* Makefile.in (removenullpaths): Remove adjacent null paths.
[emacs.git] / autogen / configure
blobce15955a483bb87698865ac8d8a00f6b4b61c335
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_strtoull_FALSE
618 gl_GNULIB_ENABLED_strtoull_TRUE
619 gl_GNULIB_ENABLED_strtoll_FALSE
620 gl_GNULIB_ENABLED_strtoll_TRUE
621 gl_GNULIB_ENABLED_stat_FALSE
622 gl_GNULIB_ENABLED_stat_TRUE
623 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
624 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
625 gl_GNULIB_ENABLED_pathmax_FALSE
626 gl_GNULIB_ENABLED_pathmax_TRUE
627 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
628 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
629 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
630 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
631 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
632 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
633 gl_GNULIB_ENABLED_getgroups_FALSE
634 gl_GNULIB_ENABLED_getgroups_TRUE
635 gl_GNULIB_ENABLED_getdtablesize_FALSE
636 gl_GNULIB_ENABLED_getdtablesize_TRUE
637 gl_GNULIB_ENABLED_euidaccess_FALSE
638 gl_GNULIB_ENABLED_euidaccess_TRUE
639 gl_GNULIB_ENABLED_dosname_FALSE
640 gl_GNULIB_ENABLED_dosname_TRUE
641 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
642 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
643 LTLIBINTL
644 LIBINTL
645 LIB_EACCESS
646 WINDOWS_64_BIT_OFF_T
647 HAVE_UNISTD_H
648 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
649 NEXT_UNISTD_H
650 LIB_TIMER_TIME
651 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
652 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
653 TIME_H_DEFINES_STRUCT_TIMESPEC
654 NEXT_AS_FIRST_DIRECTIVE_TIME_H
655 NEXT_TIME_H
656 WINDOWS_64_BIT_ST_SIZE
657 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
658 NEXT_SYS_STAT_H
659 NEXT_AS_FIRST_DIRECTIVE_STRING_H
660 NEXT_STRING_H
661 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
662 NEXT_STDLIB_H
663 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
664 NEXT_STDIO_H
665 REPLACE_VSPRINTF
666 REPLACE_VSNPRINTF
667 REPLACE_VPRINTF
668 REPLACE_VFPRINTF
669 REPLACE_VDPRINTF
670 REPLACE_VASPRINTF
671 REPLACE_TMPFILE
672 REPLACE_STDIO_WRITE_FUNCS
673 REPLACE_STDIO_READ_FUNCS
674 REPLACE_SPRINTF
675 REPLACE_SNPRINTF
676 REPLACE_RENAMEAT
677 REPLACE_RENAME
678 REPLACE_REMOVE
679 REPLACE_PRINTF
680 REPLACE_POPEN
681 REPLACE_PERROR
682 REPLACE_OBSTACK_PRINTF
683 REPLACE_GETLINE
684 REPLACE_GETDELIM
685 REPLACE_FTELLO
686 REPLACE_FTELL
687 REPLACE_FSEEKO
688 REPLACE_FSEEK
689 REPLACE_FREOPEN
690 REPLACE_FPURGE
691 REPLACE_FPRINTF
692 REPLACE_FOPEN
693 REPLACE_FFLUSH
694 REPLACE_FDOPEN
695 REPLACE_FCLOSE
696 REPLACE_DPRINTF
697 HAVE_VDPRINTF
698 HAVE_VASPRINTF
699 HAVE_RENAMEAT
700 HAVE_POPEN
701 HAVE_PCLOSE
702 HAVE_FTELLO
703 HAVE_FSEEKO
704 HAVE_DPRINTF
705 HAVE_DECL_VSNPRINTF
706 HAVE_DECL_SNPRINTF
707 HAVE_DECL_OBSTACK_PRINTF
708 HAVE_DECL_GETLINE
709 HAVE_DECL_GETDELIM
710 HAVE_DECL_FTELLO
711 HAVE_DECL_FSEEKO
712 HAVE_DECL_FPURGE
713 GNULIB_VSPRINTF_POSIX
714 GNULIB_VSNPRINTF
715 GNULIB_VPRINTF_POSIX
716 GNULIB_VPRINTF
717 GNULIB_VFPRINTF_POSIX
718 GNULIB_VFPRINTF
719 GNULIB_VDPRINTF
720 GNULIB_VSCANF
721 GNULIB_VFSCANF
722 GNULIB_VASPRINTF
723 GNULIB_TMPFILE
724 GNULIB_STDIO_H_SIGPIPE
725 GNULIB_STDIO_H_NONBLOCKING
726 GNULIB_SPRINTF_POSIX
727 GNULIB_SNPRINTF
728 GNULIB_SCANF
729 GNULIB_RENAMEAT
730 GNULIB_RENAME
731 GNULIB_REMOVE
732 GNULIB_PUTS
733 GNULIB_PUTCHAR
734 GNULIB_PUTC
735 GNULIB_PRINTF_POSIX
736 GNULIB_PRINTF
737 GNULIB_POPEN
738 GNULIB_PERROR
739 GNULIB_PCLOSE
740 GNULIB_OBSTACK_PRINTF_POSIX
741 GNULIB_OBSTACK_PRINTF
742 GNULIB_GETLINE
743 GNULIB_GETDELIM
744 GNULIB_GETCHAR
745 GNULIB_GETC
746 GNULIB_FWRITE
747 GNULIB_FTELLO
748 GNULIB_FTELL
749 GNULIB_FSEEKO
750 GNULIB_FSEEK
751 GNULIB_FSCANF
752 GNULIB_FREOPEN
753 GNULIB_FREAD
754 GNULIB_FPUTS
755 GNULIB_FPUTC
756 GNULIB_FPURGE
757 GNULIB_FPRINTF_POSIX
758 GNULIB_FPRINTF
759 GNULIB_FOPEN
760 GNULIB_FGETS
761 GNULIB_FGETC
762 GNULIB_FFLUSH
763 GNULIB_FDOPEN
764 GNULIB_FCLOSE
765 GNULIB_DPRINTF
766 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
767 NEXT_STDDEF_H
768 GL_GENERATE_STDDEF_H_FALSE
769 GL_GENERATE_STDDEF_H_TRUE
770 STDDEF_H
771 HAVE_WCHAR_T
772 REPLACE_NULL
773 HAVE__BOOL
774 GL_GENERATE_STDBOOL_H_FALSE
775 GL_GENERATE_STDBOOL_H_TRUE
776 STDBOOL_H
777 GL_GENERATE_STDARG_H_FALSE
778 GL_GENERATE_STDARG_H_TRUE
779 STDARG_H
780 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
781 NEXT_STDARG_H
782 GL_GENERATE_STDALIGN_H_FALSE
783 GL_GENERATE_STDALIGN_H_TRUE
784 STDALIGN_H
785 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
786 NEXT_SIGNAL_H
787 USE_ACL
788 LIB_ACL
789 LIB_PTHREAD_SIGMASK
790 REPLACE_RAISE
791 REPLACE_PTHREAD_SIGMASK
792 HAVE_SIGHANDLER_T
793 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
794 HAVE_STRUCT_SIGACTION_SA_SIGACTION
795 HAVE_SIGACTION
796 HAVE_SIGINFO_T
797 HAVE_SIGSET_T
798 HAVE_RAISE
799 HAVE_PTHREAD_SIGMASK
800 HAVE_POSIX_SIGNALBLOCKING
801 GNULIB_SIGACTION
802 GNULIB_SIGPROCMASK
803 GNULIB_SIGNAL_H_SIGPIPE
804 GNULIB_RAISE
805 GNULIB_PTHREAD_SIGMASK
806 HAVE_SYS_SELECT_H
807 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
808 NEXT_SYS_SELECT_H
809 REPLACE_SELECT
810 REPLACE_PSELECT
811 HAVE_PSELECT
812 GNULIB_SELECT
813 GNULIB_PSELECT
814 REPLACE_TIMEGM
815 REPLACE_NANOSLEEP
816 REPLACE_MKTIME
817 REPLACE_LOCALTIME_R
818 HAVE_TIMEGM
819 HAVE_STRPTIME
820 HAVE_NANOSLEEP
821 HAVE_DECL_LOCALTIME_R
822 GNULIB_TIME_R
823 GNULIB_TIMEGM
824 GNULIB_STRPTIME
825 GNULIB_NANOSLEEP
826 GNULIB_MKTIME
827 UNDEFINE_STRTOK_R
828 REPLACE_STRTOK_R
829 REPLACE_STRSIGNAL
830 REPLACE_STRNLEN
831 REPLACE_STRNDUP
832 REPLACE_STRNCAT
833 REPLACE_STRERROR_R
834 REPLACE_STRERROR
835 REPLACE_STRCHRNUL
836 REPLACE_STRCASESTR
837 REPLACE_STRSTR
838 REPLACE_STRDUP
839 REPLACE_STPNCPY
840 REPLACE_MEMMEM
841 REPLACE_MEMCHR
842 HAVE_STRVERSCMP
843 HAVE_DECL_STRSIGNAL
844 HAVE_DECL_STRERROR_R
845 HAVE_DECL_STRTOK_R
846 HAVE_STRCASESTR
847 HAVE_STRSEP
848 HAVE_STRPBRK
849 HAVE_DECL_STRNLEN
850 HAVE_DECL_STRNDUP
851 HAVE_DECL_STRDUP
852 HAVE_STRCHRNUL
853 HAVE_STPNCPY
854 HAVE_STPCPY
855 HAVE_RAWMEMCHR
856 HAVE_DECL_MEMRCHR
857 HAVE_MEMPCPY
858 HAVE_DECL_MEMMEM
859 HAVE_MEMCHR
860 HAVE_FFSLL
861 HAVE_FFSL
862 HAVE_MBSLEN
863 GNULIB_STRVERSCMP
864 GNULIB_STRSIGNAL
865 GNULIB_STRERROR_R
866 GNULIB_STRERROR
867 GNULIB_MBSTOK_R
868 GNULIB_MBSSEP
869 GNULIB_MBSSPN
870 GNULIB_MBSPBRK
871 GNULIB_MBSCSPN
872 GNULIB_MBSCASESTR
873 GNULIB_MBSPCASECMP
874 GNULIB_MBSNCASECMP
875 GNULIB_MBSCASECMP
876 GNULIB_MBSSTR
877 GNULIB_MBSRCHR
878 GNULIB_MBSCHR
879 GNULIB_MBSNLEN
880 GNULIB_MBSLEN
881 GNULIB_STRTOK_R
882 GNULIB_STRCASESTR
883 GNULIB_STRSTR
884 GNULIB_STRSEP
885 GNULIB_STRPBRK
886 GNULIB_STRNLEN
887 GNULIB_STRNDUP
888 GNULIB_STRNCAT
889 GNULIB_STRDUP
890 GNULIB_STRCHRNUL
891 GNULIB_STPNCPY
892 GNULIB_STPCPY
893 GNULIB_RAWMEMCHR
894 GNULIB_MEMRCHR
895 GNULIB_MEMPCPY
896 GNULIB_MEMMEM
897 GNULIB_MEMCHR
898 GNULIB_FFSLL
899 GNULIB_FFSL
900 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
901 NEXT_INTTYPES_H
902 UINT64_MAX_EQ_ULONG_MAX
903 UINT32_MAX_LT_UINTMAX_MAX
904 PRIPTR_PREFIX
905 PRI_MACROS_BROKEN
906 INT64_MAX_EQ_LONG_MAX
907 INT32_MAX_LT_INTMAX_MAX
908 REPLACE_STRTOIMAX
909 HAVE_DECL_STRTOUMAX
910 HAVE_DECL_STRTOIMAX
911 HAVE_DECL_IMAXDIV
912 HAVE_DECL_IMAXABS
913 GNULIB_STRTOUMAX
914 GNULIB_STRTOIMAX
915 GNULIB_IMAXDIV
916 GNULIB_IMAXABS
917 GL_GENERATE_STDINT_H_FALSE
918 GL_GENERATE_STDINT_H_TRUE
919 STDINT_H
920 WINT_T_SUFFIX
921 WCHAR_T_SUFFIX
922 SIG_ATOMIC_T_SUFFIX
923 SIZE_T_SUFFIX
924 PTRDIFF_T_SUFFIX
925 HAVE_SIGNED_WINT_T
926 HAVE_SIGNED_WCHAR_T
927 HAVE_SIGNED_SIG_ATOMIC_T
928 BITSIZEOF_WINT_T
929 BITSIZEOF_WCHAR_T
930 BITSIZEOF_SIG_ATOMIC_T
931 BITSIZEOF_SIZE_T
932 BITSIZEOF_PTRDIFF_T
933 APPLE_UNIVERSAL_BUILD
934 HAVE_SYS_BITYPES_H
935 HAVE_SYS_INTTYPES_H
936 HAVE_STDINT_H
937 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
938 NEXT_STDINT_H
939 HAVE_SYS_TYPES_H
940 HAVE_INTTYPES_H
941 HAVE_WCHAR_H
942 HAVE_UNSIGNED_LONG_LONG_INT
943 HAVE_LONG_LONG_INT
944 HAVE_WINSOCK2_H
945 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
946 NEXT_SYS_TIME_H
947 REPLACE_STRUCT_TIMEVAL
948 REPLACE_GETTIMEOFDAY
949 HAVE_SYS_TIME_H
950 HAVE_STRUCT_TIMEVAL
951 HAVE_GETTIMEOFDAY
952 GNULIB_GETTIMEOFDAY
953 GNULIB_GL_UNISTD_H_GETOPT
954 GETOPT_H
955 HAVE_GETOPT_H
956 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
957 NEXT_GETOPT_H
958 GETLOADAVG_LIBS
959 REPLACE_WCTOMB
960 REPLACE_UNSETENV
961 REPLACE_STRTOD
962 REPLACE_SETENV
963 REPLACE_REALPATH
964 REPLACE_REALLOC
965 REPLACE_RANDOM_R
966 REPLACE_PUTENV
967 REPLACE_PTSNAME_R
968 REPLACE_PTSNAME
969 REPLACE_MKSTEMP
970 REPLACE_MBTOWC
971 REPLACE_MALLOC
972 REPLACE_CANONICALIZE_FILE_NAME
973 REPLACE_CALLOC
974 HAVE_DECL_UNSETENV
975 HAVE_UNLOCKPT
976 HAVE_SYS_LOADAVG_H
977 HAVE_STRUCT_RANDOM_DATA
978 HAVE_STRTOULL
979 HAVE_STRTOLL
980 HAVE_STRTOD
981 HAVE_DECL_SETENV
982 HAVE_SETENV
983 HAVE_SECURE_GETENV
984 HAVE_RPMATCH
985 HAVE_REALPATH
986 HAVE_RANDOM_R
987 HAVE_RANDOM_H
988 HAVE_RANDOM
989 HAVE_PTSNAME_R
990 HAVE_PTSNAME
991 HAVE_POSIX_OPENPT
992 HAVE_MKSTEMPS
993 HAVE_MKSTEMP
994 HAVE_MKOSTEMPS
995 HAVE_MKOSTEMP
996 HAVE_MKDTEMP
997 HAVE_GRANTPT
998 HAVE_GETSUBOPT
999 HAVE_DECL_GETLOADAVG
1000 HAVE_CANONICALIZE_FILE_NAME
1001 HAVE_ATOLL
1002 HAVE__EXIT
1003 GNULIB_WCTOMB
1004 GNULIB_UNSETENV
1005 GNULIB_UNLOCKPT
1006 GNULIB_SYSTEM_POSIX
1007 GNULIB_STRTOULL
1008 GNULIB_STRTOLL
1009 GNULIB_STRTOD
1010 GNULIB_SETENV
1011 GNULIB_SECURE_GETENV
1012 GNULIB_RPMATCH
1013 GNULIB_REALPATH
1014 GNULIB_REALLOC_POSIX
1015 GNULIB_RANDOM_R
1016 GNULIB_RANDOM
1017 GNULIB_PUTENV
1018 GNULIB_PTSNAME_R
1019 GNULIB_PTSNAME
1020 GNULIB_POSIX_OPENPT
1021 GNULIB_MKSTEMPS
1022 GNULIB_MKSTEMP
1023 GNULIB_MKOSTEMPS
1024 GNULIB_MKOSTEMP
1025 GNULIB_MKDTEMP
1026 GNULIB_MBTOWC
1027 GNULIB_MALLOC_POSIX
1028 GNULIB_GRANTPT
1029 GNULIB_GETSUBOPT
1030 GNULIB_GETLOADAVG
1031 GNULIB_CANONICALIZE_FILE_NAME
1032 GNULIB_CALLOC_POSIX
1033 GNULIB_ATOLL
1034 GNULIB__EXIT
1035 REPLACE_UTIMENSAT
1036 REPLACE_STAT
1037 REPLACE_MKNOD
1038 REPLACE_MKFIFO
1039 REPLACE_MKDIR
1040 REPLACE_LSTAT
1041 REPLACE_FUTIMENS
1042 REPLACE_FSTATAT
1043 REPLACE_FSTAT
1044 HAVE_UTIMENSAT
1045 HAVE_MKNODAT
1046 HAVE_MKNOD
1047 HAVE_MKFIFOAT
1048 HAVE_MKFIFO
1049 HAVE_MKDIRAT
1050 HAVE_LSTAT
1051 HAVE_LCHMOD
1052 HAVE_FUTIMENS
1053 HAVE_FSTATAT
1054 HAVE_FCHMODAT
1055 GNULIB_UTIMENSAT
1056 GNULIB_STAT
1057 GNULIB_MKNODAT
1058 GNULIB_MKNOD
1059 GNULIB_MKFIFOAT
1060 GNULIB_MKFIFO
1061 GNULIB_MKDIRAT
1062 GNULIB_LSTAT
1063 GNULIB_LCHMOD
1064 GNULIB_FUTIMENS
1065 GNULIB_FSTATAT
1066 GNULIB_FSTAT
1067 GNULIB_FCHMODAT
1068 LIB_FDATASYNC
1069 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1070 NEXT_FCNTL_H
1071 REPLACE_OPENAT
1072 REPLACE_OPEN
1073 REPLACE_FCNTL
1074 HAVE_OPENAT
1075 HAVE_FCNTL
1076 GNULIB_OPENAT
1077 GNULIB_OPEN
1078 GNULIB_NONBLOCKING
1079 GNULIB_FCNTL
1080 GL_GENERATE_EXECINFO_H_FALSE
1081 GL_GENERATE_EXECINFO_H_TRUE
1082 LIB_EXECINFO
1083 EXECINFO_H
1084 EOVERFLOW_VALUE
1085 EOVERFLOW_HIDDEN
1086 ENOLINK_VALUE
1087 ENOLINK_HIDDEN
1088 EMULTIHOP_VALUE
1089 EMULTIHOP_HIDDEN
1090 GL_GENERATE_ERRNO_H_FALSE
1091 GL_GENERATE_ERRNO_H_TRUE
1092 ERRNO_H
1093 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1094 NEXT_ERRNO_H
1095 HAVE_DIRENT_H
1096 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1097 NEXT_DIRENT_H
1098 PRAGMA_COLUMNS
1099 PRAGMA_SYSTEM_HEADER
1100 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1101 INCLUDE_NEXT
1102 REPLACE_FDOPENDIR
1103 REPLACE_DIRFD
1104 REPLACE_CLOSEDIR
1105 REPLACE_OPENDIR
1106 HAVE_ALPHASORT
1107 HAVE_SCANDIR
1108 HAVE_FDOPENDIR
1109 HAVE_DECL_FDOPENDIR
1110 HAVE_DECL_DIRFD
1111 HAVE_CLOSEDIR
1112 HAVE_REWINDDIR
1113 HAVE_READDIR
1114 HAVE_OPENDIR
1115 GNULIB_ALPHASORT
1116 GNULIB_SCANDIR
1117 GNULIB_FDOPENDIR
1118 GNULIB_DIRFD
1119 GNULIB_CLOSEDIR
1120 GNULIB_REWINDDIR
1121 GNULIB_READDIR
1122 GNULIB_OPENDIR
1123 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1124 UNISTD_H_HAVE_WINSOCK2_H
1125 REPLACE_WRITE
1126 REPLACE_USLEEP
1127 REPLACE_UNLINKAT
1128 REPLACE_UNLINK
1129 REPLACE_TTYNAME_R
1130 REPLACE_SYMLINK
1131 REPLACE_SLEEP
1132 REPLACE_RMDIR
1133 REPLACE_READLINK
1134 REPLACE_READ
1135 REPLACE_PWRITE
1136 REPLACE_PREAD
1137 REPLACE_LSEEK
1138 REPLACE_LINKAT
1139 REPLACE_LINK
1140 REPLACE_LCHOWN
1141 REPLACE_ISATTY
1142 REPLACE_GETPAGESIZE
1143 REPLACE_GETGROUPS
1144 REPLACE_GETLOGIN_R
1145 REPLACE_GETDOMAINNAME
1146 REPLACE_GETCWD
1147 REPLACE_FTRUNCATE
1148 REPLACE_FCHOWNAT
1149 REPLACE_DUP2
1150 REPLACE_DUP
1151 REPLACE_CLOSE
1152 REPLACE_CHOWN
1153 HAVE_SYS_PARAM_H
1154 HAVE_OS_H
1155 HAVE_DECL_TTYNAME_R
1156 HAVE_DECL_SETHOSTNAME
1157 HAVE_DECL_GETUSERSHELL
1158 HAVE_DECL_GETPAGESIZE
1159 HAVE_DECL_GETLOGIN_R
1160 HAVE_DECL_GETDOMAINNAME
1161 HAVE_DECL_FDATASYNC
1162 HAVE_DECL_FCHDIR
1163 HAVE_DECL_ENVIRON
1164 HAVE_USLEEP
1165 HAVE_UNLINKAT
1166 HAVE_SYMLINKAT
1167 HAVE_SYMLINK
1168 HAVE_SLEEP
1169 HAVE_SETHOSTNAME
1170 HAVE_READLINKAT
1171 HAVE_READLINK
1172 HAVE_PWRITE
1173 HAVE_PREAD
1174 HAVE_PIPE2
1175 HAVE_PIPE
1176 HAVE_LINKAT
1177 HAVE_LINK
1178 HAVE_LCHOWN
1179 HAVE_GROUP_MEMBER
1180 HAVE_GETPAGESIZE
1181 HAVE_GETLOGIN
1182 HAVE_GETHOSTNAME
1183 HAVE_GETGROUPS
1184 HAVE_GETDTABLESIZE
1185 HAVE_FTRUNCATE
1186 HAVE_FSYNC
1187 HAVE_FDATASYNC
1188 HAVE_FCHOWNAT
1189 HAVE_FCHDIR
1190 HAVE_FACCESSAT
1191 HAVE_EUIDACCESS
1192 HAVE_DUP3
1193 HAVE_DUP2
1194 HAVE_CHOWN
1195 GNULIB_WRITE
1196 GNULIB_USLEEP
1197 GNULIB_UNLINKAT
1198 GNULIB_UNLINK
1199 GNULIB_UNISTD_H_SIGPIPE
1200 GNULIB_UNISTD_H_NONBLOCKING
1201 GNULIB_TTYNAME_R
1202 GNULIB_SYMLINKAT
1203 GNULIB_SYMLINK
1204 GNULIB_SLEEP
1205 GNULIB_SETHOSTNAME
1206 GNULIB_RMDIR
1207 GNULIB_READLINKAT
1208 GNULIB_READLINK
1209 GNULIB_READ
1210 GNULIB_PWRITE
1211 GNULIB_PREAD
1212 GNULIB_PIPE2
1213 GNULIB_PIPE
1214 GNULIB_LSEEK
1215 GNULIB_LINKAT
1216 GNULIB_LINK
1217 GNULIB_LCHOWN
1218 GNULIB_ISATTY
1219 GNULIB_GROUP_MEMBER
1220 GNULIB_GETUSERSHELL
1221 GNULIB_GETPAGESIZE
1222 GNULIB_GETLOGIN_R
1223 GNULIB_GETLOGIN
1224 GNULIB_GETHOSTNAME
1225 GNULIB_GETGROUPS
1226 GNULIB_GETDTABLESIZE
1227 GNULIB_GETDOMAINNAME
1228 GNULIB_GETCWD
1229 GNULIB_FTRUNCATE
1230 GNULIB_FSYNC
1231 GNULIB_FDATASYNC
1232 GNULIB_FCHOWNAT
1233 GNULIB_FCHDIR
1234 GNULIB_FACCESSAT
1235 GNULIB_EUIDACCESS
1236 GNULIB_ENVIRON
1237 GNULIB_DUP3
1238 GNULIB_DUP2
1239 GNULIB_DUP
1240 GNULIB_CLOSE
1241 GNULIB_CHOWN
1242 GNULIB_CHDIR
1243 LIB_CLOCK_GETTIME
1244 GL_GENERATE_ALLOCA_H_FALSE
1245 GL_GENERATE_ALLOCA_H_TRUE
1246 ALLOCA_H
1247 ALLOCA
1248 GL_COND_LIBTOOL_FALSE
1249 GL_COND_LIBTOOL_TRUE
1250 POST_ALLOC_OBJ
1251 PRE_ALLOC_OBJ
1252 CYGWIN_OBJ
1253 RALLOC_OBJ
1254 OLDXMENU_DEPS
1255 LIBX_OTHER
1256 LIBXMENU
1257 OLDXMENU
1258 OLDXMENU_TARGET
1259 LIBXT_OTHER
1260 TOOLKIT_LIBW
1261 WIDGET_OBJ
1262 XOBJ
1263 XMENU_OBJ
1264 FONT_OBJ
1265 OTHER_FILES
1266 GNU_OBJC_CFLAGS
1267 ns_appsrc
1268 ns_appresdir
1269 ns_appbindir
1270 ns_appdir
1271 X_TOOLKIT_TYPE
1272 GNUSTEP_CFLAGS
1273 C_SWITCH_X_SITE
1274 LD_SWITCH_X_SITE
1275 gameuser
1276 gamedir
1277 bitmapdir
1278 archlibdir
1279 etcdir
1280 x_default_search_path
1281 lisppath
1282 locallisppath
1283 standardlisppath
1284 leimdir
1285 lispdir
1286 srcdir
1287 canonical
1288 configuration
1289 version
1290 copyright
1291 XGSELOBJ
1292 KRB4LIB
1293 DESLIB
1294 KRB5LIB
1295 CRYPTOLIB
1296 COM_ERRLIB
1297 LIBRESOLV
1298 LIBHESIOD
1299 TERMCAP_OBJ
1300 LIBS_TERMCAP
1301 BLESSMAIL_TARGET
1302 LIBS_MAIL
1303 liblockfile
1304 LIBXML2_LIBS
1305 LIBXML2_CFLAGS
1306 XINERAMA_LIBS
1307 XINERAMA_CFLAGS
1308 XRANDR_LIBS
1309 XRANDR_CFLAGS
1310 LIBXSM
1311 LIBGPM
1312 LIBGIF
1313 LIBTIFF
1314 LIBPNG
1315 LIBJPEG
1316 LIBXPM
1317 M17N_FLT_LIBS
1318 M17N_FLT_CFLAGS
1319 LIBOTF_LIBS
1320 LIBOTF_CFLAGS
1321 FREETYPE_LIBS
1322 FREETYPE_CFLAGS
1323 XFT_LIBS
1324 XFT_CFLAGS
1325 FONTCONFIG_LIBS
1326 FONTCONFIG_CFLAGS
1327 LIBXMU
1328 LIBXTR6
1329 NOTIFY_OBJ
1330 GFILENOTIFY_LIBS
1331 GFILENOTIFY_CFLAGS
1332 LIBGNUTLS_LIBS
1333 LIBGNUTLS_CFLAGS
1334 LIBSELINUX_LIBS
1335 SETTINGS_LIBS
1336 SETTINGS_CFLAGS
1337 GOBJECT_LIBS
1338 GOBJECT_CFLAGS
1339 GCONF_LIBS
1340 GCONF_CFLAGS
1341 GSETTINGS_LIBS
1342 GSETTINGS_CFLAGS
1343 DBUS_OBJ
1344 DBUS_LIBS
1345 DBUS_CFLAGS
1346 GTK_OBJ
1347 GTK_LIBS
1348 GTK_CFLAGS
1349 IMAGEMAGICK_LIBS
1350 IMAGEMAGICK_CFLAGS
1351 RSVG_LIBS
1352 RSVG_CFLAGS
1353 LIB_PTHREAD
1354 VMLIMIT_OBJ
1355 GMALLOC_OBJ
1356 HAVE_XSERVER
1357 XARGS_LIMIT
1358 NTLIB
1359 LIB_WSOCK32
1360 LIBS_ECLIENT
1361 CM_OBJ
1362 NTDIR
1363 FIRSTFILE_OBJ
1364 W32_RES_LINK
1365 CLIENTW
1366 CLIENTRES
1367 EMACS_MANIFEST
1368 EMACSRES
1369 W32_LIBS
1370 W32_OBJ
1371 WINDRES
1372 NS_OBJC_OBJ
1373 NS_OBJ
1374 ns_self_contained
1375 INSTALL_ARCH_INDEP_EXTRA
1376 LIBS_GNUSTEP
1377 LD_SWITCH_X_SITE_RPATH
1378 XMKMF
1379 DEPFLAGS
1380 MKDEPDIR
1381 CFLAGS_SOUND
1382 ALSA_LIBS
1383 ALSA_CFLAGS
1384 LIBSOUND
1385 PKG_CONFIG
1386 LIB_MATH
1387 LIBS_SYSTEM
1388 C_SWITCH_SYSTEM
1389 UNEXEC_OBJ
1390 C_SWITCH_MACHINE
1391 LD_SWITCH_SYSTEM
1392 CANNOT_DUMP
1393 INFO_OPTS
1394 INFO_EXT
1395 HAVE_MAKEINFO
1396 PAXCTL
1397 GZIP_PROG
1398 INSTALL_INFO
1399 LN_S_FILEONLY
1400 GNULIB_WARN_CFLAGS
1401 WARN_CFLAGS
1402 WERROR_CFLAGS
1403 RANLIB
1404 ARFLAGS
1406 EGREP
1407 GREP
1409 BUILDING_FOR_WINDOWSNT_FALSE
1410 BUILDING_FOR_WINDOWSNT_TRUE
1411 am__fastdepCC_FALSE
1412 am__fastdepCC_TRUE
1413 CCDEPMODE
1414 AMDEPBACKSLASH
1415 AMDEP_FALSE
1416 AMDEP_TRUE
1417 am__quote
1418 am__include
1419 DEPDIR
1420 OBJEXT
1421 EXEEXT
1422 ac_ct_CC
1423 CPPFLAGS
1424 LDFLAGS
1425 CFLAGS
1427 host_os
1428 host_vendor
1429 host_cpu
1430 host
1431 build_os
1432 build_vendor
1433 build_cpu
1434 build
1435 PROFILING_CFLAGS
1436 GZIP_INFO
1437 cache_file
1438 am__untar
1439 am__tar
1440 AMTAR
1441 am__leading_dot
1442 SET_MAKE
1444 mkdir_p
1445 MKDIR_P
1446 INSTALL_STRIP_PROGRAM
1447 STRIP
1448 install_sh
1449 MAKEINFO
1450 AUTOHEADER
1451 AUTOMAKE
1452 AUTOCONF
1453 ACLOCAL
1454 VERSION
1455 PACKAGE
1456 CYGPATH_W
1457 am__isrc
1458 INSTALL_DATA
1459 INSTALL_SCRIPT
1460 INSTALL_PROGRAM
1461 target_alias
1462 host_alias
1463 build_alias
1464 LIBS
1465 ECHO_T
1466 ECHO_N
1467 ECHO_C
1468 DEFS
1469 mandir
1470 localedir
1471 libdir
1472 psdir
1473 pdfdir
1474 dvidir
1475 htmldir
1476 infodir
1477 docdir
1478 oldincludedir
1479 includedir
1480 localstatedir
1481 sharedstatedir
1482 sysconfdir
1483 datadir
1484 datarootdir
1485 libexecdir
1486 sbindir
1487 bindir
1488 program_transform_name
1489 prefix
1490 exec_prefix
1491 PACKAGE_URL
1492 PACKAGE_BUGREPORT
1493 PACKAGE_STRING
1494 PACKAGE_VERSION
1495 PACKAGE_TARNAME
1496 PACKAGE_NAME
1497 PATH_SEPARATOR
1498 SHELL'
1499 ac_subst_files='deps_frag
1500 lisp_frag'
1501 ac_user_opts='
1502 enable_option_checking
1503 with_all
1504 with_pop
1505 with_kerberos
1506 with_kerberos5
1507 with_hesiod
1508 with_mmdf
1509 with_mail_unlink
1510 with_mailhost
1511 with_sound
1512 with_x_toolkit
1513 with_wide_int
1514 with_xpm
1515 with_jpeg
1516 with_tiff
1517 with_gif
1518 with_png
1519 with_rsvg
1520 with_xml2
1521 with_imagemagick
1522 with_xft
1523 with_libotf
1524 with_m17n_flt
1525 with_toolkit_scroll_bars
1526 with_xaw3d
1527 with_xim
1528 with_ns
1529 with_w32
1530 with_gpm
1531 with_dbus
1532 with_gconf
1533 with_gsettings
1534 with_selinux
1535 with_gnutls
1536 with_file_notification
1537 with_makeinfo
1538 with_compress_info
1539 with_pkg_config_prog
1540 with_gameuser
1541 with_gnustep_conf
1542 enable_ns_self_contained
1543 enable_locallisppath
1544 enable_checking
1545 enable_check_lisp_object_type
1546 enable_profiling
1547 enable_autodepend
1548 enable_gtk_deprecation_warnings
1549 enable_dependency_tracking
1550 enable_largefile
1551 enable_gcc_warnings
1552 enable_link_time_optimization
1553 with_x
1554 enable_acl
1556 ac_precious_vars='build_alias
1557 host_alias
1558 target_alias
1560 CFLAGS
1561 LDFLAGS
1562 LIBS
1563 CPPFLAGS
1565 XMKMF'
1568 # Initialize some variables set by options.
1569 ac_init_help=
1570 ac_init_version=false
1571 ac_unrecognized_opts=
1572 ac_unrecognized_sep=
1573 # The variables have the same names as the options, with
1574 # dashes changed to underlines.
1575 cache_file=/dev/null
1576 exec_prefix=NONE
1577 no_create=
1578 no_recursion=
1579 prefix=NONE
1580 program_prefix=NONE
1581 program_suffix=NONE
1582 program_transform_name=s,x,x,
1583 silent=
1584 site=
1585 srcdir=
1586 verbose=
1587 x_includes=NONE
1588 x_libraries=NONE
1590 # Installation directory options.
1591 # These are left unexpanded so users can "make install exec_prefix=/foo"
1592 # and all the variables that are supposed to be based on exec_prefix
1593 # by default will actually change.
1594 # Use braces instead of parens because sh, perl, etc. also accept them.
1595 # (The list follows the same order as the GNU Coding Standards.)
1596 bindir='${exec_prefix}/bin'
1597 sbindir='${exec_prefix}/sbin'
1598 libexecdir='${exec_prefix}/libexec'
1599 datarootdir='${prefix}/share'
1600 datadir='${datarootdir}'
1601 sysconfdir='${prefix}/etc'
1602 sharedstatedir='${prefix}/com'
1603 localstatedir='${prefix}/var'
1604 includedir='${prefix}/include'
1605 oldincludedir='/usr/include'
1606 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1607 infodir='${datarootdir}/info'
1608 htmldir='${docdir}'
1609 dvidir='${docdir}'
1610 pdfdir='${docdir}'
1611 psdir='${docdir}'
1612 libdir='${exec_prefix}/lib'
1613 localedir='${datarootdir}/locale'
1614 mandir='${datarootdir}/man'
1616 ac_prev=
1617 ac_dashdash=
1618 for ac_option
1620 # If the previous option needs an argument, assign it.
1621 if test -n "$ac_prev"; then
1622 eval $ac_prev=\$ac_option
1623 ac_prev=
1624 continue
1627 case $ac_option in
1628 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1629 *) ac_optarg=yes ;;
1630 esac
1632 # Accept the important Cygnus configure options, so we can diagnose typos.
1634 case $ac_dashdash$ac_option in
1636 ac_dashdash=yes ;;
1638 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1639 ac_prev=bindir ;;
1640 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1641 bindir=$ac_optarg ;;
1643 -build | --build | --buil | --bui | --bu)
1644 ac_prev=build_alias ;;
1645 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1646 build_alias=$ac_optarg ;;
1648 -cache-file | --cache-file | --cache-fil | --cache-fi \
1649 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1650 ac_prev=cache_file ;;
1651 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1652 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1653 cache_file=$ac_optarg ;;
1655 --config-cache | -C)
1656 cache_file=config.cache ;;
1658 -datadir | --datadir | --datadi | --datad)
1659 ac_prev=datadir ;;
1660 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1661 datadir=$ac_optarg ;;
1663 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1664 | --dataroo | --dataro | --datar)
1665 ac_prev=datarootdir ;;
1666 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1667 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1668 datarootdir=$ac_optarg ;;
1670 -disable-* | --disable-*)
1671 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1672 # Reject names that are not valid shell variable names.
1673 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1674 as_fn_error "invalid feature name: $ac_useropt"
1675 ac_useropt_orig=$ac_useropt
1676 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1677 case $ac_user_opts in
1679 "enable_$ac_useropt"
1680 "*) ;;
1681 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1682 ac_unrecognized_sep=', ';;
1683 esac
1684 eval enable_$ac_useropt=no ;;
1686 -docdir | --docdir | --docdi | --doc | --do)
1687 ac_prev=docdir ;;
1688 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1689 docdir=$ac_optarg ;;
1691 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1692 ac_prev=dvidir ;;
1693 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1694 dvidir=$ac_optarg ;;
1696 -enable-* | --enable-*)
1697 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1698 # Reject names that are not valid shell variable names.
1699 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1700 as_fn_error "invalid feature name: $ac_useropt"
1701 ac_useropt_orig=$ac_useropt
1702 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1703 case $ac_user_opts in
1705 "enable_$ac_useropt"
1706 "*) ;;
1707 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1708 ac_unrecognized_sep=', ';;
1709 esac
1710 eval enable_$ac_useropt=\$ac_optarg ;;
1712 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1713 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1714 | --exec | --exe | --ex)
1715 ac_prev=exec_prefix ;;
1716 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1717 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1718 | --exec=* | --exe=* | --ex=*)
1719 exec_prefix=$ac_optarg ;;
1721 -gas | --gas | --ga | --g)
1722 # Obsolete; use --with-gas.
1723 with_gas=yes ;;
1725 -help | --help | --hel | --he | -h)
1726 ac_init_help=long ;;
1727 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1728 ac_init_help=recursive ;;
1729 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1730 ac_init_help=short ;;
1732 -host | --host | --hos | --ho)
1733 ac_prev=host_alias ;;
1734 -host=* | --host=* | --hos=* | --ho=*)
1735 host_alias=$ac_optarg ;;
1737 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1738 ac_prev=htmldir ;;
1739 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1740 | --ht=*)
1741 htmldir=$ac_optarg ;;
1743 -includedir | --includedir | --includedi | --included | --include \
1744 | --includ | --inclu | --incl | --inc)
1745 ac_prev=includedir ;;
1746 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1747 | --includ=* | --inclu=* | --incl=* | --inc=*)
1748 includedir=$ac_optarg ;;
1750 -infodir | --infodir | --infodi | --infod | --info | --inf)
1751 ac_prev=infodir ;;
1752 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1753 infodir=$ac_optarg ;;
1755 -libdir | --libdir | --libdi | --libd)
1756 ac_prev=libdir ;;
1757 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1758 libdir=$ac_optarg ;;
1760 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1761 | --libexe | --libex | --libe)
1762 ac_prev=libexecdir ;;
1763 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1764 | --libexe=* | --libex=* | --libe=*)
1765 libexecdir=$ac_optarg ;;
1767 -localedir | --localedir | --localedi | --localed | --locale)
1768 ac_prev=localedir ;;
1769 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1770 localedir=$ac_optarg ;;
1772 -localstatedir | --localstatedir | --localstatedi | --localstated \
1773 | --localstate | --localstat | --localsta | --localst | --locals)
1774 ac_prev=localstatedir ;;
1775 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1776 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1777 localstatedir=$ac_optarg ;;
1779 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1780 ac_prev=mandir ;;
1781 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1782 mandir=$ac_optarg ;;
1784 -nfp | --nfp | --nf)
1785 # Obsolete; use --without-fp.
1786 with_fp=no ;;
1788 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1789 | --no-cr | --no-c | -n)
1790 no_create=yes ;;
1792 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1793 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1794 no_recursion=yes ;;
1796 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1797 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1798 | --oldin | --oldi | --old | --ol | --o)
1799 ac_prev=oldincludedir ;;
1800 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1801 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1802 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1803 oldincludedir=$ac_optarg ;;
1805 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1806 ac_prev=prefix ;;
1807 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1808 prefix=$ac_optarg ;;
1810 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1811 | --program-pre | --program-pr | --program-p)
1812 ac_prev=program_prefix ;;
1813 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1814 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1815 program_prefix=$ac_optarg ;;
1817 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1818 | --program-suf | --program-su | --program-s)
1819 ac_prev=program_suffix ;;
1820 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1821 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1822 program_suffix=$ac_optarg ;;
1824 -program-transform-name | --program-transform-name \
1825 | --program-transform-nam | --program-transform-na \
1826 | --program-transform-n | --program-transform- \
1827 | --program-transform | --program-transfor \
1828 | --program-transfo | --program-transf \
1829 | --program-trans | --program-tran \
1830 | --progr-tra | --program-tr | --program-t)
1831 ac_prev=program_transform_name ;;
1832 -program-transform-name=* | --program-transform-name=* \
1833 | --program-transform-nam=* | --program-transform-na=* \
1834 | --program-transform-n=* | --program-transform-=* \
1835 | --program-transform=* | --program-transfor=* \
1836 | --program-transfo=* | --program-transf=* \
1837 | --program-trans=* | --program-tran=* \
1838 | --progr-tra=* | --program-tr=* | --program-t=*)
1839 program_transform_name=$ac_optarg ;;
1841 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1842 ac_prev=pdfdir ;;
1843 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1844 pdfdir=$ac_optarg ;;
1846 -psdir | --psdir | --psdi | --psd | --ps)
1847 ac_prev=psdir ;;
1848 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1849 psdir=$ac_optarg ;;
1851 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1852 | -silent | --silent | --silen | --sile | --sil)
1853 silent=yes ;;
1855 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1856 ac_prev=sbindir ;;
1857 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1858 | --sbi=* | --sb=*)
1859 sbindir=$ac_optarg ;;
1861 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1862 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1863 | --sharedst | --shareds | --shared | --share | --shar \
1864 | --sha | --sh)
1865 ac_prev=sharedstatedir ;;
1866 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1867 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1868 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1869 | --sha=* | --sh=*)
1870 sharedstatedir=$ac_optarg ;;
1872 -site | --site | --sit)
1873 ac_prev=site ;;
1874 -site=* | --site=* | --sit=*)
1875 site=$ac_optarg ;;
1877 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1878 ac_prev=srcdir ;;
1879 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1880 srcdir=$ac_optarg ;;
1882 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1883 | --syscon | --sysco | --sysc | --sys | --sy)
1884 ac_prev=sysconfdir ;;
1885 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1886 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1887 sysconfdir=$ac_optarg ;;
1889 -target | --target | --targe | --targ | --tar | --ta | --t)
1890 ac_prev=target_alias ;;
1891 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1892 target_alias=$ac_optarg ;;
1894 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1895 verbose=yes ;;
1897 -version | --version | --versio | --versi | --vers | -V)
1898 ac_init_version=: ;;
1900 -with-* | --with-*)
1901 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1902 # Reject names that are not valid shell variable names.
1903 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1904 as_fn_error "invalid package name: $ac_useropt"
1905 ac_useropt_orig=$ac_useropt
1906 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1907 case $ac_user_opts in
1909 "with_$ac_useropt"
1910 "*) ;;
1911 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1912 ac_unrecognized_sep=', ';;
1913 esac
1914 eval with_$ac_useropt=\$ac_optarg ;;
1916 -without-* | --without-*)
1917 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1918 # Reject names that are not valid shell variable names.
1919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1920 as_fn_error "invalid package name: $ac_useropt"
1921 ac_useropt_orig=$ac_useropt
1922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1923 case $ac_user_opts in
1925 "with_$ac_useropt"
1926 "*) ;;
1927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1928 ac_unrecognized_sep=', ';;
1929 esac
1930 eval with_$ac_useropt=no ;;
1932 --x)
1933 # Obsolete; use --with-x.
1934 with_x=yes ;;
1936 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1937 | --x-incl | --x-inc | --x-in | --x-i)
1938 ac_prev=x_includes ;;
1939 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1940 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1941 x_includes=$ac_optarg ;;
1943 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1944 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1945 ac_prev=x_libraries ;;
1946 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1947 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1948 x_libraries=$ac_optarg ;;
1950 -*) as_fn_error "unrecognized option: \`$ac_option'
1951 Try \`$0 --help' for more information."
1954 *=*)
1955 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1956 # Reject names that are not valid shell variable names.
1957 case $ac_envvar in #(
1958 '' | [0-9]* | *[!_$as_cr_alnum]* )
1959 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1960 esac
1961 eval $ac_envvar=\$ac_optarg
1962 export $ac_envvar ;;
1965 # FIXME: should be removed in autoconf 3.0.
1966 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1967 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1968 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1969 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1972 esac
1973 done
1975 if test -n "$ac_prev"; then
1976 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1977 as_fn_error "missing argument to $ac_option"
1980 if test -n "$ac_unrecognized_opts"; then
1981 case $enable_option_checking in
1982 no) ;;
1983 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1984 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1985 esac
1988 # Check all directory arguments for consistency.
1989 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1990 datadir sysconfdir sharedstatedir localstatedir includedir \
1991 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1992 libdir localedir mandir
1994 eval ac_val=\$$ac_var
1995 # Remove trailing slashes.
1996 case $ac_val in
1997 */ )
1998 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1999 eval $ac_var=\$ac_val;;
2000 esac
2001 # Be sure to have absolute directory names.
2002 case $ac_val in
2003 [\\/$]* | ?:[\\/]* ) continue;;
2004 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2005 esac
2006 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2007 done
2009 # There might be people who depend on the old broken behavior: `$host'
2010 # used to hold the argument of --host etc.
2011 # FIXME: To remove some day.
2012 build=$build_alias
2013 host=$host_alias
2014 target=$target_alias
2016 # FIXME: To remove some day.
2017 if test "x$host_alias" != x; then
2018 if test "x$build_alias" = x; then
2019 cross_compiling=maybe
2020 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2021 If a cross compiler is detected then cross compile mode will be used." >&2
2022 elif test "x$build_alias" != "x$host_alias"; then
2023 cross_compiling=yes
2027 ac_tool_prefix=
2028 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2030 test "$silent" = yes && exec 6>/dev/null
2033 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2034 ac_ls_di=`ls -di .` &&
2035 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2036 as_fn_error "working directory cannot be determined"
2037 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2038 as_fn_error "pwd does not report name of working directory"
2041 # Find the source files, if location was not specified.
2042 if test -z "$srcdir"; then
2043 ac_srcdir_defaulted=yes
2044 # Try the directory containing this script, then the parent directory.
2045 ac_confdir=`$as_dirname -- "$as_myself" ||
2046 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2047 X"$as_myself" : 'X\(//\)[^/]' \| \
2048 X"$as_myself" : 'X\(//\)$' \| \
2049 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2050 $as_echo X"$as_myself" |
2051 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2052 s//\1/
2055 /^X\(\/\/\)[^/].*/{
2056 s//\1/
2059 /^X\(\/\/\)$/{
2060 s//\1/
2063 /^X\(\/\).*/{
2064 s//\1/
2067 s/.*/./; q'`
2068 srcdir=$ac_confdir
2069 if test ! -r "$srcdir/$ac_unique_file"; then
2070 srcdir=..
2072 else
2073 ac_srcdir_defaulted=no
2075 if test ! -r "$srcdir/$ac_unique_file"; then
2076 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2077 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2079 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2080 ac_abs_confdir=`(
2081 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2082 pwd)`
2083 # When building in place, set srcdir=.
2084 if test "$ac_abs_confdir" = "$ac_pwd"; then
2085 srcdir=.
2087 # Remove unnecessary trailing slashes from srcdir.
2088 # Double slashes in file names in object file debugging info
2089 # mess up M-x gdb in Emacs.
2090 case $srcdir in
2091 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2092 esac
2093 for ac_var in $ac_precious_vars; do
2094 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2095 eval ac_env_${ac_var}_value=\$${ac_var}
2096 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2097 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2098 done
2101 # Report the --help message.
2103 if test "$ac_init_help" = "long"; then
2104 # Omit some internal or obsolete options to make the list less imposing.
2105 # This message is too long to be a string in the A/UX 3.1 sh.
2106 cat <<_ACEOF
2107 \`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
2109 Usage: $0 [OPTION]... [VAR=VALUE]...
2111 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2112 VAR=VALUE. See below for descriptions of some of the useful variables.
2114 Defaults for the options are specified in brackets.
2116 Configuration:
2117 -h, --help display this help and exit
2118 --help=short display options specific to this package
2119 --help=recursive display the short help of all the included packages
2120 -V, --version display version information and exit
2121 -q, --quiet, --silent do not print \`checking...' messages
2122 --cache-file=FILE cache test results in FILE [disabled]
2123 -C, --config-cache alias for \`--cache-file=config.cache'
2124 -n, --no-create do not create output files
2125 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2127 Installation directories:
2128 --prefix=PREFIX install architecture-independent files in PREFIX
2129 [$ac_default_prefix]
2130 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2131 [PREFIX]
2133 By default, \`make install' will install all the files in
2134 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2135 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2136 for instance \`--prefix=\$HOME'.
2138 For better control, use the options below.
2140 Fine tuning of the installation directories:
2141 --bindir=DIR user executables [EPREFIX/bin]
2142 --sbindir=DIR system admin executables [EPREFIX/sbin]
2143 --libexecdir=DIR program executables [EPREFIX/libexec]
2144 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2145 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2146 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2147 --libdir=DIR object code libraries [EPREFIX/lib]
2148 --includedir=DIR C header files [PREFIX/include]
2149 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2150 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2151 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2152 --infodir=DIR info documentation [DATAROOTDIR/info]
2153 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2154 --mandir=DIR man documentation [DATAROOTDIR/man]
2155 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2156 --htmldir=DIR html documentation [DOCDIR]
2157 --dvidir=DIR dvi documentation [DOCDIR]
2158 --pdfdir=DIR pdf documentation [DOCDIR]
2159 --psdir=DIR ps documentation [DOCDIR]
2160 _ACEOF
2162 cat <<\_ACEOF
2164 Program names:
2165 --program-prefix=PREFIX prepend PREFIX to installed program names
2166 --program-suffix=SUFFIX append SUFFIX to installed program names
2167 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2169 X features:
2170 --x-includes=DIR X include files are in DIR
2171 --x-libraries=DIR X library files are in DIR
2173 System types:
2174 --build=BUILD configure for building on BUILD [guessed]
2175 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2176 _ACEOF
2179 if test -n "$ac_init_help"; then
2180 case $ac_init_help in
2181 short | recursive ) echo "Configuration of emacs 24.3.50:";;
2182 esac
2183 cat <<\_ACEOF
2185 Optional Features:
2186 --disable-option-checking ignore unrecognized --enable/--with options
2187 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2188 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2189 --disable-ns-self-contained
2190 disable self contained build under NeXTstep
2191 --enable-locallisppath=PATH
2192 directories Emacs should search for lisp files
2193 specific to this site
2194 --enable-checking[=LIST]
2195 enable expensive run-time checks. With LIST, enable
2196 only specific categories of checks. Categories are:
2197 all,yes,no. Flags are: stringbytes, stringoverrun,
2198 stringfreelist, xmallocoverrun, conslist, glyphs
2199 --enable-check-lisp-object-type
2200 enable compile time checks for the Lisp_Object data
2201 type. This is useful for development for catching
2202 certain types of bugs.
2203 --enable-profiling build emacs with low-level, gprof profiling support.
2204 Mainly useful for debugging Emacs itself. May not
2205 work on all platforms. Stops profiler.el working.
2206 --enable-autodepend automatically generate dependencies to .h-files.
2207 Requires GNU Make and Gcc. Enabled if GNU Make and
2208 Gcc is found
2209 --enable-gtk-deprecation-warnings
2210 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
2211 --disable-dependency-tracking speeds up one-time build
2212 --enable-dependency-tracking do not reject slow dependency extractors
2213 --disable-largefile omit support for large files
2214 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2215 intended for developers, and may generate false
2216 alarms when used with older or non-GNU development
2217 tools.
2218 --enable-link-time-optimization
2219 build emacs with link-time optimization. This is
2220 supported only for GCC since 4.5.0.
2221 --disable-acl do not support ACLs
2223 Optional Packages:
2224 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2225 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2226 --without-all omit almost all features and build small executable
2227 with minimal dependencies
2228 --without-pop don't support POP mail retrieval with movemail
2229 --with-kerberos support Kerberos-authenticated POP
2230 --with-kerberos5 support Kerberos version 5 authenticated POP
2231 --with-hesiod support Hesiod to get the POP server host
2232 --with-mmdf support MMDF mailboxes
2233 --with-mail-unlink unlink, rather than empty, mail spool after reading
2234 --with-mailhost=HOSTNAME
2235 string giving default POP mail host
2236 --without-sound don't compile with sound support
2237 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2238 gtk3, lucid or athena, motif, no)
2239 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2240 --without-xpm don't compile with XPM image support
2241 --without-jpeg don't compile with JPEG image support
2242 --without-tiff don't compile with TIFF image support
2243 --without-gif don't compile with GIF image support
2244 --without-png don't compile with PNG image support
2245 --without-rsvg don't compile with SVG image support
2246 --without-xml2 don't compile with XML parsing support
2247 --without-imagemagick don't compile with ImageMagick image support
2248 --without-xft don't use XFT for anti aliased fonts
2249 --without-libotf don't use libotf for OpenType font support
2250 --without-m17n-flt don't use m17n-flt for text shaping
2251 --without-toolkit-scroll-bars
2252 don't use Motif or Xaw3d scroll bars
2253 --without-xaw3d don't use Xaw3d
2254 --without-xim don't use X11 XIM
2255 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2256 --with-w32 use native MS Windows GUI in a Cygwin build
2257 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2258 console
2259 --without-dbus don't compile with D-Bus support
2260 --without-gconf don't compile with GConf support
2261 --without-gsettings don't compile with GSettings support
2262 --without-selinux don't compile with SELinux support
2263 --without-gnutls don't use -lgnutls for SSL/TLS support
2264 --with-file-notification=LIB
2265 use a file notification library (LIB one of: yes,
2266 gfile, inotify, w32, no)
2267 --without-makeinfo don't require makeinfo for building manuals
2268 --without-compress-info don't compress the installed Info pages
2269 --with-pkg-config-prog=FILENAME
2270 file name of pkg-config for finding GTK and librsvg
2271 --with-gameuser=USER user for shared game score files
2272 --with-gnustep-conf=FILENAME
2273 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2274 or /etc/GNUstep/GNUstep.conf
2275 --with-x use the X Window System
2277 Some influential environment variables:
2278 CC C compiler command
2279 CFLAGS C compiler flags
2280 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2281 nonstandard directory <lib dir>
2282 LIBS libraries to pass to the linker, e.g. -l<library>
2283 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2284 you have headers in a nonstandard directory <include dir>
2285 CPP C preprocessor
2286 XMKMF Path to xmkmf, Makefile generator for X Window System
2288 Use these variables to override the choices made by `configure' or to help
2289 it to find libraries and programs with nonstandard names/locations.
2291 Report bugs to the package provider.
2292 _ACEOF
2293 ac_status=$?
2296 if test "$ac_init_help" = "recursive"; then
2297 # If there are subdirs, report their specific --help.
2298 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2299 test -d "$ac_dir" ||
2300 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2301 continue
2302 ac_builddir=.
2304 case "$ac_dir" in
2305 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2307 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2308 # A ".." for each directory in $ac_dir_suffix.
2309 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2310 case $ac_top_builddir_sub in
2311 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2312 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2313 esac ;;
2314 esac
2315 ac_abs_top_builddir=$ac_pwd
2316 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2317 # for backward compatibility:
2318 ac_top_builddir=$ac_top_build_prefix
2320 case $srcdir in
2321 .) # We are building in place.
2322 ac_srcdir=.
2323 ac_top_srcdir=$ac_top_builddir_sub
2324 ac_abs_top_srcdir=$ac_pwd ;;
2325 [\\/]* | ?:[\\/]* ) # Absolute name.
2326 ac_srcdir=$srcdir$ac_dir_suffix;
2327 ac_top_srcdir=$srcdir
2328 ac_abs_top_srcdir=$srcdir ;;
2329 *) # Relative name.
2330 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2331 ac_top_srcdir=$ac_top_build_prefix$srcdir
2332 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2333 esac
2334 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2336 cd "$ac_dir" || { ac_status=$?; continue; }
2337 # Check for guested configure.
2338 if test -f "$ac_srcdir/configure.gnu"; then
2339 echo &&
2340 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2341 elif test -f "$ac_srcdir/configure"; then
2342 echo &&
2343 $SHELL "$ac_srcdir/configure" --help=recursive
2344 else
2345 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2346 fi || ac_status=$?
2347 cd "$ac_pwd" || { ac_status=$?; break; }
2348 done
2351 test -n "$ac_init_help" && exit $ac_status
2352 if $ac_init_version; then
2353 cat <<\_ACEOF
2354 emacs configure 24.3.50
2355 generated by GNU Autoconf 2.65
2357 Copyright (C) 2009 Free Software Foundation, Inc.
2358 This configure script is free software; the Free Software Foundation
2359 gives unlimited permission to copy, distribute and modify it.
2360 _ACEOF
2361 exit
2364 ## ------------------------ ##
2365 ## Autoconf initialization. ##
2366 ## ------------------------ ##
2368 # ac_fn_c_try_compile LINENO
2369 # --------------------------
2370 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2371 ac_fn_c_try_compile ()
2373 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374 rm -f conftest.$ac_objext
2375 if { { ac_try="$ac_compile"
2376 case "(($ac_try" in
2377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2378 *) ac_try_echo=$ac_try;;
2379 esac
2380 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2381 $as_echo "$ac_try_echo"; } >&5
2382 (eval "$ac_compile") 2>conftest.err
2383 ac_status=$?
2384 if test -s conftest.err; then
2385 grep -v '^ *+' conftest.err >conftest.er1
2386 cat conftest.er1 >&5
2387 mv -f conftest.er1 conftest.err
2389 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2390 test $ac_status = 0; } && {
2391 test -z "$ac_c_werror_flag" ||
2392 test ! -s conftest.err
2393 } && test -s conftest.$ac_objext; then :
2394 ac_retval=0
2395 else
2396 $as_echo "$as_me: failed program was:" >&5
2397 sed 's/^/| /' conftest.$ac_ext >&5
2399 ac_retval=1
2401 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2402 as_fn_set_status $ac_retval
2404 } # ac_fn_c_try_compile
2406 # ac_fn_c_try_cpp LINENO
2407 # ----------------------
2408 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2409 ac_fn_c_try_cpp ()
2411 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412 if { { ac_try="$ac_cpp conftest.$ac_ext"
2413 case "(($ac_try" in
2414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415 *) ac_try_echo=$ac_try;;
2416 esac
2417 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418 $as_echo "$ac_try_echo"; } >&5
2419 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2420 ac_status=$?
2421 if test -s conftest.err; then
2422 grep -v '^ *+' conftest.err >conftest.er1
2423 cat conftest.er1 >&5
2424 mv -f conftest.er1 conftest.err
2426 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427 test $ac_status = 0; } >/dev/null && {
2428 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2429 test ! -s conftest.err
2430 }; then :
2431 ac_retval=0
2432 else
2433 $as_echo "$as_me: failed program was:" >&5
2434 sed 's/^/| /' conftest.$ac_ext >&5
2436 ac_retval=1
2438 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2439 as_fn_set_status $ac_retval
2441 } # ac_fn_c_try_cpp
2443 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2444 # -------------------------------------------------------
2445 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2446 # the include files in INCLUDES and setting the cache variable VAR
2447 # accordingly.
2448 ac_fn_c_check_header_mongrel ()
2450 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2451 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2453 $as_echo_n "checking for $2... " >&6; }
2454 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2455 $as_echo_n "(cached) " >&6
2457 eval ac_res=\$$3
2458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2459 $as_echo "$ac_res" >&6; }
2460 else
2461 # Is the header compilable?
2462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2463 $as_echo_n "checking $2 usability... " >&6; }
2464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2465 /* end confdefs.h. */
2467 #include <$2>
2468 _ACEOF
2469 if ac_fn_c_try_compile "$LINENO"; then :
2470 ac_header_compiler=yes
2471 else
2472 ac_header_compiler=no
2474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2476 $as_echo "$ac_header_compiler" >&6; }
2478 # Is the header present?
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2480 $as_echo_n "checking $2 presence... " >&6; }
2481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2482 /* end confdefs.h. */
2483 #include <$2>
2484 _ACEOF
2485 if ac_fn_c_try_cpp "$LINENO"; then :
2486 ac_header_preproc=yes
2487 else
2488 ac_header_preproc=no
2490 rm -f conftest.err conftest.$ac_ext
2491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2492 $as_echo "$ac_header_preproc" >&6; }
2494 # So? What about this header?
2495 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2496 yes:no: )
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2498 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2500 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2502 no:yes:* )
2503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2504 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2506 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2508 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2510 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2512 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2514 esac
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2516 $as_echo_n "checking for $2... " >&6; }
2517 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2518 $as_echo_n "(cached) " >&6
2519 else
2520 eval "$3=\$ac_header_compiler"
2522 eval ac_res=\$$3
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2524 $as_echo "$ac_res" >&6; }
2526 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2528 } # ac_fn_c_check_header_mongrel
2530 # ac_fn_c_try_run LINENO
2531 # ----------------------
2532 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2533 # that executables *can* be run.
2534 ac_fn_c_try_run ()
2536 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2537 if { { ac_try="$ac_link"
2538 case "(($ac_try" in
2539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2540 *) ac_try_echo=$ac_try;;
2541 esac
2542 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2543 $as_echo "$ac_try_echo"; } >&5
2544 (eval "$ac_link") 2>&5
2545 ac_status=$?
2546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2547 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2548 { { case "(($ac_try" in
2549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2550 *) ac_try_echo=$ac_try;;
2551 esac
2552 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2553 $as_echo "$ac_try_echo"; } >&5
2554 (eval "$ac_try") 2>&5
2555 ac_status=$?
2556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2557 test $ac_status = 0; }; }; then :
2558 ac_retval=0
2559 else
2560 $as_echo "$as_me: program exited with status $ac_status" >&5
2561 $as_echo "$as_me: failed program was:" >&5
2562 sed 's/^/| /' conftest.$ac_ext >&5
2564 ac_retval=$ac_status
2566 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2567 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2568 as_fn_set_status $ac_retval
2570 } # ac_fn_c_try_run
2572 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2573 # -------------------------------------------------------
2574 # Tests whether HEADER exists and can be compiled using the include files in
2575 # INCLUDES, setting the cache variable VAR accordingly.
2576 ac_fn_c_check_header_compile ()
2578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2580 $as_echo_n "checking for $2... " >&6; }
2581 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2582 $as_echo_n "(cached) " >&6
2583 else
2584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585 /* end confdefs.h. */
2587 #include <$2>
2588 _ACEOF
2589 if ac_fn_c_try_compile "$LINENO"; then :
2590 eval "$3=yes"
2591 else
2592 eval "$3=no"
2594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2596 eval ac_res=\$$3
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2598 $as_echo "$ac_res" >&6; }
2599 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2601 } # ac_fn_c_check_header_compile
2603 # ac_fn_c_try_link LINENO
2604 # -----------------------
2605 # Try to link conftest.$ac_ext, and return whether this succeeded.
2606 ac_fn_c_try_link ()
2608 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2609 rm -f conftest.$ac_objext conftest$ac_exeext
2610 if { { ac_try="$ac_link"
2611 case "(($ac_try" in
2612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2613 *) ac_try_echo=$ac_try;;
2614 esac
2615 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2616 $as_echo "$ac_try_echo"; } >&5
2617 (eval "$ac_link") 2>conftest.err
2618 ac_status=$?
2619 if test -s conftest.err; then
2620 grep -v '^ *+' conftest.err >conftest.er1
2621 cat conftest.er1 >&5
2622 mv -f conftest.er1 conftest.err
2624 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2625 test $ac_status = 0; } && {
2626 test -z "$ac_c_werror_flag" ||
2627 test ! -s conftest.err
2628 } && test -s conftest$ac_exeext && {
2629 test "$cross_compiling" = yes ||
2630 $as_test_x conftest$ac_exeext
2631 }; then :
2632 ac_retval=0
2633 else
2634 $as_echo "$as_me: failed program was:" >&5
2635 sed 's/^/| /' conftest.$ac_ext >&5
2637 ac_retval=1
2639 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2640 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2641 # interfere with the next link command; also delete a directory that is
2642 # left behind by Apple's compiler. We do this before executing the actions.
2643 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2644 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2645 as_fn_set_status $ac_retval
2647 } # ac_fn_c_try_link
2649 # ac_fn_c_check_decl LINENO SYMBOL VAR
2650 # ------------------------------------
2651 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2652 ac_fn_c_check_decl ()
2654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2656 $as_echo_n "checking whether $2 is declared... " >&6; }
2657 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2658 $as_echo_n "(cached) " >&6
2659 else
2660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2661 /* end confdefs.h. */
2664 main ()
2666 #ifndef $2
2667 (void) $2;
2668 #endif
2671 return 0;
2673 _ACEOF
2674 if ac_fn_c_try_compile "$LINENO"; then :
2675 eval "$3=yes"
2676 else
2677 eval "$3=no"
2679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681 eval ac_res=\$$3
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683 $as_echo "$ac_res" >&6; }
2684 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2686 } # ac_fn_c_check_decl
2688 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2689 # ----------------------------------------------
2690 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2691 ac_fn_c_check_header_preproc ()
2693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2695 $as_echo_n "checking for $2... " >&6; }
2696 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2697 $as_echo_n "(cached) " >&6
2698 else
2699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2700 /* end confdefs.h. */
2701 #include <$2>
2702 _ACEOF
2703 if ac_fn_c_try_cpp "$LINENO"; then :
2704 eval "$3=yes"
2705 else
2706 eval "$3=no"
2708 rm -f conftest.err conftest.$ac_ext
2710 eval ac_res=\$$3
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2712 $as_echo "$ac_res" >&6; }
2713 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2715 } # ac_fn_c_check_header_preproc
2717 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2718 # ----------------------------------------------------
2719 # Tries to find if the field MEMBER exists in type AGGR, after including
2720 # INCLUDES, setting cache variable VAR accordingly.
2721 ac_fn_c_check_member ()
2723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2725 $as_echo_n "checking for $2.$3... " >&6; }
2726 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2727 $as_echo_n "(cached) " >&6
2728 else
2729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2730 /* end confdefs.h. */
2733 main ()
2735 static $2 ac_aggr;
2736 if (ac_aggr.$3)
2737 return 0;
2739 return 0;
2741 _ACEOF
2742 if ac_fn_c_try_compile "$LINENO"; then :
2743 eval "$4=yes"
2744 else
2745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2746 /* end confdefs.h. */
2749 main ()
2751 static $2 ac_aggr;
2752 if (sizeof ac_aggr.$3)
2753 return 0;
2755 return 0;
2757 _ACEOF
2758 if ac_fn_c_try_compile "$LINENO"; then :
2759 eval "$4=yes"
2760 else
2761 eval "$4=no"
2763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2767 eval ac_res=\$$4
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2769 $as_echo "$ac_res" >&6; }
2770 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2772 } # ac_fn_c_check_member
2774 # ac_fn_c_check_func LINENO FUNC VAR
2775 # ----------------------------------
2776 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2777 ac_fn_c_check_func ()
2779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2781 $as_echo_n "checking for $2... " >&6; }
2782 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2783 $as_echo_n "(cached) " >&6
2784 else
2785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2786 /* end confdefs.h. */
2787 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2788 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2789 #define $2 innocuous_$2
2791 /* System header to define __stub macros and hopefully few prototypes,
2792 which can conflict with char $2 (); below.
2793 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2794 <limits.h> exists even on freestanding compilers. */
2796 #ifdef __STDC__
2797 # include <limits.h>
2798 #else
2799 # include <assert.h>
2800 #endif
2802 #undef $2
2804 /* Override any GCC internal prototype to avoid an error.
2805 Use char because int might match the return type of a GCC
2806 builtin and then its argument prototype would still apply. */
2807 #ifdef __cplusplus
2808 extern "C"
2809 #endif
2810 char $2 ();
2811 /* The GNU C library defines this for functions which it implements
2812 to always fail with ENOSYS. Some functions are actually named
2813 something starting with __ and the normal name is an alias. */
2814 #if defined __stub_$2 || defined __stub___$2
2815 choke me
2816 #endif
2819 main ()
2821 return $2 ();
2823 return 0;
2825 _ACEOF
2826 if ac_fn_c_try_link "$LINENO"; then :
2827 eval "$3=yes"
2828 else
2829 eval "$3=no"
2831 rm -f core conftest.err conftest.$ac_objext \
2832 conftest$ac_exeext conftest.$ac_ext
2834 eval ac_res=\$$3
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2836 $as_echo "$ac_res" >&6; }
2837 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2839 } # ac_fn_c_check_func
2841 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2842 # -------------------------------------------
2843 # Tests whether TYPE exists after having included INCLUDES, setting cache
2844 # variable VAR accordingly.
2845 ac_fn_c_check_type ()
2847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2849 $as_echo_n "checking for $2... " >&6; }
2850 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2851 $as_echo_n "(cached) " >&6
2852 else
2853 eval "$3=no"
2854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2855 /* end confdefs.h. */
2858 main ()
2860 if (sizeof ($2))
2861 return 0;
2863 return 0;
2865 _ACEOF
2866 if ac_fn_c_try_compile "$LINENO"; then :
2867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868 /* end confdefs.h. */
2871 main ()
2873 if (sizeof (($2)))
2874 return 0;
2876 return 0;
2878 _ACEOF
2879 if ac_fn_c_try_compile "$LINENO"; then :
2881 else
2882 eval "$3=yes"
2884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2888 eval ac_res=\$$3
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2890 $as_echo "$ac_res" >&6; }
2891 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2893 } # ac_fn_c_check_type
2895 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2896 # --------------------------------------------
2897 # Tries to find the compile-time value of EXPR in a program that includes
2898 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2899 # computed
2900 ac_fn_c_compute_int ()
2902 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2903 if test "$cross_compiling" = yes; then
2904 # Depending upon the size, compute the lo and hi bounds.
2905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2906 /* end confdefs.h. */
2909 main ()
2911 static int test_array [1 - 2 * !(($2) >= 0)];
2912 test_array [0] = 0
2915 return 0;
2917 _ACEOF
2918 if ac_fn_c_try_compile "$LINENO"; then :
2919 ac_lo=0 ac_mid=0
2920 while :; do
2921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2922 /* end confdefs.h. */
2925 main ()
2927 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2928 test_array [0] = 0
2931 return 0;
2933 _ACEOF
2934 if ac_fn_c_try_compile "$LINENO"; then :
2935 ac_hi=$ac_mid; break
2936 else
2937 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2938 if test $ac_lo -le $ac_mid; then
2939 ac_lo= ac_hi=
2940 break
2942 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2945 done
2946 else
2947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2948 /* end confdefs.h. */
2951 main ()
2953 static int test_array [1 - 2 * !(($2) < 0)];
2954 test_array [0] = 0
2957 return 0;
2959 _ACEOF
2960 if ac_fn_c_try_compile "$LINENO"; then :
2961 ac_hi=-1 ac_mid=-1
2962 while :; do
2963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2964 /* end confdefs.h. */
2967 main ()
2969 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2970 test_array [0] = 0
2973 return 0;
2975 _ACEOF
2976 if ac_fn_c_try_compile "$LINENO"; then :
2977 ac_lo=$ac_mid; break
2978 else
2979 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2980 if test $ac_mid -le $ac_hi; then
2981 ac_lo= ac_hi=
2982 break
2984 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2987 done
2988 else
2989 ac_lo= ac_hi=
2991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2994 # Binary search between lo and hi bounds.
2995 while test "x$ac_lo" != "x$ac_hi"; do
2996 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2998 /* end confdefs.h. */
3001 main ()
3003 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3004 test_array [0] = 0
3007 return 0;
3009 _ACEOF
3010 if ac_fn_c_try_compile "$LINENO"; then :
3011 ac_hi=$ac_mid
3012 else
3013 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3016 done
3017 case $ac_lo in #((
3018 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3019 '') ac_retval=1 ;;
3020 esac
3021 else
3022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3023 /* end confdefs.h. */
3025 static long int longval () { return $2; }
3026 static unsigned long int ulongval () { return $2; }
3027 #include <stdio.h>
3028 #include <stdlib.h>
3030 main ()
3033 FILE *f = fopen ("conftest.val", "w");
3034 if (! f)
3035 return 1;
3036 if (($2) < 0)
3038 long int i = longval ();
3039 if (i != ($2))
3040 return 1;
3041 fprintf (f, "%ld", i);
3043 else
3045 unsigned long int i = ulongval ();
3046 if (i != ($2))
3047 return 1;
3048 fprintf (f, "%lu", i);
3050 /* Do not output a trailing newline, as this causes \r\n confusion
3051 on some platforms. */
3052 return ferror (f) || fclose (f) != 0;
3055 return 0;
3057 _ACEOF
3058 if ac_fn_c_try_run "$LINENO"; then :
3059 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3060 else
3061 ac_retval=1
3063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3064 conftest.$ac_objext conftest.beam conftest.$ac_ext
3065 rm -f conftest.val
3068 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3069 as_fn_set_status $ac_retval
3071 } # ac_fn_c_compute_int
3072 cat >config.log <<_ACEOF
3073 This file contains any messages produced by compilers while
3074 running configure, to aid debugging if configure makes a mistake.
3076 It was created by emacs $as_me 24.3.50, which was
3077 generated by GNU Autoconf 2.65. Invocation command line was
3079 $ $0 $@
3081 _ACEOF
3082 exec 5>>config.log
3084 cat <<_ASUNAME
3085 ## --------- ##
3086 ## Platform. ##
3087 ## --------- ##
3089 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3090 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3091 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3092 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3093 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3095 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3096 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3098 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3099 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3100 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3101 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3102 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3103 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3104 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3106 _ASUNAME
3108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109 for as_dir in $PATH
3111 IFS=$as_save_IFS
3112 test -z "$as_dir" && as_dir=.
3113 $as_echo "PATH: $as_dir"
3114 done
3115 IFS=$as_save_IFS
3117 } >&5
3119 cat >&5 <<_ACEOF
3122 ## ----------- ##
3123 ## Core tests. ##
3124 ## ----------- ##
3126 _ACEOF
3129 # Keep a trace of the command line.
3130 # Strip out --no-create and --no-recursion so they do not pile up.
3131 # Strip out --silent because we don't want to record it for future runs.
3132 # Also quote any args containing shell meta-characters.
3133 # Make two passes to allow for proper duplicate-argument suppression.
3134 ac_configure_args=
3135 ac_configure_args0=
3136 ac_configure_args1=
3137 ac_must_keep_next=false
3138 for ac_pass in 1 2
3140 for ac_arg
3142 case $ac_arg in
3143 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3144 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3145 | -silent | --silent | --silen | --sile | --sil)
3146 continue ;;
3147 *\'*)
3148 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3149 esac
3150 case $ac_pass in
3151 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3153 as_fn_append ac_configure_args1 " '$ac_arg'"
3154 if test $ac_must_keep_next = true; then
3155 ac_must_keep_next=false # Got value, back to normal.
3156 else
3157 case $ac_arg in
3158 *=* | --config-cache | -C | -disable-* | --disable-* \
3159 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3160 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3161 | -with-* | --with-* | -without-* | --without-* | --x)
3162 case "$ac_configure_args0 " in
3163 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3164 esac
3166 -* ) ac_must_keep_next=true ;;
3167 esac
3169 as_fn_append ac_configure_args " '$ac_arg'"
3171 esac
3172 done
3173 done
3174 { ac_configure_args0=; unset ac_configure_args0;}
3175 { ac_configure_args1=; unset ac_configure_args1;}
3177 # When interrupted or exit'd, cleanup temporary files, and complete
3178 # config.log. We remove comments because anyway the quotes in there
3179 # would cause problems or look ugly.
3180 # WARNING: Use '\'' to represent an apostrophe within the trap.
3181 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3182 trap 'exit_status=$?
3183 # Save into config.log some information that might help in debugging.
3185 echo
3187 cat <<\_ASBOX
3188 ## ---------------- ##
3189 ## Cache variables. ##
3190 ## ---------------- ##
3191 _ASBOX
3192 echo
3193 # The following way of writing the cache mishandles newlines in values,
3195 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3196 eval ac_val=\$$ac_var
3197 case $ac_val in #(
3198 *${as_nl}*)
3199 case $ac_var in #(
3200 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3201 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3202 esac
3203 case $ac_var in #(
3204 _ | IFS | as_nl) ;; #(
3205 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3206 *) { eval $ac_var=; unset $ac_var;} ;;
3207 esac ;;
3208 esac
3209 done
3210 (set) 2>&1 |
3211 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3212 *${as_nl}ac_space=\ *)
3213 sed -n \
3214 "s/'\''/'\''\\\\'\'''\''/g;
3215 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3216 ;; #(
3218 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3220 esac |
3221 sort
3223 echo
3225 cat <<\_ASBOX
3226 ## ----------------- ##
3227 ## Output variables. ##
3228 ## ----------------- ##
3229 _ASBOX
3230 echo
3231 for ac_var in $ac_subst_vars
3233 eval ac_val=\$$ac_var
3234 case $ac_val in
3235 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3236 esac
3237 $as_echo "$ac_var='\''$ac_val'\''"
3238 done | sort
3239 echo
3241 if test -n "$ac_subst_files"; then
3242 cat <<\_ASBOX
3243 ## ------------------- ##
3244 ## File substitutions. ##
3245 ## ------------------- ##
3246 _ASBOX
3247 echo
3248 for ac_var in $ac_subst_files
3250 eval ac_val=\$$ac_var
3251 case $ac_val in
3252 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3253 esac
3254 $as_echo "$ac_var='\''$ac_val'\''"
3255 done | sort
3256 echo
3259 if test -s confdefs.h; then
3260 cat <<\_ASBOX
3261 ## ----------- ##
3262 ## confdefs.h. ##
3263 ## ----------- ##
3264 _ASBOX
3265 echo
3266 cat confdefs.h
3267 echo
3269 test "$ac_signal" != 0 &&
3270 $as_echo "$as_me: caught signal $ac_signal"
3271 $as_echo "$as_me: exit $exit_status"
3272 } >&5
3273 rm -f core *.core core.conftest.* &&
3274 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3275 exit $exit_status
3277 for ac_signal in 1 2 13 15; do
3278 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3279 done
3280 ac_signal=0
3282 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3283 rm -f -r conftest* confdefs.h
3285 $as_echo "/* confdefs.h */" > confdefs.h
3287 # Predefined preprocessor variables.
3289 cat >>confdefs.h <<_ACEOF
3290 #define PACKAGE_NAME "$PACKAGE_NAME"
3291 _ACEOF
3293 cat >>confdefs.h <<_ACEOF
3294 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3295 _ACEOF
3297 cat >>confdefs.h <<_ACEOF
3298 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3299 _ACEOF
3301 cat >>confdefs.h <<_ACEOF
3302 #define PACKAGE_STRING "$PACKAGE_STRING"
3303 _ACEOF
3305 cat >>confdefs.h <<_ACEOF
3306 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3307 _ACEOF
3309 cat >>confdefs.h <<_ACEOF
3310 #define PACKAGE_URL "$PACKAGE_URL"
3311 _ACEOF
3314 # Let the site file select an alternate cache file if it wants to.
3315 # Prefer an explicitly selected file to automatically selected ones.
3316 ac_site_file1=NONE
3317 ac_site_file2=NONE
3318 if test -n "$CONFIG_SITE"; then
3319 ac_site_file1=$CONFIG_SITE
3320 elif test "x$prefix" != xNONE; then
3321 ac_site_file1=$prefix/share/config.site
3322 ac_site_file2=$prefix/etc/config.site
3323 else
3324 ac_site_file1=$ac_default_prefix/share/config.site
3325 ac_site_file2=$ac_default_prefix/etc/config.site
3327 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3329 test "x$ac_site_file" = xNONE && continue
3330 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3331 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3332 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3333 sed 's/^/| /' "$ac_site_file" >&5
3334 . "$ac_site_file"
3336 done
3338 if test -r "$cache_file"; then
3339 # Some versions of bash will fail to source /dev/null (special files
3340 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3341 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3342 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3343 $as_echo "$as_me: loading cache $cache_file" >&6;}
3344 case $cache_file in
3345 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3346 *) . "./$cache_file";;
3347 esac
3349 else
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3351 $as_echo "$as_me: creating cache $cache_file" >&6;}
3352 >$cache_file
3355 as_fn_append ac_header_list " sys/systeminfo.h"
3356 as_fn_append ac_header_list " coff.h"
3357 as_fn_append ac_header_list " pty.h"
3358 as_fn_append ac_header_list " sys/resource.h"
3359 as_fn_append ac_header_list " sys/utsname.h"
3360 as_fn_append ac_header_list " pwd.h"
3361 as_fn_append ac_header_list " utmp.h"
3362 as_fn_append ac_header_list " util.h"
3363 as_fn_append ac_header_list " sys/socket.h"
3364 as_fn_append ac_header_list " stdlib.h"
3365 as_fn_append ac_header_list " unistd.h"
3366 as_fn_append ac_header_list " sys/param.h"
3367 as_fn_append ac_header_list " pthread.h"
3368 as_fn_append ac_header_list " malloc/malloc.h"
3369 as_fn_append ac_header_list " maillock.h"
3370 as_fn_append ac_header_list " sys/un.h"
3371 as_fn_append ac_func_list " tzset"
3372 as_fn_append ac_func_list " readlinkat"
3373 as_fn_append ac_header_list " dirent.h"
3374 as_fn_append ac_header_list " execinfo.h"
3375 as_fn_append ac_func_list " faccessat"
3376 as_fn_append ac_func_list " fcntl"
3377 as_fn_append ac_func_list " fdopendir"
3378 as_fn_append ac_header_list " stdio_ext.h"
3379 as_fn_append ac_func_list " __fpending"
3380 as_fn_append ac_func_list " fstatat"
3381 as_fn_append ac_func_list " fsync"
3382 gl_getopt_required=GNU
3383 as_fn_append ac_header_list " getopt.h"
3384 as_fn_append ac_func_list " gettimeofday"
3385 as_fn_append ac_func_list " nanotime"
3386 as_fn_append ac_header_list " sys/time.h"
3387 as_fn_append ac_header_list " wchar.h"
3388 as_fn_append ac_header_list " stdint.h"
3389 as_fn_append ac_header_list " inttypes.h"
3390 as_fn_append ac_func_list " lstat"
3391 as_fn_append ac_func_list " pipe2"
3392 as_fn_append ac_header_list " sys/select.h"
3393 as_fn_append ac_func_list " pselect"
3394 as_fn_append ac_func_list " pthread_sigmask"
3395 as_fn_append ac_func_list " readlink"
3396 as_fn_append ac_func_list " strtoimax"
3397 as_fn_append ac_func_list " strtoumax"
3398 as_fn_append ac_func_list " symlink"
3399 as_fn_append ac_header_list " sys/stat.h"
3400 as_fn_append ac_func_list " localtime_r"
3401 as_fn_append ac_header_list " utime.h"
3402 as_fn_append ac_func_list " futimes"
3403 as_fn_append ac_func_list " futimesat"
3404 as_fn_append ac_func_list " futimens"
3405 as_fn_append ac_func_list " utimensat"
3406 as_fn_append ac_func_list " lutimes"
3407 as_fn_append ac_func_list " getdtablesize"
3408 # Check that the precious variables saved in the cache have kept the same
3409 # value.
3410 ac_cache_corrupted=false
3411 for ac_var in $ac_precious_vars; do
3412 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3413 eval ac_new_set=\$ac_env_${ac_var}_set
3414 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3415 eval ac_new_val=\$ac_env_${ac_var}_value
3416 case $ac_old_set,$ac_new_set in
3417 set,)
3418 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3419 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3420 ac_cache_corrupted=: ;;
3421 ,set)
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3423 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3424 ac_cache_corrupted=: ;;
3425 ,);;
3427 if test "x$ac_old_val" != "x$ac_new_val"; then
3428 # differences in whitespace do not lead to failure.
3429 ac_old_val_w=`echo x $ac_old_val`
3430 ac_new_val_w=`echo x $ac_new_val`
3431 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3433 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3434 ac_cache_corrupted=:
3435 else
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3437 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3438 eval $ac_var=\$ac_old_val
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3441 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3442 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3443 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3444 fi;;
3445 esac
3446 # Pass precious variables to config.status.
3447 if test "$ac_new_set" = set; then
3448 case $ac_new_val in
3449 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3450 *) ac_arg=$ac_var=$ac_new_val ;;
3451 esac
3452 case " $ac_configure_args " in
3453 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3454 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3455 esac
3457 done
3458 if $ac_cache_corrupted; then
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3460 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3462 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3463 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3465 ## -------------------- ##
3466 ## Main body of script. ##
3467 ## -------------------- ##
3469 ac_ext=c
3470 ac_cpp='$CPP $CPPFLAGS'
3471 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3472 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3473 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3477 emacs_config_options="$@"
3478 ## Add some environment variables, if they were passed via the environment
3479 ## rather than on the command-line.
3480 for var in CFLAGS CPPFLAGS LDFLAGS; do
3481 case "$emacs_config_options" in
3482 *$var=*) continue ;;
3483 esac
3484 eval val="\$${var}"
3485 test x"$val" = x && continue
3486 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
3487 done
3489 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3492 ac_aux_dir=
3493 for ac_dir in build-aux "$srcdir"/build-aux; do
3494 for ac_t in install-sh install.sh shtool; do
3495 if test -f "$ac_dir/$ac_t"; then
3496 ac_aux_dir=$ac_dir
3497 ac_install_sh="$ac_aux_dir/$ac_t -c"
3498 break 2
3500 done
3501 done
3502 if test -z "$ac_aux_dir"; then
3503 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3506 # These three variables are undocumented and unsupported,
3507 # and are intended to be withdrawn in a future Autoconf release.
3508 # They can cause serious problems if a builder's source tree is in a directory
3509 # whose full name contains unusual characters.
3510 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3511 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3512 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3515 am__api_version='1.11'
3517 # Find a good install program. We prefer a C program (faster),
3518 # so one script is as good as another. But avoid the broken or
3519 # incompatible versions:
3520 # SysV /etc/install, /usr/sbin/install
3521 # SunOS /usr/etc/install
3522 # IRIX /sbin/install
3523 # AIX /bin/install
3524 # AmigaOS /C/install, which installs bootblocks on floppy discs
3525 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3526 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3527 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3528 # OS/2's system install, which has a completely different semantic
3529 # ./install, which can be erroneously created by make from ./install.sh.
3530 # Reject install programs that cannot install multiple files.
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3532 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3533 if test -z "$INSTALL"; then
3534 if test "${ac_cv_path_install+set}" = set; then :
3535 $as_echo_n "(cached) " >&6
3536 else
3537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3538 for as_dir in $PATH
3540 IFS=$as_save_IFS
3541 test -z "$as_dir" && as_dir=.
3542 # Account for people who put trailing slashes in PATH elements.
3543 case $as_dir/ in #((
3544 ./ | .// | /[cC]/* | \
3545 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3546 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3547 /usr/ucb/* ) ;;
3549 # OSF1 and SCO ODT 3.0 have their own names for install.
3550 # Don't use installbsd from OSF since it installs stuff as root
3551 # by default.
3552 for ac_prog in ginstall scoinst install; do
3553 for ac_exec_ext in '' $ac_executable_extensions; do
3554 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3555 if test $ac_prog = install &&
3556 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3557 # AIX install. It has an incompatible calling convention.
3559 elif test $ac_prog = install &&
3560 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3561 # program-specific install script used by HP pwplus--don't use.
3563 else
3564 rm -rf conftest.one conftest.two conftest.dir
3565 echo one > conftest.one
3566 echo two > conftest.two
3567 mkdir conftest.dir
3568 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3569 test -s conftest.one && test -s conftest.two &&
3570 test -s conftest.dir/conftest.one &&
3571 test -s conftest.dir/conftest.two
3572 then
3573 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3574 break 3
3578 done
3579 done
3581 esac
3583 done
3584 IFS=$as_save_IFS
3586 rm -rf conftest.one conftest.two conftest.dir
3589 if test "${ac_cv_path_install+set}" = set; then
3590 INSTALL=$ac_cv_path_install
3591 else
3592 # As a last resort, use the slow shell script. Don't cache a
3593 # value for INSTALL within a source directory, because that will
3594 # break other packages using the cache if that directory is
3595 # removed, or if the value is a relative name.
3596 INSTALL=$ac_install_sh
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3600 $as_echo "$INSTALL" >&6; }
3602 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3603 # It thinks the first close brace ends the variable substitution.
3604 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3606 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3608 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3611 $as_echo_n "checking whether build environment is sane... " >&6; }
3612 # Just in case
3613 sleep 1
3614 echo timestamp > conftest.file
3615 # Reject unsafe characters in $srcdir or the absolute working directory
3616 # name. Accept space and tab only in the latter.
3617 am_lf='
3619 case `pwd` in
3620 *[\\\"\#\$\&\'\`$am_lf]*)
3621 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3622 esac
3623 case $srcdir in
3624 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3625 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3626 esac
3628 # Do `set' in a subshell so we don't clobber the current shell's
3629 # arguments. Must try -L first in case configure is actually a
3630 # symlink; some systems play weird games with the mod time of symlinks
3631 # (eg FreeBSD returns the mod time of the symlink's containing
3632 # directory).
3633 if (
3634 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3635 if test "$*" = "X"; then
3636 # -L didn't work.
3637 set X `ls -t "$srcdir/configure" conftest.file`
3639 rm -f conftest.file
3640 if test "$*" != "X $srcdir/configure conftest.file" \
3641 && test "$*" != "X conftest.file $srcdir/configure"; then
3643 # If neither matched, then we have a broken ls. This can happen
3644 # if, for instance, CONFIG_SHELL is bash and it inherits a
3645 # broken ls alias from the environment. This has actually
3646 # happened. Such a system could not be considered "sane".
3647 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3648 alias in your environment" "$LINENO" 5
3651 test "$2" = conftest.file
3653 then
3654 # Ok.
3656 else
3657 as_fn_error "newly created file is older than distributed files!
3658 Check your system clock" "$LINENO" 5
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3661 $as_echo "yes" >&6; }
3662 test "$program_prefix" != NONE &&
3663 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3664 # Use a double $ so make ignores it.
3665 test "$program_suffix" != NONE &&
3666 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3667 # Double any \ or $.
3668 # By default was `s,x,x', remove it if useless.
3669 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3670 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3672 # expand $ac_aux_dir to an absolute path
3673 am_aux_dir=`cd $ac_aux_dir && pwd`
3675 if test x"${MISSING+set}" != xset; then
3676 case $am_aux_dir in
3677 *\ * | *\ *)
3678 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3680 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3681 esac
3683 # Use eval to expand $SHELL
3684 if eval "$MISSING --run true"; then
3685 am_missing_run="$MISSING --run "
3686 else
3687 am_missing_run=
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3689 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3692 if test x"${install_sh}" != xset; then
3693 case $am_aux_dir in
3694 *\ * | *\ *)
3695 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3697 install_sh="\${SHELL} $am_aux_dir/install-sh"
3698 esac
3701 # Installed binaries are usually stripped using `strip' when the user
3702 # run `make install-strip'. However `strip' might not be the right
3703 # tool to use in cross-compilation environments, therefore Automake
3704 # will honor the `STRIP' environment variable to overrule this program.
3705 if test "$cross_compiling" != no; then
3706 if test -n "$ac_tool_prefix"; then
3707 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3708 set dummy ${ac_tool_prefix}strip; ac_word=$2
3709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3710 $as_echo_n "checking for $ac_word... " >&6; }
3711 if test "${ac_cv_prog_STRIP+set}" = set; then :
3712 $as_echo_n "(cached) " >&6
3713 else
3714 if test -n "$STRIP"; then
3715 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3716 else
3717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3718 for as_dir in $PATH
3720 IFS=$as_save_IFS
3721 test -z "$as_dir" && as_dir=.
3722 for ac_exec_ext in '' $ac_executable_extensions; do
3723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3724 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3726 break 2
3728 done
3729 done
3730 IFS=$as_save_IFS
3734 STRIP=$ac_cv_prog_STRIP
3735 if test -n "$STRIP"; then
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3737 $as_echo "$STRIP" >&6; }
3738 else
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3740 $as_echo "no" >&6; }
3745 if test -z "$ac_cv_prog_STRIP"; then
3746 ac_ct_STRIP=$STRIP
3747 # Extract the first word of "strip", so it can be a program name with args.
3748 set dummy strip; ac_word=$2
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3750 $as_echo_n "checking for $ac_word... " >&6; }
3751 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3752 $as_echo_n "(cached) " >&6
3753 else
3754 if test -n "$ac_ct_STRIP"; then
3755 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3756 else
3757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3758 for as_dir in $PATH
3760 IFS=$as_save_IFS
3761 test -z "$as_dir" && as_dir=.
3762 for ac_exec_ext in '' $ac_executable_extensions; do
3763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3764 ac_cv_prog_ac_ct_STRIP="strip"
3765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3766 break 2
3768 done
3769 done
3770 IFS=$as_save_IFS
3774 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3775 if test -n "$ac_ct_STRIP"; then
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3777 $as_echo "$ac_ct_STRIP" >&6; }
3778 else
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3780 $as_echo "no" >&6; }
3783 if test "x$ac_ct_STRIP" = x; then
3784 STRIP=":"
3785 else
3786 case $cross_compiling:$ac_tool_warned in
3787 yes:)
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3789 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3790 ac_tool_warned=yes ;;
3791 esac
3792 STRIP=$ac_ct_STRIP
3794 else
3795 STRIP="$ac_cv_prog_STRIP"
3799 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3802 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3803 if test -z "$MKDIR_P"; then
3804 if test "${ac_cv_path_mkdir+set}" = set; then :
3805 $as_echo_n "(cached) " >&6
3806 else
3807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3808 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3810 IFS=$as_save_IFS
3811 test -z "$as_dir" && as_dir=.
3812 for ac_prog in mkdir gmkdir; do
3813 for ac_exec_ext in '' $ac_executable_extensions; do
3814 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3815 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3816 'mkdir (GNU coreutils) '* | \
3817 'mkdir (coreutils) '* | \
3818 'mkdir (fileutils) '4.1*)
3819 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3820 break 3;;
3821 esac
3822 done
3823 done
3824 done
3825 IFS=$as_save_IFS
3829 test -d ./--version && rmdir ./--version
3830 if test "${ac_cv_path_mkdir+set}" = set; then
3831 MKDIR_P="$ac_cv_path_mkdir -p"
3832 else
3833 # As a last resort, use the slow shell script. Don't cache a
3834 # value for MKDIR_P within a source directory, because that will
3835 # break other packages using the cache if that directory is
3836 # removed, or if the value is a relative name.
3837 MKDIR_P="$ac_install_sh -d"
3840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3841 $as_echo "$MKDIR_P" >&6; }
3843 mkdir_p="$MKDIR_P"
3844 case $mkdir_p in
3845 [\\/$]* | ?:[\\/]*) ;;
3846 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3847 esac
3849 for ac_prog in gawk mawk nawk awk
3851 # Extract the first word of "$ac_prog", so it can be a program name with args.
3852 set dummy $ac_prog; ac_word=$2
3853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3854 $as_echo_n "checking for $ac_word... " >&6; }
3855 if test "${ac_cv_prog_AWK+set}" = set; then :
3856 $as_echo_n "(cached) " >&6
3857 else
3858 if test -n "$AWK"; then
3859 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3860 else
3861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862 for as_dir in $PATH
3864 IFS=$as_save_IFS
3865 test -z "$as_dir" && as_dir=.
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3868 ac_cv_prog_AWK="$ac_prog"
3869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3870 break 2
3872 done
3873 done
3874 IFS=$as_save_IFS
3878 AWK=$ac_cv_prog_AWK
3879 if test -n "$AWK"; then
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3881 $as_echo "$AWK" >&6; }
3882 else
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3884 $as_echo "no" >&6; }
3888 test -n "$AWK" && break
3889 done
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3892 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3893 set x ${MAKE-make}
3894 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3895 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3896 $as_echo_n "(cached) " >&6
3897 else
3898 cat >conftest.make <<\_ACEOF
3899 SHELL = /bin/sh
3900 all:
3901 @echo '@@@%%%=$(MAKE)=@@@%%%'
3902 _ACEOF
3903 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3904 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3905 *@@@%%%=?*=@@@%%%*)
3906 eval ac_cv_prog_make_${ac_make}_set=yes;;
3908 eval ac_cv_prog_make_${ac_make}_set=no;;
3909 esac
3910 rm -f conftest.make
3912 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3914 $as_echo "yes" >&6; }
3915 SET_MAKE=
3916 else
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3918 $as_echo "no" >&6; }
3919 SET_MAKE="MAKE=${MAKE-make}"
3922 rm -rf .tst 2>/dev/null
3923 mkdir .tst 2>/dev/null
3924 if test -d .tst; then
3925 am__leading_dot=.
3926 else
3927 am__leading_dot=_
3929 rmdir .tst 2>/dev/null
3931 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3932 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3933 # is not polluted with repeated "-I."
3934 am__isrc=' -I$(srcdir)'
3935 # test to see if srcdir already configured
3936 if test -f $srcdir/config.status; then
3937 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3941 # test whether we have cygpath
3942 if test -z "$CYGPATH_W"; then
3943 if (cygpath --version) >/dev/null 2>/dev/null; then
3944 CYGPATH_W='cygpath -w'
3945 else
3946 CYGPATH_W=echo
3951 # Define the identity of the package.
3952 PACKAGE='emacs'
3953 VERSION='24.3.50'
3956 cat >>confdefs.h <<_ACEOF
3957 #define PACKAGE "$PACKAGE"
3958 _ACEOF
3961 cat >>confdefs.h <<_ACEOF
3962 #define VERSION "$VERSION"
3963 _ACEOF
3965 # Some tools Automake needs.
3967 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3970 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3973 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3976 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3979 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3981 # We need awk for the "check" target. The system "awk" is bad on
3982 # some platforms.
3983 # Always define AMTAR for backward compatibility.
3985 AMTAR=${AMTAR-"${am_missing_run}tar"}
3987 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3996 lispdir='${datadir}/emacs/${version}/lisp'
3997 leimdir='${datadir}/emacs/${version}/leim'
3998 standardlisppath='${lispdir}:${leimdir}'
3999 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
4000 '${datadir}/emacs/site-lisp'
4001 lisppath='${locallisppath}:${standardlisppath}'
4002 etcdir='${datadir}/emacs/${version}/etc'
4003 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
4004 docdir='${datadir}/emacs/${version}/etc'
4005 gamedir='${localstatedir}/games/emacs'
4008 # Check whether --with-all was given.
4009 if test "${with_all+set}" = set; then :
4010 withval=$with_all; with_features=$withval
4011 else
4012 with_features=yes
4019 # Check whether --with-pop was given.
4020 if test "${with_pop+set}" = set; then :
4021 withval=$with_pop;
4022 else
4023 with_pop=$with_features
4026 if test "$with_pop" = yes; then
4027 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4032 # Check whether --with-kerberos was given.
4033 if test "${with_kerberos+set}" = set; then :
4034 withval=$with_kerberos;
4035 else
4036 with_kerberos=no
4039 if test "$with_kerberos" != no; then
4040 $as_echo "#define KERBEROS 1" >>confdefs.h
4045 # Check whether --with-kerberos5 was given.
4046 if test "${with_kerberos5+set}" = set; then :
4047 withval=$with_kerberos5;
4048 else
4049 with_kerberos5=no
4052 if test "${with_kerberos5}" != no; then
4053 if test "${with_kerberos}" = no; then
4054 with_kerberos=yes
4055 $as_echo "#define KERBEROS 1" >>confdefs.h
4059 $as_echo "#define KERBEROS5 1" >>confdefs.h
4064 # Check whether --with-hesiod was given.
4065 if test "${with_hesiod+set}" = set; then :
4066 withval=$with_hesiod;
4067 else
4068 with_hesiod=no
4071 if test "$with_hesiod" != no; then
4073 $as_echo "#define HESIOD 1" >>confdefs.h
4078 # Check whether --with-mmdf was given.
4079 if test "${with_mmdf+set}" = set; then :
4080 withval=$with_mmdf;
4081 else
4082 with_mmdf=no
4085 if test "$with_mmdf" != no; then
4087 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4092 # Check whether --with-mail-unlink was given.
4093 if test "${with_mail_unlink+set}" = set; then :
4094 withval=$with_mail_unlink;
4095 else
4096 with_mail_unlink=no
4099 if test "$with_mail_unlink" != no; then
4101 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4106 # Check whether --with-mailhost was given.
4107 if test "${with_mailhost+set}" = set; then :
4108 withval=$with_mailhost;
4109 cat >>confdefs.h <<_ACEOF
4110 #define MAILHOST "$withval"
4111 _ACEOF
4117 # Check whether --with-sound was given.
4118 if test "${with_sound+set}" = set; then :
4119 withval=$with_sound;
4120 else
4121 with_sound=$with_features
4126 # Check whether --with-x-toolkit was given.
4127 if test "${with_x_toolkit+set}" = set; then :
4128 withval=$with_x_toolkit; case "${withval}" in
4129 y | ye | yes ) val=gtk ;;
4130 n | no ) val=no ;;
4131 l | lu | luc | luci | lucid ) val=lucid ;;
4132 a | at | ath | athe | athen | athena ) val=athena ;;
4133 m | mo | mot | moti | motif ) val=motif ;;
4134 g | gt | gtk ) val=gtk ;;
4135 gtk2 ) val=gtk2 ;;
4136 gtk3 ) val=gtk3 ;;
4138 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4139 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4140 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4141 \`athena' and \`lucid' are synonyms." "$LINENO" 5
4143 esac
4144 with_x_toolkit=$val
4150 # Check whether --with-wide-int was given.
4151 if test "${with_wide_int+set}" = set; then :
4152 withval=$with_wide_int;
4153 else
4154 with_wide_int=no
4157 if test "$with_wide_int" = yes; then
4159 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4164 # Check whether --with-xpm was given.
4165 if test "${with_xpm+set}" = set; then :
4166 withval=$with_xpm;
4167 else
4168 with_xpm=$with_features
4172 # Check whether --with-jpeg was given.
4173 if test "${with_jpeg+set}" = set; then :
4174 withval=$with_jpeg;
4175 else
4176 with_jpeg=$with_features
4180 # Check whether --with-tiff was given.
4181 if test "${with_tiff+set}" = set; then :
4182 withval=$with_tiff;
4183 else
4184 with_tiff=$with_features
4188 # Check whether --with-gif was given.
4189 if test "${with_gif+set}" = set; then :
4190 withval=$with_gif;
4191 else
4192 with_gif=$with_features
4196 # Check whether --with-png was given.
4197 if test "${with_png+set}" = set; then :
4198 withval=$with_png;
4199 else
4200 with_png=$with_features
4204 # Check whether --with-rsvg was given.
4205 if test "${with_rsvg+set}" = set; then :
4206 withval=$with_rsvg;
4207 else
4208 with_rsvg=$with_features
4212 # Check whether --with-xml2 was given.
4213 if test "${with_xml2+set}" = set; then :
4214 withval=$with_xml2;
4215 else
4216 with_xml2=$with_features
4220 # Check whether --with-imagemagick was given.
4221 if test "${with_imagemagick+set}" = set; then :
4222 withval=$with_imagemagick;
4223 else
4224 with_imagemagick=$with_features
4229 # Check whether --with-xft was given.
4230 if test "${with_xft+set}" = set; then :
4231 withval=$with_xft;
4232 else
4233 with_xft=$with_features
4237 # Check whether --with-libotf was given.
4238 if test "${with_libotf+set}" = set; then :
4239 withval=$with_libotf;
4240 else
4241 with_libotf=$with_features
4245 # Check whether --with-m17n-flt was given.
4246 if test "${with_m17n_flt+set}" = set; then :
4247 withval=$with_m17n_flt;
4248 else
4249 with_m17n_flt=$with_features
4254 # Check whether --with-toolkit-scroll-bars was given.
4255 if test "${with_toolkit_scroll_bars+set}" = set; then :
4256 withval=$with_toolkit_scroll_bars;
4257 else
4258 with_toolkit_scroll_bars=$with_features
4262 # Check whether --with-xaw3d was given.
4263 if test "${with_xaw3d+set}" = set; then :
4264 withval=$with_xaw3d;
4265 else
4266 with_xaw3d=$with_features
4270 # Check whether --with-xim was given.
4271 if test "${with_xim+set}" = set; then :
4272 withval=$with_xim;
4273 else
4274 with_xim=$with_features
4278 # Check whether --with-ns was given.
4279 if test "${with_ns+set}" = set; then :
4280 withval=$with_ns;
4281 else
4282 with_ns=no
4286 # Check whether --with-w32 was given.
4287 if test "${with_w32+set}" = set; then :
4288 withval=$with_w32;
4289 else
4290 with_w32=no
4295 # Check whether --with-gpm was given.
4296 if test "${with_gpm+set}" = set; then :
4297 withval=$with_gpm;
4298 else
4299 with_gpm=$with_features
4303 # Check whether --with-dbus was given.
4304 if test "${with_dbus+set}" = set; then :
4305 withval=$with_dbus;
4306 else
4307 with_dbus=$with_features
4311 # Check whether --with-gconf was given.
4312 if test "${with_gconf+set}" = set; then :
4313 withval=$with_gconf;
4314 else
4315 with_gconf=$with_features
4319 # Check whether --with-gsettings was given.
4320 if test "${with_gsettings+set}" = set; then :
4321 withval=$with_gsettings;
4322 else
4323 with_gsettings=$with_features
4327 # Check whether --with-selinux was given.
4328 if test "${with_selinux+set}" = set; then :
4329 withval=$with_selinux;
4330 else
4331 with_selinux=$with_features
4335 # Check whether --with-gnutls was given.
4336 if test "${with_gnutls+set}" = set; then :
4337 withval=$with_gnutls;
4338 else
4339 with_gnutls=$with_features
4344 # Check whether --with-file-notification was given.
4345 if test "${with_file_notification+set}" = set; then :
4346 withval=$with_file_notification; case "${withval}" in
4347 y | ye | yes ) val=yes ;;
4348 n | no ) val=no ;;
4349 g | gf | gfi | gfil | gfile ) val=gfile ;;
4350 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4351 w | w3 | w32 ) val=w32 ;;
4352 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4353 this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
4354 \`yes' is a synonym for \`w32' on MS-Windows, and for \`gfile' otherwise." "$LINENO" 5
4356 esac
4357 with_file_notification=$val
4359 else
4360 with_file_notification=$with_features
4364 ## For the times when you want to build Emacs but don't have
4365 ## a suitable makeinfo, and can live without the manuals.
4367 # Check whether --with-makeinfo was given.
4368 if test "${with_makeinfo+set}" = set; then :
4369 withval=$with_makeinfo;
4370 else
4371 with_makeinfo=$with_features
4375 ## Makefile.in needs the cache file name.
4378 ## This is an option because I do not know if all info/man support
4379 ## compressed files, nor how to test if they do so.
4381 # Check whether --with-compress-info was given.
4382 if test "${with_compress_info+set}" = set; then :
4383 withval=$with_compress_info;
4384 else
4385 with_compress_info=$with_features
4388 if test $with_compress_info = yes; then
4389 GZIP_INFO=yes
4390 else
4391 GZIP_INFO=
4396 # Check whether --with-pkg-config-prog was given.
4397 if test "${with_pkg_config_prog+set}" = set; then :
4398 withval=$with_pkg_config_prog;
4401 if test "X${with_pkg_config_prog}" != X; then
4402 if test "${with_pkg_config_prog}" != yes; then
4403 PKG_CONFIG="${with_pkg_config_prog}"
4408 # Check whether --with-gameuser was given.
4409 if test "${with_gameuser+set}" = set; then :
4410 withval=$with_gameuser;
4413 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4414 && gameuser="${with_gameuser}"
4415 test "X$gameuser" = X && gameuser=games
4418 # Check whether --with-gnustep-conf was given.
4419 if test "${with_gnustep_conf+set}" = set; then :
4420 withval=$with_gnustep_conf;
4423 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4424 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4425 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4426 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4428 # Check whether --enable-ns-self-contained was given.
4429 if test "${enable_ns_self_contained+set}" = set; then :
4430 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4431 else
4432 EN_NS_SELF_CONTAINED=yes
4436 # Check whether --enable-locallisppath was given.
4437 if test "${enable_locallisppath+set}" = set; then :
4438 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4439 locallisppath=
4440 elif test "${enableval}" != "yes"; then
4441 locallisppath=${enableval}
4446 # Check whether --enable-checking was given.
4447 if test "${enable_checking+set}" = set; then :
4448 enableval=$enable_checking; ac_checking_flags="${enableval}"
4451 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4452 for check in $ac_checking_flags
4454 case $check in
4455 # these set all the flags to specific states
4456 yes) ac_enable_checking=1 ;;
4457 no) ac_enable_checking= ;
4458 ac_gc_check_stringbytes= ;
4459 ac_gc_check_string_overrun= ;
4460 ac_gc_check_string_free_list= ;
4461 ac_xmalloc_overrun= ;
4462 ac_gc_check_cons_list= ;
4463 ac_glyphs_debug= ;;
4464 all) ac_enable_checking=1 ;
4465 ac_gc_check_stringbytes=1 ;
4466 ac_gc_check_string_overrun=1 ;
4467 ac_gc_check_string_free_list=1 ;
4468 ac_xmalloc_overrun=1 ;
4469 ac_gc_check_cons_list=1 ;
4470 ac_glyphs_debug=1 ;;
4471 # these enable particular checks
4472 stringbytes) ac_gc_check_stringbytes=1 ;;
4473 stringoverrun) ac_gc_check_string_overrun=1 ;;
4474 stringfreelist) ac_gc_check_string_free_list=1 ;;
4475 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4476 conslist) ac_gc_check_cons_list=1 ;;
4477 glyphs) ac_glyphs_debug=1 ;;
4478 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4479 esac
4480 done
4481 IFS="$ac_save_IFS"
4483 if test x$ac_enable_checking != x ; then
4485 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4488 if test x$ac_gc_check_stringbytes != x ; then
4490 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4493 if test x$ac_gc_check_string_overrun != x ; then
4495 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4498 if test x$ac_gc_check_string_free_list != x ; then
4500 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4503 if test x$ac_xmalloc_overrun != x ; then
4505 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4508 if test x$ac_gc_check_cons_list != x ; then
4510 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4513 if test x$ac_glyphs_debug != x ; then
4515 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4519 # Check whether --enable-check-lisp-object-type was given.
4520 if test "${enable_check_lisp_object_type+set}" = set; then :
4521 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4523 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4530 # Check whether --enable-profiling was given.
4531 if test "${enable_profiling+set}" = set; then :
4532 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4535 if test x$ac_enable_profiling != x ; then
4536 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4537 else
4538 PROFILING_CFLAGS=
4542 # Check whether --enable-autodepend was given.
4543 if test "${enable_autodepend+set}" = set; then :
4544 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4545 else
4546 ac_enable_autodepend=yes
4550 # Check whether --enable-gtk-deprecation-warnings was given.
4551 if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4552 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4556 #### Make srcdir absolute, if it isn't already. It's important to
4557 #### avoid running the file name through pwd unnecessarily, since pwd can
4558 #### give you automounter prefixes, which can go away. We do all this
4559 #### so Emacs can find its files when run uninstalled.
4560 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4561 unset CDPATH
4562 case "${srcdir}" in
4563 [\\/]* | ?:[\\/]*) ;;
4565 ## We may be able to use the $PWD environment variable to make this
4566 ## absolute. But sometimes PWD is inaccurate.
4567 ## Note: we used to use $PWD at the end instead of `pwd`,
4568 ## but that tested only for a well-formed and valid PWD,
4569 ## it did not object when PWD was well-formed and valid but just wrong.
4570 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
4571 then
4572 srcdir="$PWD"
4573 else
4574 srcdir=`(cd "$srcdir"; pwd)`
4577 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
4578 esac
4580 ### Canonicalize the configuration name.
4582 # Make sure we can run config.sub.
4583 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4584 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4587 $as_echo_n "checking build system type... " >&6; }
4588 if test "${ac_cv_build+set}" = set; then :
4589 $as_echo_n "(cached) " >&6
4590 else
4591 ac_build_alias=$build_alias
4592 test "x$ac_build_alias" = x &&
4593 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4594 test "x$ac_build_alias" = x &&
4595 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4596 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4597 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4601 $as_echo "$ac_cv_build" >&6; }
4602 case $ac_cv_build in
4603 *-*-*) ;;
4604 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4605 esac
4606 build=$ac_cv_build
4607 ac_save_IFS=$IFS; IFS='-'
4608 set x $ac_cv_build
4609 shift
4610 build_cpu=$1
4611 build_vendor=$2
4612 shift; shift
4613 # Remember, the first character of IFS is used to create $*,
4614 # except with old shells:
4615 build_os=$*
4616 IFS=$ac_save_IFS
4617 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4621 $as_echo_n "checking host system type... " >&6; }
4622 if test "${ac_cv_host+set}" = set; then :
4623 $as_echo_n "(cached) " >&6
4624 else
4625 if test "x$host_alias" = x; then
4626 ac_cv_host=$ac_cv_build
4627 else
4628 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4629 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4634 $as_echo "$ac_cv_host" >&6; }
4635 case $ac_cv_host in
4636 *-*-*) ;;
4637 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4638 esac
4639 host=$ac_cv_host
4640 ac_save_IFS=$IFS; IFS='-'
4641 set x $ac_cv_host
4642 shift
4643 host_cpu=$1
4644 host_vendor=$2
4645 shift; shift
4646 # Remember, the first character of IFS is used to create $*,
4647 # except with old shells:
4648 host_os=$*
4649 IFS=$ac_save_IFS
4650 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4653 canonical=$host
4654 configuration=${host_alias-${build_alias-$host}}
4658 ### If you add support for a new configuration, add code to this
4659 ### switch statement to recognize your configuration name and select
4660 ### the appropriate operating system file.
4662 ### You would hope that you could choose an s/*.h
4663 ### file based on the operating system portion. However, it turns out
4664 ### that each s/*.h file is pretty manufacturer-specific.
4665 ### So we basically have to have a special case for each
4666 ### configuration name.
4668 ### As far as handling version numbers on operating systems is
4669 ### concerned, make sure things will fail in a fixable way. If
4670 ### /etc/MACHINES doesn't say anything about version numbers, be
4671 ### prepared to handle anything reasonably. If version numbers
4672 ### matter, be sure /etc/MACHINES says something about it.
4674 opsys='' unported=no
4675 case "${canonical}" in
4677 ## GNU/Linux and similar ports
4678 *-*-linux* )
4679 opsys=gnu-linux
4682 ## FreeBSD ports
4683 *-*-freebsd* )
4684 opsys=freebsd
4687 ## DragonFly ports
4688 *-*-dragonfly* )
4689 opsys=dragonfly
4692 ## FreeBSD kernel + glibc based userland
4693 *-*-kfreebsd*gnu* )
4694 opsys=gnu-kfreebsd
4697 ## NetBSD ports
4698 *-*-netbsd* )
4699 opsys=netbsd
4702 ## OpenBSD ports
4703 *-*-openbsd* )
4704 opsys=openbsd
4707 ## Apple Darwin / Mac OS X
4708 *-apple-darwin* )
4709 case "${canonical}" in
4710 i[3456]86-* ) ;;
4711 powerpc-* ) ;;
4712 x86_64-* ) ;;
4713 * ) unported=yes ;;
4714 esac
4715 opsys=darwin
4716 ## Use fink packages if available.
4717 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4718 ## if test -d /sw/include && test -d /sw/lib; then
4719 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4720 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4721 ## fi
4724 ## Cygwin ports
4725 *-*-cygwin )
4726 opsys=cygwin
4729 ## HP 9000 series 700 and 800, running HP/UX
4730 hppa*-hp-hpux10.2* )
4731 opsys=hpux10-20
4733 hppa*-hp-hpux1[1-9]* )
4734 opsys=hpux11
4735 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4738 ## IBM machines
4739 rs6000-ibm-aix4.[23]* )
4740 opsys=aix4-2
4742 powerpc-ibm-aix4.[23]* )
4743 opsys=aix4-2
4745 rs6000-ibm-aix[56]* )
4746 opsys=aix4-2
4748 powerpc-ibm-aix[56]* )
4749 opsys=aix4-2
4752 ## Silicon Graphics machines
4753 ## Iris 4D
4754 mips-sgi-irix6.5 )
4755 opsys=irix6-5
4756 # Without defining _LANGUAGE_C, things get masked out in the headers
4757 # so that, for instance, grepping for `free' in stdlib.h fails and
4758 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4759 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4762 ## Suns
4763 *-sun-solaris* \
4764 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4765 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4766 case "${canonical}" in
4767 i[3456]86-*-* ) ;;
4768 amd64-*-*|x86_64-*-*) ;;
4769 sparc* ) ;;
4770 * ) unported=yes ;;
4771 esac
4772 case "${canonical}" in
4773 *-sunos5.6* | *-solaris2.6* )
4774 opsys=sol2-6
4775 RANLIB="ar -ts"
4777 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4778 opsys=sol2-6
4779 emacs_check_sunpro_c=yes
4781 *-sunos5* | *-solaris* )
4782 opsys=sol2-10
4783 emacs_check_sunpro_c=yes
4785 esac
4786 ## Watch out for a compiler that we know will not work.
4787 case "${canonical}" in
4788 *-solaris* | *-sunos5* )
4789 if [ "x$CC" = x/usr/ucb/cc ]; then
4790 ## /usr/ucb/cc doesn't work;
4791 ## we should find some other compiler that does work.
4792 unset CC
4795 *) ;;
4796 esac
4799 ## Intel 386 machines where we don't care about the manufacturer.
4800 i[3456]86-*-* )
4801 case "${canonical}" in
4802 *-darwin* ) opsys=darwin ;;
4803 *-mingw32 )
4804 opsys=mingw32
4805 # MinGW overrides and adds some system headers in nt/inc.
4806 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4808 *-sysv4.2uw* ) opsys=unixware ;;
4809 *-sysv5uw* ) opsys=unixware ;;
4810 *-sysv5OpenUNIX* ) opsys=unixware ;;
4811 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4812 esac
4816 unported=yes
4818 esac
4820 ### If the code above didn't choose an operating system, just choose
4821 ### an operating system based on the configuration name. You really
4822 ### only want to use this when you have no idea what the right
4823 ### operating system is; if you know what operating systems a machine
4824 ### runs, it's cleaner to make it explicit in the case statement
4825 ### above.
4826 if test x"${opsys}" = x; then
4827 case "${canonical}" in
4828 *-gnu* ) opsys=gnu ;;
4830 unported=yes
4832 esac
4837 if test $unported = yes; then
4838 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4839 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4843 #### Choose a compiler.
4845 ac_ext=c
4846 ac_cpp='$CPP $CPPFLAGS'
4847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4850 if test -n "$ac_tool_prefix"; then
4851 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4852 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4854 $as_echo_n "checking for $ac_word... " >&6; }
4855 if test "${ac_cv_prog_CC+set}" = set; then :
4856 $as_echo_n "(cached) " >&6
4857 else
4858 if test -n "$CC"; then
4859 ac_cv_prog_CC="$CC" # Let the user override the test.
4860 else
4861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862 for as_dir in $PATH
4864 IFS=$as_save_IFS
4865 test -z "$as_dir" && as_dir=.
4866 for ac_exec_ext in '' $ac_executable_extensions; do
4867 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4868 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4870 break 2
4872 done
4873 done
4874 IFS=$as_save_IFS
4878 CC=$ac_cv_prog_CC
4879 if test -n "$CC"; then
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4881 $as_echo "$CC" >&6; }
4882 else
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4884 $as_echo "no" >&6; }
4889 if test -z "$ac_cv_prog_CC"; then
4890 ac_ct_CC=$CC
4891 # Extract the first word of "gcc", so it can be a program name with args.
4892 set dummy gcc; ac_word=$2
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894 $as_echo_n "checking for $ac_word... " >&6; }
4895 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4896 $as_echo_n "(cached) " >&6
4897 else
4898 if test -n "$ac_ct_CC"; then
4899 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4900 else
4901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902 for as_dir in $PATH
4904 IFS=$as_save_IFS
4905 test -z "$as_dir" && as_dir=.
4906 for ac_exec_ext in '' $ac_executable_extensions; do
4907 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4908 ac_cv_prog_ac_ct_CC="gcc"
4909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910 break 2
4912 done
4913 done
4914 IFS=$as_save_IFS
4918 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4919 if test -n "$ac_ct_CC"; then
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4921 $as_echo "$ac_ct_CC" >&6; }
4922 else
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924 $as_echo "no" >&6; }
4927 if test "x$ac_ct_CC" = x; then
4928 CC=""
4929 else
4930 case $cross_compiling:$ac_tool_warned in
4931 yes:)
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4933 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4934 ac_tool_warned=yes ;;
4935 esac
4936 CC=$ac_ct_CC
4938 else
4939 CC="$ac_cv_prog_CC"
4942 if test -z "$CC"; then
4943 if test -n "$ac_tool_prefix"; then
4944 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4945 set dummy ${ac_tool_prefix}cc; ac_word=$2
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947 $as_echo_n "checking for $ac_word... " >&6; }
4948 if test "${ac_cv_prog_CC+set}" = set; then :
4949 $as_echo_n "(cached) " >&6
4950 else
4951 if test -n "$CC"; then
4952 ac_cv_prog_CC="$CC" # Let the user override the test.
4953 else
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955 for as_dir in $PATH
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4961 ac_cv_prog_CC="${ac_tool_prefix}cc"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4965 done
4966 done
4967 IFS=$as_save_IFS
4971 CC=$ac_cv_prog_CC
4972 if test -n "$CC"; then
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4974 $as_echo "$CC" >&6; }
4975 else
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977 $as_echo "no" >&6; }
4983 if test -z "$CC"; then
4984 # Extract the first word of "cc", so it can be a program name with args.
4985 set dummy cc; ac_word=$2
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987 $as_echo_n "checking for $ac_word... " >&6; }
4988 if test "${ac_cv_prog_CC+set}" = set; then :
4989 $as_echo_n "(cached) " >&6
4990 else
4991 if test -n "$CC"; then
4992 ac_cv_prog_CC="$CC" # Let the user override the test.
4993 else
4994 ac_prog_rejected=no
4995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4996 for as_dir in $PATH
4998 IFS=$as_save_IFS
4999 test -z "$as_dir" && as_dir=.
5000 for ac_exec_ext in '' $ac_executable_extensions; do
5001 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5002 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5003 ac_prog_rejected=yes
5004 continue
5006 ac_cv_prog_CC="cc"
5007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5008 break 2
5010 done
5011 done
5012 IFS=$as_save_IFS
5014 if test $ac_prog_rejected = yes; then
5015 # We found a bogon in the path, so make sure we never use it.
5016 set dummy $ac_cv_prog_CC
5017 shift
5018 if test $# != 0; then
5019 # We chose a different compiler from the bogus one.
5020 # However, it has the same basename, so the bogon will be chosen
5021 # first if we set CC to just the basename; use the full file name.
5022 shift
5023 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5028 CC=$ac_cv_prog_CC
5029 if test -n "$CC"; then
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5031 $as_echo "$CC" >&6; }
5032 else
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5034 $as_echo "no" >&6; }
5039 if test -z "$CC"; then
5040 if test -n "$ac_tool_prefix"; then
5041 for ac_prog in cl.exe
5043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5044 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046 $as_echo_n "checking for $ac_word... " >&6; }
5047 if test "${ac_cv_prog_CC+set}" = set; then :
5048 $as_echo_n "(cached) " >&6
5049 else
5050 if test -n "$CC"; then
5051 ac_cv_prog_CC="$CC" # Let the user override the test.
5052 else
5053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054 for as_dir in $PATH
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
5058 for ac_exec_ext in '' $ac_executable_extensions; do
5059 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5060 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5062 break 2
5064 done
5065 done
5066 IFS=$as_save_IFS
5070 CC=$ac_cv_prog_CC
5071 if test -n "$CC"; then
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5073 $as_echo "$CC" >&6; }
5074 else
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076 $as_echo "no" >&6; }
5080 test -n "$CC" && break
5081 done
5083 if test -z "$CC"; then
5084 ac_ct_CC=$CC
5085 for ac_prog in cl.exe
5087 # Extract the first word of "$ac_prog", so it can be a program name with args.
5088 set dummy $ac_prog; ac_word=$2
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090 $as_echo_n "checking for $ac_word... " >&6; }
5091 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5092 $as_echo_n "(cached) " >&6
5093 else
5094 if test -n "$ac_ct_CC"; then
5095 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5096 else
5097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098 for as_dir in $PATH
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
5102 for ac_exec_ext in '' $ac_executable_extensions; do
5103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5104 ac_cv_prog_ac_ct_CC="$ac_prog"
5105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106 break 2
5108 done
5109 done
5110 IFS=$as_save_IFS
5114 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5115 if test -n "$ac_ct_CC"; then
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5117 $as_echo "$ac_ct_CC" >&6; }
5118 else
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120 $as_echo "no" >&6; }
5124 test -n "$ac_ct_CC" && break
5125 done
5127 if test "x$ac_ct_CC" = x; then
5128 CC=""
5129 else
5130 case $cross_compiling:$ac_tool_warned in
5131 yes:)
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5133 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5134 ac_tool_warned=yes ;;
5135 esac
5136 CC=$ac_ct_CC
5143 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5144 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5145 as_fn_error "no acceptable C compiler found in \$PATH
5146 See \`config.log' for more details." "$LINENO" 5; }
5148 # Provide some information about the compiler.
5149 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5150 set X $ac_compile
5151 ac_compiler=$2
5152 for ac_option in --version -v -V -qversion; do
5153 { { ac_try="$ac_compiler $ac_option >&5"
5154 case "(($ac_try" in
5155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5156 *) ac_try_echo=$ac_try;;
5157 esac
5158 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5159 $as_echo "$ac_try_echo"; } >&5
5160 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5161 ac_status=$?
5162 if test -s conftest.err; then
5163 sed '10a\
5164 ... rest of stderr output deleted ...
5165 10q' conftest.err >conftest.er1
5166 cat conftest.er1 >&5
5168 rm -f conftest.er1 conftest.err
5169 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5170 test $ac_status = 0; }
5171 done
5173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5174 /* end confdefs.h. */
5177 main ()
5181 return 0;
5183 _ACEOF
5184 ac_clean_files_save=$ac_clean_files
5185 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5186 # Try to create an executable without -o first, disregard a.out.
5187 # It will help us diagnose broken compilers, and finding out an intuition
5188 # of exeext.
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5190 $as_echo_n "checking whether the C compiler works... " >&6; }
5191 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5193 # The possible output files:
5194 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5196 ac_rmfiles=
5197 for ac_file in $ac_files
5199 case $ac_file in
5200 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5201 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5202 esac
5203 done
5204 rm -f $ac_rmfiles
5206 if { { ac_try="$ac_link_default"
5207 case "(($ac_try" in
5208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5209 *) ac_try_echo=$ac_try;;
5210 esac
5211 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5212 $as_echo "$ac_try_echo"; } >&5
5213 (eval "$ac_link_default") 2>&5
5214 ac_status=$?
5215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5216 test $ac_status = 0; }; then :
5217 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5218 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5219 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5220 # so that the user can short-circuit this test for compilers unknown to
5221 # Autoconf.
5222 for ac_file in $ac_files ''
5224 test -f "$ac_file" || continue
5225 case $ac_file in
5226 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5228 [ab].out )
5229 # We found the default executable, but exeext='' is most
5230 # certainly right.
5231 break;;
5232 *.* )
5233 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5234 then :; else
5235 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5237 # We set ac_cv_exeext here because the later test for it is not
5238 # safe: cross compilers may not add the suffix if given an `-o'
5239 # argument, so we may need to know it at that point already.
5240 # Even if this section looks crufty: it has the advantage of
5241 # actually working.
5242 break;;
5244 break;;
5245 esac
5246 done
5247 test "$ac_cv_exeext" = no && ac_cv_exeext=
5249 else
5250 ac_file=''
5252 if test -z "$ac_file"; then :
5253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5254 $as_echo "no" >&6; }
5255 $as_echo "$as_me: failed program was:" >&5
5256 sed 's/^/| /' conftest.$ac_ext >&5
5258 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5259 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5260 { as_fn_set_status 77
5261 as_fn_error "C compiler cannot create executables
5262 See \`config.log' for more details." "$LINENO" 5; }; }
5263 else
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5265 $as_echo "yes" >&6; }
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5268 $as_echo_n "checking for C compiler default output file name... " >&6; }
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5270 $as_echo "$ac_file" >&6; }
5271 ac_exeext=$ac_cv_exeext
5273 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5274 ac_clean_files=$ac_clean_files_save
5275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5276 $as_echo_n "checking for suffix of executables... " >&6; }
5277 if { { ac_try="$ac_link"
5278 case "(($ac_try" in
5279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5280 *) ac_try_echo=$ac_try;;
5281 esac
5282 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5283 $as_echo "$ac_try_echo"; } >&5
5284 (eval "$ac_link") 2>&5
5285 ac_status=$?
5286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5287 test $ac_status = 0; }; then :
5288 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5289 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5290 # work properly (i.e., refer to `conftest.exe'), while it won't with
5291 # `rm'.
5292 for ac_file in conftest.exe conftest conftest.*; do
5293 test -f "$ac_file" || continue
5294 case $ac_file in
5295 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5296 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5297 break;;
5298 * ) break;;
5299 esac
5300 done
5301 else
5302 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5303 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5304 as_fn_error "cannot compute suffix of executables: cannot compile and link
5305 See \`config.log' for more details." "$LINENO" 5; }
5307 rm -f conftest conftest$ac_cv_exeext
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5309 $as_echo "$ac_cv_exeext" >&6; }
5311 rm -f conftest.$ac_ext
5312 EXEEXT=$ac_cv_exeext
5313 ac_exeext=$EXEEXT
5314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5315 /* end confdefs.h. */
5316 #include <stdio.h>
5318 main ()
5320 FILE *f = fopen ("conftest.out", "w");
5321 return ferror (f) || fclose (f) != 0;
5324 return 0;
5326 _ACEOF
5327 ac_clean_files="$ac_clean_files conftest.out"
5328 # Check that the compiler produces executables we can run. If not, either
5329 # the compiler is broken, or we cross compile.
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5331 $as_echo_n "checking whether we are cross compiling... " >&6; }
5332 if test "$cross_compiling" != yes; then
5333 { { ac_try="$ac_link"
5334 case "(($ac_try" in
5335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5336 *) ac_try_echo=$ac_try;;
5337 esac
5338 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5339 $as_echo "$ac_try_echo"; } >&5
5340 (eval "$ac_link") 2>&5
5341 ac_status=$?
5342 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5343 test $ac_status = 0; }
5344 if { ac_try='./conftest$ac_cv_exeext'
5345 { { case "(($ac_try" in
5346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5347 *) ac_try_echo=$ac_try;;
5348 esac
5349 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5350 $as_echo "$ac_try_echo"; } >&5
5351 (eval "$ac_try") 2>&5
5352 ac_status=$?
5353 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5354 test $ac_status = 0; }; }; then
5355 cross_compiling=no
5356 else
5357 if test "$cross_compiling" = maybe; then
5358 cross_compiling=yes
5359 else
5360 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5361 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5362 as_fn_error "cannot run C compiled programs.
5363 If you meant to cross compile, use \`--host'.
5364 See \`config.log' for more details." "$LINENO" 5; }
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5369 $as_echo "$cross_compiling" >&6; }
5371 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5372 ac_clean_files=$ac_clean_files_save
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5374 $as_echo_n "checking for suffix of object files... " >&6; }
5375 if test "${ac_cv_objext+set}" = set; then :
5376 $as_echo_n "(cached) " >&6
5377 else
5378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5379 /* end confdefs.h. */
5382 main ()
5386 return 0;
5388 _ACEOF
5389 rm -f conftest.o conftest.obj
5390 if { { ac_try="$ac_compile"
5391 case "(($ac_try" in
5392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5393 *) ac_try_echo=$ac_try;;
5394 esac
5395 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5396 $as_echo "$ac_try_echo"; } >&5
5397 (eval "$ac_compile") 2>&5
5398 ac_status=$?
5399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5400 test $ac_status = 0; }; then :
5401 for ac_file in conftest.o conftest.obj conftest.*; do
5402 test -f "$ac_file" || continue;
5403 case $ac_file in
5404 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5405 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5406 break;;
5407 esac
5408 done
5409 else
5410 $as_echo "$as_me: failed program was:" >&5
5411 sed 's/^/| /' conftest.$ac_ext >&5
5413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5414 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5415 as_fn_error "cannot compute suffix of object files: cannot compile
5416 See \`config.log' for more details." "$LINENO" 5; }
5418 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5421 $as_echo "$ac_cv_objext" >&6; }
5422 OBJEXT=$ac_cv_objext
5423 ac_objext=$OBJEXT
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5425 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5426 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5427 $as_echo_n "(cached) " >&6
5428 else
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5430 /* end confdefs.h. */
5433 main ()
5435 #ifndef __GNUC__
5436 choke me
5437 #endif
5440 return 0;
5442 _ACEOF
5443 if ac_fn_c_try_compile "$LINENO"; then :
5444 ac_compiler_gnu=yes
5445 else
5446 ac_compiler_gnu=no
5448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5449 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5453 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5454 if test $ac_compiler_gnu = yes; then
5455 GCC=yes
5456 else
5457 GCC=
5459 ac_test_CFLAGS=${CFLAGS+set}
5460 ac_save_CFLAGS=$CFLAGS
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5462 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5463 if test "${ac_cv_prog_cc_g+set}" = set; then :
5464 $as_echo_n "(cached) " >&6
5465 else
5466 ac_save_c_werror_flag=$ac_c_werror_flag
5467 ac_c_werror_flag=yes
5468 ac_cv_prog_cc_g=no
5469 CFLAGS="-g"
5470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471 /* end confdefs.h. */
5474 main ()
5478 return 0;
5480 _ACEOF
5481 if ac_fn_c_try_compile "$LINENO"; then :
5482 ac_cv_prog_cc_g=yes
5483 else
5484 CFLAGS=""
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5486 /* end confdefs.h. */
5489 main ()
5493 return 0;
5495 _ACEOF
5496 if ac_fn_c_try_compile "$LINENO"; then :
5498 else
5499 ac_c_werror_flag=$ac_save_c_werror_flag
5500 CFLAGS="-g"
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 :
5513 ac_cv_prog_cc_g=yes
5515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5520 ac_c_werror_flag=$ac_save_c_werror_flag
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5523 $as_echo "$ac_cv_prog_cc_g" >&6; }
5524 if test "$ac_test_CFLAGS" = set; then
5525 CFLAGS=$ac_save_CFLAGS
5526 elif test $ac_cv_prog_cc_g = yes; then
5527 if test "$GCC" = yes; then
5528 CFLAGS="-g -O2"
5529 else
5530 CFLAGS="-g"
5532 else
5533 if test "$GCC" = yes; then
5534 CFLAGS="-O2"
5535 else
5536 CFLAGS=
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5540 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5541 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5542 $as_echo_n "(cached) " >&6
5543 else
5544 ac_cv_prog_cc_c89=no
5545 ac_save_CC=$CC
5546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5547 /* end confdefs.h. */
5548 #include <stdarg.h>
5549 #include <stdio.h>
5550 #include <sys/types.h>
5551 #include <sys/stat.h>
5552 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5553 struct buf { int x; };
5554 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5555 static char *e (p, i)
5556 char **p;
5557 int i;
5559 return p[i];
5561 static char *f (char * (*g) (char **, int), char **p, ...)
5563 char *s;
5564 va_list v;
5565 va_start (v,p);
5566 s = g (p, va_arg (v,int));
5567 va_end (v);
5568 return s;
5571 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5572 function prototypes and stuff, but not '\xHH' hex character constants.
5573 These don't provoke an error unfortunately, instead are silently treated
5574 as 'x'. The following induces an error, until -std is added to get
5575 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5576 array size at least. It's necessary to write '\x00'==0 to get something
5577 that's true only with -std. */
5578 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5580 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5581 inside strings and character constants. */
5582 #define FOO(x) 'x'
5583 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5585 int test (int i, double x);
5586 struct s1 {int (*f) (int a);};
5587 struct s2 {int (*f) (double a);};
5588 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5589 int argc;
5590 char **argv;
5592 main ()
5594 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5596 return 0;
5598 _ACEOF
5599 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5600 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5602 CC="$ac_save_CC $ac_arg"
5603 if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_prog_cc_c89=$ac_arg
5606 rm -f core conftest.err conftest.$ac_objext
5607 test "x$ac_cv_prog_cc_c89" != "xno" && break
5608 done
5609 rm -f conftest.$ac_ext
5610 CC=$ac_save_CC
5613 # AC_CACHE_VAL
5614 case "x$ac_cv_prog_cc_c89" in
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5617 $as_echo "none needed" >&6; } ;;
5618 xno)
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5620 $as_echo "unsupported" >&6; } ;;
5622 CC="$CC $ac_cv_prog_cc_c89"
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5624 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5625 esac
5626 if test "x$ac_cv_prog_cc_c89" != xno; then :
5630 ac_ext=c
5631 ac_cpp='$CPP $CPPFLAGS'
5632 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5633 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5634 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5635 DEPDIR="${am__leading_dot}deps"
5637 ac_config_commands="$ac_config_commands depfiles"
5640 am_make=${MAKE-make}
5641 cat > confinc << 'END'
5642 am__doit:
5643 @echo this is the am__doit target
5644 .PHONY: am__doit
5646 # If we don't find an include directive, just comment out the code.
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5648 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5649 am__include="#"
5650 am__quote=
5651 _am_result=none
5652 # First try GNU make style include.
5653 echo "include confinc" > confmf
5654 # Ignore all kinds of additional output from `make'.
5655 case `$am_make -s -f confmf 2> /dev/null` in #(
5656 *the\ am__doit\ target*)
5657 am__include=include
5658 am__quote=
5659 _am_result=GNU
5661 esac
5662 # Now try BSD make style include.
5663 if test "$am__include" = "#"; then
5664 echo '.include "confinc"' > confmf
5665 case `$am_make -s -f confmf 2> /dev/null` in #(
5666 *the\ am__doit\ target*)
5667 am__include=.include
5668 am__quote="\""
5669 _am_result=BSD
5671 esac
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5676 $as_echo "$_am_result" >&6; }
5677 rm -f confinc confmf
5679 # Check whether --enable-dependency-tracking was given.
5680 if test "${enable_dependency_tracking+set}" = set; then :
5681 enableval=$enable_dependency_tracking;
5684 if test "x$enable_dependency_tracking" != xno; then
5685 am_depcomp="$ac_aux_dir/depcomp"
5686 AMDEPBACKSLASH='\'
5688 if test "x$enable_dependency_tracking" != xno; then
5689 AMDEP_TRUE=
5690 AMDEP_FALSE='#'
5691 else
5692 AMDEP_TRUE='#'
5693 AMDEP_FALSE=
5698 depcc="$CC" am_compiler_list=
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5701 $as_echo_n "checking dependency style of $depcc... " >&6; }
5702 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5703 $as_echo_n "(cached) " >&6
5704 else
5705 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5706 # We make a subdir and do the tests there. Otherwise we can end up
5707 # making bogus files that we don't know about and never remove. For
5708 # instance it was reported that on HP-UX the gcc test will end up
5709 # making a dummy file named `D' -- because `-MD' means `put the output
5710 # in D'.
5711 mkdir conftest.dir
5712 # Copy depcomp to subdir because otherwise we won't find it if we're
5713 # using a relative directory.
5714 cp "$am_depcomp" conftest.dir
5715 cd conftest.dir
5716 # We will build objects and dependencies in a subdirectory because
5717 # it helps to detect inapplicable dependency modes. For instance
5718 # both Tru64's cc and ICC support -MD to output dependencies as a
5719 # side effect of compilation, but ICC will put the dependencies in
5720 # the current directory while Tru64 will put them in the object
5721 # directory.
5722 mkdir sub
5724 am_cv_CC_dependencies_compiler_type=none
5725 if test "$am_compiler_list" = ""; then
5726 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5728 am__universal=false
5729 case " $depcc " in #(
5730 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5731 esac
5733 for depmode in $am_compiler_list; do
5734 # Setup a source with many dependencies, because some compilers
5735 # like to wrap large dependency lists on column 80 (with \), and
5736 # we should not choose a depcomp mode which is confused by this.
5738 # We need to recreate these files for each test, as the compiler may
5739 # overwrite some of them when testing with obscure command lines.
5740 # This happens at least with the AIX C compiler.
5741 : > sub/conftest.c
5742 for i in 1 2 3 4 5 6; do
5743 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5744 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5745 # Solaris 8's {/usr,}/bin/sh.
5746 touch sub/conftst$i.h
5747 done
5748 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5750 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5751 # mode. It turns out that the SunPro C++ compiler does not properly
5752 # handle `-M -o', and we need to detect this. Also, some Intel
5753 # versions had trouble with output in subdirs
5754 am__obj=sub/conftest.${OBJEXT-o}
5755 am__minus_obj="-o $am__obj"
5756 case $depmode in
5757 gcc)
5758 # This depmode causes a compiler race in universal mode.
5759 test "$am__universal" = false || continue
5761 nosideeffect)
5762 # after this tag, mechanisms are not by side-effect, so they'll
5763 # only be used when explicitly requested
5764 if test "x$enable_dependency_tracking" = xyes; then
5765 continue
5766 else
5767 break
5770 msvisualcpp | msvcmsys)
5771 # This compiler won't grok `-c -o', but also, the minuso test has
5772 # not run yet. These depmodes are late enough in the game, and
5773 # so weak that their functioning should not be impacted.
5774 am__obj=conftest.${OBJEXT-o}
5775 am__minus_obj=
5777 none) break ;;
5778 esac
5779 if depmode=$depmode \
5780 source=sub/conftest.c object=$am__obj \
5781 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5782 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5783 >/dev/null 2>conftest.err &&
5784 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5785 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5786 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5787 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5788 # icc doesn't choke on unknown options, it will just issue warnings
5789 # or remarks (even with -Werror). So we grep stderr for any message
5790 # that says an option was ignored or not supported.
5791 # When given -MP, icc 7.0 and 7.1 complain thusly:
5792 # icc: Command line warning: ignoring option '-M'; no argument required
5793 # The diagnosis changed in icc 8.0:
5794 # icc: Command line remark: option '-MP' not supported
5795 if (grep 'ignoring option' conftest.err ||
5796 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5797 am_cv_CC_dependencies_compiler_type=$depmode
5798 break
5801 done
5803 cd ..
5804 rm -rf conftest.dir
5805 else
5806 am_cv_CC_dependencies_compiler_type=none
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5811 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5812 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5815 test "x$enable_dependency_tracking" != xno \
5816 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5817 am__fastdepCC_TRUE=
5818 am__fastdepCC_FALSE='#'
5819 else
5820 am__fastdepCC_TRUE='#'
5821 am__fastdepCC_FALSE=
5825 if test "x$CC" != xcc; then
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5827 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5828 else
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5830 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5832 set dummy $CC; ac_cc=`$as_echo "$2" |
5833 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5834 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5835 $as_echo_n "(cached) " >&6
5836 else
5837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5838 /* end confdefs.h. */
5841 main ()
5845 return 0;
5847 _ACEOF
5848 # Make sure it works both with $CC and with simple cc.
5849 # We do the test twice because some compilers refuse to overwrite an
5850 # existing .o file with -o, though they will create one.
5851 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5852 rm -f conftest2.*
5853 if { { case "(($ac_try" in
5854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5855 *) ac_try_echo=$ac_try;;
5856 esac
5857 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5858 $as_echo "$ac_try_echo"; } >&5
5859 (eval "$ac_try") 2>&5
5860 ac_status=$?
5861 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5862 test $ac_status = 0; } &&
5863 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5865 *) ac_try_echo=$ac_try;;
5866 esac
5867 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5868 $as_echo "$ac_try_echo"; } >&5
5869 (eval "$ac_try") 2>&5
5870 ac_status=$?
5871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5872 test $ac_status = 0; };
5873 then
5874 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5875 if test "x$CC" != xcc; then
5876 # Test first that cc exists at all.
5877 if { ac_try='cc -c conftest.$ac_ext >&5'
5878 { { case "(($ac_try" in
5879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5880 *) ac_try_echo=$ac_try;;
5881 esac
5882 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5883 $as_echo "$ac_try_echo"; } >&5
5884 (eval "$ac_try") 2>&5
5885 ac_status=$?
5886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5887 test $ac_status = 0; }; }; then
5888 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5889 rm -f conftest2.*
5890 if { { case "(($ac_try" in
5891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5892 *) ac_try_echo=$ac_try;;
5893 esac
5894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5895 $as_echo "$ac_try_echo"; } >&5
5896 (eval "$ac_try") 2>&5
5897 ac_status=$?
5898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5899 test $ac_status = 0; } &&
5900 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5902 *) ac_try_echo=$ac_try;;
5903 esac
5904 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5905 $as_echo "$ac_try_echo"; } >&5
5906 (eval "$ac_try") 2>&5
5907 ac_status=$?
5908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5909 test $ac_status = 0; };
5910 then
5911 # cc works too.
5913 else
5914 # cc exists but doesn't like -o.
5915 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5919 else
5920 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5922 rm -f core conftest*
5925 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5927 $as_echo "yes" >&6; }
5928 else
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930 $as_echo "no" >&6; }
5932 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5936 # FIXME: we rely on the cache variable name because
5937 # there is no other way.
5938 set dummy $CC
5939 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5940 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5941 if test "$am_t" != yes; then
5942 # Losing compiler, so override with the script.
5943 # FIXME: It is wrong to rewrite CC.
5944 # But if we don't then we get into trouble of one sort or another.
5945 # A longer-term fix would be to have automake use am__CC in this case,
5946 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5947 CC="$am_aux_dir/compile $CC"
5952 if test x$GCC = xyes; then
5953 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5954 else
5955 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5958 if test "x$opsys" = "xmingw32"; then
5959 BUILDING_FOR_WINDOWSNT_TRUE=
5960 BUILDING_FOR_WINDOWSNT_FALSE='#'
5961 else
5962 BUILDING_FOR_WINDOWSNT_TRUE='#'
5963 BUILDING_FOR_WINDOWSNT_FALSE=
5967 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
5968 # as we don't use them.
5970 # Avoid gnulib's threadlib module, as we do threads our own way.
5973 # Initialize gnulib right after choosing the compiler.
5975 ac_ext=c
5976 ac_cpp='$CPP $CPPFLAGS'
5977 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5978 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5979 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5981 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5982 # On Suns, sometimes $CPP names a directory.
5983 if test -n "$CPP" && test -d "$CPP"; then
5984 CPP=
5986 if test -z "$CPP"; then
5987 if test "${ac_cv_prog_CPP+set}" = set; then :
5988 $as_echo_n "(cached) " >&6
5989 else
5990 # Double quotes because CPP needs to be expanded
5991 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5993 ac_preproc_ok=false
5994 for ac_c_preproc_warn_flag in '' yes
5996 # Use a header file that comes with gcc, so configuring glibc
5997 # with a fresh cross-compiler works.
5998 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5999 # <limits.h> exists even on freestanding compilers.
6000 # On the NeXT, cc -E runs the code through the compiler's parser,
6001 # not just through cpp. "Syntax error" is here to catch this case.
6002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6003 /* end confdefs.h. */
6004 #ifdef __STDC__
6005 # include <limits.h>
6006 #else
6007 # include <assert.h>
6008 #endif
6009 Syntax error
6010 _ACEOF
6011 if ac_fn_c_try_cpp "$LINENO"; then :
6013 else
6014 # Broken: fails on valid input.
6015 continue
6017 rm -f conftest.err conftest.$ac_ext
6019 # OK, works on sane cases. Now check whether nonexistent headers
6020 # can be detected and how.
6021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6022 /* end confdefs.h. */
6023 #include <ac_nonexistent.h>
6024 _ACEOF
6025 if ac_fn_c_try_cpp "$LINENO"; then :
6026 # Broken: success on invalid input.
6027 continue
6028 else
6029 # Passes both tests.
6030 ac_preproc_ok=:
6031 break
6033 rm -f conftest.err conftest.$ac_ext
6035 done
6036 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6037 rm -f conftest.err conftest.$ac_ext
6038 if $ac_preproc_ok; then :
6039 break
6042 done
6043 ac_cv_prog_CPP=$CPP
6046 CPP=$ac_cv_prog_CPP
6047 else
6048 ac_cv_prog_CPP=$CPP
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6051 $as_echo "$CPP" >&6; }
6052 ac_preproc_ok=false
6053 for ac_c_preproc_warn_flag in '' yes
6055 # Use a header file that comes with gcc, so configuring glibc
6056 # with a fresh cross-compiler works.
6057 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6058 # <limits.h> exists even on freestanding compilers.
6059 # On the NeXT, cc -E runs the code through the compiler's parser,
6060 # not just through cpp. "Syntax error" is here to catch this case.
6061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6062 /* end confdefs.h. */
6063 #ifdef __STDC__
6064 # include <limits.h>
6065 #else
6066 # include <assert.h>
6067 #endif
6068 Syntax error
6069 _ACEOF
6070 if ac_fn_c_try_cpp "$LINENO"; then :
6072 else
6073 # Broken: fails on valid input.
6074 continue
6076 rm -f conftest.err conftest.$ac_ext
6078 # OK, works on sane cases. Now check whether nonexistent headers
6079 # can be detected and how.
6080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6081 /* end confdefs.h. */
6082 #include <ac_nonexistent.h>
6083 _ACEOF
6084 if ac_fn_c_try_cpp "$LINENO"; then :
6085 # Broken: success on invalid input.
6086 continue
6087 else
6088 # Passes both tests.
6089 ac_preproc_ok=:
6090 break
6092 rm -f conftest.err conftest.$ac_ext
6094 done
6095 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6096 rm -f conftest.err conftest.$ac_ext
6097 if $ac_preproc_ok; then :
6099 else
6100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6102 as_fn_error "C preprocessor \"$CPP\" fails sanity check
6103 See \`config.log' for more details." "$LINENO" 5; }
6106 ac_ext=c
6107 ac_cpp='$CPP $CPPFLAGS'
6108 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6109 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6110 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6114 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6115 if test "${ac_cv_path_GREP+set}" = set; then :
6116 $as_echo_n "(cached) " >&6
6117 else
6118 if test -z "$GREP"; then
6119 ac_path_GREP_found=false
6120 # Loop through the user's path and test for each of PROGNAME-LIST
6121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6122 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6124 IFS=$as_save_IFS
6125 test -z "$as_dir" && as_dir=.
6126 for ac_prog in grep ggrep; do
6127 for ac_exec_ext in '' $ac_executable_extensions; do
6128 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6129 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6130 # Check for GNU ac_path_GREP and select it if it is found.
6131 # Check for GNU $ac_path_GREP
6132 case `"$ac_path_GREP" --version 2>&1` in
6133 *GNU*)
6134 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6136 ac_count=0
6137 $as_echo_n 0123456789 >"conftest.in"
6138 while :
6140 cat "conftest.in" "conftest.in" >"conftest.tmp"
6141 mv "conftest.tmp" "conftest.in"
6142 cp "conftest.in" "conftest.nl"
6143 $as_echo 'GREP' >> "conftest.nl"
6144 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6145 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6146 as_fn_arith $ac_count + 1 && ac_count=$as_val
6147 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6148 # Best one so far, save it but keep looking for a better one
6149 ac_cv_path_GREP="$ac_path_GREP"
6150 ac_path_GREP_max=$ac_count
6152 # 10*(2^10) chars as input seems more than enough
6153 test $ac_count -gt 10 && break
6154 done
6155 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6156 esac
6158 $ac_path_GREP_found && break 3
6159 done
6160 done
6161 done
6162 IFS=$as_save_IFS
6163 if test -z "$ac_cv_path_GREP"; then
6164 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6166 else
6167 ac_cv_path_GREP=$GREP
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6172 $as_echo "$ac_cv_path_GREP" >&6; }
6173 GREP="$ac_cv_path_GREP"
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6177 $as_echo_n "checking for egrep... " >&6; }
6178 if test "${ac_cv_path_EGREP+set}" = set; then :
6179 $as_echo_n "(cached) " >&6
6180 else
6181 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6182 then ac_cv_path_EGREP="$GREP -E"
6183 else
6184 if test -z "$EGREP"; then
6185 ac_path_EGREP_found=false
6186 # Loop through the user's path and test for each of PROGNAME-LIST
6187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
6192 for ac_prog in egrep; do
6193 for ac_exec_ext in '' $ac_executable_extensions; do
6194 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6195 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6196 # Check for GNU ac_path_EGREP and select it if it is found.
6197 # Check for GNU $ac_path_EGREP
6198 case `"$ac_path_EGREP" --version 2>&1` in
6199 *GNU*)
6200 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6202 ac_count=0
6203 $as_echo_n 0123456789 >"conftest.in"
6204 while :
6206 cat "conftest.in" "conftest.in" >"conftest.tmp"
6207 mv "conftest.tmp" "conftest.in"
6208 cp "conftest.in" "conftest.nl"
6209 $as_echo 'EGREP' >> "conftest.nl"
6210 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6211 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6212 as_fn_arith $ac_count + 1 && ac_count=$as_val
6213 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6214 # Best one so far, save it but keep looking for a better one
6215 ac_cv_path_EGREP="$ac_path_EGREP"
6216 ac_path_EGREP_max=$ac_count
6218 # 10*(2^10) chars as input seems more than enough
6219 test $ac_count -gt 10 && break
6220 done
6221 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6222 esac
6224 $ac_path_EGREP_found && break 3
6225 done
6226 done
6227 done
6228 IFS=$as_save_IFS
6229 if test -z "$ac_cv_path_EGREP"; then
6230 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6232 else
6233 ac_cv_path_EGREP=$EGREP
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6239 $as_echo "$ac_cv_path_EGREP" >&6; }
6240 EGREP="$ac_cv_path_EGREP"
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6246 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6247 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6248 $as_echo_n "(cached) " >&6
6249 else
6251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6252 /* end confdefs.h. */
6254 #ifdef __ACK__
6255 Amsterdam
6256 #endif
6258 _ACEOF
6259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6260 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6261 gl_cv_c_amsterdam_compiler=yes
6262 else
6263 gl_cv_c_amsterdam_compiler=no
6265 rm -f conftest*
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6270 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6271 if test -z "$AR"; then
6272 if test $gl_cv_c_amsterdam_compiler = yes; then
6273 AR='cc -c.a'
6274 if test -z "$ARFLAGS"; then
6275 ARFLAGS='-o'
6277 else
6278 if test -n "$ac_tool_prefix"; then
6279 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6280 set dummy ${ac_tool_prefix}ar; ac_word=$2
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282 $as_echo_n "checking for $ac_word... " >&6; }
6283 if test "${ac_cv_prog_AR+set}" = set; then :
6284 $as_echo_n "(cached) " >&6
6285 else
6286 if test -n "$AR"; then
6287 ac_cv_prog_AR="$AR" # Let the user override the test.
6288 else
6289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290 for as_dir in $PATH
6292 IFS=$as_save_IFS
6293 test -z "$as_dir" && as_dir=.
6294 for ac_exec_ext in '' $ac_executable_extensions; do
6295 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6296 ac_cv_prog_AR="${ac_tool_prefix}ar"
6297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6298 break 2
6300 done
6301 done
6302 IFS=$as_save_IFS
6306 AR=$ac_cv_prog_AR
6307 if test -n "$AR"; then
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6309 $as_echo "$AR" >&6; }
6310 else
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312 $as_echo "no" >&6; }
6317 if test -z "$ac_cv_prog_AR"; then
6318 ac_ct_AR=$AR
6319 # Extract the first word of "ar", so it can be a program name with args.
6320 set dummy ar; ac_word=$2
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322 $as_echo_n "checking for $ac_word... " >&6; }
6323 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6324 $as_echo_n "(cached) " >&6
6325 else
6326 if test -n "$ac_ct_AR"; then
6327 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6328 else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330 for as_dir in $PATH
6332 IFS=$as_save_IFS
6333 test -z "$as_dir" && as_dir=.
6334 for ac_exec_ext in '' $ac_executable_extensions; do
6335 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6336 ac_cv_prog_ac_ct_AR="ar"
6337 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6338 break 2
6340 done
6341 done
6342 IFS=$as_save_IFS
6346 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6347 if test -n "$ac_ct_AR"; then
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6349 $as_echo "$ac_ct_AR" >&6; }
6350 else
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352 $as_echo "no" >&6; }
6355 if test "x$ac_ct_AR" = x; then
6356 AR="ar"
6357 else
6358 case $cross_compiling:$ac_tool_warned in
6359 yes:)
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6361 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6362 ac_tool_warned=yes ;;
6363 esac
6364 AR=$ac_ct_AR
6366 else
6367 AR="$ac_cv_prog_AR"
6370 if test -z "$ARFLAGS"; then
6371 ARFLAGS='cru'
6374 else
6375 if test -z "$ARFLAGS"; then
6376 ARFLAGS='cru'
6381 if test -z "$RANLIB"; then
6382 if test $gl_cv_c_amsterdam_compiler = yes; then
6383 RANLIB=':'
6384 else
6385 if test -n "$ac_tool_prefix"; then
6386 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6387 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389 $as_echo_n "checking for $ac_word... " >&6; }
6390 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6391 $as_echo_n "(cached) " >&6
6392 else
6393 if test -n "$RANLIB"; then
6394 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6395 else
6396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6397 for as_dir in $PATH
6399 IFS=$as_save_IFS
6400 test -z "$as_dir" && as_dir=.
6401 for ac_exec_ext in '' $ac_executable_extensions; do
6402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6403 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6405 break 2
6407 done
6408 done
6409 IFS=$as_save_IFS
6413 RANLIB=$ac_cv_prog_RANLIB
6414 if test -n "$RANLIB"; then
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6416 $as_echo "$RANLIB" >&6; }
6417 else
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419 $as_echo "no" >&6; }
6424 if test -z "$ac_cv_prog_RANLIB"; then
6425 ac_ct_RANLIB=$RANLIB
6426 # Extract the first word of "ranlib", so it can be a program name with args.
6427 set dummy ranlib; ac_word=$2
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6429 $as_echo_n "checking for $ac_word... " >&6; }
6430 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6431 $as_echo_n "(cached) " >&6
6432 else
6433 if test -n "$ac_ct_RANLIB"; then
6434 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6435 else
6436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6437 for as_dir in $PATH
6439 IFS=$as_save_IFS
6440 test -z "$as_dir" && as_dir=.
6441 for ac_exec_ext in '' $ac_executable_extensions; do
6442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6443 ac_cv_prog_ac_ct_RANLIB="ranlib"
6444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6445 break 2
6447 done
6448 done
6449 IFS=$as_save_IFS
6453 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6454 if test -n "$ac_ct_RANLIB"; then
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6456 $as_echo "$ac_ct_RANLIB" >&6; }
6457 else
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459 $as_echo "no" >&6; }
6462 if test "x$ac_ct_RANLIB" = x; then
6463 RANLIB=":"
6464 else
6465 case $cross_compiling:$ac_tool_warned in
6466 yes:)
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6468 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6469 ac_tool_warned=yes ;;
6470 esac
6471 RANLIB=$ac_ct_RANLIB
6473 else
6474 RANLIB="$ac_cv_prog_RANLIB"
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6482 $as_echo_n "checking for ANSI C header files... " >&6; }
6483 if test "${ac_cv_header_stdc+set}" = set; then :
6484 $as_echo_n "(cached) " >&6
6485 else
6486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6487 /* end confdefs.h. */
6488 #include <stdlib.h>
6489 #include <stdarg.h>
6490 #include <string.h>
6491 #include <float.h>
6494 main ()
6498 return 0;
6500 _ACEOF
6501 if ac_fn_c_try_compile "$LINENO"; then :
6502 ac_cv_header_stdc=yes
6503 else
6504 ac_cv_header_stdc=no
6506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6508 if test $ac_cv_header_stdc = yes; then
6509 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6511 /* end confdefs.h. */
6512 #include <string.h>
6514 _ACEOF
6515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6516 $EGREP "memchr" >/dev/null 2>&1; then :
6518 else
6519 ac_cv_header_stdc=no
6521 rm -f conftest*
6525 if test $ac_cv_header_stdc = yes; then
6526 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6528 /* end confdefs.h. */
6529 #include <stdlib.h>
6531 _ACEOF
6532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6533 $EGREP "free" >/dev/null 2>&1; then :
6535 else
6536 ac_cv_header_stdc=no
6538 rm -f conftest*
6542 if test $ac_cv_header_stdc = yes; then
6543 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6544 if test "$cross_compiling" = yes; then :
6546 else
6547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6548 /* end confdefs.h. */
6549 #include <ctype.h>
6550 #include <stdlib.h>
6551 #if ((' ' & 0x0FF) == 0x020)
6552 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6553 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6554 #else
6555 # define ISLOWER(c) \
6556 (('a' <= (c) && (c) <= 'i') \
6557 || ('j' <= (c) && (c) <= 'r') \
6558 || ('s' <= (c) && (c) <= 'z'))
6559 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6560 #endif
6562 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6564 main ()
6566 int i;
6567 for (i = 0; i < 256; i++)
6568 if (XOR (islower (i), ISLOWER (i))
6569 || toupper (i) != TOUPPER (i))
6570 return 2;
6571 return 0;
6573 _ACEOF
6574 if ac_fn_c_try_run "$LINENO"; then :
6576 else
6577 ac_cv_header_stdc=no
6579 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6580 conftest.$ac_objext conftest.beam conftest.$ac_ext
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6586 $as_echo "$ac_cv_header_stdc" >&6; }
6587 if test $ac_cv_header_stdc = yes; then
6589 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6593 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6594 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6595 inttypes.h stdint.h unistd.h
6596 do :
6597 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6598 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6600 eval as_val=\$$as_ac_Header
6601 if test "x$as_val" = x""yes; then :
6602 cat >>confdefs.h <<_ACEOF
6603 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6604 _ACEOF
6608 done
6612 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6613 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6614 MINIX=yes
6615 else
6616 MINIX=
6620 if test "$MINIX" = yes; then
6622 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6625 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6628 $as_echo "#define _MINIX 1" >>confdefs.h
6631 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6637 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6638 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6639 $as_echo_n "(cached) " >&6
6640 else
6641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6642 /* end confdefs.h. */
6644 # define __EXTENSIONS__ 1
6645 $ac_includes_default
6647 main ()
6651 return 0;
6653 _ACEOF
6654 if ac_fn_c_try_compile "$LINENO"; then :
6655 ac_cv_safe_to_define___extensions__=yes
6656 else
6657 ac_cv_safe_to_define___extensions__=no
6659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6662 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6663 test $ac_cv_safe_to_define___extensions__ = yes &&
6664 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6666 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6668 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6670 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6672 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6674 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6677 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6678 if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6679 $as_echo_n "(cached) " >&6
6680 else
6681 ac_cv_should_define__xopen_source=no
6682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6683 /* end confdefs.h. */
6685 #include <wchar.h>
6686 mbstate_t x;
6688 main ()
6692 return 0;
6694 _ACEOF
6695 if ac_fn_c_try_compile "$LINENO"; then :
6697 else
6698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6699 /* end confdefs.h. */
6701 #define _XOPEN_SOURCE 500
6702 #include <wchar.h>
6703 mbstate_t x;
6705 main ()
6709 return 0;
6711 _ACEOF
6712 if ac_fn_c_try_compile "$LINENO"; then :
6713 ac_cv_should_define__xopen_source=yes
6715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6720 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6721 test $ac_cv_should_define__xopen_source = yes &&
6722 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6731 # Check whether --enable-largefile was given.
6732 if test "${enable_largefile+set}" = set; then :
6733 enableval=$enable_largefile;
6736 if test "$enable_largefile" != no; then
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6739 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6740 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6741 $as_echo_n "(cached) " >&6
6742 else
6743 ac_cv_sys_largefile_CC=no
6744 if test "$GCC" != yes; then
6745 ac_save_CC=$CC
6746 while :; do
6747 # IRIX 6.2 and later do not support large files by default,
6748 # so use the C compiler's -n32 option if that helps.
6749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6750 /* end confdefs.h. */
6751 #include <sys/types.h>
6752 /* Check that off_t can represent 2**63 - 1 correctly.
6753 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6754 since some C++ compilers masquerading as C compilers
6755 incorrectly reject 9223372036854775807. */
6756 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6757 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6758 && LARGE_OFF_T % 2147483647 == 1)
6759 ? 1 : -1];
6761 main ()
6765 return 0;
6767 _ACEOF
6768 if ac_fn_c_try_compile "$LINENO"; then :
6769 break
6771 rm -f core conftest.err conftest.$ac_objext
6772 CC="$CC -n32"
6773 if ac_fn_c_try_compile "$LINENO"; then :
6774 ac_cv_sys_largefile_CC=' -n32'; break
6776 rm -f core conftest.err conftest.$ac_objext
6777 break
6778 done
6779 CC=$ac_save_CC
6780 rm -f conftest.$ac_ext
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6784 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6785 if test "$ac_cv_sys_largefile_CC" != no; then
6786 CC=$CC$ac_cv_sys_largefile_CC
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6790 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6791 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6792 $as_echo_n "(cached) " >&6
6793 else
6794 while :; do
6795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6796 /* end confdefs.h. */
6797 #include <sys/types.h>
6798 /* Check that off_t can represent 2**63 - 1 correctly.
6799 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6800 since some C++ compilers masquerading as C compilers
6801 incorrectly reject 9223372036854775807. */
6802 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6803 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6804 && LARGE_OFF_T % 2147483647 == 1)
6805 ? 1 : -1];
6807 main ()
6811 return 0;
6813 _ACEOF
6814 if ac_fn_c_try_compile "$LINENO"; then :
6815 ac_cv_sys_file_offset_bits=no; break
6817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6819 /* end confdefs.h. */
6820 #define _FILE_OFFSET_BITS 64
6821 #include <sys/types.h>
6822 /* Check that off_t can represent 2**63 - 1 correctly.
6823 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6824 since some C++ compilers masquerading as C compilers
6825 incorrectly reject 9223372036854775807. */
6826 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6827 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6828 && LARGE_OFF_T % 2147483647 == 1)
6829 ? 1 : -1];
6831 main ()
6835 return 0;
6837 _ACEOF
6838 if ac_fn_c_try_compile "$LINENO"; then :
6839 ac_cv_sys_file_offset_bits=64; break
6841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6842 ac_cv_sys_file_offset_bits=unknown
6843 break
6844 done
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6847 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6848 case $ac_cv_sys_file_offset_bits in #(
6849 no | unknown) ;;
6851 cat >>confdefs.h <<_ACEOF
6852 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6853 _ACEOF
6855 esac
6856 rm -rf conftest*
6857 if test $ac_cv_sys_file_offset_bits = unknown; then
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6859 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6860 if test "${ac_cv_sys_large_files+set}" = set; then :
6861 $as_echo_n "(cached) " >&6
6862 else
6863 while :; do
6864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6865 /* end confdefs.h. */
6866 #include <sys/types.h>
6867 /* Check that off_t can represent 2**63 - 1 correctly.
6868 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6869 since some C++ compilers masquerading as C compilers
6870 incorrectly reject 9223372036854775807. */
6871 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6872 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6873 && LARGE_OFF_T % 2147483647 == 1)
6874 ? 1 : -1];
6876 main ()
6880 return 0;
6882 _ACEOF
6883 if ac_fn_c_try_compile "$LINENO"; then :
6884 ac_cv_sys_large_files=no; break
6886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6888 /* end confdefs.h. */
6889 #define _LARGE_FILES 1
6890 #include <sys/types.h>
6891 /* Check that off_t can represent 2**63 - 1 correctly.
6892 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6893 since some C++ compilers masquerading as C compilers
6894 incorrectly reject 9223372036854775807. */
6895 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6896 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6897 && LARGE_OFF_T % 2147483647 == 1)
6898 ? 1 : -1];
6900 main ()
6904 return 0;
6906 _ACEOF
6907 if ac_fn_c_try_compile "$LINENO"; then :
6908 ac_cv_sys_large_files=1; break
6910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6911 ac_cv_sys_large_files=unknown
6912 break
6913 done
6915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6916 $as_echo "$ac_cv_sys_large_files" >&6; }
6917 case $ac_cv_sys_large_files in #(
6918 no | unknown) ;;
6920 cat >>confdefs.h <<_ACEOF
6921 #define _LARGE_FILES $ac_cv_sys_large_files
6922 _ACEOF
6924 esac
6925 rm -rf conftest*
6929 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6933 case $ac_cv_prog_cc_stdc in #(
6934 no) :
6935 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6936 *) :
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6938 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6939 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6940 $as_echo_n "(cached) " >&6
6941 else
6942 ac_cv_prog_cc_c99=no
6943 ac_save_CC=$CC
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945 /* end confdefs.h. */
6946 #include <stdarg.h>
6947 #include <stdbool.h>
6948 #include <stdlib.h>
6949 #include <wchar.h>
6950 #include <stdio.h>
6952 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6953 #define debug(...) fprintf (stderr, __VA_ARGS__)
6954 #define showlist(...) puts (#__VA_ARGS__)
6955 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6956 static void
6957 test_varargs_macros (void)
6959 int x = 1234;
6960 int y = 5678;
6961 debug ("Flag");
6962 debug ("X = %d\n", x);
6963 showlist (The first, second, and third items.);
6964 report (x>y, "x is %d but y is %d", x, y);
6967 // Check long long types.
6968 #define BIG64 18446744073709551615ull
6969 #define BIG32 4294967295ul
6970 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6971 #if !BIG_OK
6972 your preprocessor is broken;
6973 #endif
6974 #if BIG_OK
6975 #else
6976 your preprocessor is broken;
6977 #endif
6978 static long long int bignum = -9223372036854775807LL;
6979 static unsigned long long int ubignum = BIG64;
6981 struct incomplete_array
6983 int datasize;
6984 double data[];
6987 struct named_init {
6988 int number;
6989 const wchar_t *name;
6990 double average;
6993 typedef const char *ccp;
6995 static inline int
6996 test_restrict (ccp restrict text)
6998 // See if C++-style comments work.
6999 // Iterate through items via the restricted pointer.
7000 // Also check for declarations in for loops.
7001 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7002 continue;
7003 return 0;
7006 // Check varargs and va_copy.
7007 static void
7008 test_varargs (const char *format, ...)
7010 va_list args;
7011 va_start (args, format);
7012 va_list args_copy;
7013 va_copy (args_copy, args);
7015 const char *str;
7016 int number;
7017 float fnumber;
7019 while (*format)
7021 switch (*format++)
7023 case 's': // string
7024 str = va_arg (args_copy, const char *);
7025 break;
7026 case 'd': // int
7027 number = va_arg (args_copy, int);
7028 break;
7029 case 'f': // float
7030 fnumber = va_arg (args_copy, double);
7031 break;
7032 default:
7033 break;
7036 va_end (args_copy);
7037 va_end (args);
7041 main ()
7044 // Check bool.
7045 _Bool success = false;
7047 // Check restrict.
7048 if (test_restrict ("String literal") == 0)
7049 success = true;
7050 char *restrict newvar = "Another string";
7052 // Check varargs.
7053 test_varargs ("s, d' f .", "string", 65, 34.234);
7054 test_varargs_macros ();
7056 // Check flexible array members.
7057 struct incomplete_array *ia =
7058 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7059 ia->datasize = 10;
7060 for (int i = 0; i < ia->datasize; ++i)
7061 ia->data[i] = i * 1.234;
7063 // Check named initializers.
7064 struct named_init ni = {
7065 .number = 34,
7066 .name = L"Test wide string",
7067 .average = 543.34343,
7070 ni.number = 58;
7072 int dynamic_array[ni.number];
7073 dynamic_array[ni.number - 1] = 543;
7075 // work around unused variable warnings
7076 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7077 || dynamic_array[ni.number - 1] != 543);
7080 return 0;
7082 _ACEOF
7083 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7085 CC="$ac_save_CC $ac_arg"
7086 if ac_fn_c_try_compile "$LINENO"; then :
7087 ac_cv_prog_cc_c99=$ac_arg
7089 rm -f core conftest.err conftest.$ac_objext
7090 test "x$ac_cv_prog_cc_c99" != "xno" && break
7091 done
7092 rm -f conftest.$ac_ext
7093 CC=$ac_save_CC
7096 # AC_CACHE_VAL
7097 case "x$ac_cv_prog_cc_c99" in
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7100 $as_echo "none needed" >&6; } ;;
7101 xno)
7102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7103 $as_echo "unsupported" >&6; } ;;
7105 CC="$CC $ac_cv_prog_cc_c99"
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7107 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7108 esac
7109 if test "x$ac_cv_prog_cc_c99" != xno; then :
7110 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7111 else
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7113 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7114 if test "${ac_cv_prog_cc_c89+set}" = set; then :
7115 $as_echo_n "(cached) " >&6
7116 else
7117 ac_cv_prog_cc_c89=no
7118 ac_save_CC=$CC
7119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120 /* end confdefs.h. */
7121 #include <stdarg.h>
7122 #include <stdio.h>
7123 #include <sys/types.h>
7124 #include <sys/stat.h>
7125 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7126 struct buf { int x; };
7127 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7128 static char *e (p, i)
7129 char **p;
7130 int i;
7132 return p[i];
7134 static char *f (char * (*g) (char **, int), char **p, ...)
7136 char *s;
7137 va_list v;
7138 va_start (v,p);
7139 s = g (p, va_arg (v,int));
7140 va_end (v);
7141 return s;
7144 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7145 function prototypes and stuff, but not '\xHH' hex character constants.
7146 These don't provoke an error unfortunately, instead are silently treated
7147 as 'x'. The following induces an error, until -std is added to get
7148 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7149 array size at least. It's necessary to write '\x00'==0 to get something
7150 that's true only with -std. */
7151 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7153 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7154 inside strings and character constants. */
7155 #define FOO(x) 'x'
7156 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7158 int test (int i, double x);
7159 struct s1 {int (*f) (int a);};
7160 struct s2 {int (*f) (double a);};
7161 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7162 int argc;
7163 char **argv;
7165 main ()
7167 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7169 return 0;
7171 _ACEOF
7172 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7173 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7175 CC="$ac_save_CC $ac_arg"
7176 if ac_fn_c_try_compile "$LINENO"; then :
7177 ac_cv_prog_cc_c89=$ac_arg
7179 rm -f core conftest.err conftest.$ac_objext
7180 test "x$ac_cv_prog_cc_c89" != "xno" && break
7181 done
7182 rm -f conftest.$ac_ext
7183 CC=$ac_save_CC
7186 # AC_CACHE_VAL
7187 case "x$ac_cv_prog_cc_c89" in
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7190 $as_echo "none needed" >&6; } ;;
7191 xno)
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7193 $as_echo "unsupported" >&6; } ;;
7195 CC="$CC $ac_cv_prog_cc_c89"
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7197 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7198 esac
7199 if test "x$ac_cv_prog_cc_c89" != xno; then :
7200 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7201 else
7202 ac_cv_prog_cc_stdc=no
7207 esac
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7209 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
7210 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
7211 $as_echo_n "(cached) " >&6
7214 case $ac_cv_prog_cc_stdc in #(
7215 no) :
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7217 $as_echo "unsupported" >&6; } ;; #(
7218 '') :
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7220 $as_echo "none needed" >&6; } ;; #(
7221 *) :
7222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7223 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7224 esac
7228 # Code from module alloca-opt:
7229 # Code from module allocator:
7230 # Code from module at-internal:
7231 # Code from module c-ctype:
7232 # Code from module c-strcase:
7233 # Code from module careadlinkat:
7234 # Code from module clock-time:
7235 # Code from module close-stream:
7236 # Code from module crypto/md5:
7237 # Code from module crypto/sha1:
7238 # Code from module crypto/sha256:
7239 # Code from module crypto/sha512:
7240 # Code from module dirent:
7241 # Code from module dosname:
7242 # Code from module dtoastr:
7243 # Code from module dtotimespec:
7244 # Code from module dup2:
7245 # Code from module environ:
7246 # Code from module errno:
7247 # Code from module euidaccess:
7248 # Code from module execinfo:
7249 # Code from module extensions:
7251 # Code from module extern-inline:
7252 # Code from module faccessat:
7253 # Code from module fcntl:
7254 # Code from module fcntl-h:
7255 # Code from module fdatasync:
7256 # Code from module fdopendir:
7257 # Code from module filemode:
7258 # Code from module fpending:
7259 # Code from module fstatat:
7260 # Code from module fsync:
7261 # Code from module getdtablesize:
7262 # Code from module getgroups:
7263 # Code from module getloadavg:
7264 # Code from module getopt-gnu:
7265 # Code from module getopt-posix:
7266 # Code from module gettext-h:
7267 # Code from module gettime:
7268 # Code from module gettimeofday:
7269 # Code from module group-member:
7270 # Code from module include_next:
7271 # Code from module intprops:
7272 # Code from module inttypes-incomplete:
7273 # Code from module largefile:
7275 # Code from module lstat:
7276 # Code from module manywarnings:
7277 # Code from module memrchr:
7278 # Code from module mktime:
7279 # Code from module multiarch:
7280 # Code from module nocrash:
7281 # Code from module openat-h:
7282 # Code from module pathmax:
7283 # Code from module pipe2:
7284 # Code from module pselect:
7285 # Code from module pthread_sigmask:
7286 # Code from module putenv:
7287 # Code from module qacl:
7288 # Code from module readlink:
7289 # Code from module readlinkat:
7290 # Code from module root-uid:
7291 # Code from module sig2str:
7292 # Code from module signal-h:
7293 # Code from module snippet/_Noreturn:
7294 # Code from module snippet/arg-nonnull:
7295 # Code from module snippet/c++defs:
7296 # Code from module snippet/warn-on-use:
7297 # Code from module socklen:
7298 # Code from module ssize_t:
7299 # Code from module stat:
7300 # Code from module stat-time:
7301 # Code from module stdalign:
7302 # Code from module stdarg:
7306 # Code from module stdbool:
7307 # Code from module stddef:
7308 # Code from module stdint:
7309 # Code from module stdio:
7310 # Code from module stdlib:
7311 # Code from module strftime:
7312 # Code from module string:
7313 # Code from module strtoimax:
7314 # Code from module strtoll:
7315 # Code from module strtoull:
7316 # Code from module strtoumax:
7317 # Code from module symlink:
7318 # Code from module sys_select:
7319 # Code from module sys_stat:
7320 # Code from module sys_time:
7321 # Code from module time:
7322 # Code from module time_r:
7323 # Code from module timer-time:
7324 # Code from module timespec:
7325 # Code from module timespec-add:
7326 # Code from module timespec-sub:
7327 # Code from module u64:
7328 # Code from module unistd:
7329 # Code from module unsetenv:
7330 # Code from module utimens:
7331 # Code from module verify:
7332 # Code from module warnings:
7333 # Code from module xalloc-oversized:
7336 if test "$ac_test_CFLAGS" != set; then
7337 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7338 # if -g3 works and the user does not specify CFLAGS.
7339 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7340 case $CFLAGS in
7341 '-g')
7342 emacs_g3_CFLAGS='-g3';;
7343 '-g -O2')
7344 emacs_g3_CFLAGS='-g3 -O2';;
7346 emacs_g3_CFLAGS='';;
7347 esac
7348 if test -n "$emacs_g3_CFLAGS"; then
7349 emacs_save_CFLAGS=$CFLAGS
7350 CFLAGS=$emacs_g3_CFLAGS
7351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7352 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7353 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7354 $as_echo_n "(cached) " >&6
7355 else
7356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7357 /* end confdefs.h. */
7360 main ()
7364 return 0;
7366 _ACEOF
7367 if ac_fn_c_try_link "$LINENO"; then :
7368 emacs_cv_prog_cc_g3=yes
7369 else
7370 emacs_cv_prog_cc_g3=no
7372 rm -f core conftest.err conftest.$ac_objext \
7373 conftest$ac_exeext conftest.$ac_ext
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7376 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7377 if test $emacs_cv_prog_cc_g3 != yes; then
7378 CFLAGS=$emacs_save_CFLAGS
7380 if test $opsys = mingw32; then
7381 CFLAGS="$CFLAGS -gdwarf-2"
7385 case $CFLAGS in
7386 *-O*) ;;
7388 # No optimization flag was inferred for this non-GCC compiler.
7389 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7390 emacs_save_CFLAGS=$CFLAGS
7391 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7392 CFLAGS=${CFLAGS}-O
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7394 $as_echo_n "checking whether $CC accepts -O... " >&6; }
7395 if test "${emacs_cv_prog_cc_o+set}" = set; then :
7396 $as_echo_n "(cached) " >&6
7397 else
7398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7399 /* end confdefs.h. */
7402 main ()
7406 return 0;
7408 _ACEOF
7409 if ac_fn_c_try_link "$LINENO"; then :
7410 emacs_cv_prog_cc_o=yes
7411 else
7412 emacs_cv_prog_cc_o=no
7414 rm -f core conftest.err conftest.$ac_objext \
7415 conftest$ac_exeext conftest.$ac_ext
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7418 $as_echo "$emacs_cv_prog_cc_o" >&6; }
7419 if test $emacs_cv_prog_cc_o != yes; then
7420 CFLAGS=$emacs_save_CFLAGS
7421 fi ;;
7422 esac
7425 # Check whether --enable-gcc-warnings was given.
7426 if test "${enable_gcc_warnings+set}" = set; then :
7427 enableval=$enable_gcc_warnings; case $enableval in
7428 yes|no) ;;
7429 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7430 esac
7431 gl_gcc_warnings=$enableval
7432 else
7433 gl_gcc_warnings=no
7438 # Check whether --enable-link-time-optimization was given.
7439 if test "${enable_link_time_optimization+set}" = set; then :
7440 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7442 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7443 ac_lto_supported=no
7444 if test x$GCC = xyes; then
7445 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7446 if test x$CPUS != x; then
7447 LTO="-flto=$CPUS"
7448 else
7449 LTO="-flto"
7451 old_CFLAGS=$CFLAGS
7452 CFLAGS="$CFLAGS $LTO"
7453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7454 /* end confdefs.h. */
7457 main ()
7461 return 0;
7463 _ACEOF
7464 if ac_fn_c_try_compile "$LINENO"; then :
7465 ac_lto_supported=yes
7466 else
7467 ac_lto_supported=no
7469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7470 CFLAGS="$old_CFLAGS"
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7473 $as_echo "$ac_lto_supported" >&6; }
7474 if test "$ac_lto_supported" = "yes"; then
7475 CFLAGS="$CFLAGS $LTO"
7481 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7482 # ------------------------------------------------
7483 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7484 # Otherwise, run RUN-IF-NOT-FOUND.
7487 # When compiling with GCC, prefer -isystem to -I when including system
7488 # include files, to avoid generating useless diagnostics for the files.
7489 if test "$gl_gcc_warnings" != yes; then
7490 isystem='-I'
7491 else
7492 isystem='-isystem '
7494 # This, $nw, is the list of warnings we disable.
7497 case $with_x_toolkit in
7498 lucid | athena | motif)
7499 # Old toolkits mishandle 'const'.
7500 nw="$nw -Wwrite-strings"
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7504 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7505 if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7506 $as_echo_n "(cached) " >&6
7507 else
7509 gl_save_compiler_FLAGS="$CFLAGS"
7510 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7512 /* end confdefs.h. */
7515 main ()
7519 return 0;
7521 _ACEOF
7522 if ac_fn_c_try_compile "$LINENO"; then :
7523 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7524 else
7525 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7528 CFLAGS="$gl_save_compiler_FLAGS"
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7532 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7533 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7534 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7535 else
7536 gl_unknown_warnings_are_errors=
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7541 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7542 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7543 $as_echo_n "(cached) " >&6
7544 else
7546 gl_save_compiler_FLAGS="$CFLAGS"
7547 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7549 /* end confdefs.h. */
7552 main ()
7556 return 0;
7558 _ACEOF
7559 if ac_fn_c_try_compile "$LINENO"; then :
7560 gl_cv_warn_c__Werror=yes
7561 else
7562 gl_cv_warn_c__Werror=no
7564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7565 CFLAGS="$gl_save_compiler_FLAGS"
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7569 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7570 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7571 as_fn_append WERROR_CFLAGS " -Werror"
7576 esac
7579 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7580 nw="$nw -Woverlength-strings" # Not a problem these days
7581 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7582 nw="$nw -Wformat-nonliteral" # we do this a lot
7583 nw="$nw -Wvla" # warnings in gettext.h
7584 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7585 nw="$nw -Wswitch-default" # Too many warnings for now
7586 nw="$nw -Winline" # OK to ignore 'inline'
7587 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7588 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7589 # signed overflow has undefined behavior
7590 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7591 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7592 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
7594 # Emacs doesn't care about shadowing; see
7595 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7596 nw="$nw -Wshadow"
7598 # Emacs's use of alloca inhibits protecting the stack.
7599 nw="$nw -Wstack-protector"
7601 # The following line should be removable at some point.
7602 nw="$nw -Wsuggest-attribute=pure"
7604 # clang is unduly picky about some things.
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7606 $as_echo_n "checking whether the compiler is clang... " >&6; }
7607 if test "${emacs_cv_clang+set}" = set; then :
7608 $as_echo_n "(cached) " >&6
7609 else
7610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7611 /* end confdefs.h. */
7613 #ifndef __clang__
7614 #error "not clang"
7615 #endif
7618 main ()
7622 return 0;
7624 _ACEOF
7625 if ac_fn_c_try_compile "$LINENO"; then :
7626 emacs_cv_clang=yes
7627 else
7628 emacs_cv_clang=no
7630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7633 $as_echo "$emacs_cv_clang" >&6; }
7634 if test $emacs_cv_clang = yes; then
7635 nw="$nw -Wcast-align"
7640 if test -n "$GCC"; then
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7643 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7644 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7645 $as_echo_n "(cached) " >&6
7646 else
7648 gl_save_CFLAGS="$CFLAGS"
7649 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7651 /* end confdefs.h. */
7654 main ()
7658 return 0;
7660 _ACEOF
7661 if ac_fn_c_try_compile "$LINENO"; then :
7662 gl_cv_cc_nomfi_supported=yes
7663 else
7664 gl_cv_cc_nomfi_supported=no
7666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7667 CFLAGS="$gl_save_CFLAGS"
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7671 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7673 if test "$gl_cv_cc_nomfi_supported" = yes; then
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7675 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7676 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7677 $as_echo_n "(cached) " >&6
7678 else
7680 gl_save_CFLAGS="$CFLAGS"
7681 CFLAGS="$CFLAGS -W -Werror"
7682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7683 /* end confdefs.h. */
7684 void f (void)
7686 typedef struct { int a; int b; } s_t;
7687 s_t s1 = { 0, };
7691 main ()
7695 return 0;
7697 _ACEOF
7698 if ac_fn_c_try_compile "$LINENO"; then :
7699 gl_cv_cc_nomfi_needed=no
7700 else
7701 gl_cv_cc_nomfi_needed=yes
7703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7704 CFLAGS="$gl_save_CFLAGS"
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7709 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7713 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7714 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7715 $as_echo_n "(cached) " >&6
7716 else
7718 gl_save_CFLAGS="$CFLAGS"
7719 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7721 /* end confdefs.h. */
7724 main ()
7728 return 0;
7730 _ACEOF
7731 if ac_fn_c_try_compile "$LINENO"; then :
7732 gl_cv_cc_uninitialized_supported=yes
7733 else
7734 gl_cv_cc_uninitialized_supported=no
7736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7737 CFLAGS="$gl_save_CFLAGS"
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7741 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7745 # List all gcc warning categories.
7746 gl_manywarn_set=
7747 for gl_manywarn_item in \
7748 -W \
7749 -Wabi \
7750 -Waddress \
7751 -Waggressive-loop-optimizations \
7752 -Wall \
7753 -Warray-bounds \
7754 -Wattributes \
7755 -Wbad-function-cast \
7756 -Wbuiltin-macro-redefined \
7757 -Wcast-align \
7758 -Wchar-subscripts \
7759 -Wclobbered \
7760 -Wcomment \
7761 -Wcomments \
7762 -Wcoverage-mismatch \
7763 -Wcpp \
7764 -Wdeprecated \
7765 -Wdeprecated-declarations \
7766 -Wdisabled-optimization \
7767 -Wdiv-by-zero \
7768 -Wdouble-promotion \
7769 -Wempty-body \
7770 -Wendif-labels \
7771 -Wenum-compare \
7772 -Wextra \
7773 -Wformat-contains-nul \
7774 -Wformat-extra-args \
7775 -Wformat-nonliteral \
7776 -Wformat-security \
7777 -Wformat-y2k \
7778 -Wformat-zero-length \
7779 -Wfree-nonheap-object \
7780 -Wignored-qualifiers \
7781 -Wimplicit \
7782 -Wimplicit-function-declaration \
7783 -Wimplicit-int \
7784 -Winit-self \
7785 -Winline \
7786 -Wint-to-pointer-cast \
7787 -Winvalid-memory-model \
7788 -Winvalid-pch \
7789 -Wjump-misses-init \
7790 -Wlogical-op \
7791 -Wmain \
7792 -Wmaybe-uninitialized \
7793 -Wmissing-braces \
7794 -Wmissing-declarations \
7795 -Wmissing-field-initializers \
7796 -Wmissing-include-dirs \
7797 -Wmissing-parameter-type \
7798 -Wmissing-prototypes \
7799 -Wmudflap \
7800 -Wmultichar \
7801 -Wnarrowing \
7802 -Wnested-externs \
7803 -Wnonnull \
7804 -Wnormalized=nfc \
7805 -Wold-style-declaration \
7806 -Wold-style-definition \
7807 -Woverflow \
7808 -Woverlength-strings \
7809 -Woverride-init \
7810 -Wpacked \
7811 -Wpacked-bitfield-compat \
7812 -Wparentheses \
7813 -Wpointer-arith \
7814 -Wpointer-sign \
7815 -Wpointer-to-int-cast \
7816 -Wpragmas \
7817 -Wreturn-local-addr \
7818 -Wreturn-type \
7819 -Wsequence-point \
7820 -Wshadow \
7821 -Wsizeof-pointer-memaccess \
7822 -Wstack-protector \
7823 -Wstrict-aliasing \
7824 -Wstrict-overflow \
7825 -Wstrict-prototypes \
7826 -Wsuggest-attribute=const \
7827 -Wsuggest-attribute=format \
7828 -Wsuggest-attribute=noreturn \
7829 -Wsuggest-attribute=pure \
7830 -Wswitch \
7831 -Wswitch-default \
7832 -Wsync-nand \
7833 -Wsystem-headers \
7834 -Wtrampolines \
7835 -Wtrigraphs \
7836 -Wtype-limits \
7837 -Wuninitialized \
7838 -Wunknown-pragmas \
7839 -Wunsafe-loop-optimizations \
7840 -Wunused \
7841 -Wunused-but-set-parameter \
7842 -Wunused-but-set-variable \
7843 -Wunused-function \
7844 -Wunused-label \
7845 -Wunused-local-typedefs \
7846 -Wunused-macros \
7847 -Wunused-parameter \
7848 -Wunused-result \
7849 -Wunused-value \
7850 -Wunused-variable \
7851 -Wvarargs \
7852 -Wvariadic-macros \
7853 -Wvector-operation-performance \
7854 -Wvla \
7855 -Wvolatile-register-var \
7856 -Wwrite-strings \
7858 ; do
7859 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7860 done
7862 # Disable specific options as needed.
7863 if test "$gl_cv_cc_nomfi_needed" = yes; then
7864 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7867 if test "$gl_cv_cc_uninitialized_supported" = no; then
7868 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7871 ws=$gl_manywarn_set
7874 gl_warn_set=
7875 set x $ws; shift
7876 for gl_warn_item
7878 case " $nw " in
7879 *" $gl_warn_item "*)
7882 gl_warn_set="$gl_warn_set $gl_warn_item"
7884 esac
7885 done
7886 ws=$gl_warn_set
7888 for w in $ws; do
7890 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7892 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7893 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7894 $as_echo_n "(cached) " >&6
7895 else
7897 gl_save_compiler_FLAGS="$CFLAGS"
7898 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
7899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7900 /* end confdefs.h. */
7903 main ()
7907 return 0;
7909 _ACEOF
7910 if ac_fn_c_try_compile "$LINENO"; then :
7911 eval "$as_gl_Warn=yes"
7912 else
7913 eval "$as_gl_Warn=no"
7915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7916 CFLAGS="$gl_save_compiler_FLAGS"
7919 eval ac_res=\$$as_gl_Warn
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7921 $as_echo "$ac_res" >&6; }
7922 eval as_val=\$$as_gl_Warn
7923 if test "x$as_val" = x""yes; then :
7924 as_fn_append WARN_CFLAGS " $w"
7928 done
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7931 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7932 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7933 $as_echo_n "(cached) " >&6
7934 else
7936 gl_save_compiler_FLAGS="$CFLAGS"
7937 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
7938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7939 /* end confdefs.h. */
7942 main ()
7946 return 0;
7948 _ACEOF
7949 if ac_fn_c_try_compile "$LINENO"; then :
7950 gl_cv_warn_c__Wno_missing_field_initializers=yes
7951 else
7952 gl_cv_warn_c__Wno_missing_field_initializers=no
7954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7955 CFLAGS="$gl_save_compiler_FLAGS"
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7959 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7960 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7961 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7964 # We need this one
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7967 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7968 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7969 $as_echo_n "(cached) " >&6
7970 else
7972 gl_save_compiler_FLAGS="$CFLAGS"
7973 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
7974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7975 /* end confdefs.h. */
7978 main ()
7982 return 0;
7984 _ACEOF
7985 if ac_fn_c_try_compile "$LINENO"; then :
7986 gl_cv_warn_c__Wno_sign_compare=yes
7987 else
7988 gl_cv_warn_c__Wno_sign_compare=no
7990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7991 CFLAGS="$gl_save_compiler_FLAGS"
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7995 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7996 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7997 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
8000 # Too many warnings for now
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
8003 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8004 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8005 $as_echo_n "(cached) " >&6
8006 else
8008 gl_save_compiler_FLAGS="$CFLAGS"
8009 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
8010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8011 /* end confdefs.h. */
8014 main ()
8018 return 0;
8020 _ACEOF
8021 if ac_fn_c_try_compile "$LINENO"; then :
8022 gl_cv_warn_c__Wno_type_limits=yes
8023 else
8024 gl_cv_warn_c__Wno_type_limits=no
8026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8027 CFLAGS="$gl_save_compiler_FLAGS"
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8031 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8032 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8033 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8036 # Too many warnings for now
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
8039 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8040 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8041 $as_echo_n "(cached) " >&6
8042 else
8044 gl_save_compiler_FLAGS="$CFLAGS"
8045 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-switch"
8046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8047 /* end confdefs.h. */
8050 main ()
8054 return 0;
8056 _ACEOF
8057 if ac_fn_c_try_compile "$LINENO"; then :
8058 gl_cv_warn_c__Wno_switch=yes
8059 else
8060 gl_cv_warn_c__Wno_switch=no
8062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8063 CFLAGS="$gl_save_compiler_FLAGS"
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8067 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8068 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8069 as_fn_append WARN_CFLAGS " -Wno-switch"
8072 # Too many warnings for now
8074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
8075 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8076 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8077 $as_echo_n "(cached) " >&6
8078 else
8080 gl_save_compiler_FLAGS="$CFLAGS"
8081 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
8082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8083 /* end confdefs.h. */
8086 main ()
8090 return 0;
8092 _ACEOF
8093 if ac_fn_c_try_compile "$LINENO"; then :
8094 gl_cv_warn_c__Wno_unused_parameter=yes
8095 else
8096 gl_cv_warn_c__Wno_unused_parameter=no
8098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8099 CFLAGS="$gl_save_compiler_FLAGS"
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8103 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8104 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8105 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8108 # Too many warnings for now
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
8111 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8112 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8113 $as_echo_n "(cached) " >&6
8114 else
8116 gl_save_compiler_FLAGS="$CFLAGS"
8117 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
8118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8119 /* end confdefs.h. */
8122 main ()
8126 return 0;
8128 _ACEOF
8129 if ac_fn_c_try_compile "$LINENO"; then :
8130 gl_cv_warn_c__Wno_format_nonliteral=yes
8131 else
8132 gl_cv_warn_c__Wno_format_nonliteral=no
8134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8135 CFLAGS="$gl_save_compiler_FLAGS"
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8139 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8140 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8141 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8146 # In spite of excluding -Wlogical-op above, it is enabled, as of
8147 # gcc 4.5.0 20090517.
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
8150 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8151 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8152 $as_echo_n "(cached) " >&6
8153 else
8155 gl_save_compiler_FLAGS="$CFLAGS"
8156 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
8157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158 /* end confdefs.h. */
8161 main ()
8165 return 0;
8167 _ACEOF
8168 if ac_fn_c_try_compile "$LINENO"; then :
8169 gl_cv_warn_c__Wno_logical_op=yes
8170 else
8171 gl_cv_warn_c__Wno_logical_op=no
8173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8174 CFLAGS="$gl_save_compiler_FLAGS"
8177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8178 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8179 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8180 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8185 # More things that clang is unduly picky about.
8186 if test $emacs_cv_clang = yes; then
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8189 $as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8190 if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8191 $as_echo_n "(cached) " >&6
8192 else
8194 gl_save_compiler_FLAGS="$CFLAGS"
8195 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-extra-args"
8196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8197 /* end confdefs.h. */
8200 main ()
8204 return 0;
8206 _ACEOF
8207 if ac_fn_c_try_compile "$LINENO"; then :
8208 gl_cv_warn_c__Wno_format_extra_args=yes
8209 else
8210 gl_cv_warn_c__Wno_format_extra_args=no
8212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8213 CFLAGS="$gl_save_compiler_FLAGS"
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8217 $as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8218 if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8219 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8225 $as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8226 if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8227 $as_echo_n "(cached) " >&6
8228 else
8230 gl_save_compiler_FLAGS="$CFLAGS"
8231 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-tautological-constant-out-of-range-compare"
8232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8233 /* end confdefs.h. */
8236 main ()
8240 return 0;
8242 _ACEOF
8243 if ac_fn_c_try_compile "$LINENO"; then :
8244 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8245 else
8246 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8249 CFLAGS="$gl_save_compiler_FLAGS"
8252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8253 $as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8254 if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8255 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8261 $as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8262 if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8263 $as_echo_n "(cached) " >&6
8264 else
8266 gl_save_compiler_FLAGS="$CFLAGS"
8267 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-command-line-argument"
8268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8269 /* end confdefs.h. */
8272 main ()
8276 return 0;
8278 _ACEOF
8279 if ac_fn_c_try_compile "$LINENO"; then :
8280 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8281 else
8282 gl_cv_warn_c__Wno_unused_command_line_argument=no
8284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8285 CFLAGS="$gl_save_compiler_FLAGS"
8288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8289 $as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8290 if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8291 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8297 $as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8298 if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8299 $as_echo_n "(cached) " >&6
8300 else
8302 gl_save_compiler_FLAGS="$CFLAGS"
8303 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-value"
8304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8305 /* end confdefs.h. */
8308 main ()
8312 return 0;
8314 _ACEOF
8315 if ac_fn_c_try_compile "$LINENO"; then :
8316 gl_cv_warn_c__Wno_unused_value=yes
8317 else
8318 gl_cv_warn_c__Wno_unused_value=no
8320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8321 CFLAGS="$gl_save_compiler_FLAGS"
8324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8325 $as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8326 if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8327 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8335 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8336 if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8337 $as_echo_n "(cached) " >&6
8338 else
8340 gl_save_compiler_FLAGS="$CFLAGS"
8341 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
8342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8343 /* end confdefs.h. */
8346 main ()
8350 return 0;
8352 _ACEOF
8353 if ac_fn_c_try_compile "$LINENO"; then :
8354 gl_cv_warn_c__fdiagnostics_show_option=yes
8355 else
8356 gl_cv_warn_c__fdiagnostics_show_option=no
8358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8359 CFLAGS="$gl_save_compiler_FLAGS"
8362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8363 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8364 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8365 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8371 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8372 if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8373 $as_echo_n "(cached) " >&6
8374 else
8376 gl_save_compiler_FLAGS="$CFLAGS"
8377 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
8378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379 /* end confdefs.h. */
8382 main ()
8386 return 0;
8388 _ACEOF
8389 if ac_fn_c_try_compile "$LINENO"; then :
8390 gl_cv_warn_c__funit_at_a_time=yes
8391 else
8392 gl_cv_warn_c__funit_at_a_time=no
8394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8395 CFLAGS="$gl_save_compiler_FLAGS"
8398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8399 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8400 if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8401 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8407 $as_echo "#define lint 1" >>confdefs.h
8411 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8414 # We use a slightly smaller set of warning options for lib/.
8415 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8417 nw="$nw -Wunused-macros"
8420 gl_warn_set=
8421 set x $WARN_CFLAGS; shift
8422 for gl_warn_item
8424 case " $nw " in
8425 *" $gl_warn_item "*)
8428 gl_warn_set="$gl_warn_set $gl_warn_item"
8430 esac
8431 done
8432 GNULIB_WARN_CFLAGS=$gl_warn_set
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8443 $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8444 rm -f conf$$ conf$$.file
8446 LN_S_FILEONLY='cp -p'
8448 if (echo >conf$$.file) 2>/dev/null; then
8449 if ln -s conf$$.file conf$$ 2>/dev/null; then
8450 LN_S_FILEONLY='ln -s'
8451 elif ln conf$$.file conf$$ 2>/dev/null; then
8452 LN_S_FILEONLY=ln
8456 rm -f conf$$ conf$$.file
8458 if test "$LN_S_FILEONLY" = "ln -s"; then
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8460 $as_echo "yes" >&6; }
8461 else
8462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8463 $as_echo "no, using $LN_S_FILEONLY" >&6; }
8469 if test "$opsys" = "mingw32"; then
8470 LN_S="ln"
8473 # Extract the first word of "install-info", so it can be a program name with args.
8474 set dummy install-info; ac_word=$2
8475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8476 $as_echo_n "checking for $ac_word... " >&6; }
8477 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
8478 $as_echo_n "(cached) " >&6
8479 else
8480 case $INSTALL_INFO in
8481 [\\/]* | ?:[\\/]*)
8482 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
8488 IFS=$as_save_IFS
8489 test -z "$as_dir" && as_dir=.
8490 for ac_exec_ext in '' $ac_executable_extensions; do
8491 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8492 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494 break 2
8496 done
8497 done
8498 IFS=$as_save_IFS
8500 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8502 esac
8504 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8505 if test -n "$INSTALL_INFO"; then
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8507 $as_echo "$INSTALL_INFO" >&6; }
8508 else
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8510 $as_echo "no" >&6; }
8514 # Extract the first word of "gzip", so it can be a program name with args.
8515 set dummy gzip; ac_word=$2
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8517 $as_echo_n "checking for $ac_word... " >&6; }
8518 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
8519 $as_echo_n "(cached) " >&6
8520 else
8521 case $GZIP_PROG in
8522 [\\/]* | ?:[\\/]*)
8523 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8527 for as_dir in $PATH
8529 IFS=$as_save_IFS
8530 test -z "$as_dir" && as_dir=.
8531 for ac_exec_ext in '' $ac_executable_extensions; do
8532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8533 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8535 break 2
8537 done
8538 done
8539 IFS=$as_save_IFS
8542 esac
8544 GZIP_PROG=$ac_cv_path_GZIP_PROG
8545 if test -n "$GZIP_PROG"; then
8546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8547 $as_echo "$GZIP_PROG" >&6; }
8548 else
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8550 $as_echo "no" >&6; }
8555 if test $opsys = gnu-linux; then
8556 # Extract the first word of "paxctl", so it can be a program name with args.
8557 set dummy paxctl; ac_word=$2
8558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8559 $as_echo_n "checking for $ac_word... " >&6; }
8560 if test "${ac_cv_path_PAXCTL+set}" = set; then :
8561 $as_echo_n "(cached) " >&6
8562 else
8563 case $PAXCTL in
8564 [\\/]* | ?:[\\/]*)
8565 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8569 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8571 IFS=$as_save_IFS
8572 test -z "$as_dir" && as_dir=.
8573 for ac_exec_ext in '' $ac_executable_extensions; do
8574 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8575 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8577 break 2
8579 done
8580 done
8581 IFS=$as_save_IFS
8584 esac
8586 PAXCTL=$ac_cv_path_PAXCTL
8587 if test -n "$PAXCTL"; then
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8589 $as_echo "$PAXCTL" >&6; }
8590 else
8591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8592 $as_echo "no" >&6; }
8596 if test "X$PAXCTL" != X; then
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8598 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8600 /* end confdefs.h. */
8603 main ()
8607 return 0;
8609 _ACEOF
8610 if ac_fn_c_try_link "$LINENO"; then :
8611 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8612 $as_echo "yes" >&6; }
8613 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8614 $as_echo "no" >&6; }; PAXCTL=""; fi
8616 rm -f core conftest.err conftest.$ac_objext \
8617 conftest$ac_exeext conftest.$ac_ext
8621 ## Need makeinfo >= 4.7 (?) to build the manuals.
8622 # Extract the first word of "makeinfo", so it can be a program name with args.
8623 set dummy makeinfo; ac_word=$2
8624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8625 $as_echo_n "checking for $ac_word... " >&6; }
8626 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8627 $as_echo_n "(cached) " >&6
8628 else
8629 case $MAKEINFO in
8630 [\\/]* | ?:[\\/]*)
8631 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8635 for as_dir in $PATH
8637 IFS=$as_save_IFS
8638 test -z "$as_dir" && as_dir=.
8639 for ac_exec_ext in '' $ac_executable_extensions; do
8640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8641 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8643 break 2
8645 done
8646 done
8647 IFS=$as_save_IFS
8649 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8651 esac
8653 MAKEINFO=$ac_cv_path_MAKEINFO
8654 if test -n "$MAKEINFO"; then
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8656 $as_echo "$MAKEINFO" >&6; }
8657 else
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8659 $as_echo "no" >&6; }
8663 if test "$MAKEINFO" != "no"; then
8664 case `
8665 $MAKEINFO --version 2> /dev/null |
8666 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8667 ` in
8668 '') MAKEINFO=no;;
8669 esac
8672 ## Makeinfo is unusual. For a released Emacs, the manuals are
8673 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8674 ## therefore in the category of "special tools" not normally required, which
8675 ## configure does not have to check for (eg autoconf itself).
8676 ## In a Bazaar checkout on the other hand, the manuals are not included.
8677 ## So makeinfo is a requirement to build from Bazaar, and configure
8678 ## should test for it as it does for any other build requirement.
8679 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8680 ## with pre-built manuals, from a Bazaar checkout.
8681 HAVE_MAKEINFO=yes
8683 if test "$MAKEINFO" = "no"; then
8684 MAKEINFO=makeinfo
8685 if test "x${with_makeinfo}" = "xno"; then
8686 HAVE_MAKEINFO=no
8687 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
8688 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8689 source tree does not seem to have pre-built manuals in the \`info' directory.
8690 Either install a suitable version of makeinfo, or re-run configure
8691 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8696 INFO_EXT=.info
8697 INFO_OPTS=--no-split
8702 if test x$GCC = xyes; then
8703 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8704 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8705 else
8706 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8707 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8711 late_LDFLAGS=$LDFLAGS
8712 if test x$GCC = xyes; then
8713 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8714 else
8715 LDFLAGS="$LDFLAGS -znocombreloc"
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8719 $as_echo_n "checking for -znocombreloc... " >&6; }
8720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8721 /* end confdefs.h. */
8724 main ()
8728 return 0;
8730 _ACEOF
8731 if ac_fn_c_try_link "$LINENO"; then :
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8733 $as_echo "yes" >&6; }
8734 else
8735 LDFLAGS=$late_LDFLAGS
8736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8737 $as_echo "no" >&6; }
8739 rm -f core conftest.err conftest.$ac_objext \
8740 conftest$ac_exeext conftest.$ac_ext
8743 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8744 case "$opsys" in
8745 your-opsys-here) CANNOT_DUMP=yes ;;
8746 esac
8748 test "$CANNOT_DUMP" = "yes" && \
8750 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8756 UNEXEC_OBJ=unexelf.o
8757 case "$opsys" in
8758 # MSDOS uses unexcoff.o
8759 aix4-2)
8760 UNEXEC_OBJ=unexaix.o
8762 cygwin)
8763 UNEXEC_OBJ=unexcw.o
8765 darwin)
8766 UNEXEC_OBJ=unexmacosx.o
8768 hpux10-20 | hpux11)
8769 UNEXEC_OBJ=unexhp9k800.o
8771 mingw32)
8772 UNEXEC_OBJ=unexw32.o
8774 sol2-10)
8775 # Use the Solaris dldump() function, called from unexsol.c, to dump
8776 # emacs, instead of the generic ELF dump code found in unexelf.c.
8777 # The resulting binary has a complete symbol table, and is better
8778 # for debugging and other observability tools (debuggers, pstack, etc).
8780 # If you encounter a problem using dldump(), please consider sending
8781 # a message to the OpenSolaris tools-linking mailing list:
8782 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8784 # It is likely that dldump() works with older Solaris too, but this has
8785 # not been tested, so for now this change is for Solaris 10 or newer.
8786 UNEXEC_OBJ=unexsol.o
8788 esac
8790 LD_SWITCH_SYSTEM=
8791 case "$opsys" in
8792 freebsd|dragonfly)
8793 ## Let `ld' find image libs and similar things in /usr/local/lib.
8794 ## The system compiler, GCC, has apparently been modified to not
8795 ## look there, contrary to what a stock GCC would do.
8796 ### It's not our place to do this. See bug#10313#17.
8797 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8801 gnu-linux)
8802 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8803 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8806 netbsd)
8807 ### It's not our place to do this. See bug#10313#17.
8808 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8812 openbsd)
8813 ## Han Boetes <han@boetes.org> says this is necessary,
8814 ## otherwise Emacs dumps core on elf systems.
8815 LD_SWITCH_SYSTEM="-Z"
8817 esac
8820 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8822 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8823 ## which has not been defined yet. When this was handled with cpp,
8824 ## it was expanded to null when configure sourced the s/*.h file.
8825 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8826 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8827 ## (or somesuch), but because it is supposed to go at the _front_
8828 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8829 ## Compare with the gnu-linux case below, which added to the end
8830 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8831 ## LD_SWITCH_SYSTEM_TEMACS.
8832 case "$opsys" in
8833 netbsd|openbsd)
8834 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8835 esac
8838 C_SWITCH_MACHINE=
8839 case $canonical in
8840 alpha*)
8841 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8842 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8846 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8847 ## With ELF, make sure that all common symbols get allocated to in the
8848 ## data section. Otherwise, the dump of temacs may miss variables in
8849 ## the shared library that have been initialized. For example, with
8850 ## GNU libc, __malloc_initialized would normally be resolved to the
8851 ## shared library's .bss section, which is fatal.
8852 if test "x$GCC" = "xyes"; then
8853 C_SWITCH_MACHINE="-fno-common"
8854 else
8855 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
8857 else
8858 UNEXEC_OBJ=unexalpha.o
8861 esac
8866 C_SWITCH_SYSTEM=
8867 ## Some programs in src produce warnings saying certain subprograms
8868 ## are too complex and need a MAXMEM value greater than 2000 for
8869 ## additional optimization. --nils@exp-math.uni-essen.de
8870 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8871 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8872 test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
8873 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8874 ## It is redundant in glibc2, since we define _GNU_SOURCE.
8878 LIBS_SYSTEM=
8879 case "$opsys" in
8880 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8881 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8883 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
8885 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8887 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
8889 ## Motif needs -lgen.
8890 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8891 esac
8895 ### Make sure subsequent tests use flags consistent with the build flags.
8897 if test x"${OVERRIDE_CPPFLAGS}" != x; then
8898 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8899 else
8900 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8903 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8905 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8909 LIB_MATH=-lm
8910 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
8912 case $opsys in
8913 cygwin )
8914 LIB_MATH=
8916 darwin )
8917 ## Adding -lm confuses the dynamic linker, so omit it.
8918 LIB_MATH=
8920 freebsd | dragonfly )
8921 SYSTEM_TYPE=berkeley-unix
8923 gnu-linux | gnu-kfreebsd )
8925 hpux10-20 | hpux11 )
8927 mingw32 )
8928 LIB_MATH=
8929 SYSTEM_TYPE=windows-nt
8931 netbsd | openbsd )
8932 SYSTEM_TYPE=berkeley-unix
8935 sol2* | unixware )
8936 SYSTEM_TYPE=usg-unix-v
8939 esac
8943 cat >>confdefs.h <<_ACEOF
8944 #define SYSTEM_TYPE "$SYSTEM_TYPE"
8945 _ACEOF
8949 pre_PKG_CONFIG_CFLAGS=$CFLAGS
8950 pre_PKG_CONFIG_LIBS=$LIBS
8952 # Extract the first word of "pkg-config", so it can be a program name with args.
8953 set dummy pkg-config; ac_word=$2
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8955 $as_echo_n "checking for $ac_word... " >&6; }
8956 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8957 $as_echo_n "(cached) " >&6
8958 else
8959 case $PKG_CONFIG in
8960 [\\/]* | ?:[\\/]*)
8961 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8965 for as_dir in $PATH
8967 IFS=$as_save_IFS
8968 test -z "$as_dir" && as_dir=.
8969 for ac_exec_ext in '' $ac_executable_extensions; do
8970 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8971 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8973 break 2
8975 done
8976 done
8977 IFS=$as_save_IFS
8979 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8981 esac
8983 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8984 if test -n "$PKG_CONFIG"; then
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8986 $as_echo "$PKG_CONFIG" >&6; }
8987 else
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8989 $as_echo "no" >&6; }
8996 if test "${with_sound}" != "no"; then
8997 # Sound support for GNU/Linux, the free BSDs, and MinGW.
8998 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8999 do :
9000 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9001 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9002 #ifdef __MINGW32__
9003 #define WIN32_LEAN_AND_MEAN
9004 #include <windows.h>
9005 #endif
9008 eval as_val=\$$as_ac_Header
9009 if test "x$as_val" = x""yes; then :
9010 cat >>confdefs.h <<_ACEOF
9011 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9012 _ACEOF
9013 have_sound_header=yes
9016 done
9018 # Emulation library used on NetBSD.
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
9020 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9021 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
9022 $as_echo_n "(cached) " >&6
9023 else
9024 ac_check_lib_save_LIBS=$LIBS
9025 LIBS="-lossaudio $LIBS"
9026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9027 /* end confdefs.h. */
9029 /* Override any GCC internal prototype to avoid an error.
9030 Use char because int might match the return type of a GCC
9031 builtin and then its argument prototype would still apply. */
9032 #ifdef __cplusplus
9033 extern "C"
9034 #endif
9035 char _oss_ioctl ();
9037 main ()
9039 return _oss_ioctl ();
9041 return 0;
9043 _ACEOF
9044 if ac_fn_c_try_link "$LINENO"; then :
9045 ac_cv_lib_ossaudio__oss_ioctl=yes
9046 else
9047 ac_cv_lib_ossaudio__oss_ioctl=no
9049 rm -f core conftest.err conftest.$ac_objext \
9050 conftest$ac_exeext conftest.$ac_ext
9051 LIBS=$ac_check_lib_save_LIBS
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9054 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9055 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9056 LIBSOUND=-lossaudio
9057 else
9058 LIBSOUND=
9063 ALSA_REQUIRED=1.0.0
9064 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
9066 succeeded=no
9068 if test "$PKG_CONFIG" = "no" ; then
9069 HAVE_ALSA=no
9070 else
9071 PKG_CONFIG_MIN_VERSION=0.9.0
9072 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9074 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
9076 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9077 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9078 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
9079 edit_cflags="
9080 s,///*,/,g
9081 s/^/ /
9082 s/ -I/ $isystem/g
9083 s/^ //
9085 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9086 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9088 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9089 succeeded=yes
9090 else
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092 $as_echo "no" >&6; }
9093 ALSA_CFLAGS=""
9094 ALSA_LIBS=""
9095 ## If we have a custom action on failure, don't print errors, but
9096 ## do set a variable so people can do so. Do it in a subshell
9097 ## to capture any diagnostics in invoking pkg-config.
9098 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
9104 else
9105 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9106 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9110 if test $succeeded = yes; then
9111 HAVE_ALSA=yes
9112 else
9113 HAVE_ALSA=no
9116 if test $HAVE_ALSA = yes; then
9117 SAVE_CFLAGS="$CFLAGS"
9118 SAVE_LIBS="$LIBS"
9119 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9120 LIBS="$ALSA_LIBS $LIBS"
9121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9122 /* end confdefs.h. */
9123 #include <asoundlib.h>
9125 main ()
9127 snd_lib_error_set_handler (0);
9129 return 0;
9131 _ACEOF
9132 if ac_fn_c_try_compile "$LINENO"; then :
9133 emacs_alsa_normal=yes
9134 else
9135 emacs_alsa_normal=no
9137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9138 if test "$emacs_alsa_normal" != yes; then
9139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9140 /* end confdefs.h. */
9141 #include <alsa/asoundlib.h>
9143 main ()
9145 snd_lib_error_set_handler (0);
9147 return 0;
9149 _ACEOF
9150 if ac_fn_c_try_compile "$LINENO"; then :
9151 emacs_alsa_subdir=yes
9152 else
9153 emacs_alsa_subdir=no
9155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156 if test "$emacs_alsa_subdir" != yes; then
9157 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9159 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
9162 CFLAGS="$SAVE_CFLAGS"
9163 LIBS="$SAVE_LIBS"
9164 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9165 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
9167 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
9171 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
9172 case "$opsys" in
9173 gnu-linux|freebsd|netbsd|mingw32)
9175 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
9178 esac
9187 for ac_header in $ac_header_list
9188 do :
9189 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9190 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9192 eval as_val=\$$as_ac_Header
9193 if test "x$as_val" = x""yes; then :
9194 cat >>confdefs.h <<_ACEOF
9195 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9196 _ACEOF
9200 done
9220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9221 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9223 /* end confdefs.h. */
9224 #include <sys/personality.h>
9226 main ()
9228 personality (PER_LINUX32)
9230 return 0;
9232 _ACEOF
9233 if ac_fn_c_try_compile "$LINENO"; then :
9234 emacs_cv_personality_linux32=yes
9235 else
9236 emacs_cv_personality_linux32=no
9238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9240 $as_echo "$emacs_cv_personality_linux32" >&6; }
9242 if test $emacs_cv_personality_linux32 = yes; then
9244 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9248 for ac_header in term.h
9249 do :
9250 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9251 if test "x$ac_cv_header_term_h" = x""yes; then :
9252 cat >>confdefs.h <<_ACEOF
9253 #define HAVE_TERM_H 1
9254 _ACEOF
9258 done
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9261 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9262 if test "${ac_cv_header_time+set}" = set; then :
9263 $as_echo_n "(cached) " >&6
9264 else
9265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9266 /* end confdefs.h. */
9267 #include <sys/types.h>
9268 #include <sys/time.h>
9269 #include <time.h>
9272 main ()
9274 if ((struct tm *) 0)
9275 return 0;
9277 return 0;
9279 _ACEOF
9280 if ac_fn_c_try_compile "$LINENO"; then :
9281 ac_cv_header_time=yes
9282 else
9283 ac_cv_header_time=no
9285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9288 $as_echo "$ac_cv_header_time" >&6; }
9289 if test $ac_cv_header_time = yes; then
9291 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9295 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9298 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9299 ac_have_decl=1
9300 else
9301 ac_have_decl=0
9304 cat >>confdefs.h <<_ACEOF
9305 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
9306 _ACEOF
9308 if test $ac_cv_have_decl_sys_siglist != yes; then
9309 # For Tru64, at least:
9310 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9313 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9314 ac_have_decl=1
9315 else
9316 ac_have_decl=0
9319 cat >>confdefs.h <<_ACEOF
9320 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9321 _ACEOF
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9325 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9326 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9327 $as_echo_n "(cached) " >&6
9328 else
9329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9330 /* end confdefs.h. */
9331 #include <sys/types.h>
9332 #include <sys/wait.h>
9333 #ifndef WEXITSTATUS
9334 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9335 #endif
9336 #ifndef WIFEXITED
9337 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9338 #endif
9341 main ()
9343 int s;
9344 wait (&s);
9345 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9347 return 0;
9349 _ACEOF
9350 if ac_fn_c_try_compile "$LINENO"; then :
9351 ac_cv_header_sys_wait_h=yes
9352 else
9353 ac_cv_header_sys_wait_h=no
9355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9358 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
9359 if test $ac_cv_header_sys_wait_h = yes; then
9361 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9369 for ac_header in net/if.h
9370 do :
9371 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9372 #if HAVE_SYS_SOCKET_H
9373 #include <sys/socket.h>
9374 #endif
9376 if test "x$ac_cv_header_net_if_h" = x""yes; then :
9377 cat >>confdefs.h <<_ACEOF
9378 #define HAVE_NET_IF_H 1
9379 _ACEOF
9383 done
9385 for ac_header in ifaddrs.h
9386 do :
9387 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9388 #if HAVE_SYS_SOCKET_H
9389 #include <sys/socket.h>
9390 #endif
9392 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9393 cat >>confdefs.h <<_ACEOF
9394 #define HAVE_IFADDRS_H 1
9395 _ACEOF
9399 done
9401 for ac_header in net/if_dl.h
9402 do :
9403 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9404 #if HAVE_SYS_SOCKET_H
9405 #include <sys/socket.h>
9406 #endif
9408 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
9409 cat >>confdefs.h <<_ACEOF
9410 #define HAVE_NET_IF_DL_H 1
9411 _ACEOF
9415 done
9418 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9419 #if HAVE_SYS_SOCKET_H
9420 #include <sys/socket.h>
9421 #endif
9422 #if HAVE_NET_IF_H
9423 #include <net/if.h>
9424 #endif
9426 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
9428 cat >>confdefs.h <<_ACEOF
9429 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9430 _ACEOF
9434 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9435 #if HAVE_SYS_SOCKET_H
9436 #include <sys/socket.h>
9437 #endif
9438 #if HAVE_NET_IF_H
9439 #include <net/if.h>
9440 #endif
9442 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9444 cat >>confdefs.h <<_ACEOF
9445 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9446 _ACEOF
9450 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9451 #if HAVE_SYS_SOCKET_H
9452 #include <sys/socket.h>
9453 #endif
9454 #if HAVE_NET_IF_H
9455 #include <net/if.h>
9456 #endif
9458 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9460 cat >>confdefs.h <<_ACEOF
9461 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9462 _ACEOF
9466 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9467 #if HAVE_SYS_SOCKET_H
9468 #include <sys/socket.h>
9469 #endif
9470 #if HAVE_NET_IF_H
9471 #include <net/if.h>
9472 #endif
9474 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9476 cat >>confdefs.h <<_ACEOF
9477 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9478 _ACEOF
9482 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9483 #if HAVE_SYS_SOCKET_H
9484 #include <sys/socket.h>
9485 #endif
9486 #if HAVE_NET_IF_H
9487 #include <net/if.h>
9488 #endif
9490 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9492 cat >>confdefs.h <<_ACEOF
9493 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9494 _ACEOF
9498 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9499 #if HAVE_SYS_SOCKET_H
9500 #include <sys/socket.h>
9501 #endif
9502 #if HAVE_NET_IF_H
9503 #include <net/if.h>
9504 #endif
9506 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9508 cat >>confdefs.h <<_ACEOF
9509 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9510 _ACEOF
9518 DEPFLAGS=
9519 MKDEPDIR=":"
9520 deps_frag=deps.mk
9521 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9523 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9524 HAVE_GNU_MAKE=no
9525 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9526 if test "x$testval" != x; then
9527 HAVE_GNU_MAKE=yes
9528 else
9529 ac_enable_autodepend=no
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9532 $as_echo "$HAVE_GNU_MAKE" >&6; }
9533 if test $HAVE_GNU_MAKE = yes; then
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9535 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9536 SAVE_CFLAGS="$CFLAGS"
9537 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9539 /* end confdefs.h. */
9542 main ()
9546 return 0;
9548 _ACEOF
9549 if ac_fn_c_try_compile "$LINENO"; then :
9551 else
9552 ac_enable_autodepend=no
9554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9555 CFLAGS="$SAVE_CFLAGS"
9556 test -f deps.d || ac_enable_autodepend=no
9557 rm -rf deps.d
9558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9559 $as_echo "$ac_enable_autodepend" >&6; }
9561 if test $ac_enable_autodepend = yes; then
9562 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9563 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9564 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9565 deps_frag=autodeps.mk
9568 deps_frag=$srcdir/src/$deps_frag
9574 lisp_frag=$srcdir/src/lisp.mk
9578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9579 $as_echo_n "checking for long file names... " >&6; }
9580 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9581 $as_echo_n "(cached) " >&6
9582 else
9583 ac_cv_sys_long_file_names=yes
9584 # Test for long file names in all the places we know might matter:
9585 # . the current directory, where building will happen
9586 # $prefix/lib where we will be installing things
9587 # $exec_prefix/lib likewise
9588 # $TMPDIR if set, where it might want to write temporary files
9589 # /tmp where it might want to write temporary files
9590 # /var/tmp likewise
9591 # /usr/tmp likewise
9592 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9593 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9594 # in the usual case where exec_prefix is '${prefix}'.
9595 case $ac_dir in #(
9596 . | /* | ?:[\\/]*) ;; #(
9597 *) continue;;
9598 esac
9599 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9600 ac_xdir=$ac_dir/cf$$
9601 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9602 ac_tf1=$ac_xdir/conftest9012345
9603 ac_tf2=$ac_xdir/conftest9012346
9604 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9605 ac_cv_sys_long_file_names=no
9606 rm -f -r "$ac_xdir" 2>/dev/null
9607 test $ac_cv_sys_long_file_names = no && break
9608 done
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9611 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9612 if test $ac_cv_sys_long_file_names = yes; then
9614 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9619 #### Choose a window system.
9621 ## We leave window_system equal to none if
9622 ## we end up building without one. Any new window system should
9623 ## set window_system to an appropriate value and add objects to
9624 ## window-system-specific substs.
9626 window_system=none
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9628 $as_echo_n "checking for X... " >&6; }
9631 # Check whether --with-x was given.
9632 if test "${with_x+set}" = set; then :
9633 withval=$with_x;
9636 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9637 if test "x$with_x" = xno; then
9638 # The user explicitly disabled X.
9639 have_x=disabled
9640 else
9641 case $x_includes,$x_libraries in #(
9642 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9643 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9644 $as_echo_n "(cached) " >&6
9645 else
9646 # One or both of the vars are not set, and there is no cached value.
9647 ac_x_includes=no ac_x_libraries=no
9648 rm -f -r conftest.dir
9649 if mkdir conftest.dir; then
9650 cd conftest.dir
9651 cat >Imakefile <<'_ACEOF'
9652 incroot:
9653 @echo incroot='${INCROOT}'
9654 usrlibdir:
9655 @echo usrlibdir='${USRLIBDIR}'
9656 libdir:
9657 @echo libdir='${LIBDIR}'
9658 _ACEOF
9659 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9660 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9661 for ac_var in incroot usrlibdir libdir; do
9662 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9663 done
9664 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9665 for ac_extension in a so sl dylib la dll; do
9666 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9667 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9668 ac_im_usrlibdir=$ac_im_libdir; break
9670 done
9671 # Screen out bogus values from the imake configuration. They are
9672 # bogus both because they are the default anyway, and because
9673 # using them would break gcc on systems where it needs fixed includes.
9674 case $ac_im_incroot in
9675 /usr/include) ac_x_includes= ;;
9676 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9677 esac
9678 case $ac_im_usrlibdir in
9679 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9680 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9681 esac
9683 cd ..
9684 rm -f -r conftest.dir
9687 # Standard set of common directories for X headers.
9688 # Check X11 before X11Rn because it is often a symlink to the current release.
9689 ac_x_header_dirs='
9690 /usr/X11/include
9691 /usr/X11R7/include
9692 /usr/X11R6/include
9693 /usr/X11R5/include
9694 /usr/X11R4/include
9696 /usr/include/X11
9697 /usr/include/X11R7
9698 /usr/include/X11R6
9699 /usr/include/X11R5
9700 /usr/include/X11R4
9702 /usr/local/X11/include
9703 /usr/local/X11R7/include
9704 /usr/local/X11R6/include
9705 /usr/local/X11R5/include
9706 /usr/local/X11R4/include
9708 /usr/local/include/X11
9709 /usr/local/include/X11R7
9710 /usr/local/include/X11R6
9711 /usr/local/include/X11R5
9712 /usr/local/include/X11R4
9714 /usr/X386/include
9715 /usr/x386/include
9716 /usr/XFree86/include/X11
9718 /usr/include
9719 /usr/local/include
9720 /usr/unsupported/include
9721 /usr/athena/include
9722 /usr/local/x11r5/include
9723 /usr/lpp/Xamples/include
9725 /usr/openwin/include
9726 /usr/openwin/share/include'
9728 if test "$ac_x_includes" = no; then
9729 # Guess where to find include files, by looking for Xlib.h.
9730 # First, try using that file with no special directory specified.
9731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9732 /* end confdefs.h. */
9733 #include <X11/Xlib.h>
9734 _ACEOF
9735 if ac_fn_c_try_cpp "$LINENO"; then :
9736 # We can compile using X headers with no special include directory.
9737 ac_x_includes=
9738 else
9739 for ac_dir in $ac_x_header_dirs; do
9740 if test -r "$ac_dir/X11/Xlib.h"; then
9741 ac_x_includes=$ac_dir
9742 break
9744 done
9746 rm -f conftest.err conftest.$ac_ext
9747 fi # $ac_x_includes = no
9749 if test "$ac_x_libraries" = no; then
9750 # Check for the libraries.
9751 # See if we find them without any special options.
9752 # Don't add to $LIBS permanently.
9753 ac_save_LIBS=$LIBS
9754 LIBS="-lX11 $LIBS"
9755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9756 /* end confdefs.h. */
9757 #include <X11/Xlib.h>
9759 main ()
9761 XrmInitialize ()
9763 return 0;
9765 _ACEOF
9766 if ac_fn_c_try_link "$LINENO"; then :
9767 LIBS=$ac_save_LIBS
9768 # We can link X programs with no special library path.
9769 ac_x_libraries=
9770 else
9771 LIBS=$ac_save_LIBS
9772 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9774 # Don't even attempt the hair of trying to link an X program!
9775 for ac_extension in a so sl dylib la dll; do
9776 if test -r "$ac_dir/libX11.$ac_extension"; then
9777 ac_x_libraries=$ac_dir
9778 break 2
9780 done
9781 done
9783 rm -f core conftest.err conftest.$ac_objext \
9784 conftest$ac_exeext conftest.$ac_ext
9785 fi # $ac_x_libraries = no
9787 case $ac_x_includes,$ac_x_libraries in #(
9788 no,* | *,no | *\'*)
9789 # Didn't find X, or a directory has "'" in its name.
9790 ac_cv_have_x="have_x=no";; #(
9792 # Record where we found X for the cache.
9793 ac_cv_have_x="have_x=yes\
9794 ac_x_includes='$ac_x_includes'\
9795 ac_x_libraries='$ac_x_libraries'"
9796 esac
9798 ;; #(
9799 *) have_x=yes;;
9800 esac
9801 eval "$ac_cv_have_x"
9802 fi # $with_x != no
9804 if test "$have_x" != yes; then
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9806 $as_echo "$have_x" >&6; }
9807 no_x=yes
9808 else
9809 # If each of the values was on the command line, it overrides each guess.
9810 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9811 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9812 # Update the cache value to reflect the command line values.
9813 ac_cv_have_x="have_x=yes\
9814 ac_x_includes='$x_includes'\
9815 ac_x_libraries='$x_libraries'"
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9817 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9820 if test "$no_x" != yes; then
9821 window_system=x11
9824 LD_SWITCH_X_SITE_RPATH=
9825 if test "${x_libraries}" != NONE; then
9826 if test -n "${x_libraries}"; then
9827 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9828 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9830 x_default_search_path=""
9831 x_search_path=${x_libraries}
9832 if test -z "${x_search_path}"; then
9833 x_search_path=/usr/lib
9835 for x_library in `echo ${x_search_path}: | \
9836 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9837 x_search_path="\
9838 ${x_library}/X11/%L/%T/%N%C%S:\
9839 ${x_library}/X11/%l/%T/%N%C%S:\
9840 ${x_library}/X11/%T/%N%C%S:\
9841 ${x_library}/X11/%L/%T/%N%S:\
9842 ${x_library}/X11/%l/%T/%N%S:\
9843 ${x_library}/X11/%T/%N%S"
9844 if test x"${x_default_search_path}" = x; then
9845 x_default_search_path=${x_search_path}
9846 else
9847 x_default_search_path="${x_search_path}:${x_default_search_path}"
9849 done
9853 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9854 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9857 if test x"${x_includes}" = x; then
9858 bitmapdir=/usr/include/X11/bitmaps
9859 else
9860 # accumulate include directories that have X11 bitmap subdirectories
9861 bmd_acc="dummyval"
9862 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9863 if test -d "${bmd}/X11/bitmaps"; then
9864 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9866 if test -d "${bmd}/bitmaps"; then
9867 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9869 done
9870 if test ${bmd_acc} != "dummyval"; then
9871 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9875 HAVE_NS=no
9876 NS_IMPL_COCOA=no
9877 NS_IMPL_GNUSTEP=no
9878 tmp_CPPFLAGS="$CPPFLAGS"
9879 tmp_CFLAGS="$CFLAGS"
9880 CPPFLAGS="$CPPFLAGS -x objective-c"
9881 CFLAGS="$CFLAGS -x objective-c"
9882 GNU_OBJC_CFLAGS=
9883 LIBS_GNUSTEP=
9884 if test "${with_ns}" != no; then
9885 if test "${opsys}" = darwin; then
9886 NS_IMPL_COCOA=yes
9887 ns_appdir=`pwd`/nextstep/Emacs.app
9888 ns_appbindir=${ns_appdir}/Contents/MacOS
9889 ns_appresdir=${ns_appdir}/Contents/Resources
9890 ns_appsrc=Cocoa/Emacs.base
9891 elif test -f $GNUSTEP_CONFIG_FILE; then
9892 NS_IMPL_GNUSTEP=yes
9893 ns_appdir=`pwd`/nextstep/Emacs.app
9894 ns_appbindir=${ns_appdir}
9895 ns_appresdir=${ns_appdir}/Resources
9896 ns_appsrc=GNUstep/Emacs.base
9897 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9898 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9899 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9900 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9901 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9902 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9903 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9904 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9905 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9906 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9907 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9908 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9910 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9911 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9912 $as_echo_n "(cached) " >&6
9913 else
9914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9915 /* end confdefs.h. */
9916 #include <GNUstepBase/GSConfig.h>
9918 main ()
9920 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9922 #else
9923 fail;
9924 #endif
9926 return 0;
9928 _ACEOF
9929 if ac_fn_c_try_compile "$LINENO"; then :
9930 emacs_cv_objc_exceptions=yes
9931 else
9932 emacs_cv_objc_exceptions=no
9934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9937 $as_echo "$emacs_cv_objc_exceptions" >&6; }
9938 if test $emacs_cv_objc_exceptions = yes; then
9940 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9942 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9946 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9948 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9949 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9950 HAVE_NS=yes
9951 else
9952 as_fn_error "\`--with-ns' was specified, but the include
9953 files are missing or cannot be compiled." "$LINENO" 5
9958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9959 /* end confdefs.h. */
9960 #include <AppKit/AppKit.h>
9962 main ()
9965 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9966 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9967 ; /* OK */
9968 #else
9969 #error "OSX 10.4 or newer required"
9970 #endif
9971 #endif
9974 return 0;
9976 _ACEOF
9977 if ac_fn_c_try_compile "$LINENO"; then :
9978 ns_osx_have_104=yes
9979 else
9980 ns_osx_have_104=no
9982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984 /* end confdefs.h. */
9985 #include <Foundation/NSObjCRuntime.h>
9987 main ()
9989 NSInteger i;
9991 return 0;
9993 _ACEOF
9994 if ac_fn_c_try_compile "$LINENO"; then :
9995 ns_have_nsinteger=yes
9996 else
9997 ns_have_nsinteger=no
9999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10000 if test $ns_osx_have_104 = no; then
10001 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10003 if test $ns_have_nsinteger = yes; then
10005 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
10012 INSTALL_ARCH_INDEP_EXTRA=install-etc
10013 ns_self_contained=no
10014 NS_OBJ=
10015 NS_OBJC_OBJ=
10016 if test "${HAVE_NS}" = yes; then
10017 if test "$with_toolkit_scroll_bars" = "no"; then
10018 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10021 window_system=nextstep
10022 # set up packaging dirs
10023 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10024 ns_self_contained=yes
10025 prefix=${ns_appresdir}
10026 exec_prefix=${ns_appbindir}
10027 libexecdir="\${ns_appbindir}/libexec"
10028 archlibdir="\${ns_appbindir}/libexec"
10029 docdir="\${ns_appresdir}/etc"
10030 etcdir="\${ns_appresdir}/etc"
10031 infodir="\${ns_appresdir}/info"
10032 mandir="\${ns_appresdir}/man"
10033 lispdir="\${ns_appresdir}/lisp"
10034 leimdir="\${ns_appresdir}/leim"
10035 INSTALL_ARCH_INDEP_EXTRA=
10037 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
10039 CFLAGS="$tmp_CFLAGS"
10040 CPPFLAGS="$tmp_CPPFLAGS"
10046 HAVE_W32=no
10047 W32_OBJ=
10048 W32_LIBS=
10049 EMACSRES=
10050 CLIENTRES=
10051 CLIENTW=
10052 W32_RES_LINK=
10053 EMACS_MANIFEST=
10054 if test "${with_w32}" != no; then
10055 case "${opsys}" in
10056 cygwin)
10057 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
10058 if test "x$ac_cv_header_windows_h" = x""yes; then :
10059 HAVE_W32=yes
10060 else
10061 as_fn_error "\`--with-w32' was specified, but windows.h
10062 cannot be found." "$LINENO" 5
10067 mingw32)
10068 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10071 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10073 esac
10076 if test "${opsys}" = "mingw32"; then
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10078 $as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080 /* end confdefs.h. */
10082 #include <windows.h>
10083 #include <usp10.h>
10085 main ()
10087 void test(PIMAGE_NT_HEADERS pHeader)
10088 {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}
10090 return 0;
10092 _ACEOF
10093 if ac_fn_c_try_compile "$LINENO"; then :
10094 emacs_cv_w32api=yes
10095 HAVE_W32=yes
10096 else
10097 emacs_cv_w32api=no
10099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10101 $as_echo "$emacs_cv_w32api" >&6; }
10102 if test "${emacs_cv_w32api}" = "no"; then
10103 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10107 FIRSTFILE_OBJ=
10108 NTDIR=
10109 LIBS_ECLIENT=
10110 LIB_WSOCK32=
10111 NTLIB=
10112 CM_OBJ="cm.o"
10113 XARGS_LIMIT=
10114 if test "${HAVE_W32}" = "yes"; then
10116 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10118 if test -n "$ac_tool_prefix"; then
10119 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10120 set dummy ${ac_tool_prefix}windres; ac_word=$2
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10122 $as_echo_n "checking for $ac_word... " >&6; }
10123 if test "${ac_cv_prog_WINDRES+set}" = set; then :
10124 $as_echo_n "(cached) " >&6
10125 else
10126 if test -n "$WINDRES"; then
10127 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10128 else
10129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10130 for as_dir in $PATH
10132 IFS=$as_save_IFS
10133 test -z "$as_dir" && as_dir=.
10134 for ac_exec_ext in '' $ac_executable_extensions; do
10135 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10136 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10138 break 2
10140 done
10141 done
10142 IFS=$as_save_IFS
10146 WINDRES=$ac_cv_prog_WINDRES
10147 if test -n "$WINDRES"; then
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10149 $as_echo "$WINDRES" >&6; }
10150 else
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10152 $as_echo "no" >&6; }
10157 if test -z "$ac_cv_prog_WINDRES"; then
10158 ac_ct_WINDRES=$WINDRES
10159 # Extract the first word of "windres", so it can be a program name with args.
10160 set dummy windres; ac_word=$2
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10162 $as_echo_n "checking for $ac_word... " >&6; }
10163 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10164 $as_echo_n "(cached) " >&6
10165 else
10166 if test -n "$ac_ct_WINDRES"; then
10167 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10168 else
10169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170 for as_dir in $PATH
10172 IFS=$as_save_IFS
10173 test -z "$as_dir" && as_dir=.
10174 for ac_exec_ext in '' $ac_executable_extensions; do
10175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10176 ac_cv_prog_ac_ct_WINDRES="windres"
10177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178 break 2
10180 done
10181 done
10182 IFS=$as_save_IFS
10186 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10187 if test -n "$ac_ct_WINDRES"; then
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10189 $as_echo "$ac_ct_WINDRES" >&6; }
10190 else
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192 $as_echo "no" >&6; }
10195 if test "x$ac_ct_WINDRES" = x; then
10196 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10197 else
10198 case $cross_compiling:$ac_tool_warned in
10199 yes:)
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10201 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10202 ac_tool_warned=yes ;;
10203 esac
10204 WINDRES=$ac_ct_WINDRES
10206 else
10207 WINDRES="$ac_cv_prog_WINDRES"
10210 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10211 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
10212 EMACSRES="emacs.res"
10213 case "$canonical" in
10214 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10215 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10216 esac
10217 if test "${opsys}" = "cygwin"; then
10218 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10219 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10220 # Tell the linker that emacs.res is an object (which we compile from
10221 # the rc file), not a linker script.
10222 W32_RES_LINK="-Wl,emacs.res"
10223 else
10224 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
10225 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10226 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10227 W32_RES_LINK="\$(EMACSRES)"
10228 CLIENTRES="emacsclient.res"
10229 CLIENTW="emacsclientw\$(EXEEXT)"
10230 FIRSTFILE_OBJ=firstfile.o
10231 NTDIR=nt
10232 CM_OBJ=
10233 LIBS_ECLIENT="-lcomctl32"
10234 LIB_WSOCK32="-lwsock32"
10235 NTLIB="ntlib.$ac_objext"
10236 XARGS_LIMIT="-s 10000"
10254 if test "${HAVE_W32}" = "yes"; then
10255 window_system=w32
10256 with_xft=no
10259 ## $window_system is now set to the window system we will
10260 ## ultimately use.
10262 term_header=
10263 HAVE_X_WINDOWS=no
10264 HAVE_X11=no
10265 USE_X_TOOLKIT=none
10267 case "${window_system}" in
10268 x11 )
10269 HAVE_X_WINDOWS=yes
10270 HAVE_X11=yes
10271 term_header=xterm.h
10272 case "${with_x_toolkit}" in
10273 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10274 motif ) USE_X_TOOLKIT=MOTIF ;;
10275 gtk ) with_gtk=yes
10276 term_header=gtkutil.h
10277 USE_X_TOOLKIT=none ;;
10278 gtk2 ) with_gtk2=yes
10279 term_header=gtkutil.h
10280 USE_X_TOOLKIT=none ;;
10281 gtk3 ) with_gtk3=yes
10282 term_header=gtkutil.h
10283 USE_X_TOOLKIT=none ;;
10284 no ) USE_X_TOOLKIT=none ;;
10285 * ) USE_X_TOOLKIT=maybe ;;
10286 esac
10288 nextstep )
10289 term_header=nsterm.h
10291 w32 )
10292 term_header=w32term.h
10294 esac
10296 if test "$window_system" = none && test "X$with_x" != "Xno"; then
10297 # Extract the first word of "X", so it can be a program name with args.
10298 set dummy X; ac_word=$2
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10300 $as_echo_n "checking for $ac_word... " >&6; }
10301 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10302 $as_echo_n "(cached) " >&6
10303 else
10304 if test -n "$HAVE_XSERVER"; then
10305 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10306 else
10307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10308 for as_dir in $PATH
10310 IFS=$as_save_IFS
10311 test -z "$as_dir" && as_dir=.
10312 for ac_exec_ext in '' $ac_executable_extensions; do
10313 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10314 ac_cv_prog_HAVE_XSERVER="true"
10315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10316 break 2
10318 done
10319 done
10320 IFS=$as_save_IFS
10322 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10325 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10326 if test -n "$HAVE_XSERVER"; then
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10328 $as_echo "$HAVE_XSERVER" >&6; }
10329 else
10330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331 $as_echo "no" >&6; }
10335 if test "$HAVE_XSERVER" = true ||
10336 test -n "$DISPLAY" ||
10337 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10338 as_fn_error "You seem to be running X, but no X development libraries
10339 were found. You should install the relevant development files for X
10340 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10341 sure you have development files for image handling, i.e.
10342 tiff, gif, jpeg, png and xpm.
10343 If you are sure you want Emacs compiled without X window support, pass
10344 --without-x
10345 to configure." "$LINENO" 5
10349 ### If we're using X11, we should use the X menu package.
10350 HAVE_MENUS=no
10351 case ${HAVE_X11} in
10352 yes ) HAVE_MENUS=yes ;;
10353 esac
10355 # Does the opsystem file prohibit the use of the GNU malloc?
10356 # Assume not, until told otherwise.
10357 GNU_MALLOC=yes
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10360 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10361 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
10362 $as_echo_n "(cached) " >&6
10363 else
10364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10365 /* end confdefs.h. */
10366 #include <malloc.h>
10367 static void hook (void) {}
10369 main ()
10371 malloc_set_state (malloc_get_state ());
10372 __after_morecore_hook = hook;
10373 __malloc_initialize_hook = hook;
10375 return 0;
10377 _ACEOF
10378 if ac_fn_c_try_link "$LINENO"; then :
10379 emacs_cv_var_doug_lea_malloc=yes
10380 else
10381 emacs_cv_var_doug_lea_malloc=no
10383 rm -f core conftest.err conftest.$ac_objext \
10384 conftest$ac_exeext conftest.$ac_ext
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10387 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10388 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10391 system_malloc=no
10392 case "$opsys" in
10393 ## darwin ld insists on the use of malloc routines in the System framework.
10394 darwin|sol2-10) system_malloc=yes ;;
10395 esac
10397 if test "${system_malloc}" = "yes"; then
10399 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10401 GNU_MALLOC=no
10402 GNU_MALLOC_reason="
10403 (The GNU allocators don't work with this system configuration.)"
10404 GMALLOC_OBJ=
10405 VMLIMIT_OBJ=
10406 else
10407 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10408 VMLIMIT_OBJ=vm-limit.o
10410 for ac_header in sys/vlimit.h
10411 do :
10412 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10413 if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10414 cat >>confdefs.h <<_ACEOF
10415 #define HAVE_SYS_VLIMIT_H 1
10416 _ACEOF
10420 done
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10423 $as_echo_n "checking for data_start... " >&6; }
10424 if test "${emacs_cv_data_start+set}" = set; then :
10425 $as_echo_n "(cached) " >&6
10426 else
10427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10428 /* end confdefs.h. */
10429 extern char data_start[]; char ch;
10431 main ()
10433 return data_start < &ch;
10435 return 0;
10437 _ACEOF
10438 if ac_fn_c_try_link "$LINENO"; then :
10439 emacs_cv_data_start=yes
10440 else
10441 emacs_cv_data_start=no
10443 rm -f core conftest.err conftest.$ac_objext \
10444 conftest$ac_exeext conftest.$ac_ext
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10447 $as_echo "$emacs_cv_data_start" >&6; }
10448 if test $emacs_cv_data_start = yes; then
10450 $as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10457 if test "$doug_lea_malloc" = "yes" ; then
10458 if test "$GNU_MALLOC" = yes ; then
10459 GNU_MALLOC_reason="
10460 (Using Doug Lea's new malloc from the GNU C Library.)"
10463 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10466 ## Use mmap directly for allocating larger buffers.
10467 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10468 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10469 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10470 case "$opsys" in
10471 gnu*) REL_ALLOC=no ;;
10472 esac
10475 if test x"${REL_ALLOC}" = x; then
10476 REL_ALLOC=${GNU_MALLOC}
10479 use_mmap_for_buffers=no
10480 case "$opsys" in
10481 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10482 esac
10491 for ac_func in getpagesize
10492 do :
10493 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10494 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10495 cat >>confdefs.h <<_ACEOF
10496 #define HAVE_GETPAGESIZE 1
10497 _ACEOF
10500 done
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10503 $as_echo_n "checking for working mmap... " >&6; }
10504 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10505 $as_echo_n "(cached) " >&6
10506 else
10507 if test "$cross_compiling" = yes; then :
10508 ac_cv_func_mmap_fixed_mapped=no
10509 else
10510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10511 /* end confdefs.h. */
10512 $ac_includes_default
10513 /* malloc might have been renamed as rpl_malloc. */
10514 #undef malloc
10516 /* Thanks to Mike Haertel and Jim Avera for this test.
10517 Here is a matrix of mmap possibilities:
10518 mmap private not fixed
10519 mmap private fixed at somewhere currently unmapped
10520 mmap private fixed at somewhere already mapped
10521 mmap shared not fixed
10522 mmap shared fixed at somewhere currently unmapped
10523 mmap shared fixed at somewhere already mapped
10524 For private mappings, we should verify that changes cannot be read()
10525 back from the file, nor mmap's back from the file at a different
10526 address. (There have been systems where private was not correctly
10527 implemented like the infamous i386 svr4.0, and systems where the
10528 VM page cache was not coherent with the file system buffer cache
10529 like early versions of FreeBSD and possibly contemporary NetBSD.)
10530 For shared mappings, we should conversely verify that changes get
10531 propagated back to all the places they're supposed to be.
10533 Grep wants private fixed already mapped.
10534 The main things grep needs to know about mmap are:
10535 * does it exist and is it safe to write into the mmap'd area
10536 * how to use it (BSD variants) */
10538 #include <fcntl.h>
10539 #include <sys/mman.h>
10541 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10542 char *malloc ();
10543 #endif
10545 /* This mess was copied from the GNU getpagesize.h. */
10546 #ifndef HAVE_GETPAGESIZE
10547 # ifdef _SC_PAGESIZE
10548 # define getpagesize() sysconf(_SC_PAGESIZE)
10549 # else /* no _SC_PAGESIZE */
10550 # ifdef HAVE_SYS_PARAM_H
10551 # include <sys/param.h>
10552 # ifdef EXEC_PAGESIZE
10553 # define getpagesize() EXEC_PAGESIZE
10554 # else /* no EXEC_PAGESIZE */
10555 # ifdef NBPG
10556 # define getpagesize() NBPG * CLSIZE
10557 # ifndef CLSIZE
10558 # define CLSIZE 1
10559 # endif /* no CLSIZE */
10560 # else /* no NBPG */
10561 # ifdef NBPC
10562 # define getpagesize() NBPC
10563 # else /* no NBPC */
10564 # ifdef PAGESIZE
10565 # define getpagesize() PAGESIZE
10566 # endif /* PAGESIZE */
10567 # endif /* no NBPC */
10568 # endif /* no NBPG */
10569 # endif /* no EXEC_PAGESIZE */
10570 # else /* no HAVE_SYS_PARAM_H */
10571 # define getpagesize() 8192 /* punt totally */
10572 # endif /* no HAVE_SYS_PARAM_H */
10573 # endif /* no _SC_PAGESIZE */
10575 #endif /* no HAVE_GETPAGESIZE */
10578 main ()
10580 char *data, *data2, *data3;
10581 const char *cdata2;
10582 int i, pagesize;
10583 int fd, fd2;
10585 pagesize = getpagesize ();
10587 /* First, make a file with some known garbage in it. */
10588 data = (char *) malloc (pagesize);
10589 if (!data)
10590 return 1;
10591 for (i = 0; i < pagesize; ++i)
10592 *(data + i) = rand ();
10593 umask (0);
10594 fd = creat ("conftest.mmap", 0600);
10595 if (fd < 0)
10596 return 2;
10597 if (write (fd, data, pagesize) != pagesize)
10598 return 3;
10599 close (fd);
10601 /* Next, check that the tail of a page is zero-filled. File must have
10602 non-zero length, otherwise we risk SIGBUS for entire page. */
10603 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10604 if (fd2 < 0)
10605 return 4;
10606 cdata2 = "";
10607 if (write (fd2, cdata2, 1) != 1)
10608 return 5;
10609 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10610 if (data2 == MAP_FAILED)
10611 return 6;
10612 for (i = 0; i < pagesize; ++i)
10613 if (*(data2 + i))
10614 return 7;
10615 close (fd2);
10616 if (munmap (data2, pagesize))
10617 return 8;
10619 /* Next, try to mmap the file at a fixed address which already has
10620 something else allocated at it. If we can, also make sure that
10621 we see the same garbage. */
10622 fd = open ("conftest.mmap", O_RDWR);
10623 if (fd < 0)
10624 return 9;
10625 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10626 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10627 return 10;
10628 for (i = 0; i < pagesize; ++i)
10629 if (*(data + i) != *(data2 + i))
10630 return 11;
10632 /* Finally, make sure that changes to the mapped area do not
10633 percolate back to the file as seen by read(). (This is a bug on
10634 some variants of i386 svr4.0.) */
10635 for (i = 0; i < pagesize; ++i)
10636 *(data2 + i) = *(data2 + i) + 1;
10637 data3 = (char *) malloc (pagesize);
10638 if (!data3)
10639 return 12;
10640 if (read (fd, data3, pagesize) != pagesize)
10641 return 13;
10642 for (i = 0; i < pagesize; ++i)
10643 if (*(data + i) != *(data3 + i))
10644 return 14;
10645 close (fd);
10646 return 0;
10648 _ACEOF
10649 if ac_fn_c_try_run "$LINENO"; then :
10650 ac_cv_func_mmap_fixed_mapped=yes
10651 else
10652 ac_cv_func_mmap_fixed_mapped=no
10654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10655 conftest.$ac_objext conftest.beam conftest.$ac_ext
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10660 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10661 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10663 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10666 rm -f conftest.mmap conftest.txt
10668 if test $use_mmap_for_buffers = yes; then
10670 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10672 REL_ALLOC=no
10675 LIBS="$LIBS_SYSTEM $LIBS"
10677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10678 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10679 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10680 $as_echo_n "(cached) " >&6
10681 else
10682 ac_check_lib_save_LIBS=$LIBS
10683 LIBS="-ldnet $LIBS"
10684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10685 /* end confdefs.h. */
10687 /* Override any GCC internal prototype to avoid an error.
10688 Use char because int might match the return type of a GCC
10689 builtin and then its argument prototype would still apply. */
10690 #ifdef __cplusplus
10691 extern "C"
10692 #endif
10693 char dnet_ntoa ();
10695 main ()
10697 return dnet_ntoa ();
10699 return 0;
10701 _ACEOF
10702 if ac_fn_c_try_link "$LINENO"; then :
10703 ac_cv_lib_dnet_dnet_ntoa=yes
10704 else
10705 ac_cv_lib_dnet_dnet_ntoa=no
10707 rm -f core conftest.err conftest.$ac_objext \
10708 conftest$ac_exeext conftest.$ac_ext
10709 LIBS=$ac_check_lib_save_LIBS
10711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10712 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10713 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10714 cat >>confdefs.h <<_ACEOF
10715 #define HAVE_LIBDNET 1
10716 _ACEOF
10718 LIBS="-ldnet $LIBS"
10723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10724 $as_echo_n "checking for main in -lXbsd... " >&6; }
10725 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10726 $as_echo_n "(cached) " >&6
10727 else
10728 ac_check_lib_save_LIBS=$LIBS
10729 LIBS="-lXbsd $LIBS"
10730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10731 /* end confdefs.h. */
10735 main ()
10737 return main ();
10739 return 0;
10741 _ACEOF
10742 if ac_fn_c_try_link "$LINENO"; then :
10743 ac_cv_lib_Xbsd_main=yes
10744 else
10745 ac_cv_lib_Xbsd_main=no
10747 rm -f core conftest.err conftest.$ac_objext \
10748 conftest$ac_exeext conftest.$ac_ext
10749 LIBS=$ac_check_lib_save_LIBS
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10752 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10753 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10754 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10758 LIB_PTHREAD=
10762 if test "$ac_cv_header_pthread_h"; then
10763 if test "$GMALLOC_OBJ" = gmalloc.o; then
10764 emacs_pthread_function=pthread_atfork
10765 else
10766 emacs_pthread_function=pthread_self
10768 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10770 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10771 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10772 $as_echo_n "(cached) " >&6
10773 else
10774 ac_check_lib_save_LIBS=$LIBS
10775 LIBS="-lpthread $LIBS"
10776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10777 /* end confdefs.h. */
10779 /* Override any GCC internal prototype to avoid an error.
10780 Use char because int might match the return type of a GCC
10781 builtin and then its argument prototype would still apply. */
10782 #ifdef __cplusplus
10783 extern "C"
10784 #endif
10785 char $emacs_pthread_function ();
10787 main ()
10789 return $emacs_pthread_function ();
10791 return 0;
10793 _ACEOF
10794 if ac_fn_c_try_link "$LINENO"; then :
10795 eval "$as_ac_Lib=yes"
10796 else
10797 eval "$as_ac_Lib=no"
10799 rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
10801 LIBS=$ac_check_lib_save_LIBS
10803 eval ac_res=\$$as_ac_Lib
10804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10805 $as_echo "$ac_res" >&6; }
10806 eval as_val=\$$as_ac_Lib
10807 if test "x$as_val" = x""yes; then :
10808 HAVE_PTHREAD=yes
10812 if test "$HAVE_PTHREAD" = yes; then
10813 case "${canonical}" in
10814 *-hpux*) ;;
10815 *) LIB_PTHREAD="-lpthread"
10816 LIBS="$LIB_PTHREAD $LIBS" ;;
10817 esac
10819 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10825 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10826 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10827 $as_echo_n "(cached) " >&6
10828 else
10829 ac_check_lib_save_LIBS=$LIBS
10830 LIBS="-lpthreads $LIBS"
10831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832 /* end confdefs.h. */
10834 /* Override any GCC internal prototype to avoid an error.
10835 Use char because int might match the return type of a GCC
10836 builtin and then its argument prototype would still apply. */
10837 #ifdef __cplusplus
10838 extern "C"
10839 #endif
10840 char cma_open ();
10842 main ()
10844 return cma_open ();
10846 return 0;
10848 _ACEOF
10849 if ac_fn_c_try_link "$LINENO"; then :
10850 ac_cv_lib_pthreads_cma_open=yes
10851 else
10852 ac_cv_lib_pthreads_cma_open=no
10854 rm -f core conftest.err conftest.$ac_objext \
10855 conftest$ac_exeext conftest.$ac_ext
10856 LIBS=$ac_check_lib_save_LIBS
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10859 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10860 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10861 cat >>confdefs.h <<_ACEOF
10862 #define HAVE_LIBPTHREADS 1
10863 _ACEOF
10865 LIBS="-lpthreads $LIBS"
10870 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10871 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10872 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10873 ## added to LIBS in configure would never contain the pthreads part,
10874 ## but the value used in Makefiles might. FIXME?
10876 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10877 ## be harmless on older versions of X where it happens to exist.
10878 test "$opsys" = "aix4-2" && \
10879 test $ac_cv_lib_pthreads_cma_open = yes && \
10880 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10883 case ${host_os} in
10884 aix*)
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10886 $as_echo_n "checking for -bbigtoc option... " >&6; }
10887 if test "${gdb_cv_bigtoc+set}" = set; then :
10888 $as_echo_n "(cached) " >&6
10889 else
10891 case $GCC in
10892 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10893 *) gdb_cv_bigtoc=-bbigtoc ;;
10894 esac
10896 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10898 /* end confdefs.h. */
10901 main ()
10903 int i;
10905 return 0;
10907 _ACEOF
10908 if ac_fn_c_try_link "$LINENO"; then :
10910 else
10911 gdb_cv_bigtoc=
10913 rm -f core conftest.err conftest.$ac_objext \
10914 conftest$ac_exeext conftest.$ac_ext
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10918 $as_echo "$gdb_cv_bigtoc" >&6; }
10920 esac
10922 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10923 # used for the tests that follow. We set them back to REAL_CFLAGS and
10924 # REAL_CPPFLAGS later on.
10926 REAL_CFLAGS="$CFLAGS"
10927 REAL_CPPFLAGS="$CPPFLAGS"
10929 if test "${HAVE_X11}" = "yes"; then
10930 DEFS="$C_SWITCH_X_SITE $DEFS"
10931 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10932 LIBS="-lX11 $LIBS"
10933 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10934 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10936 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10937 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10938 # but it's more convenient here to set LD_RUN_PATH since this
10939 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10940 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10941 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10942 export LD_RUN_PATH
10945 if test "${opsys}" = "gnu-linux"; then
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10947 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949 /* end confdefs.h. */
10952 main ()
10954 XOpenDisplay ("foo");
10956 return 0;
10958 _ACEOF
10959 if ac_fn_c_try_link "$LINENO"; then :
10960 xgnu_linux_first_failure=no
10961 else
10962 xgnu_linux_first_failure=yes
10964 rm -f core conftest.err conftest.$ac_objext \
10965 conftest$ac_exeext conftest.$ac_ext
10966 if test "${xgnu_linux_first_failure}" = "yes"; then
10967 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10968 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10969 OLD_CPPFLAGS="$CPPFLAGS"
10970 OLD_LIBS="$LIBS"
10971 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10972 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10973 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10974 LIBS="$LIBS -b i486-linuxaout"
10975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976 /* end confdefs.h. */
10979 main ()
10981 XOpenDisplay ("foo");
10983 return 0;
10985 _ACEOF
10986 if ac_fn_c_try_link "$LINENO"; then :
10987 xgnu_linux_second_failure=no
10988 else
10989 xgnu_linux_second_failure=yes
10991 rm -f core conftest.err conftest.$ac_objext \
10992 conftest$ac_exeext conftest.$ac_ext
10993 if test "${xgnu_linux_second_failure}" = "yes"; then
10994 # If we get the same failure with -b, there is no use adding -b.
10995 # So take it out. This plays safe.
10996 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10997 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10998 CPPFLAGS="$OLD_CPPFLAGS"
10999 LIBS="$OLD_LIBS"
11000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11001 $as_echo "no" >&6; }
11002 else
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11004 $as_echo "yes" >&6; }
11006 else
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008 $as_echo "no" >&6; }
11012 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11013 # header files included from there.
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11015 $as_echo_n "checking for Xkb... " >&6; }
11016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11017 /* end confdefs.h. */
11018 #include <X11/Xlib.h>
11019 #include <X11/XKBlib.h>
11021 main ()
11023 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
11025 return 0;
11027 _ACEOF
11028 if ac_fn_c_try_link "$LINENO"; then :
11029 emacs_xkb=yes
11030 else
11031 emacs_xkb=no
11033 rm -f core conftest.err conftest.$ac_objext \
11034 conftest$ac_exeext conftest.$ac_ext
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11036 $as_echo "$emacs_xkb" >&6; }
11037 if test $emacs_xkb = yes; then
11039 $as_echo "#define HAVE_XKB 1" >>confdefs.h
11043 for ac_func in XrmSetDatabase XScreenResourceString \
11044 XScreenNumberOfScreen
11045 do :
11046 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11047 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11048 eval as_val=\$$as_ac_var
11049 if test "x$as_val" = x""yes; then :
11050 cat >>confdefs.h <<_ACEOF
11051 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11052 _ACEOF
11055 done
11059 if test "${window_system}" = "x11"; then
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11061 $as_echo_n "checking X11 version 6... " >&6; }
11062 if test "${emacs_cv_x11_version_6+set}" = set; then :
11063 $as_echo_n "(cached) " >&6
11064 else
11065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11066 /* end confdefs.h. */
11067 #include <X11/Xlib.h>
11069 main ()
11071 #if XlibSpecificationRelease < 6
11072 fail;
11073 #endif
11076 return 0;
11078 _ACEOF
11079 if ac_fn_c_try_link "$LINENO"; then :
11080 emacs_cv_x11_version_6=yes
11081 else
11082 emacs_cv_x11_version_6=no
11084 rm -f core conftest.err conftest.$ac_objext \
11085 conftest$ac_exeext conftest.$ac_ext
11088 if test $emacs_cv_x11_version_6 = yes; then
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11090 $as_echo "6 or newer" >&6; }
11092 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
11095 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
11097 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11098 ## XIM support.
11099 case "$opsys" in
11100 sol2-*) : ;;
11102 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
11105 esac
11106 else
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11108 $as_echo "before 6" >&6; }
11113 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11114 HAVE_RSVG=no
11115 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
11116 if test "${with_rsvg}" != "no"; then
11117 RSVG_REQUIRED=2.11.0
11118 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11121 succeeded=no
11123 if test "$PKG_CONFIG" = "no" ; then
11125 else
11126 PKG_CONFIG_MIN_VERSION=0.9.0
11127 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11129 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
11131 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11132 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11133 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
11134 edit_cflags="
11135 s,///*,/,g
11136 s/^/ /
11137 s/ -I/ $isystem/g
11138 s/^ //
11140 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11141 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11143 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11144 succeeded=yes
11145 else
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11147 $as_echo "no" >&6; }
11148 RSVG_CFLAGS=""
11149 RSVG_LIBS=""
11150 ## If we have a custom action on failure, don't print errors, but
11151 ## do set a variable so people can do so. Do it in a subshell
11152 ## to capture any diagnostics in invoking pkg-config.
11153 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
11159 else
11160 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11161 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11165 if test $succeeded = yes; then
11166 HAVE_RSVG=yes
11167 else
11174 if test $HAVE_RSVG = yes; then
11176 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
11178 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11179 LIBS="$RSVG_LIBS $LIBS"
11184 HAVE_IMAGEMAGICK=no
11185 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
11186 if test "${with_imagemagick}" != "no"; then
11187 ## 6.2.8 is the earliest version known to work, but earlier versions
11188 ## might work - let us know if you find one.
11189 ## 6.0.7 does not work. See bug#7955.
11190 ## 6.8.2 makes Emacs crash; see Bug#13867.
11191 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
11193 succeeded=no
11195 if test "$PKG_CONFIG" = "no" ; then
11197 else
11198 PKG_CONFIG_MIN_VERSION=0.9.0
11199 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11201 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
11203 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11204 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11205 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
11206 edit_cflags="
11207 s,///*,/,g
11208 s/^/ /
11209 s/ -I/ $isystem/g
11210 s/^ //
11212 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11213 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11215 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11216 succeeded=yes
11217 else
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219 $as_echo "no" >&6; }
11220 IMAGEMAGICK_CFLAGS=""
11221 IMAGEMAGICK_LIBS=""
11222 ## If we have a custom action on failure, don't print errors, but
11223 ## do set a variable so people can do so. Do it in a subshell
11224 ## to capture any diagnostics in invoking pkg-config.
11225 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
11231 else
11232 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11233 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11237 if test $succeeded = yes; then
11238 HAVE_IMAGEMAGICK=yes
11239 else
11246 if test $HAVE_IMAGEMAGICK = yes; then
11248 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
11250 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11251 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11252 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11253 do :
11254 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11255 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11256 eval as_val=\$$as_ac_var
11257 if test "x$as_val" = x""yes; then :
11258 cat >>confdefs.h <<_ACEOF
11259 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11260 _ACEOF
11263 done
11270 HAVE_GTK=no
11271 GTK_OBJ=
11272 gtk_term_header=$term_header
11273 check_gtk2=no
11274 gtk3_pkg_errors=
11275 if test "${opsys}" != "mingw32"; then
11276 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11277 GLIB_REQUIRED=2.28
11278 GTK_REQUIRED=3.0
11279 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11282 succeeded=no
11284 if test "$PKG_CONFIG" = "no" ; then
11285 pkg_check_gtk=no
11286 else
11287 PKG_CONFIG_MIN_VERSION=0.9.0
11288 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11290 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11292 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11293 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11294 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11295 edit_cflags="
11296 s,///*,/,g
11297 s/^/ /
11298 s/ -I/ $isystem/g
11299 s/^ //
11301 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11302 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11304 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11305 succeeded=yes
11306 else
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11308 $as_echo "no" >&6; }
11309 GTK_CFLAGS=""
11310 GTK_LIBS=""
11311 ## If we have a custom action on failure, don't print errors, but
11312 ## do set a variable so people can do so. Do it in a subshell
11313 ## to capture any diagnostics in invoking pkg-config.
11314 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11320 else
11321 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11322 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11326 if test $succeeded = yes; then
11327 pkg_check_gtk=yes
11328 else
11329 pkg_check_gtk=no
11332 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11333 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11335 if test "$pkg_check_gtk" = "yes"; then
11337 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
11339 GTK_OBJ=emacsgtkfixed.o
11340 gtk_term_header=gtkutil.h
11341 USE_GTK_TOOLKIT="GTK3"
11342 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11343 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
11344 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
11346 else
11347 check_gtk2=yes
11348 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11352 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11353 GLIB_REQUIRED=2.10
11354 GTK_REQUIRED=2.10
11355 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11358 succeeded=no
11360 if test "$PKG_CONFIG" = "no" ; then
11361 pkg_check_gtk=no
11362 else
11363 PKG_CONFIG_MIN_VERSION=0.9.0
11364 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11366 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11368 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11369 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11370 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11371 edit_cflags="
11372 s,///*,/,g
11373 s/^/ /
11374 s/ -I/ $isystem/g
11375 s/^ //
11377 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11378 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11380 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11381 succeeded=yes
11382 else
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384 $as_echo "no" >&6; }
11385 GTK_CFLAGS=""
11386 GTK_LIBS=""
11387 ## If we have a custom action on failure, don't print errors, but
11388 ## do set a variable so people can do so. Do it in a subshell
11389 ## to capture any diagnostics in invoking pkg-config.
11390 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11396 else
11397 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11398 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11402 if test $succeeded = yes; then
11403 pkg_check_gtk=yes
11404 else
11405 pkg_check_gtk=no
11408 if test "$pkg_check_gtk" = "no" &&
11409 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11410 then
11411 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11413 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
11417 if test x"$pkg_check_gtk" = xyes; then
11421 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11422 CFLAGS="$CFLAGS $GTK_CFLAGS"
11423 LIBS="$GTK_LIBS $LIBS"
11424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
11425 $as_echo_n "checking whether GTK compiles... " >&6; }
11426 GTK_COMPILES=no
11427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11428 /* end confdefs.h. */
11429 /* Check the Gtk and Glib APIs. */
11430 #include <gtk/gtk.h>
11431 #include <glib-object.h>
11432 static void
11433 callback (GObject *go, GParamSpec *spec, gpointer user_data)
11437 main ()
11440 GtkSettings *gs = 0;
11441 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
11442 strict C prohibits this. Use gtk_main_iteration to test that the
11443 libraries are there. */
11444 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
11445 0, 0, 0, G_CALLBACK (callback), 0))
11446 gtk_main_iteration ();
11449 return 0;
11451 _ACEOF
11452 if ac_fn_c_try_link "$LINENO"; then :
11453 GTK_COMPILES=yes
11455 rm -f core conftest.err conftest.$ac_objext \
11456 conftest$ac_exeext conftest.$ac_ext
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5
11458 $as_echo "$GTK_COMPILES" >&6; }
11459 if test "${GTK_COMPILES}" != "yes"; then
11460 GTK_OBJ=
11461 if test "$USE_X_TOOLKIT" != "maybe"; then
11462 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11464 else
11465 HAVE_GTK=yes
11467 $as_echo "#define USE_GTK 1" >>confdefs.h
11469 GTK_OBJ="gtkutil.o $GTK_OBJ"
11470 term_header=$gtk_term_header
11471 USE_X_TOOLKIT=none
11472 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
11474 else
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11476 closing open displays. This is no problem if you just use
11477 one display, but if you use more than one and close one of them
11478 Emacs may crash." >&5
11479 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11480 closing open displays. This is no problem if you just use
11481 one display, but if you use more than one and close one of them
11482 Emacs may crash." >&2;}
11483 sleep 3
11491 if test "${HAVE_GTK}" = "yes"; then
11493 if test "$with_toolkit_scroll_bars" != no; then
11494 with_toolkit_scroll_bars=yes
11497 HAVE_GTK_FILE_SELECTION=no
11498 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11499 #include <gtk/gtk.h>
11501 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11502 HAVE_GTK_FILE_SELECTION=yes
11503 else
11504 HAVE_GTK_FILE_SELECTION=no
11507 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11508 for ac_func in gtk_file_selection_new
11509 do :
11510 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11511 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11512 cat >>confdefs.h <<_ACEOF
11513 #define HAVE_GTK_FILE_SELECTION_NEW 1
11514 _ACEOF
11517 done
11521 HAVE_GTK_HANDLE_BOX=no
11522 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11523 #include <gtk/gtk.h>
11525 if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11526 HAVE_GTK_HANDLE_BOX=yes
11527 else
11528 HAVE_GTK_HANDLE_BOX=no
11531 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11532 for ac_func in gtk_handle_box_new
11533 do :
11534 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11535 if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11536 cat >>confdefs.h <<_ACEOF
11537 #define HAVE_GTK_HANDLE_BOX_NEW 1
11538 _ACEOF
11541 done
11545 HAVE_GTK_TEAROFF_MENU_ITEM=no
11546 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11547 #include <gtk/gtk.h>
11549 if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11550 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11551 else
11552 HAVE_GTK_TEAROFF_MENU_ITEM=no
11555 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11556 for ac_func in gtk_tearoff_menu_item_new
11557 do :
11558 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11559 if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11560 cat >>confdefs.h <<_ACEOF
11561 #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11562 _ACEOF
11565 done
11569 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11570 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11571 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11572 gtk_orientable_set_orientation \
11573 gtk_window_set_has_resize_grip
11574 do :
11575 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11576 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11577 eval as_val=\$$as_ac_var
11578 if test "x$as_val" = x""yes; then :
11579 cat >>confdefs.h <<_ACEOF
11580 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11581 _ACEOF
11584 done
11587 term_header=gtkutil.h
11590 HAVE_DBUS=no
11591 DBUS_OBJ=
11592 if test "${with_dbus}" = "yes"; then
11594 succeeded=no
11596 if test "$PKG_CONFIG" = "no" ; then
11597 HAVE_DBUS=no
11598 else
11599 PKG_CONFIG_MIN_VERSION=0.9.0
11600 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11602 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11604 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11605 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11606 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
11607 edit_cflags="
11608 s,///*,/,g
11609 s/^/ /
11610 s/ -I/ $isystem/g
11611 s/^ //
11613 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11614 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11616 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11617 succeeded=yes
11618 else
11619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11620 $as_echo "no" >&6; }
11621 DBUS_CFLAGS=""
11622 DBUS_LIBS=""
11623 ## If we have a custom action on failure, don't print errors, but
11624 ## do set a variable so people can do so. Do it in a subshell
11625 ## to capture any diagnostics in invoking pkg-config.
11626 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
11632 else
11633 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11634 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11638 if test $succeeded = yes; then
11639 HAVE_DBUS=yes
11640 else
11641 HAVE_DBUS=no
11644 if test "$HAVE_DBUS" = yes; then
11645 LIBS="$LIBS $DBUS_LIBS"
11647 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11649 for ac_func in dbus_watch_get_unix_fd \
11650 dbus_type_is_valid \
11651 dbus_validate_bus_name \
11652 dbus_validate_path \
11653 dbus_validate_interface \
11654 dbus_validate_member
11655 do :
11656 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11657 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11658 eval as_val=\$$as_ac_var
11659 if test "x$as_val" = x""yes; then :
11660 cat >>confdefs.h <<_ACEOF
11661 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11662 _ACEOF
11665 done
11667 DBUS_OBJ=dbusbind.o
11672 HAVE_GSETTINGS=no
11673 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11675 succeeded=no
11677 if test "$PKG_CONFIG" = "no" ; then
11678 HAVE_GSETTINGS=no
11679 else
11680 PKG_CONFIG_MIN_VERSION=0.9.0
11681 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11683 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11685 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11686 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11687 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
11688 edit_cflags="
11689 s,///*,/,g
11690 s/^/ /
11691 s/ -I/ $isystem/g
11692 s/^ //
11694 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11695 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11697 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11698 succeeded=yes
11699 else
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701 $as_echo "no" >&6; }
11702 GSETTINGS_CFLAGS=""
11703 GSETTINGS_LIBS=""
11704 ## If we have a custom action on failure, don't print errors, but
11705 ## do set a variable so people can do so. Do it in a subshell
11706 ## to capture any diagnostics in invoking pkg-config.
11707 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
11713 else
11714 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11715 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11719 if test $succeeded = yes; then
11720 HAVE_GSETTINGS=yes
11721 else
11722 HAVE_GSETTINGS=no
11725 if test "$HAVE_GSETTINGS" = "yes"; then
11727 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11729 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11730 SETTINGS_LIBS="$GSETTINGS_LIBS"
11734 HAVE_GCONF=no
11735 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11737 succeeded=no
11739 if test "$PKG_CONFIG" = "no" ; then
11740 HAVE_GCONF=no
11741 else
11742 PKG_CONFIG_MIN_VERSION=0.9.0
11743 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11745 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11747 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11748 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11749 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
11750 edit_cflags="
11751 s,///*,/,g
11752 s/^/ /
11753 s/ -I/ $isystem/g
11754 s/^ //
11756 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11757 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11759 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11760 succeeded=yes
11761 else
11762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763 $as_echo "no" >&6; }
11764 GCONF_CFLAGS=""
11765 GCONF_LIBS=""
11766 ## If we have a custom action on failure, don't print errors, but
11767 ## do set a variable so people can do so. Do it in a subshell
11768 ## to capture any diagnostics in invoking pkg-config.
11769 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
11775 else
11776 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11777 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11781 if test $succeeded = yes; then
11782 HAVE_GCONF=yes
11783 else
11784 HAVE_GCONF=no
11787 if test "$HAVE_GCONF" = yes; then
11789 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11791 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11792 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11796 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11798 succeeded=no
11800 if test "$PKG_CONFIG" = "no" ; then
11801 HAVE_GOBJECT=no
11802 else
11803 PKG_CONFIG_MIN_VERSION=0.9.0
11804 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11806 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11808 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11809 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11810 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
11811 edit_cflags="
11812 s,///*,/,g
11813 s/^/ /
11814 s/ -I/ $isystem/g
11815 s/^ //
11817 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11818 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11820 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11821 succeeded=yes
11822 else
11823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824 $as_echo "no" >&6; }
11825 GOBJECT_CFLAGS=""
11826 GOBJECT_LIBS=""
11827 ## If we have a custom action on failure, don't print errors, but
11828 ## do set a variable so people can do so. Do it in a subshell
11829 ## to capture any diagnostics in invoking pkg-config.
11830 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
11836 else
11837 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11838 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11842 if test $succeeded = yes; then
11843 HAVE_GOBJECT=yes
11844 else
11845 HAVE_GOBJECT=no
11848 if test "$HAVE_GOBJECT" = "yes"; then
11849 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11850 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11852 SAVE_CFLAGS="$CFLAGS"
11853 SAVE_LIBS="$LIBS"
11854 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11855 LIBS="$SETTINGS_LIBS $LIBS"
11856 for ac_func in g_type_init
11857 do :
11858 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11859 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11860 cat >>confdefs.h <<_ACEOF
11861 #define HAVE_G_TYPE_INIT 1
11862 _ACEOF
11865 done
11867 CFLAGS="$SAVE_CFLAGS"
11868 LIBS="$SAVE_LIBS"
11874 HAVE_LIBSELINUX=no
11875 LIBSELINUX_LIBS=
11876 if test "${with_selinux}" = "yes"; then
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11878 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11879 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11880 $as_echo_n "(cached) " >&6
11881 else
11882 ac_check_lib_save_LIBS=$LIBS
11883 LIBS="-lselinux $LIBS"
11884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11885 /* end confdefs.h. */
11887 /* Override any GCC internal prototype to avoid an error.
11888 Use char because int might match the return type of a GCC
11889 builtin and then its argument prototype would still apply. */
11890 #ifdef __cplusplus
11891 extern "C"
11892 #endif
11893 char lgetfilecon ();
11895 main ()
11897 return lgetfilecon ();
11899 return 0;
11901 _ACEOF
11902 if ac_fn_c_try_link "$LINENO"; then :
11903 ac_cv_lib_selinux_lgetfilecon=yes
11904 else
11905 ac_cv_lib_selinux_lgetfilecon=no
11907 rm -f core conftest.err conftest.$ac_objext \
11908 conftest$ac_exeext conftest.$ac_ext
11909 LIBS=$ac_check_lib_save_LIBS
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11912 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11913 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11914 HAVE_LIBSELINUX=yes
11915 else
11916 HAVE_LIBSELINUX=no
11919 if test "$HAVE_LIBSELINUX" = yes; then
11921 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11923 LIBSELINUX_LIBS=-lselinux
11928 HAVE_GNUTLS=no
11929 if test "${with_gnutls}" = "yes" ; then
11931 succeeded=no
11933 if test "$PKG_CONFIG" = "no" ; then
11934 HAVE_GNUTLS=no
11935 else
11936 PKG_CONFIG_MIN_VERSION=0.9.0
11937 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11939 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11941 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11942 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11943 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
11944 edit_cflags="
11945 s,///*,/,g
11946 s/^/ /
11947 s/ -I/ $isystem/g
11948 s/^ //
11950 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11951 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11953 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11954 succeeded=yes
11955 else
11956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11957 $as_echo "no" >&6; }
11958 LIBGNUTLS_CFLAGS=""
11959 LIBGNUTLS_LIBS=""
11960 ## If we have a custom action on failure, don't print errors, but
11961 ## do set a variable so people can do so. Do it in a subshell
11962 ## to capture any diagnostics in invoking pkg-config.
11963 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
11969 else
11970 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11971 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11975 if test $succeeded = yes; then
11976 HAVE_GNUTLS=yes
11977 else
11978 HAVE_GNUTLS=no
11981 if test "${HAVE_GNUTLS}" = "yes"; then
11983 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11987 # Windows loads GnuTLS dynamically
11988 if test "${opsys}" = "mingw32"; then
11989 LIBGNUTLS_LIBS=
11990 else
11991 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11992 LIBS="$LIBGNUTLS_LIBS $LIBS"
11999 NOTIFY_OBJ=
12000 NOTIFY_SUMMARY=no
12002 if test "${with_file_notification}" = "yes"; then
12003 if test "${opsys}" = "mingw32"; then
12004 with_file_notification=w32
12005 else
12006 if test "${with_ns}" != yes; then
12007 with_file_notification=gfile
12012 if test "${with_file_notification}" = "gfile"; then
12014 succeeded=no
12016 if test "$PKG_CONFIG" = "no" ; then
12017 HAVE_GFILENOTIFY=no
12018 else
12019 PKG_CONFIG_MIN_VERSION=0.9.0
12020 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12022 $as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12024 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12025 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12026 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12027 edit_cflags="
12028 s,///*,/,g
12029 s/^/ /
12030 s/ -I/ $isystem/g
12031 s/^ //
12033 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12034 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12036 $as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12037 succeeded=yes
12038 else
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12040 $as_echo "no" >&6; }
12041 GFILENOTIFY_CFLAGS=""
12042 GFILENOTIFY_LIBS=""
12043 ## If we have a custom action on failure, don't print errors, but
12044 ## do set a variable so people can do so. Do it in a subshell
12045 ## to capture any diagnostics in invoking pkg-config.
12046 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12052 else
12053 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12054 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12058 if test $succeeded = yes; then
12059 HAVE_GFILENOTIFY=yes
12060 else
12061 HAVE_GFILENOTIFY=no
12064 if test "$HAVE_GFILENOTIFY" = "yes"; then
12066 $as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12068 NOTIFY_OBJ=gfilenotify.o
12069 NOTIFY_SUMMARY="yes -lgio (gfile)"
12072 if test "${with_file_notification}" = "inotify"; then
12073 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
12074 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
12079 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12080 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
12081 if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12085 if test "$ac_cv_func_inotify_init1" = yes; then
12087 $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12089 NOTIFY_OBJ=inotify.o
12090 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12094 if test "${with_file_notification}" = "w32"; then
12095 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12096 if test "x$ac_cv_header_windows_h" = x""yes; then :
12101 if test "$ac_cv_header_windows_h" = yes ; then
12103 $as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12105 NOTIFY_OBJ=w32notify.o
12106 NOTIFY_SUMMARY="yes (w32)"
12109 if test -n "$NOTIFY_OBJ"; then
12111 $as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
12118 HAVE_XAW3D=no
12119 LUCID_LIBW=
12120 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12121 if test "$with_xaw3d" != no; then
12122 if test "${emacs_cv_xaw3d+set}" = set; then :
12123 $as_echo_n "(cached) " >&6
12124 else
12125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12126 /* end confdefs.h. */
12128 #include <X11/Intrinsic.h>
12129 #include <X11/Xaw3d/Simple.h>
12131 main ()
12135 return 0;
12137 _ACEOF
12138 if ac_fn_c_try_link "$LINENO"; then :
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12140 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12141 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12142 $as_echo_n "(cached) " >&6
12143 else
12144 ac_check_lib_save_LIBS=$LIBS
12145 LIBS="-lXaw3d $LIBS"
12146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12147 /* end confdefs.h. */
12149 /* Override any GCC internal prototype to avoid an error.
12150 Use char because int might match the return type of a GCC
12151 builtin and then its argument prototype would still apply. */
12152 #ifdef __cplusplus
12153 extern "C"
12154 #endif
12155 char XawScrollbarSetThumb ();
12157 main ()
12159 return XawScrollbarSetThumb ();
12161 return 0;
12163 _ACEOF
12164 if ac_fn_c_try_link "$LINENO"; then :
12165 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
12166 else
12167 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
12169 rm -f core conftest.err conftest.$ac_objext \
12170 conftest$ac_exeext conftest.$ac_ext
12171 LIBS=$ac_check_lib_save_LIBS
12173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12174 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12175 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12176 emacs_cv_xaw3d=yes
12177 else
12178 emacs_cv_xaw3d=no
12181 else
12182 emacs_cv_xaw3d=no
12184 rm -f core conftest.err conftest.$ac_objext \
12185 conftest$ac_exeext conftest.$ac_ext
12188 else
12189 emacs_cv_xaw3d=no
12191 if test $emacs_cv_xaw3d = yes; then
12192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12193 $as_echo_n "checking for xaw3d... " >&6; }
12194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12195 $as_echo "yes; using Lucid toolkit" >&6; }
12196 USE_X_TOOLKIT=LUCID
12197 HAVE_XAW3D=yes
12198 LUCID_LIBW=-lXaw3d
12200 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
12202 else
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12204 $as_echo_n "checking for xaw3d... " >&6; }
12205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12206 $as_echo "no" >&6; }
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12208 $as_echo_n "checking for libXaw... " >&6; }
12209 if test "${emacs_cv_xaw+set}" = set; then :
12210 $as_echo_n "(cached) " >&6
12211 else
12212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12213 /* end confdefs.h. */
12215 #include <X11/Intrinsic.h>
12216 #include <X11/Xaw/Simple.h>
12218 main ()
12222 return 0;
12224 _ACEOF
12225 if ac_fn_c_try_link "$LINENO"; then :
12226 emacs_cv_xaw=yes
12227 else
12228 emacs_cv_xaw=no
12230 rm -f core conftest.err conftest.$ac_objext \
12231 conftest$ac_exeext conftest.$ac_ext
12234 if test $emacs_cv_xaw = yes; then
12235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12236 $as_echo "yes; using Lucid toolkit" >&6; }
12237 USE_X_TOOLKIT=LUCID
12238 LUCID_LIBW=-lXaw
12239 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12240 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
12241 else
12242 as_fn_error "No X toolkit could be found.
12243 If you are sure you want Emacs compiled without an X toolkit, pass
12244 --with-x-toolkit=no
12245 to configure. Otherwise, install the development libraries for the toolkit
12246 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
12251 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12253 LIBXTR6=
12254 if test "${USE_X_TOOLKIT}" != "none"; then
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12256 $as_echo_n "checking X11 toolkit version... " >&6; }
12257 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
12258 $as_echo_n "(cached) " >&6
12259 else
12260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12261 /* end confdefs.h. */
12262 #include <X11/Intrinsic.h>
12264 main ()
12266 #if XtSpecificationRelease < 6
12267 fail;
12268 #endif
12271 return 0;
12273 _ACEOF
12274 if ac_fn_c_try_link "$LINENO"; then :
12275 emacs_cv_x11_toolkit_version_6=yes
12276 else
12277 emacs_cv_x11_toolkit_version_6=no
12279 rm -f core conftest.err conftest.$ac_objext \
12280 conftest$ac_exeext conftest.$ac_ext
12283 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12284 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12286 $as_echo "6 or newer" >&6; }
12288 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
12290 LIBXTR6="-lSM -lICE"
12291 case "$opsys" in
12292 ## Use libw.a along with X11R6 Xt.
12293 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12294 esac
12295 else
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12297 $as_echo "before 6" >&6; }
12300 OLDLIBS="$LIBS"
12301 if test x$HAVE_X11XTR6 = xyes; then
12302 LIBS="-lXt -lSM -lICE $LIBS"
12303 else
12304 LIBS="-lXt $LIBS"
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12307 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12308 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12309 $as_echo_n "(cached) " >&6
12310 else
12311 ac_check_lib_save_LIBS=$LIBS
12312 LIBS="-lXmu $LIBS"
12313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314 /* end confdefs.h. */
12316 /* Override any GCC internal prototype to avoid an error.
12317 Use char because int might match the return type of a GCC
12318 builtin and then its argument prototype would still apply. */
12319 #ifdef __cplusplus
12320 extern "C"
12321 #endif
12322 char XmuConvertStandardSelection ();
12324 main ()
12326 return XmuConvertStandardSelection ();
12328 return 0;
12330 _ACEOF
12331 if ac_fn_c_try_link "$LINENO"; then :
12332 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12333 else
12334 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
12336 rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext conftest.$ac_ext
12338 LIBS=$ac_check_lib_save_LIBS
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12341 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12342 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12343 cat >>confdefs.h <<_ACEOF
12344 #define HAVE_LIBXMU 1
12345 _ACEOF
12347 LIBS="-lXmu $LIBS"
12351 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12355 LIBXMU=-lXmu
12356 case $opsys in
12357 ## These systems don't supply Xmu.
12358 hpux* | aix4-2 )
12359 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12361 mingw32 )
12362 LIBXMU=
12364 esac
12367 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12368 if test "${HAVE_X11}" = "yes"; then
12369 if test "${USE_X_TOOLKIT}" != "none"; then
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12371 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12372 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
12373 $as_echo_n "(cached) " >&6
12374 else
12375 ac_check_lib_save_LIBS=$LIBS
12376 LIBS="-lXext $LIBS"
12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12378 /* end confdefs.h. */
12380 /* Override any GCC internal prototype to avoid an error.
12381 Use char because int might match the return type of a GCC
12382 builtin and then its argument prototype would still apply. */
12383 #ifdef __cplusplus
12384 extern "C"
12385 #endif
12386 char XShapeQueryExtension ();
12388 main ()
12390 return XShapeQueryExtension ();
12392 return 0;
12394 _ACEOF
12395 if ac_fn_c_try_link "$LINENO"; then :
12396 ac_cv_lib_Xext_XShapeQueryExtension=yes
12397 else
12398 ac_cv_lib_Xext_XShapeQueryExtension=no
12400 rm -f core conftest.err conftest.$ac_objext \
12401 conftest$ac_exeext conftest.$ac_ext
12402 LIBS=$ac_check_lib_save_LIBS
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12405 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12406 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12407 cat >>confdefs.h <<_ACEOF
12408 #define HAVE_LIBXEXT 1
12409 _ACEOF
12411 LIBS="-lXext $LIBS"
12418 LIBXP=
12419 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12420 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12421 if test -d /usr/include/openmotif; then
12422 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12423 emacs_cv_openmotif=yes
12424 case "$canonical" in
12425 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12426 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12429 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12430 esac
12431 else
12432 emacs_cv_openmotif=no
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12435 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
12436 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
12437 $as_echo_n "(cached) " >&6
12438 else
12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440 /* end confdefs.h. */
12441 #include <Xm/Xm.h>
12443 main ()
12445 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12446 int x = 5;
12447 #else
12448 Motif version prior to 2.1.
12449 #endif
12451 return 0;
12453 _ACEOF
12454 if ac_fn_c_try_compile "$LINENO"; then :
12455 emacs_cv_motif_version_2_1=yes
12456 else
12457 emacs_cv_motif_version_2_1=no
12459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12462 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
12463 if test $emacs_cv_motif_version_2_1 = yes; then
12464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12465 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12466 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12467 $as_echo_n "(cached) " >&6
12468 else
12469 ac_check_lib_save_LIBS=$LIBS
12470 LIBS="-lXp $LIBS"
12471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12472 /* end confdefs.h. */
12474 /* Override any GCC internal prototype to avoid an error.
12475 Use char because int might match the return type of a GCC
12476 builtin and then its argument prototype would still apply. */
12477 #ifdef __cplusplus
12478 extern "C"
12479 #endif
12480 char XpCreateContext ();
12482 main ()
12484 return XpCreateContext ();
12486 return 0;
12488 _ACEOF
12489 if ac_fn_c_try_link "$LINENO"; then :
12490 ac_cv_lib_Xp_XpCreateContext=yes
12491 else
12492 ac_cv_lib_Xp_XpCreateContext=no
12494 rm -f core conftest.err conftest.$ac_objext \
12495 conftest$ac_exeext conftest.$ac_ext
12496 LIBS=$ac_check_lib_save_LIBS
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12499 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12500 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12501 LIBXP=-lXp
12504 if test x$emacs_cv_openmotif = xyes; then
12505 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12507 else
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12509 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
12510 if test "${emacs_cv_lesstif+set}" = set; then :
12511 $as_echo_n "(cached) " >&6
12512 else
12513 # We put this in CFLAGS temporarily to precede other -I options
12514 # that might be in CFLAGS temporarily.
12515 # We put this in CPPFLAGS where it precedes the other -I options.
12516 OLD_CPPFLAGS=$CPPFLAGS
12517 OLD_CFLAGS=$CFLAGS
12518 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12519 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12521 /* end confdefs.h. */
12522 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12524 main ()
12526 int x = 5;
12528 return 0;
12530 _ACEOF
12531 if ac_fn_c_try_compile "$LINENO"; then :
12532 emacs_cv_lesstif=yes
12533 else
12534 emacs_cv_lesstif=no
12536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12539 $as_echo "$emacs_cv_lesstif" >&6; }
12540 if test $emacs_cv_lesstif = yes; then
12541 # Make sure this -I option remains in CPPFLAGS after it is set
12542 # back to REAL_CPPFLAGS.
12543 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12544 # have those other -I options anyway. Ultimately, having this
12545 # directory ultimately in CPPFLAGS will be enough.
12546 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12547 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12548 else
12549 CFLAGS=$OLD_CFLAGS
12550 CPPFLAGS=$OLD_CPPFLAGS
12553 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12554 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12556 else
12557 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12564 USE_TOOLKIT_SCROLL_BARS=no
12565 if test "${with_toolkit_scroll_bars}" != "no"; then
12566 if test "${USE_X_TOOLKIT}" != "none"; then
12567 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12568 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12570 HAVE_XAW3D=no
12571 USE_TOOLKIT_SCROLL_BARS=yes
12572 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12573 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12575 USE_TOOLKIT_SCROLL_BARS=yes
12577 elif test "${HAVE_GTK}" = "yes"; then
12578 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12580 USE_TOOLKIT_SCROLL_BARS=yes
12581 elif test "${HAVE_NS}" = "yes"; then
12582 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12584 USE_TOOLKIT_SCROLL_BARS=yes
12585 elif test "${HAVE_W32}" = "yes"; then
12586 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12588 USE_TOOLKIT_SCROLL_BARS=yes
12592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593 /* end confdefs.h. */
12595 #include <X11/Xlib.h>
12596 #include <X11/Xresource.h>
12598 main ()
12600 XIMProc callback;
12602 return 0;
12604 _ACEOF
12605 if ac_fn_c_try_compile "$LINENO"; then :
12606 HAVE_XIM=yes
12608 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12610 else
12611 HAVE_XIM=no
12613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12616 if test "${with_xim}" != "no"; then
12618 $as_echo "#define USE_XIM 1" >>confdefs.h
12623 if test "${HAVE_XIM}" != "no"; then
12624 late_CFLAGS=$CFLAGS
12625 if test "$GCC" = yes; then
12626 CFLAGS="$CFLAGS --pedantic-errors"
12628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12629 /* end confdefs.h. */
12631 #include <X11/Xlib.h>
12632 #include <X11/Xresource.h>
12634 main ()
12636 Display *display;
12637 XrmDatabase db;
12638 char *res_name;
12639 char *res_class;
12640 XIMProc callback;
12641 XPointer *client_data;
12642 #ifndef __GNUC__
12643 /* If we're not using GCC, it's probably not XFree86, and this is
12644 probably right, but we can't use something like --pedantic-errors. */
12645 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12646 char*, XIMProc, XPointer*);
12647 #endif
12648 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12649 client_data);
12651 return 0;
12653 _ACEOF
12654 if ac_fn_c_try_compile "$LINENO"; then :
12655 emacs_cv_arg6_star=yes
12657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12658 if test "$emacs_cv_arg6_star" = yes; then
12659 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12661 else
12662 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
12665 CFLAGS=$late_CFLAGS
12668 ### Start of font-backend (under any platform) section.
12669 # (nothing here yet -- this is a placeholder)
12670 ### End of font-backend (under any platform) section.
12672 ### Start of font-backend (under X11) section.
12673 if test "${HAVE_X11}" = "yes"; then
12675 succeeded=no
12677 if test "$PKG_CONFIG" = "no" ; then
12678 HAVE_FC=no
12679 else
12680 PKG_CONFIG_MIN_VERSION=0.9.0
12681 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12683 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12685 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12686 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12687 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
12688 edit_cflags="
12689 s,///*,/,g
12690 s/^/ /
12691 s/ -I/ $isystem/g
12692 s/^ //
12694 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12695 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12697 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12698 succeeded=yes
12699 else
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12701 $as_echo "no" >&6; }
12702 FONTCONFIG_CFLAGS=""
12703 FONTCONFIG_LIBS=""
12704 ## If we have a custom action on failure, don't print errors, but
12705 ## do set a variable so people can do so. Do it in a subshell
12706 ## to capture any diagnostics in invoking pkg-config.
12707 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
12713 else
12714 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12715 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12719 if test $succeeded = yes; then
12720 HAVE_FC=yes
12721 else
12722 HAVE_FC=no
12726 ## Use -lXft if available, unless `--with-xft=no'.
12727 HAVE_XFT=maybe
12728 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12729 with_xft="no";
12731 if test "x${with_xft}" != "xno"; then
12734 succeeded=no
12736 if test "$PKG_CONFIG" = "no" ; then
12737 HAVE_XFT=no
12738 else
12739 PKG_CONFIG_MIN_VERSION=0.9.0
12740 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12742 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12744 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12745 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12746 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
12747 edit_cflags="
12748 s,///*,/,g
12749 s/^/ /
12750 s/ -I/ $isystem/g
12751 s/^ //
12753 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12754 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12756 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12757 succeeded=yes
12758 else
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12760 $as_echo "no" >&6; }
12761 XFT_CFLAGS=""
12762 XFT_LIBS=""
12763 ## If we have a custom action on failure, don't print errors, but
12764 ## do set a variable so people can do so. Do it in a subshell
12765 ## to capture any diagnostics in invoking pkg-config.
12766 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
12772 else
12773 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12774 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12778 if test $succeeded = yes; then
12780 else
12781 HAVE_XFT=no
12784 ## Because xftfont.c uses XRenderQueryExtension, we also
12785 ## need to link to -lXrender.
12786 HAVE_XRENDER=no
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12788 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12789 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12790 $as_echo_n "(cached) " >&6
12791 else
12792 ac_check_lib_save_LIBS=$LIBS
12793 LIBS="-lXrender $LIBS"
12794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12795 /* end confdefs.h. */
12797 /* Override any GCC internal prototype to avoid an error.
12798 Use char because int might match the return type of a GCC
12799 builtin and then its argument prototype would still apply. */
12800 #ifdef __cplusplus
12801 extern "C"
12802 #endif
12803 char XRenderQueryExtension ();
12805 main ()
12807 return XRenderQueryExtension ();
12809 return 0;
12811 _ACEOF
12812 if ac_fn_c_try_link "$LINENO"; then :
12813 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12814 else
12815 ac_cv_lib_Xrender_XRenderQueryExtension=no
12817 rm -f core conftest.err conftest.$ac_objext \
12818 conftest$ac_exeext conftest.$ac_ext
12819 LIBS=$ac_check_lib_save_LIBS
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12822 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12823 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12824 HAVE_XRENDER=yes
12827 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12828 OLD_CPPFLAGS="$CPPFLAGS"
12829 OLD_CFLAGS="$CFLAGS"
12830 OLD_LIBS="$LIBS"
12831 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12832 CFLAGS="$CFLAGS $XFT_CFLAGS"
12833 XFT_LIBS="-lXrender $XFT_LIBS"
12834 LIBS="$XFT_LIBS $LIBS"
12835 ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
12837 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12839 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12840 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12841 $as_echo_n "(cached) " >&6
12842 else
12843 ac_check_lib_save_LIBS=$LIBS
12844 LIBS="-lXft $XFT_LIBS $LIBS"
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846 /* end confdefs.h. */
12848 /* Override any GCC internal prototype to avoid an error.
12849 Use char because int might match the return type of a GCC
12850 builtin and then its argument prototype would still apply. */
12851 #ifdef __cplusplus
12852 extern "C"
12853 #endif
12854 char XftFontOpen ();
12856 main ()
12858 return XftFontOpen ();
12860 return 0;
12862 _ACEOF
12863 if ac_fn_c_try_link "$LINENO"; then :
12864 ac_cv_lib_Xft_XftFontOpen=yes
12865 else
12866 ac_cv_lib_Xft_XftFontOpen=no
12868 rm -f core conftest.err conftest.$ac_objext \
12869 conftest$ac_exeext conftest.$ac_ext
12870 LIBS=$ac_check_lib_save_LIBS
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12873 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12874 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12875 HAVE_XFT=yes
12882 if test "${HAVE_XFT}" = "yes"; then
12884 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12887 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12888 else
12889 CPPFLAGS="$OLD_CPPFLAGS"
12890 CFLAGS="$OLD_CFLAGS"
12891 LIBS="$OLD_LIBS"
12892 fi # "${HAVE_XFT}" = "yes"
12893 fi # "$HAVE_XFT" != no
12894 fi # "x${with_xft}" != "xno"
12896 ## We used to allow building with FreeType and without Xft.
12897 ## However, the ftx font backend driver is not in good shape.
12898 if test "$HAVE_XFT" != "yes"; then
12899 HAVE_XFT=no
12900 HAVE_FREETYPE=no
12901 else
12903 succeeded=no
12905 if test "$PKG_CONFIG" = "no" ; then
12906 HAVE_FREETYPE=no
12907 else
12908 PKG_CONFIG_MIN_VERSION=0.9.0
12909 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12911 $as_echo_n "checking for freetype2... " >&6; }
12913 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12914 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12915 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
12916 edit_cflags="
12917 s,///*,/,g
12918 s/^/ /
12919 s/ -I/ $isystem/g
12920 s/^ //
12922 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12923 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12925 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12926 succeeded=yes
12927 else
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12929 $as_echo "no" >&6; }
12930 FREETYPE_CFLAGS=""
12931 FREETYPE_LIBS=""
12932 ## If we have a custom action on failure, don't print errors, but
12933 ## do set a variable so people can do so. Do it in a subshell
12934 ## to capture any diagnostics in invoking pkg-config.
12935 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
12941 else
12942 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12943 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12947 if test $succeeded = yes; then
12948 HAVE_FREETYPE=yes
12949 else
12950 HAVE_FREETYPE=no
12954 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12957 HAVE_LIBOTF=no
12958 if test "${HAVE_FREETYPE}" = "yes"; then
12960 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12962 if test "${with_libotf}" != "no"; then
12964 succeeded=no
12966 if test "$PKG_CONFIG" = "no" ; then
12967 HAVE_LIBOTF=no
12968 else
12969 PKG_CONFIG_MIN_VERSION=0.9.0
12970 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12972 $as_echo_n "checking for libotf... " >&6; }
12974 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12975 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12976 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
12977 edit_cflags="
12978 s,///*,/,g
12979 s/^/ /
12980 s/ -I/ $isystem/g
12981 s/^ //
12983 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12984 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12986 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12987 succeeded=yes
12988 else
12989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12990 $as_echo "no" >&6; }
12991 LIBOTF_CFLAGS=""
12992 LIBOTF_LIBS=""
12993 ## If we have a custom action on failure, don't print errors, but
12994 ## do set a variable so people can do so. Do it in a subshell
12995 ## to capture any diagnostics in invoking pkg-config.
12996 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
13002 else
13003 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13004 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13008 if test $succeeded = yes; then
13009 HAVE_LIBOTF=yes
13010 else
13011 HAVE_LIBOTF=no
13014 if test "$HAVE_LIBOTF" = "yes"; then
13016 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
13018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13019 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13020 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
13021 $as_echo_n "(cached) " >&6
13022 else
13023 ac_check_lib_save_LIBS=$LIBS
13024 LIBS="-lotf $LIBS"
13025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13026 /* end confdefs.h. */
13028 /* Override any GCC internal prototype to avoid an error.
13029 Use char because int might match the return type of a GCC
13030 builtin and then its argument prototype would still apply. */
13031 #ifdef __cplusplus
13032 extern "C"
13033 #endif
13034 char OTF_get_variation_glyphs ();
13036 main ()
13038 return OTF_get_variation_glyphs ();
13040 return 0;
13042 _ACEOF
13043 if ac_fn_c_try_link "$LINENO"; then :
13044 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
13045 else
13046 ac_cv_lib_otf_OTF_get_variation_glyphs=no
13048 rm -f core conftest.err conftest.$ac_objext \
13049 conftest$ac_exeext conftest.$ac_ext
13050 LIBS=$ac_check_lib_save_LIBS
13052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13053 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13054 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13055 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13056 else
13057 HAVE_OTF_GET_VARIATION_GLYPHS=no
13060 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13062 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13069 HAVE_M17N_FLT=no
13070 if test "${HAVE_LIBOTF}" = yes; then
13071 if test "${with_m17n_flt}" != "no"; then
13073 succeeded=no
13075 if test "$PKG_CONFIG" = "no" ; then
13076 HAVE_M17N_FLT=no
13077 else
13078 PKG_CONFIG_MIN_VERSION=0.9.0
13079 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13081 $as_echo_n "checking for m17n-flt... " >&6; }
13083 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13084 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13085 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
13086 edit_cflags="
13087 s,///*,/,g
13088 s/^/ /
13089 s/ -I/ $isystem/g
13090 s/^ //
13092 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13093 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13095 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13096 succeeded=yes
13097 else
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099 $as_echo "no" >&6; }
13100 M17N_FLT_CFLAGS=""
13101 M17N_FLT_LIBS=""
13102 ## If we have a custom action on failure, don't print errors, but
13103 ## do set a variable so people can do so. Do it in a subshell
13104 ## to capture any diagnostics in invoking pkg-config.
13105 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
13111 else
13112 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13113 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13117 if test $succeeded = yes; then
13118 HAVE_M17N_FLT=yes
13119 else
13120 HAVE_M17N_FLT=no
13123 if test "$HAVE_M17N_FLT" = "yes"; then
13125 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13130 else
13131 HAVE_XFT=no
13132 HAVE_FREETYPE=no
13133 HAVE_LIBOTF=no
13134 HAVE_M17N_FLT=no
13137 ### End of font-backend (under X11) section.
13148 ### Use -lXpm if available, unless `--with-xpm=no'.
13149 ### mingw32 doesn't use -lXpm, since it loads the library dynamically.
13150 HAVE_XPM=no
13151 LIBXPM=
13152 if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
13153 if test "${with_xpm}" != "no"; then
13154 SAVE_CPPFLAGS="$CPPFLAGS"
13155 SAVE_LDFLAGS="$LDFLAGS"
13156 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13157 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13158 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13159 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13161 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13162 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13163 $as_echo_n "(cached) " >&6
13164 else
13165 ac_check_lib_save_LIBS=$LIBS
13166 LIBS="-lXpm $LIBS"
13167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13168 /* end confdefs.h. */
13170 /* Override any GCC internal prototype to avoid an error.
13171 Use char because int might match the return type of a GCC
13172 builtin and then its argument prototype would still apply. */
13173 #ifdef __cplusplus
13174 extern "C"
13175 #endif
13176 char XpmReadFileToImage ();
13178 main ()
13180 return XpmReadFileToImage ();
13182 return 0;
13184 _ACEOF
13185 if ac_fn_c_try_link "$LINENO"; then :
13186 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13187 else
13188 ac_cv_lib_Xpm_XpmReadFileToImage=no
13190 rm -f core conftest.err conftest.$ac_objext \
13191 conftest$ac_exeext conftest.$ac_ext
13192 LIBS=$ac_check_lib_save_LIBS
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13195 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13196 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13197 HAVE_XPM=yes
13203 if test "${HAVE_XPM}" = "yes"; then
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13205 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h. */
13208 #include "X11/xpm.h"
13209 #ifndef XpmReturnAllocPixels
13210 no_return_alloc_pixels
13211 #endif
13213 _ACEOF
13214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13215 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13216 HAVE_XPM=no
13217 else
13218 HAVE_XPM=yes
13220 rm -f conftest*
13223 if test "${HAVE_XPM}" = "yes"; then
13224 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13226 $as_echo "yes" >&6; }
13227 else
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13229 $as_echo "no" >&6; }
13230 CPPFLAGS="$SAVE_CPPFLAGS"
13231 LDFLAGS="$SAVE_LDFLAGS"
13236 if test "${HAVE_XPM}" = "yes"; then
13238 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13240 LIBXPM=-lXpm
13244 if test "${HAVE_X11}" = "yes"; then
13245 if test "${with_xpm}" != "no"; then
13246 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13247 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13249 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13250 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
13251 $as_echo_n "(cached) " >&6
13252 else
13253 ac_check_lib_save_LIBS=$LIBS
13254 LIBS="-lXpm -lX11 $LIBS"
13255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13256 /* end confdefs.h. */
13258 /* Override any GCC internal prototype to avoid an error.
13259 Use char because int might match the return type of a GCC
13260 builtin and then its argument prototype would still apply. */
13261 #ifdef __cplusplus
13262 extern "C"
13263 #endif
13264 char XpmReadFileToPixmap ();
13266 main ()
13268 return XpmReadFileToPixmap ();
13270 return 0;
13272 _ACEOF
13273 if ac_fn_c_try_link "$LINENO"; then :
13274 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
13275 else
13276 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
13278 rm -f core conftest.err conftest.$ac_objext \
13279 conftest$ac_exeext conftest.$ac_ext
13280 LIBS=$ac_check_lib_save_LIBS
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13283 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13284 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13285 HAVE_XPM=yes
13291 if test "${HAVE_XPM}" = "yes"; then
13292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13293 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13295 /* end confdefs.h. */
13296 #include "X11/xpm.h"
13297 #ifndef XpmReturnAllocPixels
13298 no_return_alloc_pixels
13299 #endif
13301 _ACEOF
13302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13303 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13304 HAVE_XPM=no
13305 else
13306 HAVE_XPM=yes
13308 rm -f conftest*
13311 if test "${HAVE_XPM}" = "yes"; then
13312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13313 $as_echo "yes" >&6; }
13314 else
13315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316 $as_echo "no" >&6; }
13321 if test "${HAVE_XPM}" = "yes"; then
13323 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13325 LIBXPM=-lXpm
13329 ### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13330 ### slightly different requirements wrt image libraries (it doesn't
13331 ### use -lXpm because it loads the xpm shared library dynamically at
13332 ### run time).
13333 if test "${opsys}" = "mingw32"; then
13334 if test "${with_xpm}" != "no"; then
13335 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13336 #define FOR_MSW 1
13338 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13339 HAVE_XPM=yes
13340 else
13341 HAVE_XPM=no
13347 if test "${HAVE_XPM}" = "yes"; then
13349 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13356 ### Use -ljpeg if available, unless `--with-jpeg=no'.
13357 ### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
13358 HAVE_JPEG=no
13359 LIBJPEG=
13360 if test "${opsys}" = "mingw32"; then
13361 if test "${with_jpeg}" != "no"; then
13362 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13363 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13364 HAVE_JPEG=yes
13365 else
13366 HAVE_JPEG=no
13371 if test "${HAVE_JPEG}" = "yes"; then
13372 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13375 /* end confdefs.h. */
13376 #include <jpeglib.h>
13377 version=JPEG_LIB_VERSION
13379 _ACEOF
13380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13381 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13382 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13384 else
13385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13386 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13387 HAVE_JPEG=no
13389 rm -f conftest*
13392 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13393 if test "${with_jpeg}" != "no"; then
13394 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13395 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13397 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13398 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
13399 $as_echo_n "(cached) " >&6
13400 else
13401 ac_check_lib_save_LIBS=$LIBS
13402 LIBS="-ljpeg $LIBS"
13403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13404 /* end confdefs.h. */
13406 /* Override any GCC internal prototype to avoid an error.
13407 Use char because int might match the return type of a GCC
13408 builtin and then its argument prototype would still apply. */
13409 #ifdef __cplusplus
13410 extern "C"
13411 #endif
13412 char jpeg_destroy_compress ();
13414 main ()
13416 return jpeg_destroy_compress ();
13418 return 0;
13420 _ACEOF
13421 if ac_fn_c_try_link "$LINENO"; then :
13422 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
13423 else
13424 ac_cv_lib_jpeg_jpeg_destroy_compress=no
13426 rm -f core conftest.err conftest.$ac_objext \
13427 conftest$ac_exeext conftest.$ac_ext
13428 LIBS=$ac_check_lib_save_LIBS
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13431 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13432 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13433 HAVE_JPEG=yes
13441 if test "${HAVE_JPEG}" = "yes"; then
13442 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13445 /* end confdefs.h. */
13446 #include <jpeglib.h>
13447 version=JPEG_LIB_VERSION
13449 _ACEOF
13450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13451 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13452 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13454 else
13455 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13456 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13457 HAVE_JPEG=no
13459 rm -f conftest*
13462 if test "${HAVE_JPEG}" = "yes"; then
13463 LIBJPEG=-ljpeg
13468 ### Use -lpng if available, unless `--with-png=no'.
13469 ### mingw32 doesn't use -lpng, since it loads the library dynamically.
13470 HAVE_PNG=no
13471 LIBPNG=
13472 if test "${opsys}" = "mingw32"; then
13473 if test "${with_png}" != "no"; then
13474 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13475 if test "x$ac_cv_header_png_h" = x""yes; then :
13476 HAVE_PNG=yes
13477 else
13478 HAVE_PNG=no
13483 if test "${HAVE_PNG}" = "yes"; then
13485 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13488 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13489 # include <libpng/png.h>
13490 #else
13491 # include <png.h>
13492 #endif
13495 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13497 else
13499 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13504 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13505 if test "${with_png}" != "no"; then
13506 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13507 # in /usr/include/libpng.
13508 for ac_header in png.h libpng/png.h
13509 do :
13510 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13511 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13512 eval as_val=\$$as_ac_Header
13513 if test "x$as_val" = x""yes; then :
13514 cat >>confdefs.h <<_ACEOF
13515 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13516 _ACEOF
13517 break
13520 done
13522 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13524 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13525 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13526 $as_echo_n "(cached) " >&6
13527 else
13528 ac_check_lib_save_LIBS=$LIBS
13529 LIBS="-lpng -lz -lm $LIBS"
13530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13531 /* end confdefs.h. */
13533 /* Override any GCC internal prototype to avoid an error.
13534 Use char because int might match the return type of a GCC
13535 builtin and then its argument prototype would still apply. */
13536 #ifdef __cplusplus
13537 extern "C"
13538 #endif
13539 char png_get_channels ();
13541 main ()
13543 return png_get_channels ();
13545 return 0;
13547 _ACEOF
13548 if ac_fn_c_try_link "$LINENO"; then :
13549 ac_cv_lib_png_png_get_channels=yes
13550 else
13551 ac_cv_lib_png_png_get_channels=no
13553 rm -f core conftest.err conftest.$ac_objext \
13554 conftest$ac_exeext conftest.$ac_ext
13555 LIBS=$ac_check_lib_save_LIBS
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13558 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13559 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13560 HAVE_PNG=yes
13566 if test "${HAVE_PNG}" = "yes"; then
13568 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13570 LIBPNG="-lpng -lz -lm"
13572 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13573 # include <libpng/png.h>
13574 #else
13575 # include <png.h>
13576 #endif
13579 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13581 else
13583 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13591 ### Use -ltiff if available, unless `--with-tiff=no'.
13592 ### mingw32 doesn't use -ltiff, since it loads the library dynamically.
13593 HAVE_TIFF=no
13594 LIBTIFF=
13595 if test "${opsys}" = "mingw32"; then
13596 if test "${with_tiff}" != "no"; then
13597 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13598 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13599 HAVE_TIFF=yes
13600 else
13601 HAVE_TIFF=no
13606 if test "${HAVE_TIFF}" = "yes"; then
13608 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13611 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13612 if test "${with_tiff}" != "no"; then
13613 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13614 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13615 tifflibs="-lz -lm"
13616 # At least one tiff package requires the jpeg library.
13617 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13619 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13620 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
13621 $as_echo_n "(cached) " >&6
13622 else
13623 ac_check_lib_save_LIBS=$LIBS
13624 LIBS="-ltiff $tifflibs $LIBS"
13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13626 /* end confdefs.h. */
13628 /* Override any GCC internal prototype to avoid an error.
13629 Use char because int might match the return type of a GCC
13630 builtin and then its argument prototype would still apply. */
13631 #ifdef __cplusplus
13632 extern "C"
13633 #endif
13634 char TIFFGetVersion ();
13636 main ()
13638 return TIFFGetVersion ();
13640 return 0;
13642 _ACEOF
13643 if ac_fn_c_try_link "$LINENO"; then :
13644 ac_cv_lib_tiff_TIFFGetVersion=yes
13645 else
13646 ac_cv_lib_tiff_TIFFGetVersion=no
13648 rm -f core conftest.err conftest.$ac_objext \
13649 conftest$ac_exeext conftest.$ac_ext
13650 LIBS=$ac_check_lib_save_LIBS
13652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13653 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13654 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13655 HAVE_TIFF=yes
13663 if test "${HAVE_TIFF}" = "yes"; then
13665 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13667 LIBTIFF=-ltiff
13672 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
13673 ### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
13674 HAVE_GIF=no
13675 LIBGIF=
13676 if test "${opsys}" = "mingw32"; then
13677 if test "${with_gif}" != "no"; then
13678 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13679 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13680 HAVE_GIF=yes
13681 else
13682 HAVE_GIF=no
13687 if test "${HAVE_GIF}" = "yes"; then
13689 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13692 elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13693 || test "${HAVE_W32}" = "yes"; then
13694 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13695 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13696 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13697 # Earlier versions can crash Emacs.
13698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13699 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13700 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
13701 $as_echo_n "(cached) " >&6
13702 else
13703 ac_check_lib_save_LIBS=$LIBS
13704 LIBS="-lgif $LIBS"
13705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13706 /* end confdefs.h. */
13708 /* Override any GCC internal prototype to avoid an error.
13709 Use char because int might match the return type of a GCC
13710 builtin and then its argument prototype would still apply. */
13711 #ifdef __cplusplus
13712 extern "C"
13713 #endif
13714 char EGifPutExtensionLast ();
13716 main ()
13718 return EGifPutExtensionLast ();
13720 return 0;
13722 _ACEOF
13723 if ac_fn_c_try_link "$LINENO"; then :
13724 ac_cv_lib_gif_EGifPutExtensionLast=yes
13725 else
13726 ac_cv_lib_gif_EGifPutExtensionLast=no
13728 rm -f core conftest.err conftest.$ac_objext \
13729 conftest$ac_exeext conftest.$ac_ext
13730 LIBS=$ac_check_lib_save_LIBS
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13733 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13734 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13735 HAVE_GIF=yes
13736 else
13737 HAVE_GIF=maybe
13744 if test "$HAVE_GIF" = yes; then
13745 LIBGIF=-lgif
13746 elif test "$HAVE_GIF" = maybe; then
13747 # If gif_lib.h but no libgif, try libungif.
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13749 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13750 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
13751 $as_echo_n "(cached) " >&6
13752 else
13753 ac_check_lib_save_LIBS=$LIBS
13754 LIBS="-lungif $LIBS"
13755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13756 /* end confdefs.h. */
13758 /* Override any GCC internal prototype to avoid an error.
13759 Use char because int might match the return type of a GCC
13760 builtin and then its argument prototype would still apply. */
13761 #ifdef __cplusplus
13762 extern "C"
13763 #endif
13764 char EGifPutExtensionLast ();
13766 main ()
13768 return EGifPutExtensionLast ();
13770 return 0;
13772 _ACEOF
13773 if ac_fn_c_try_link "$LINENO"; then :
13774 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13775 else
13776 ac_cv_lib_ungif_EGifPutExtensionLast=no
13778 rm -f core conftest.err conftest.$ac_objext \
13779 conftest$ac_exeext conftest.$ac_ext
13780 LIBS=$ac_check_lib_save_LIBS
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13783 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13784 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13785 HAVE_GIF=yes
13786 else
13787 HAVE_GIF=no
13790 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13793 if test "${HAVE_GIF}" = "yes"; then
13795 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13801 if test "${HAVE_X11}" = "yes"; then
13802 MISSING=""
13803 WITH_NO=""
13804 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13805 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13806 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13807 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13808 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13809 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13810 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13811 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13812 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13813 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13815 if test "X${MISSING}" != X; then
13816 as_fn_error "The following required libraries were not found:
13817 $MISSING
13818 Maybe some development libraries/packages are missing?
13819 If you don't want to link with them give
13820 $WITH_NO
13821 as options to configure" "$LINENO" 5
13825 ### Use -lgpm if available, unless `--with-gpm=no'.
13826 HAVE_GPM=no
13827 LIBGPM=
13828 if test "${with_gpm}" != "no"; then
13829 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13830 if test "x$ac_cv_header_gpm_h" = x""yes; then :
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13832 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13833 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
13834 $as_echo_n "(cached) " >&6
13835 else
13836 ac_check_lib_save_LIBS=$LIBS
13837 LIBS="-lgpm $LIBS"
13838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13839 /* end confdefs.h. */
13841 /* Override any GCC internal prototype to avoid an error.
13842 Use char because int might match the return type of a GCC
13843 builtin and then its argument prototype would still apply. */
13844 #ifdef __cplusplus
13845 extern "C"
13846 #endif
13847 char Gpm_Open ();
13849 main ()
13851 return Gpm_Open ();
13853 return 0;
13855 _ACEOF
13856 if ac_fn_c_try_link "$LINENO"; then :
13857 ac_cv_lib_gpm_Gpm_Open=yes
13858 else
13859 ac_cv_lib_gpm_Gpm_Open=no
13861 rm -f core conftest.err conftest.$ac_objext \
13862 conftest$ac_exeext conftest.$ac_ext
13863 LIBS=$ac_check_lib_save_LIBS
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13866 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13867 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13868 HAVE_GPM=yes
13875 if test "${HAVE_GPM}" = "yes"; then
13877 $as_echo "#define HAVE_GPM 1" >>confdefs.h
13879 LIBGPM=-lgpm
13888 GNUSTEP_CFLAGS=
13889 ### Use NeXTstep API to implement GUI.
13890 if test "${HAVE_NS}" = "yes"; then
13892 $as_echo "#define HAVE_NS 1" >>confdefs.h
13894 if test "${NS_IMPL_COCOA}" = "yes"; then
13896 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
13899 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
13901 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13903 # See also .m.o rule in Makefile.in */
13904 # FIXME: are all these flags really needed? Document here why. */
13905 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13906 ## Extra CFLAGS applied to src/*.m files.
13907 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"
13909 # We also have mouse menus.
13910 HAVE_MENUS=yes
13911 OTHER_FILES=ns-app
13914 if test "${HAVE_W32}" = "yes"; then
13915 HAVE_MENUS=yes
13918 ### Use session management (-lSM -lICE) if available
13919 HAVE_X_SM=no
13920 LIBXSM=
13921 if test "${HAVE_X11}" = "yes"; then
13922 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13923 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13925 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13926 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
13927 $as_echo_n "(cached) " >&6
13928 else
13929 ac_check_lib_save_LIBS=$LIBS
13930 LIBS="-lSM -lICE $LIBS"
13931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13932 /* end confdefs.h. */
13934 /* Override any GCC internal prototype to avoid an error.
13935 Use char because int might match the return type of a GCC
13936 builtin and then its argument prototype would still apply. */
13937 #ifdef __cplusplus
13938 extern "C"
13939 #endif
13940 char SmcOpenConnection ();
13942 main ()
13944 return SmcOpenConnection ();
13946 return 0;
13948 _ACEOF
13949 if ac_fn_c_try_link "$LINENO"; then :
13950 ac_cv_lib_SM_SmcOpenConnection=yes
13951 else
13952 ac_cv_lib_SM_SmcOpenConnection=no
13954 rm -f core conftest.err conftest.$ac_objext \
13955 conftest$ac_exeext conftest.$ac_ext
13956 LIBS=$ac_check_lib_save_LIBS
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13959 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13960 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13961 HAVE_X_SM=yes
13968 if test "${HAVE_X_SM}" = "yes"; then
13970 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
13972 LIBXSM="-lSM -lICE"
13973 case "$LIBS" in
13974 *-lSM*) ;;
13975 *) LIBS="$LIBXSM $LIBS" ;;
13976 esac
13981 ### Use XRandr (-lXrandr) if available
13982 HAVE_XRANDR=no
13983 if test "${HAVE_X11}" = "yes"; then
13984 XRANDR_REQUIRED=1.2.2
13985 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
13987 succeeded=no
13989 if test "$PKG_CONFIG" = "no" ; then
13990 HAVE_XRANDR=no
13991 else
13992 PKG_CONFIG_MIN_VERSION=0.9.0
13993 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
13995 $as_echo_n "checking for $XRANDR_MODULES... " >&6; }
13997 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
13998 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
13999 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14000 edit_cflags="
14001 s,///*,/,g
14002 s/^/ /
14003 s/ -I/ $isystem/g
14004 s/^ //
14006 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14007 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14009 $as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14010 succeeded=yes
14011 else
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14013 $as_echo "no" >&6; }
14014 XRANDR_CFLAGS=""
14015 XRANDR_LIBS=""
14016 ## If we have a custom action on failure, don't print errors, but
14017 ## do set a variable so people can do so. Do it in a subshell
14018 ## to capture any diagnostics in invoking pkg-config.
14019 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14025 else
14026 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14027 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14031 if test $succeeded = yes; then
14032 HAVE_XRANDR=yes
14033 else
14034 HAVE_XRANDR=no
14037 if test $HAVE_XRANDR = no; then
14038 # Test old way in case pkg-config doesn't have it (older machines).
14039 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14040 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14042 $as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14043 if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
14044 $as_echo_n "(cached) " >&6
14045 else
14046 ac_check_lib_save_LIBS=$LIBS
14047 LIBS="-lXrandr $LIBS"
14048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049 /* end confdefs.h. */
14051 /* Override any GCC internal prototype to avoid an error.
14052 Use char because int might match the return type of a GCC
14053 builtin and then its argument prototype would still apply. */
14054 #ifdef __cplusplus
14055 extern "C"
14056 #endif
14057 char XRRGetScreenResources ();
14059 main ()
14061 return XRRGetScreenResources ();
14063 return 0;
14065 _ACEOF
14066 if ac_fn_c_try_link "$LINENO"; then :
14067 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
14068 else
14069 ac_cv_lib_Xrandr_XRRGetScreenResources=no
14071 rm -f core conftest.err conftest.$ac_objext \
14072 conftest$ac_exeext conftest.$ac_ext
14073 LIBS=$ac_check_lib_save_LIBS
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14076 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14077 if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
14078 HAVE_XRANDR=yes
14084 if test $HAVE_XRANDR = yes; then
14085 XRANDR_LIBS=-lXrandr
14089 if test $HAVE_XRANDR = yes; then
14090 SAVE_CFLAGS="$CFLAGS"
14091 SAVE_LIBS="$LIBS"
14092 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14093 LIBS="$XRANDR_LIBS $LIBS"
14094 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14095 do :
14096 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14097 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14098 eval as_val=\$$as_ac_var
14099 if test "x$as_val" = x""yes; then :
14100 cat >>confdefs.h <<_ACEOF
14101 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14102 _ACEOF
14105 done
14107 CFLAGS="$SAVE_CFLAGS"
14108 LIBS="$SAVE_LIBS"
14111 $as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14116 ### Use Xinerama (-lXinerama) if available
14117 HAVE_XINERAMA=no
14118 if test "${HAVE_X11}" = "yes"; then
14119 XINERAMA_REQUIRED=1.0.2
14120 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14122 succeeded=no
14124 if test "$PKG_CONFIG" = "no" ; then
14125 HAVE_XINERAMA=no
14126 else
14127 PKG_CONFIG_MIN_VERSION=0.9.0
14128 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14130 $as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14132 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14133 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14134 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14135 edit_cflags="
14136 s,///*,/,g
14137 s/^/ /
14138 s/ -I/ $isystem/g
14139 s/^ //
14141 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14142 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14144 $as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14145 succeeded=yes
14146 else
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14148 $as_echo "no" >&6; }
14149 XINERAMA_CFLAGS=""
14150 XINERAMA_LIBS=""
14151 ## If we have a custom action on failure, don't print errors, but
14152 ## do set a variable so people can do so. Do it in a subshell
14153 ## to capture any diagnostics in invoking pkg-config.
14154 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14160 else
14161 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14162 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14166 if test $succeeded = yes; then
14167 HAVE_XINERAMA=yes
14168 else
14169 HAVE_XINERAMA=no
14172 if test $HAVE_XINERAMA = no; then
14173 # Test old way in case pkg-config doesn't have it (older machines).
14174 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14175 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14177 $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14178 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14179 $as_echo_n "(cached) " >&6
14180 else
14181 ac_check_lib_save_LIBS=$LIBS
14182 LIBS="-lXinerama $LIBS"
14183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14184 /* end confdefs.h. */
14186 /* Override any GCC internal prototype to avoid an error.
14187 Use char because int might match the return type of a GCC
14188 builtin and then its argument prototype would still apply. */
14189 #ifdef __cplusplus
14190 extern "C"
14191 #endif
14192 char XineramaQueryExtension ();
14194 main ()
14196 return XineramaQueryExtension ();
14198 return 0;
14200 _ACEOF
14201 if ac_fn_c_try_link "$LINENO"; then :
14202 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14203 else
14204 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14206 rm -f core conftest.err conftest.$ac_objext \
14207 conftest$ac_exeext conftest.$ac_ext
14208 LIBS=$ac_check_lib_save_LIBS
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14211 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14212 if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14213 HAVE_XINERAMA=yes
14219 if test $HAVE_XINERAMA = yes; then
14220 XINERAMA_LIBS=-lXinerama
14224 if test $HAVE_XINERAMA = yes; then
14226 $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14232 ### Use libxml (-lxml2) if available
14233 ### mingw32 doesn't use -lxml2, since it loads the library dynamically.
14234 HAVE_LIBXML2=no
14235 if test "${with_xml2}" != "no"; then
14236 ### I'm not sure what the version number should be, so I just guessed.
14238 succeeded=no
14240 if test "$PKG_CONFIG" = "no" ; then
14241 HAVE_LIBXML2=no
14242 else
14243 PKG_CONFIG_MIN_VERSION=0.9.0
14244 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14246 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
14248 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14249 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14250 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
14251 edit_cflags="
14252 s,///*,/,g
14253 s/^/ /
14254 s/ -I/ $isystem/g
14255 s/^ //
14257 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14258 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14260 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14261 succeeded=yes
14262 else
14263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14264 $as_echo "no" >&6; }
14265 LIBXML2_CFLAGS=""
14266 LIBXML2_LIBS=""
14267 ## If we have a custom action on failure, don't print errors, but
14268 ## do set a variable so people can do so. Do it in a subshell
14269 ## to capture any diagnostics in invoking pkg-config.
14270 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
14276 else
14277 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14278 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14282 if test $succeeded = yes; then
14283 HAVE_LIBXML2=yes
14284 else
14285 HAVE_LIBXML2=no
14288 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14289 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14290 SAVE_CPPFLAGS="$CPPFLAGS"
14291 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14292 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14293 if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14294 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14296 if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14297 HAVE_LIBXML2=yes
14303 CPPFLAGS="$SAVE_CPPFLAGS"
14304 if test "${HAVE_LIBXML2}" = "yes"; then
14305 LIBXML2_LIBS="-lxml2"
14306 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14309 if test "${HAVE_LIBXML2}" = "yes"; then
14310 if test "${opsys}" != "mingw32"; then
14311 LIBS="$LIBXML2_LIBS $LIBS"
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
14313 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14314 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
14315 $as_echo_n "(cached) " >&6
14316 else
14317 ac_check_lib_save_LIBS=$LIBS
14318 LIBS="-lxml2 $LIBS"
14319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14320 /* end confdefs.h. */
14322 /* Override any GCC internal prototype to avoid an error.
14323 Use char because int might match the return type of a GCC
14324 builtin and then its argument prototype would still apply. */
14325 #ifdef __cplusplus
14326 extern "C"
14327 #endif
14328 char htmlReadMemory ();
14330 main ()
14332 return htmlReadMemory ();
14334 return 0;
14336 _ACEOF
14337 if ac_fn_c_try_link "$LINENO"; then :
14338 ac_cv_lib_xml2_htmlReadMemory=yes
14339 else
14340 ac_cv_lib_xml2_htmlReadMemory=no
14342 rm -f core conftest.err conftest.$ac_objext \
14343 conftest$ac_exeext conftest.$ac_ext
14344 LIBS=$ac_check_lib_save_LIBS
14346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14347 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14348 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14349 HAVE_LIBXML2=yes
14350 else
14351 HAVE_LIBXML2=no
14354 else
14355 LIBXML2_LIBS=""
14357 if test "${HAVE_LIBXML2}" = "yes"; then
14359 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
14361 else
14362 LIBXML2_LIBS=""
14363 LIBXML2_CFLAGS=""
14370 # If netdb.h doesn't declare h_errno, we must declare it by hand.
14371 # On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14372 if test "${opsys}" = "mingw32"; then
14373 emacs_cv_netdb_declares_h_errno=yes
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14376 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
14377 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14378 $as_echo_n "(cached) " >&6
14379 else
14380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14381 /* end confdefs.h. */
14382 #include <netdb.h>
14384 main ()
14386 return h_errno;
14388 return 0;
14390 _ACEOF
14391 if ac_fn_c_try_link "$LINENO"; then :
14392 emacs_cv_netdb_declares_h_errno=yes
14393 else
14394 emacs_cv_netdb_declares_h_errno=no
14396 rm -f core conftest.err conftest.$ac_objext \
14397 conftest$ac_exeext conftest.$ac_ext
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14400 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14401 if test $emacs_cv_netdb_declares_h_errno = yes; then
14403 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
14407 # sqrt and other floating-point functions such as fmod and frexp
14408 # are found in -lm on most systems, but mingw32 doesn't use -lm.
14409 if test "${opsys}" != "mingw32"; then
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
14411 $as_echo_n "checking for sqrt in -lm... " >&6; }
14412 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14413 $as_echo_n "(cached) " >&6
14414 else
14415 ac_check_lib_save_LIBS=$LIBS
14416 LIBS="-lm $LIBS"
14417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418 /* end confdefs.h. */
14420 /* Override any GCC internal prototype to avoid an error.
14421 Use char because int might match the return type of a GCC
14422 builtin and then its argument prototype would still apply. */
14423 #ifdef __cplusplus
14424 extern "C"
14425 #endif
14426 char sqrt ();
14428 main ()
14430 return sqrt ();
14432 return 0;
14434 _ACEOF
14435 if ac_fn_c_try_link "$LINENO"; then :
14436 ac_cv_lib_m_sqrt=yes
14437 else
14438 ac_cv_lib_m_sqrt=no
14440 rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
14442 LIBS=$ac_check_lib_save_LIBS
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14445 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
14446 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14447 cat >>confdefs.h <<_ACEOF
14448 #define HAVE_LIBM 1
14449 _ACEOF
14451 LIBS="-lm $LIBS"
14457 # Check for mail-locking functions in a "mail" library. Probably this should
14458 # have the same check as for liblockfile below.
14459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14460 $as_echo_n "checking for maillock in -lmail... " >&6; }
14461 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
14462 $as_echo_n "(cached) " >&6
14463 else
14464 ac_check_lib_save_LIBS=$LIBS
14465 LIBS="-lmail $LIBS"
14466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14467 /* end confdefs.h. */
14469 /* Override any GCC internal prototype to avoid an error.
14470 Use char because int might match the return type of a GCC
14471 builtin and then its argument prototype would still apply. */
14472 #ifdef __cplusplus
14473 extern "C"
14474 #endif
14475 char maillock ();
14477 main ()
14479 return maillock ();
14481 return 0;
14483 _ACEOF
14484 if ac_fn_c_try_link "$LINENO"; then :
14485 ac_cv_lib_mail_maillock=yes
14486 else
14487 ac_cv_lib_mail_maillock=no
14489 rm -f core conftest.err conftest.$ac_objext \
14490 conftest$ac_exeext conftest.$ac_ext
14491 LIBS=$ac_check_lib_save_LIBS
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14494 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
14495 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14496 have_mail=yes
14497 else
14498 have_mail=no
14501 if test $have_mail = yes; then
14502 LIBS_MAIL=-lmail
14503 LIBS="$LIBS_MAIL $LIBS"
14505 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
14507 else
14508 LIBS_MAIL=
14510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14511 $as_echo_n "checking for maillock in -llockfile... " >&6; }
14512 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
14513 $as_echo_n "(cached) " >&6
14514 else
14515 ac_check_lib_save_LIBS=$LIBS
14516 LIBS="-llockfile $LIBS"
14517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14518 /* end confdefs.h. */
14520 /* Override any GCC internal prototype to avoid an error.
14521 Use char because int might match the return type of a GCC
14522 builtin and then its argument prototype would still apply. */
14523 #ifdef __cplusplus
14524 extern "C"
14525 #endif
14526 char maillock ();
14528 main ()
14530 return maillock ();
14532 return 0;
14534 _ACEOF
14535 if ac_fn_c_try_link "$LINENO"; then :
14536 ac_cv_lib_lockfile_maillock=yes
14537 else
14538 ac_cv_lib_lockfile_maillock=no
14540 rm -f core conftest.err conftest.$ac_objext \
14541 conftest$ac_exeext conftest.$ac_ext
14542 LIBS=$ac_check_lib_save_LIBS
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14545 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14546 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14547 have_lockfile=yes
14548 else
14549 have_lockfile=no
14552 if test $have_lockfile = yes; then
14553 LIBS_MAIL=-llockfile
14554 LIBS="$LIBS_MAIL $LIBS"
14556 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
14558 else
14559 # If we have the shared liblockfile, assume we must use it for mail
14560 # locking (e.g. Debian). If we couldn't link against liblockfile
14561 # (no liblockfile.a installed), ensure that we don't need to.
14562 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14563 set dummy liblockfile.so; ac_word=$2
14564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14565 $as_echo_n "checking for $ac_word... " >&6; }
14566 if test "${ac_cv_prog_liblockfile+set}" = set; then :
14567 $as_echo_n "(cached) " >&6
14568 else
14569 if test -n "$liblockfile"; then
14570 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14571 else
14572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14573 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14574 for as_dir in $as_dummy
14576 IFS=$as_save_IFS
14577 test -z "$as_dir" && as_dir=.
14578 for ac_exec_ext in '' $ac_executable_extensions; do
14579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14580 ac_cv_prog_liblockfile="yes"
14581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582 break 2
14584 done
14585 done
14586 IFS=$as_save_IFS
14588 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14591 liblockfile=$ac_cv_prog_liblockfile
14592 if test -n "$liblockfile"; then
14593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14594 $as_echo "$liblockfile" >&6; }
14595 else
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597 $as_echo "no" >&6; }
14601 if test $ac_cv_prog_liblockfile = yes; then
14602 as_fn_error "Shared liblockfile found but can't link against it.
14603 This probably means that movemail could lose mail.
14604 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14612 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14613 ## interlock access to the mail spool. The alternative is a lock file named
14614 ## /usr/spool/mail/$USER.lock.
14615 mail_lock=no
14616 case "$opsys" in
14617 aix4-2) mail_lock="lockf" ;;
14619 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
14621 ## On GNU/Linux systems, both methods are used by various mail programs.
14622 ## I assume most people are using newer mailers that have heard of flock.
14623 ## Change this if you need to.
14624 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14625 ## configure gets the right answers, and that means *NOT* using flock.
14626 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14627 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14628 ## Debian maintainer hasn't provided a clean fix for Emacs.
14629 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14630 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14631 ## correct logic. -- fx
14632 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14633 ## liblockfile is a Free Software replacement for libmail, used on
14634 ## Debian systems and elsewhere. -rfr.
14635 gnu-*)
14636 mail_lock="flock"
14637 if test $have_mail = yes || test $have_lockfile = yes; then
14638 test $ac_cv_header_maillock_h = yes && mail_lock=no
14642 mingw32)
14643 mail_lock="none-needed" ;;
14644 esac
14646 BLESSMAIL_TARGET=
14647 case "$mail_lock" in
14648 flock)
14649 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14652 lockf)
14653 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14656 none-needed) ;;
14658 *) BLESSMAIL_TARGET="need-blessmail" ;;
14659 esac
14663 for ac_func in accept4 gethostname \
14664 getrusage get_current_dir_name \
14665 lrand48 \
14666 select getpagesize setlocale \
14667 getrlimit setrlimit shutdown getaddrinfo \
14668 strsignal setitimer \
14669 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
14670 gai_strerror mkostemp mkstemp getline getdelim sync \
14671 difftime posix_memalign \
14672 getpwent endpwent getgrent endgrent \
14673 touchlock \
14674 cfmakeraw cfsetspeed copysign __executable_start log2
14675 do :
14676 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14677 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14678 eval as_val=\$$as_ac_var
14679 if test "x$as_val" = x""yes; then :
14680 cat >>confdefs.h <<_ACEOF
14681 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14682 _ACEOF
14685 done
14688 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
14689 ## has a broken `rint' in some library versions including math library
14690 ## version number A.09.05.
14691 ## You can fix the math library by installing patch number PHSS_4630.
14692 ## But we can fix it more reliably for Emacs by just not using rint.
14693 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
14694 case $opsys in
14695 hpux*) : ;;
14696 *) for ac_func in random rint
14697 do :
14698 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14699 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14700 eval as_val=\$$as_ac_var
14701 if test "x$as_val" = x""yes; then :
14702 cat >>confdefs.h <<_ACEOF
14703 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14704 _ACEOF
14707 done
14709 esac
14711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14712 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
14713 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
14714 $as_echo_n "(cached) " >&6
14715 else
14716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14717 /* end confdefs.h. */
14720 main ()
14722 __builtin_unwind_init ();
14724 return 0;
14726 _ACEOF
14727 if ac_fn_c_try_link "$LINENO"; then :
14728 emacs_cv_func___builtin_unwind_init=yes
14729 else
14730 emacs_cv_func___builtin_unwind_init=no
14732 rm -f core conftest.err conftest.$ac_objext \
14733 conftest$ac_exeext conftest.$ac_ext
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14736 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14737 if test $emacs_cv_func___builtin_unwind_init = yes; then
14739 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
14747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14748 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14749 if test "${ac_cv_sys_largefile_source+set}" = set; then :
14750 $as_echo_n "(cached) " >&6
14751 else
14752 while :; do
14753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14754 /* end confdefs.h. */
14755 #include <sys/types.h> /* for off_t */
14756 #include <stdio.h>
14758 main ()
14760 int (*fp) (FILE *, off_t, int) = fseeko;
14761 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14763 return 0;
14765 _ACEOF
14766 if ac_fn_c_try_link "$LINENO"; then :
14767 ac_cv_sys_largefile_source=no; break
14769 rm -f core conftest.err conftest.$ac_objext \
14770 conftest$ac_exeext conftest.$ac_ext
14771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14772 /* end confdefs.h. */
14773 #define _LARGEFILE_SOURCE 1
14774 #include <sys/types.h> /* for off_t */
14775 #include <stdio.h>
14777 main ()
14779 int (*fp) (FILE *, off_t, int) = fseeko;
14780 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14782 return 0;
14784 _ACEOF
14785 if ac_fn_c_try_link "$LINENO"; then :
14786 ac_cv_sys_largefile_source=1; break
14788 rm -f core conftest.err conftest.$ac_objext \
14789 conftest$ac_exeext conftest.$ac_ext
14790 ac_cv_sys_largefile_source=unknown
14791 break
14792 done
14794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14795 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14796 case $ac_cv_sys_largefile_source in #(
14797 no | unknown) ;;
14799 cat >>confdefs.h <<_ACEOF
14800 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14801 _ACEOF
14803 esac
14804 rm -rf conftest*
14806 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14807 # in glibc 2.1.3, but that breaks too many other things.
14808 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14809 if test $ac_cv_sys_largefile_source != unknown; then
14811 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14816 # UNIX98 PTYs.
14817 for ac_func in grantpt
14818 do :
14819 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14820 if test "x$ac_cv_func_grantpt" = x""yes; then :
14821 cat >>confdefs.h <<_ACEOF
14822 #define HAVE_GRANTPT 1
14823 _ACEOF
14826 done
14829 # PTY-related GNU extensions.
14830 for ac_func in getpt posix_openpt
14831 do :
14832 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14833 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14834 eval as_val=\$$as_ac_var
14835 if test "x$as_val" = x""yes; then :
14836 cat >>confdefs.h <<_ACEOF
14837 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14838 _ACEOF
14841 done
14844 # Check this now, so that we will NOT find the above functions in ncurses.
14845 # That is because we have not set up to link ncurses in lib-src.
14846 # It's better to believe a function is not available
14847 # than to expect to find it in ncurses.
14848 # Also we need tputs and friends to be able to build at all.
14849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
14850 $as_echo_n "checking for library containing tputs... " >&6; }
14851 # Run a test program that contains a call to tputs, a call that is
14852 # never executed. This tests whether a pre-'main' dynamic linker
14853 # works with the library. It's too much trouble to actually call
14854 # tputs in the test program, due to portability hassles. When
14855 # cross-compiling, assume the test program will run if it links.
14857 if test "${opsys}" = "mingw32"; then
14858 msg='none required'
14859 else
14860 # Maybe curses should be tried earlier?
14861 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14862 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14863 OLIBS=$LIBS
14864 if test -z "$tputs_library"; then
14865 LIBS_TERMCAP=
14866 msg='none required'
14867 else
14868 LIBS_TERMCAP=-l$tputs_library
14869 msg=$LIBS_TERMCAP
14870 LIBS="$LIBS_TERMCAP $LIBS"
14872 if test "$cross_compiling" = yes; then :
14873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14874 /* end confdefs.h. */
14876 extern void tputs (const char *, int, int (*)(int));
14877 int main (int argc, char **argv)
14879 if (argc == 10000)
14880 tputs (argv[0], 0, 0);
14881 return 0;
14884 _ACEOF
14885 if ac_fn_c_try_link "$LINENO"; then :
14887 else
14888 msg=no
14890 rm -f core conftest.err conftest.$ac_objext \
14891 conftest$ac_exeext conftest.$ac_ext
14892 else
14893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894 /* end confdefs.h. */
14896 extern void tputs (const char *, int, int (*)(int));
14897 int main (int argc, char **argv)
14899 if (argc == 10000)
14900 tputs (argv[0], 0, 0);
14901 return 0;
14904 _ACEOF
14905 if ac_fn_c_try_run "$LINENO"; then :
14907 else
14908 msg=no
14910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14911 conftest.$ac_objext conftest.beam conftest.$ac_ext
14914 LIBS=$OLIBS
14915 if test "X$msg" != Xno; then
14916 break
14918 done
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14921 $as_echo "$msg" >&6; }
14922 if test "X$msg" = Xno; then
14923 as_fn_error "The required function \`tputs' was not found in any library.
14924 The following libraries were tried (in order):
14925 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14926 Please try installing whichever of these libraries is most appropriate
14927 for your system, together with its header files.
14928 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
14931 ## Use termcap instead of terminfo?
14932 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14933 TERMINFO=yes
14934 ## FIXME? In the cases below where we unconditionally set
14935 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14936 ## if that was found above to have tputs.
14937 ## Should we use the gnu* logic everywhere?
14938 case "$opsys" in
14939 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14940 ## The ncurses library has been moved out of the System framework in
14941 ## Mac OS X 10.2. So if configure detects it, set the command-line
14942 ## option to use it.
14943 darwin) LIBS_TERMCAP="-lncurses" ;;
14945 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14947 freebsd)
14948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14949 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14950 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
14951 $as_echo_n "(cached) " >&6
14952 else
14953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14954 /* end confdefs.h. */
14955 #include <osreldate.h>
14957 main ()
14959 #if __FreeBSD_version < 400000
14960 fail;
14961 #endif
14964 return 0;
14966 _ACEOF
14967 if ac_fn_c_try_link "$LINENO"; then :
14968 emacs_cv_freebsd_terminfo=yes
14969 else
14970 emacs_cv_freebsd_terminfo=no
14972 rm -f core conftest.err conftest.$ac_objext \
14973 conftest$ac_exeext conftest.$ac_ext
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14978 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14980 if test $emacs_cv_freebsd_terminfo = yes; then
14981 LIBS_TERMCAP="-lncurses"
14982 else
14983 TERMINFO=no
14984 LIBS_TERMCAP="-ltermcap"
14988 mingw32)
14989 TERMINFO=no
14990 LIBS_TERMCAP=
14993 netbsd)
14994 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14995 TERMINFO=no
14996 LIBS_TERMCAP="-ltermcap"
15000 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
15002 ## hpux: Make sure we get select from libc rather than from libcurses
15003 ## because libcurses on HPUX 10.10 has a broken version of select.
15004 ## We used to use -lc -lcurses, but this may be cleaner.
15005 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15006 # set that way, now it uses the default). Isn't this a contradiction?
15007 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15009 esac
15011 TERMCAP_OBJ=tparam.o
15012 if test $TERMINFO = yes; then
15014 $as_echo "#define TERMINFO 1" >>confdefs.h
15016 TERMCAP_OBJ=terminfo.o
15022 # Do we have res_init, for detecting changes in /etc/resolv.conf?
15023 # On Darwin, res_init appears not to be useful: see bug#562 and
15024 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15025 resolv=no
15027 if test $opsys != darwin; then
15029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030 /* end confdefs.h. */
15031 #include <netinet/in.h>
15032 #include <arpa/nameser.h>
15033 #include <resolv.h>
15035 main ()
15037 return res_init();
15039 return 0;
15041 _ACEOF
15042 if ac_fn_c_try_link "$LINENO"; then :
15043 have_res_init=yes
15044 else
15045 have_res_init=no
15047 rm -f core conftest.err conftest.$ac_objext \
15048 conftest$ac_exeext conftest.$ac_ext
15049 if test "$have_res_init" = no; then
15050 OLIBS="$LIBS"
15051 LIBS="$LIBS -lresolv"
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15053 $as_echo_n "checking for res_init with -lresolv... " >&6; }
15054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15055 /* end confdefs.h. */
15056 #include <netinet/in.h>
15057 #include <arpa/nameser.h>
15058 #include <resolv.h>
15060 main ()
15062 return res_init();
15064 return 0;
15066 _ACEOF
15067 if ac_fn_c_try_link "$LINENO"; then :
15068 have_res_init=yes
15069 else
15070 have_res_init=no
15072 rm -f core conftest.err conftest.$ac_objext \
15073 conftest$ac_exeext conftest.$ac_ext
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15075 $as_echo "$have_res_init" >&6; }
15076 if test "$have_res_init" = yes ; then
15077 resolv=yes
15079 LIBS="$OLIBS"
15082 if test "$have_res_init" = yes; then
15084 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
15088 # Do we need the Hesiod library to provide the support routines?
15089 LIBHESIOD=
15090 if test "$with_hesiod" != no ; then
15091 # Don't set $LIBS here -- see comments above. FIXME which comments?
15092 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15093 if test "x$ac_cv_func_res_send" = x""yes; then :
15095 else
15096 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15097 if test "x$ac_cv_func___res_send" = x""yes; then :
15099 else
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15101 $as_echo_n "checking for res_send in -lresolv... " >&6; }
15102 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
15103 $as_echo_n "(cached) " >&6
15104 else
15105 ac_check_lib_save_LIBS=$LIBS
15106 LIBS="-lresolv $LIBS"
15107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15108 /* end confdefs.h. */
15110 /* Override any GCC internal prototype to avoid an error.
15111 Use char because int might match the return type of a GCC
15112 builtin and then its argument prototype would still apply. */
15113 #ifdef __cplusplus
15114 extern "C"
15115 #endif
15116 char res_send ();
15118 main ()
15120 return res_send ();
15122 return 0;
15124 _ACEOF
15125 if ac_fn_c_try_link "$LINENO"; then :
15126 ac_cv_lib_resolv_res_send=yes
15127 else
15128 ac_cv_lib_resolv_res_send=no
15130 rm -f core conftest.err conftest.$ac_objext \
15131 conftest$ac_exeext conftest.$ac_ext
15132 LIBS=$ac_check_lib_save_LIBS
15134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15135 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15136 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15137 resolv=yes
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
15185 if test "$resolv" = yes ; then
15186 RESOLVLIB=-lresolv
15187 else
15188 RESOLVLIB=
15190 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15191 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15193 else
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15195 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15196 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15197 $as_echo_n "(cached) " >&6
15198 else
15199 ac_check_lib_save_LIBS=$LIBS
15200 LIBS="-lhesiod $RESOLVLIB $LIBS"
15201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15202 /* end confdefs.h. */
15204 /* Override any GCC internal prototype to avoid an error.
15205 Use char because int might match the return type of a GCC
15206 builtin and then its argument prototype would still apply. */
15207 #ifdef __cplusplus
15208 extern "C"
15209 #endif
15210 char hes_getmailhost ();
15212 main ()
15214 return hes_getmailhost ();
15216 return 0;
15218 _ACEOF
15219 if ac_fn_c_try_link "$LINENO"; then :
15220 ac_cv_lib_hesiod_hes_getmailhost=yes
15221 else
15222 ac_cv_lib_hesiod_hes_getmailhost=no
15224 rm -f core conftest.err conftest.$ac_objext \
15225 conftest$ac_exeext conftest.$ac_ext
15226 LIBS=$ac_check_lib_save_LIBS
15228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15229 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15230 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15231 hesiod=yes
15232 else
15239 if test x"$hesiod" = xyes; then
15240 LIBHESIOD=-lhesiod
15245 # Do we need libresolv (due to res_init or Hesiod)?
15246 if test "$resolv" = yes && test $opsys != darwin; then
15247 LIBRESOLV=-lresolv
15248 else
15249 LIBRESOLV=
15253 # These tell us which Kerberos-related libraries to use.
15254 COM_ERRLIB=
15255 CRYPTOLIB=
15256 KRB5LIB=
15257 DESLIB=
15258 KRB4LIB=
15260 if test "${with_kerberos}" != no; then
15261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15262 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
15263 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15264 $as_echo_n "(cached) " >&6
15265 else
15266 ac_check_lib_save_LIBS=$LIBS
15267 LIBS="-lcom_err $LIBS"
15268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15269 /* end confdefs.h. */
15271 /* Override any GCC internal prototype to avoid an error.
15272 Use char because int might match the return type of a GCC
15273 builtin and then its argument prototype would still apply. */
15274 #ifdef __cplusplus
15275 extern "C"
15276 #endif
15277 char com_err ();
15279 main ()
15281 return com_err ();
15283 return 0;
15285 _ACEOF
15286 if ac_fn_c_try_link "$LINENO"; then :
15287 ac_cv_lib_com_err_com_err=yes
15288 else
15289 ac_cv_lib_com_err_com_err=no
15291 rm -f core conftest.err conftest.$ac_objext \
15292 conftest$ac_exeext conftest.$ac_ext
15293 LIBS=$ac_check_lib_save_LIBS
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15296 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15297 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15298 have_com_err=yes
15299 else
15300 have_com_err=no
15303 if test $have_com_err = yes; then
15304 COM_ERRLIB=-lcom_err
15305 LIBS="$COM_ERRLIB $LIBS"
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15308 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15309 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15310 $as_echo_n "(cached) " >&6
15311 else
15312 ac_check_lib_save_LIBS=$LIBS
15313 LIBS="-lcrypto $LIBS"
15314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15315 /* end confdefs.h. */
15317 /* Override any GCC internal prototype to avoid an error.
15318 Use char because int might match the return type of a GCC
15319 builtin and then its argument prototype would still apply. */
15320 #ifdef __cplusplus
15321 extern "C"
15322 #endif
15323 char mit_des_cbc_encrypt ();
15325 main ()
15327 return mit_des_cbc_encrypt ();
15329 return 0;
15331 _ACEOF
15332 if ac_fn_c_try_link "$LINENO"; then :
15333 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15334 else
15335 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15337 rm -f core conftest.err conftest.$ac_objext \
15338 conftest$ac_exeext conftest.$ac_ext
15339 LIBS=$ac_check_lib_save_LIBS
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15342 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15343 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15344 have_crypto=yes
15345 else
15346 have_crypto=no
15349 if test $have_crypto = yes; then
15350 CRYPTOLIB=-lcrypto
15351 LIBS="$CRYPTOLIB $LIBS"
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15354 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15355 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15356 $as_echo_n "(cached) " >&6
15357 else
15358 ac_check_lib_save_LIBS=$LIBS
15359 LIBS="-lk5crypto $LIBS"
15360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15361 /* end confdefs.h. */
15363 /* Override any GCC internal prototype to avoid an error.
15364 Use char because int might match the return type of a GCC
15365 builtin and then its argument prototype would still apply. */
15366 #ifdef __cplusplus
15367 extern "C"
15368 #endif
15369 char mit_des_cbc_encrypt ();
15371 main ()
15373 return mit_des_cbc_encrypt ();
15375 return 0;
15377 _ACEOF
15378 if ac_fn_c_try_link "$LINENO"; then :
15379 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15380 else
15381 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15383 rm -f core conftest.err conftest.$ac_objext \
15384 conftest$ac_exeext conftest.$ac_ext
15385 LIBS=$ac_check_lib_save_LIBS
15387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15388 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15389 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15390 have_k5crypto=yes
15391 else
15392 have_k5crypto=no
15395 if test $have_k5crypto = yes; then
15396 CRYPTOLIB=-lk5crypto
15397 LIBS="$CRYPTOLIB $LIBS"
15399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15400 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15401 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15402 $as_echo_n "(cached) " >&6
15403 else
15404 ac_check_lib_save_LIBS=$LIBS
15405 LIBS="-lkrb5 $LIBS"
15406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15407 /* end confdefs.h. */
15409 /* Override any GCC internal prototype to avoid an error.
15410 Use char because int might match the return type of a GCC
15411 builtin and then its argument prototype would still apply. */
15412 #ifdef __cplusplus
15413 extern "C"
15414 #endif
15415 char krb5_init_context ();
15417 main ()
15419 return krb5_init_context ();
15421 return 0;
15423 _ACEOF
15424 if ac_fn_c_try_link "$LINENO"; then :
15425 ac_cv_lib_krb5_krb5_init_context=yes
15426 else
15427 ac_cv_lib_krb5_krb5_init_context=no
15429 rm -f core conftest.err conftest.$ac_objext \
15430 conftest$ac_exeext conftest.$ac_ext
15431 LIBS=$ac_check_lib_save_LIBS
15433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15434 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15435 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15436 have_krb5=yes
15437 else
15438 have_krb5=no
15441 if test $have_krb5=yes; then
15442 KRB5LIB=-lkrb5
15443 LIBS="$KRB5LIB $LIBS"
15445 if test "${with_kerberos5}" = no; then
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15447 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15448 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
15449 $as_echo_n "(cached) " >&6
15450 else
15451 ac_check_lib_save_LIBS=$LIBS
15452 LIBS="-ldes425 $LIBS"
15453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15454 /* end confdefs.h. */
15456 /* Override any GCC internal prototype to avoid an error.
15457 Use char because int might match the return type of a GCC
15458 builtin and then its argument prototype would still apply. */
15459 #ifdef __cplusplus
15460 extern "C"
15461 #endif
15462 char des_cbc_encrypt ();
15464 main ()
15466 return des_cbc_encrypt ();
15468 return 0;
15470 _ACEOF
15471 if ac_fn_c_try_link "$LINENO"; then :
15472 ac_cv_lib_des425_des_cbc_encrypt=yes
15473 else
15474 ac_cv_lib_des425_des_cbc_encrypt=no
15476 rm -f core conftest.err conftest.$ac_objext \
15477 conftest$ac_exeext conftest.$ac_ext
15478 LIBS=$ac_check_lib_save_LIBS
15480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15481 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15482 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15483 have_des425=yes
15484 else
15485 have_des425=no
15488 if test $have_des425 = yes; then
15489 DESLIB=-ldes425
15490 LIBS="$DESLIB $LIBS"
15491 else
15492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15493 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15494 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15495 $as_echo_n "(cached) " >&6
15496 else
15497 ac_check_lib_save_LIBS=$LIBS
15498 LIBS="-ldes $LIBS"
15499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500 /* end confdefs.h. */
15502 /* Override any GCC internal prototype to avoid an error.
15503 Use char because int might match the return type of a GCC
15504 builtin and then its argument prototype would still apply. */
15505 #ifdef __cplusplus
15506 extern "C"
15507 #endif
15508 char des_cbc_encrypt ();
15510 main ()
15512 return des_cbc_encrypt ();
15514 return 0;
15516 _ACEOF
15517 if ac_fn_c_try_link "$LINENO"; then :
15518 ac_cv_lib_des_des_cbc_encrypt=yes
15519 else
15520 ac_cv_lib_des_des_cbc_encrypt=no
15522 rm -f core conftest.err conftest.$ac_objext \
15523 conftest$ac_exeext conftest.$ac_ext
15524 LIBS=$ac_check_lib_save_LIBS
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15527 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15528 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15529 have_des=yes
15530 else
15531 have_des=no
15534 if test $have_des = yes; then
15535 DESLIB=-ldes
15536 LIBS="$DESLIB $LIBS"
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15540 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15541 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
15542 $as_echo_n "(cached) " >&6
15543 else
15544 ac_check_lib_save_LIBS=$LIBS
15545 LIBS="-lkrb4 $LIBS"
15546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15547 /* end confdefs.h. */
15549 /* Override any GCC internal prototype to avoid an error.
15550 Use char because int might match the return type of a GCC
15551 builtin and then its argument prototype would still apply. */
15552 #ifdef __cplusplus
15553 extern "C"
15554 #endif
15555 char krb_get_cred ();
15557 main ()
15559 return krb_get_cred ();
15561 return 0;
15563 _ACEOF
15564 if ac_fn_c_try_link "$LINENO"; then :
15565 ac_cv_lib_krb4_krb_get_cred=yes
15566 else
15567 ac_cv_lib_krb4_krb_get_cred=no
15569 rm -f core conftest.err conftest.$ac_objext \
15570 conftest$ac_exeext conftest.$ac_ext
15571 LIBS=$ac_check_lib_save_LIBS
15573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15574 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15575 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15576 have_krb4=yes
15577 else
15578 have_krb4=no
15581 if test $have_krb4 = yes; then
15582 KRB4LIB=-lkrb4
15583 LIBS="$KRB4LIB $LIBS"
15584 else
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15586 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15587 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15588 $as_echo_n "(cached) " >&6
15589 else
15590 ac_check_lib_save_LIBS=$LIBS
15591 LIBS="-lkrb $LIBS"
15592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15593 /* end confdefs.h. */
15595 /* Override any GCC internal prototype to avoid an error.
15596 Use char because int might match the return type of a GCC
15597 builtin and then its argument prototype would still apply. */
15598 #ifdef __cplusplus
15599 extern "C"
15600 #endif
15601 char krb_get_cred ();
15603 main ()
15605 return krb_get_cred ();
15607 return 0;
15609 _ACEOF
15610 if ac_fn_c_try_link "$LINENO"; then :
15611 ac_cv_lib_krb_krb_get_cred=yes
15612 else
15613 ac_cv_lib_krb_krb_get_cred=no
15615 rm -f core conftest.err conftest.$ac_objext \
15616 conftest$ac_exeext conftest.$ac_ext
15617 LIBS=$ac_check_lib_save_LIBS
15619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15620 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15621 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15622 have_krb=yes
15623 else
15624 have_krb=no
15627 if test $have_krb = yes; then
15628 KRB4LIB=-lkrb
15629 LIBS="$KRB4LIB $LIBS"
15634 if test "${with_kerberos5}" != no; then
15635 for ac_header in krb5.h
15636 do :
15637 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15638 if test "x$ac_cv_header_krb5_h" = x""yes; then :
15639 cat >>confdefs.h <<_ACEOF
15640 #define HAVE_KRB5_H 1
15641 _ACEOF
15642 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15644 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15646 cat >>confdefs.h <<_ACEOF
15647 #define HAVE_KRB5_ERROR_TEXT 1
15648 _ACEOF
15652 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15654 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
15656 cat >>confdefs.h <<_ACEOF
15657 #define HAVE_KRB5_ERROR_E_TEXT 1
15658 _ACEOF
15665 done
15667 else
15668 for ac_header in krb.h
15669 do :
15670 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15671 if test "x$ac_cv_header_krb_h" = x""yes; then :
15672 cat >>confdefs.h <<_ACEOF
15673 #define HAVE_KRB_H 1
15674 _ACEOF
15676 else
15677 for ac_header in kerberosIV/krb.h
15678 do :
15679 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15680 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15681 cat >>confdefs.h <<_ACEOF
15682 #define HAVE_KERBEROSIV_KRB_H 1
15683 _ACEOF
15685 else
15686 for ac_header in kerberos/krb.h
15687 do :
15688 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15689 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15690 cat >>confdefs.h <<_ACEOF
15691 #define HAVE_KERBEROS_KRB_H 1
15692 _ACEOF
15696 done
15700 done
15704 done
15707 for ac_header in com_err.h
15708 do :
15709 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15710 if test "x$ac_cv_header_com_err_h" = x""yes; then :
15711 cat >>confdefs.h <<_ACEOF
15712 #define HAVE_COM_ERR_H 1
15713 _ACEOF
15717 done
15730 for ac_func in $ac_func_list
15731 do :
15732 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15733 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15734 eval as_val=\$$as_ac_var
15735 if test "x$as_val" = x""yes; then :
15736 cat >>confdefs.h <<_ACEOF
15737 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15738 _ACEOF
15741 done
15746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15747 $as_echo_n "checking whether localtime caches TZ... " >&6; }
15748 if test "${emacs_cv_localtime_cache+set}" = set; then :
15749 $as_echo_n "(cached) " >&6
15750 else
15751 if test x$ac_cv_func_tzset = xyes; then
15752 if test "$cross_compiling" = yes; then :
15753 # If we have tzset, assume the worst when cross-compiling.
15754 emacs_cv_localtime_cache=yes
15755 else
15756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15757 /* end confdefs.h. */
15758 #include <time.h>
15759 char TZ_GMT0[] = "TZ=GMT0";
15760 char TZ_PST8[] = "TZ=PST8";
15761 main()
15763 time_t now = time ((time_t *) 0);
15764 int hour_GMT0, hour_unset;
15765 if (putenv (TZ_GMT0) != 0)
15766 exit (1);
15767 hour_GMT0 = localtime (&now)->tm_hour;
15768 unsetenv("TZ");
15769 hour_unset = localtime (&now)->tm_hour;
15770 if (putenv (TZ_PST8) != 0)
15771 exit (1);
15772 if (localtime (&now)->tm_hour == hour_GMT0)
15773 exit (1);
15774 unsetenv("TZ");
15775 if (localtime (&now)->tm_hour != hour_unset)
15776 exit (1);
15777 exit (0);
15779 _ACEOF
15780 if ac_fn_c_try_run "$LINENO"; then :
15781 emacs_cv_localtime_cache=no
15782 else
15783 emacs_cv_localtime_cache=yes
15785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15786 conftest.$ac_objext conftest.beam conftest.$ac_ext
15789 else
15790 # If we lack tzset, report that localtime does not cache TZ,
15791 # since we can't invalidate the cache if we don't have tzset.
15792 emacs_cv_localtime_cache=no
15795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15796 $as_echo "$emacs_cv_localtime_cache" >&6; }
15797 if test $emacs_cv_localtime_cache = yes; then
15799 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
15803 ok_so_far=yes
15804 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15805 if test "x$ac_cv_func_socket" = x""yes; then :
15807 else
15808 ok_so_far=no
15811 if test $ok_so_far = yes; then
15812 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15813 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
15815 else
15816 ok_so_far=no
15821 if test $ok_so_far = yes; then
15822 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15823 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
15825 else
15826 ok_so_far=no
15831 if test $ok_so_far = yes; then
15833 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
15837 case $canonical in
15838 *-solaris2.4 | *-solaris2.4.*)
15839 : ${ac_cv_func_vfork_works=no};;
15840 esac
15842 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15843 if test "x$ac_cv_type_pid_t" = x""yes; then :
15845 else
15847 cat >>confdefs.h <<_ACEOF
15848 #define pid_t int
15849 _ACEOF
15853 for ac_header in vfork.h
15854 do :
15855 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15856 if test "x$ac_cv_header_vfork_h" = x""yes; then :
15857 cat >>confdefs.h <<_ACEOF
15858 #define HAVE_VFORK_H 1
15859 _ACEOF
15863 done
15865 for ac_func in fork vfork
15866 do :
15867 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15868 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15869 eval as_val=\$$as_ac_var
15870 if test "x$as_val" = x""yes; then :
15871 cat >>confdefs.h <<_ACEOF
15872 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15873 _ACEOF
15876 done
15878 if test "x$ac_cv_func_fork" = xyes; then
15879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15880 $as_echo_n "checking for working fork... " >&6; }
15881 if test "${ac_cv_func_fork_works+set}" = set; then :
15882 $as_echo_n "(cached) " >&6
15883 else
15884 if test "$cross_compiling" = yes; then :
15885 ac_cv_func_fork_works=cross
15886 else
15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15888 /* end confdefs.h. */
15889 $ac_includes_default
15891 main ()
15894 /* By Ruediger Kuhlmann. */
15895 return fork () < 0;
15898 return 0;
15900 _ACEOF
15901 if ac_fn_c_try_run "$LINENO"; then :
15902 ac_cv_func_fork_works=yes
15903 else
15904 ac_cv_func_fork_works=no
15906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15907 conftest.$ac_objext conftest.beam conftest.$ac_ext
15911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15912 $as_echo "$ac_cv_func_fork_works" >&6; }
15914 else
15915 ac_cv_func_fork_works=$ac_cv_func_fork
15917 if test "x$ac_cv_func_fork_works" = xcross; then
15918 case $host in
15919 *-*-amigaos* | *-*-msdosdjgpp*)
15920 # Override, as these systems have only a dummy fork() stub
15921 ac_cv_func_fork_works=no
15924 ac_cv_func_fork_works=yes
15926 esac
15927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15928 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15930 ac_cv_func_vfork_works=$ac_cv_func_vfork
15931 if test "x$ac_cv_func_vfork" = xyes; then
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15933 $as_echo_n "checking for working vfork... " >&6; }
15934 if test "${ac_cv_func_vfork_works+set}" = set; then :
15935 $as_echo_n "(cached) " >&6
15936 else
15937 if test "$cross_compiling" = yes; then :
15938 ac_cv_func_vfork_works=cross
15939 else
15940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15941 /* end confdefs.h. */
15942 /* Thanks to Paul Eggert for this test. */
15943 $ac_includes_default
15944 #include <sys/wait.h>
15945 #ifdef HAVE_VFORK_H
15946 # include <vfork.h>
15947 #endif
15948 /* On some sparc systems, changes by the child to local and incoming
15949 argument registers are propagated back to the parent. The compiler
15950 is told about this with #include <vfork.h>, but some compilers
15951 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15952 static variable whose address is put into a register that is
15953 clobbered by the vfork. */
15954 static void
15955 #ifdef __cplusplus
15956 sparc_address_test (int arg)
15957 # else
15958 sparc_address_test (arg) int arg;
15959 #endif
15961 static pid_t child;
15962 if (!child) {
15963 child = vfork ();
15964 if (child < 0) {
15965 perror ("vfork");
15966 _exit(2);
15968 if (!child) {
15969 arg = getpid();
15970 write(-1, "", 0);
15971 _exit (arg);
15977 main ()
15979 pid_t parent = getpid ();
15980 pid_t child;
15982 sparc_address_test (0);
15984 child = vfork ();
15986 if (child == 0) {
15987 /* Here is another test for sparc vfork register problems. This
15988 test uses lots of local variables, at least as many local
15989 variables as main has allocated so far including compiler
15990 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15991 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15992 reuse the register of parent for one of the local variables,
15993 since it will think that parent can't possibly be used any more
15994 in this routine. Assigning to the local variable will thus
15995 munge parent in the parent process. */
15996 pid_t
15997 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15998 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15999 /* Convince the compiler that p..p7 are live; otherwise, it might
16000 use the same hardware register for all 8 local variables. */
16001 if (p != p1 || p != p2 || p != p3 || p != p4
16002 || p != p5 || p != p6 || p != p7)
16003 _exit(1);
16005 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16006 from child file descriptors. If the child closes a descriptor
16007 before it execs or exits, this munges the parent's descriptor
16008 as well. Test for this by closing stdout in the child. */
16009 _exit(close(fileno(stdout)) != 0);
16010 } else {
16011 int status;
16012 struct stat st;
16014 while (wait(&status) != child)
16016 return (
16017 /* Was there some problem with vforking? */
16018 child < 0
16020 /* Did the child fail? (This shouldn't happen.) */
16021 || status
16023 /* Did the vfork/compiler bug occur? */
16024 || parent != getpid()
16026 /* Did the file descriptor bug occur? */
16027 || fstat(fileno(stdout), &st) != 0
16031 _ACEOF
16032 if ac_fn_c_try_run "$LINENO"; then :
16033 ac_cv_func_vfork_works=yes
16034 else
16035 ac_cv_func_vfork_works=no
16037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16038 conftest.$ac_objext conftest.beam conftest.$ac_ext
16042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16043 $as_echo "$ac_cv_func_vfork_works" >&6; }
16046 if test "x$ac_cv_func_fork_works" = xcross; then
16047 ac_cv_func_vfork_works=$ac_cv_func_vfork
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16049 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16052 if test "x$ac_cv_func_vfork_works" = xyes; then
16054 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
16056 else
16058 $as_echo "#define vfork fork" >>confdefs.h
16061 if test "x$ac_cv_func_fork_works" = xyes; then
16063 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
16068 for ac_func in snprintf
16069 do :
16070 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16071 if test "x$ac_cv_func_snprintf" = x""yes; then :
16072 cat >>confdefs.h <<_ACEOF
16073 #define HAVE_SNPRINTF 1
16074 _ACEOF
16077 done
16080 XGSELOBJ=
16081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16082 $as_echo_n "checking whether GLib is linked in... " >&6; }
16083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16084 /* end confdefs.h. */
16085 #include <glib.h>
16088 main ()
16090 g_print ("Hello world");
16092 return 0;
16094 _ACEOF
16095 if ac_fn_c_try_link "$LINENO"; then :
16096 links_glib=yes
16097 else
16098 links_glib=no
16100 rm -f core conftest.err conftest.$ac_objext \
16101 conftest$ac_exeext conftest.$ac_ext
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16103 $as_echo "$links_glib" >&6; }
16104 if test "${links_glib}" = "yes"; then
16106 $as_echo "#define HAVE_GLIB 1" >>confdefs.h
16108 if test "$HAVE_NS" = no;then
16109 XGSELOBJ=xgselect.o
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16115 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16116 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16117 $as_echo_n "(cached) " >&6
16118 else
16119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120 /* end confdefs.h. */
16121 #include <langinfo.h>
16123 main ()
16125 char* cs = nl_langinfo(CODESET);
16127 return 0;
16129 _ACEOF
16130 if ac_fn_c_try_link "$LINENO"; then :
16131 emacs_cv_langinfo_codeset=yes
16132 else
16133 emacs_cv_langinfo_codeset=no
16135 rm -f core conftest.err conftest.$ac_objext \
16136 conftest$ac_exeext conftest.$ac_ext
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16140 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
16141 if test $emacs_cv_langinfo_codeset = yes; then
16143 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16148 $as_echo_n "checking for mbstate_t... " >&6; }
16149 if test "${ac_cv_type_mbstate_t+set}" = set; then :
16150 $as_echo_n "(cached) " >&6
16151 else
16152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16153 /* end confdefs.h. */
16154 $ac_includes_default
16155 # include <wchar.h>
16157 main ()
16159 mbstate_t x; return sizeof x;
16161 return 0;
16163 _ACEOF
16164 if ac_fn_c_try_compile "$LINENO"; then :
16165 ac_cv_type_mbstate_t=yes
16166 else
16167 ac_cv_type_mbstate_t=no
16169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16172 $as_echo "$ac_cv_type_mbstate_t" >&6; }
16173 if test $ac_cv_type_mbstate_t = yes; then
16175 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
16177 else
16179 $as_echo "#define mbstate_t int" >>confdefs.h
16183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16184 $as_echo_n "checking for C restricted array declarations... " >&6; }
16185 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16186 $as_echo_n "(cached) " >&6
16187 else
16188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16189 /* end confdefs.h. */
16190 void fred (int x[__restrict]);
16192 main ()
16196 return 0;
16198 _ACEOF
16199 if ac_fn_c_try_compile "$LINENO"; then :
16200 emacs_cv_c_restrict_arr=yes
16201 else
16202 emacs_cv_c_restrict_arr=no
16204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16207 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
16208 if test "$emacs_cv_c_restrict_arr" = yes; then
16210 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
16215 if test "${opsys}" != "mingw32"; then
16217 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16222 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
16225 ## Note: PTYs are broken on darwin <6. Use at your own risk.
16226 if test "${opsys}" != "mingw32"; then
16228 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
16233 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
16239 if test "${opsys}" = "mingw32"; then
16240 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16242 else
16243 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16248 if test "${opsys}" = "mingw32"; then
16249 $as_echo "#define SEPCHAR ';'" >>confdefs.h
16251 else
16252 $as_echo "#define SEPCHAR ':'" >>confdefs.h
16257 $as_echo "#define subprocesses 1" >>confdefs.h
16261 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16266 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16269 if test "${opsys}" = "mingw32"; then
16271 $as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
16275 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16279 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16281 else
16283 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16287 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16291 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16297 case $opsys in
16298 aix4-2)
16299 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16300 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16305 hpux*)
16306 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16309 esac
16312 case $opsys in
16313 irix6-5 | sol2* | unixware )
16315 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
16318 esac
16320 emacs_broken_SIGIO=no
16322 case $opsys in
16323 hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd )
16324 emacs_broken_SIGIO=yes
16327 aix4-2)
16329 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
16333 freebsd)
16335 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
16338 esac
16340 case $opsys in
16341 gnu-* | sol2-10 )
16343 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
16346 esac
16348 case $opsys in
16349 darwin | dragonfly | freebsd | netbsd | openbsd )
16351 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
16354 esac
16356 case $opsys in
16357 netbsd | openbsd) sound_device="/dev/audio" ;;
16358 *) sound_device="/dev/dsp" ;;
16359 esac
16362 cat >>confdefs.h <<_ACEOF
16363 #define DEFAULT_SOUND_DEVICE "$sound_device"
16364 _ACEOF
16368 case $opsys in
16369 darwin | gnu-linux | gnu-kfreebsd )
16371 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
16374 esac
16377 case $opsys in
16378 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
16380 $as_echo "#define NARROWPROTO 1" >>confdefs.h
16383 esac
16392 case $opsys in
16393 aix4-2 )
16394 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
16396 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
16398 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
16402 cygwin )
16403 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16405 $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
16407 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16409 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16413 darwin )
16414 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16416 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16418 $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
16420 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16422 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16426 gnu | openbsd )
16427 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16431 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
16432 if test "x$ac_cv_func_grantpt" = xyes; then
16434 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
16436 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16438 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
16440 if test "x$ac_cv_func_posix_openpt" = xyes; then
16441 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY)" >>confdefs.h
16443 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16445 elif test "x$ac_cv_func_getpt" = xyes; then
16446 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
16448 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16450 else
16451 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16454 else
16455 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16460 hpux*)
16461 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16463 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
16465 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
16469 irix6-5 )
16470 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
16472 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
16474 $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
16476 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16478 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16482 sol2* )
16483 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
16487 unixware )
16488 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
16491 esac
16494 case $opsys in
16495 sol2* | unixware )
16496 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16498 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16501 $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
16504 esac
16509 case $opsys in
16510 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
16511 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16515 gnu-linux | gnu-kfreebsd )
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16518 $as_echo_n "checking for signals via characters... " >&6; }
16519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16520 /* end confdefs.h. */
16522 #include <linux/version.h>
16523 #if LINUX_VERSION_CODE < 0x20400
16524 # error "Linux version too old"
16525 #endif
16528 main ()
16532 return 0;
16534 _ACEOF
16535 if ac_fn_c_try_cpp "$LINENO"; then :
16536 emacs_signals_via_chars=yes
16537 else
16538 emacs_signals_via_chars=no
16540 rm -f conftest.err conftest.$ac_ext
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16543 $as_echo "$emacs_signals_via_chars" >&6; }
16544 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16547 esac
16552 case $opsys in
16553 aix*)
16554 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
16557 hpux*)
16558 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
16561 irix6-5)
16562 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
16565 esac
16570 case $opsys in
16571 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16574 gnu | dragonfly | freebsd | netbsd | openbsd )
16576 $as_echo "#define TABDLY OXTABS" >>confdefs.h
16578 $as_echo "#define TAB3 OXTABS" >>confdefs.h
16582 gnu-linux | gnu-kfreebsd )
16583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16584 /* end confdefs.h. */
16586 #ifndef __ia64__
16587 # error "not ia64"
16588 #endif
16591 main ()
16595 return 0;
16597 _ACEOF
16598 if ac_fn_c_try_cpp "$LINENO"; then :
16600 $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
16603 rm -f conftest.err conftest.$ac_ext
16606 hpux*)
16608 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
16611 esac
16617 case $opsys in
16618 gnu-linux | gnu-kfreebsd )
16619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16620 /* end confdefs.h. */
16622 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16623 || defined __alpha__ || defined __mips__ || defined __s390__ \
16624 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16625 || defined __ia64__ || defined __sh__
16626 /* ok */
16627 #else
16628 # error "setjmp not known to work on this arch"
16629 #endif
16632 main ()
16636 return 0;
16638 _ACEOF
16639 if ac_fn_c_try_cpp "$LINENO"; then :
16640 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16643 rm -f conftest.err conftest.$ac_ext
16645 esac
16648 if test x$GCC = xyes; then
16649 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16651 else
16652 case $opsys in
16653 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
16654 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16657 esac
16659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
16660 $as_echo_n "checking for _setjmp... " >&6; }
16661 if test "${emacs_cv_func__setjmp+set}" = set; then :
16662 $as_echo_n "(cached) " >&6
16663 else
16664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16665 /* end confdefs.h. */
16666 #include <setjmp.h>
16667 #ifdef __MINGW32__
16668 # define _longjmp longjmp
16669 #endif
16672 main ()
16674 jmp_buf j;
16675 if (! _setjmp (j))
16676 _longjmp (j, 1);
16678 return 0;
16680 _ACEOF
16681 if ac_fn_c_try_link "$LINENO"; then :
16682 emacs_cv_func__setjmp=yes
16683 else
16684 emacs_cv_func__setjmp=no
16686 rm -f core conftest.err conftest.$ac_objext \
16687 conftest$ac_exeext conftest.$ac_ext
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
16690 $as_echo "$emacs_cv_func__setjmp" >&6; }
16691 if test $emacs_cv_func__setjmp = yes; then
16693 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
16695 else
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
16697 $as_echo_n "checking for sigsetjmp... " >&6; }
16698 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
16699 $as_echo_n "(cached) " >&6
16700 else
16701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16702 /* end confdefs.h. */
16703 #include <setjmp.h>
16706 main ()
16708 sigjmp_buf j;
16709 if (! sigsetjmp (j, 1))
16710 siglongjmp (j, 1);
16712 return 0;
16714 _ACEOF
16715 if ac_fn_c_try_link "$LINENO"; then :
16716 emacs_cv_func_sigsetjmp=yes
16717 else
16718 emacs_cv_func_sigsetjmp=no
16720 rm -f core conftest.err conftest.$ac_objext \
16721 conftest$ac_exeext conftest.$ac_ext
16723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
16724 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
16725 if test $emacs_cv_func_sigsetjmp = yes; then
16727 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
16732 case $opsys in
16733 sol2* | unixware )
16735 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
16738 esac
16741 case $opsys in
16742 hpux* | sol2* )
16744 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
16747 esac
16755 case $opsys in
16756 aix4-2)
16757 $as_echo "#define USG /**/" >>confdefs.h
16759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16760 /* end confdefs.h. */
16762 #ifndef _AIX
16763 # error "_AIX not defined"
16764 #endif
16767 main ()
16771 return 0;
16773 _ACEOF
16774 if ac_fn_c_try_cpp "$LINENO"; then :
16776 else
16778 $as_echo "#define _AIX /**/" >>confdefs.h
16781 rm -f conftest.err conftest.$ac_ext
16784 cygwin)
16786 $as_echo "#define CYGWIN 1" >>confdefs.h
16790 darwin)
16792 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
16796 gnu-linux | gnu-kfreebsd )
16797 $as_echo "#define USG /**/" >>confdefs.h
16800 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
16804 hpux*)
16805 $as_echo "#define USG /**/" >>confdefs.h
16808 $as_echo "#define HPUX /**/" >>confdefs.h
16812 irix6-5)
16813 $as_echo "#define USG /**/" >>confdefs.h
16815 $as_echo "#define USG5_4 /**/" >>confdefs.h
16818 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
16822 mingw32)
16823 $as_echo "#define DOS_NT /**/" >>confdefs.h
16826 $as_echo "#define WINDOWSNT 1" >>confdefs.h
16828 if test "x$ac_enable_checking" != "x" ; then
16830 $as_echo "#define EMACSDEBUG 1" >>confdefs.h
16835 sol2*)
16836 $as_echo "#define USG /**/" >>confdefs.h
16838 $as_echo "#define USG5_4 /**/" >>confdefs.h
16841 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
16845 unixware)
16846 $as_echo "#define USG /**/" >>confdefs.h
16848 $as_echo "#define USG5_4 /**/" >>confdefs.h
16851 esac
16853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16854 $as_echo_n "checking for usable FIONREAD... " >&6; }
16855 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16856 $as_echo_n "(cached) " >&6
16857 else
16858 case $opsys in
16859 aix4-2)
16860 emacs_cv_usable_FIONREAD=no
16863 mingw32)
16864 emacs_cv_usable_FIONREAD=yes
16868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16869 /* end confdefs.h. */
16870 #include <sys/types.h>
16871 #include <sys/ioctl.h>
16872 #ifdef USG5_4
16873 # include <sys/filio.h>
16874 #endif
16877 main ()
16879 int foo = ioctl (0, FIONREAD, &foo);
16881 return 0;
16883 _ACEOF
16884 if ac_fn_c_try_compile "$LINENO"; then :
16885 emacs_cv_usable_FIONREAD=yes
16886 else
16887 emacs_cv_usable_FIONREAD=no
16889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16891 esac
16893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16894 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16895 if test $emacs_cv_usable_FIONREAD = yes; then
16897 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16900 if test $emacs_broken_SIGIO = no; then
16901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16902 $as_echo_n "checking for usable SIGIO... " >&6; }
16903 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16904 $as_echo_n "(cached) " >&6
16905 else
16906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16907 /* end confdefs.h. */
16908 #include <fcntl.h>
16909 #include <signal.h>
16912 main ()
16914 int foo = SIGIO | F_SETFL | FASYNC;
16916 return 0;
16918 _ACEOF
16919 if ac_fn_c_try_compile "$LINENO"; then :
16920 emacs_cv_usable_SIGIO=yes
16921 else
16922 emacs_cv_usable_SIGIO=no
16924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16927 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
16928 if test $emacs_cv_usable_SIGIO = yes; then
16930 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16937 case $opsys in
16938 cygwin)
16940 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
16944 hpux11)
16946 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
16950 irix6-5)
16952 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
16956 sol2-10)
16958 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
16961 esac
16963 # Set up the CFLAGS for real compilation, so we can substitute it.
16964 CFLAGS="$REAL_CFLAGS"
16965 CPPFLAGS="$REAL_CPPFLAGS"
16967 ## Hack to detect a buggy GCC version.
16968 if test "x$GCC" = xyes \
16969 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16970 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16971 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16972 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16975 version=$PACKAGE_VERSION
16977 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
16979 cat >>confdefs.h <<_ACEOF
16980 #define COPYRIGHT "$copyright"
16981 _ACEOF
16985 ### Specify what sort of things we'll be editing into Makefile and config.h.
16986 ### Use configuration here uncanonicalized to avoid exceeding size limits.
16989 ## Unused?
17012 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17013 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17014 ## end of LIBX_BASE, but nothing ever set it.
17019 ## Used in lwlib/Makefile.in.
17028 if test -n "${term_header}"; then
17030 cat >>confdefs.h <<_ACEOF
17031 #define TERM_HEADER "${term_header}"
17032 _ACEOF
17037 cat >>confdefs.h <<_ACEOF
17038 #define EMACS_CONFIGURATION "${canonical}"
17039 _ACEOF
17041 emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
17043 cat >>confdefs.h <<_ACEOF
17044 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
17045 _ACEOF
17049 case $opsys in
17050 mingw32)
17051 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17054 esac
17056 XMENU_OBJ=
17057 XOBJ=
17058 FONT_OBJ=
17059 if test "${HAVE_X_WINDOWS}" = "yes" ; then
17061 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
17063 XMENU_OBJ=xmenu.o
17064 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
17065 FONT_OBJ=xfont.o
17066 if test "$HAVE_XFT" = "yes"; then
17067 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17068 elif test "$HAVE_FREETYPE" = "yes"; then
17069 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17077 WIDGET_OBJ=
17078 MOTIF_LIBW=
17079 if test "${USE_X_TOOLKIT}" != "none" ; then
17080 WIDGET_OBJ=widget.o
17082 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17084 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17086 $as_echo "#define USE_LUCID 1" >>confdefs.h
17088 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
17090 $as_echo "#define USE_MOTIF 1" >>confdefs.h
17092 MOTIF_LIBW=-lXm
17093 case "$opsys" in
17094 gnu-linux)
17095 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17096 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17099 unixware)
17100 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17101 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17102 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17105 aix4-2)
17106 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17107 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17109 esac
17110 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17115 TOOLKIT_LIBW=
17116 case "$USE_X_TOOLKIT" in
17117 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17118 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17119 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17120 esac
17123 if test "${opsys}" != "mingw32"; then
17124 if test "$USE_X_TOOLKIT" = "none"; then
17125 LIBXT_OTHER="\$(LIBXSM)"
17126 OLDXMENU_TARGET="really-oldXMenu"
17127 else
17128 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17129 OLDXMENU_TARGET="really-lwlib"
17134 ## The X Menu stuff is present in the X10 distribution, but missing
17135 ## from X11. If we have X10, just use the installed library;
17136 ## otherwise, use our own copy.
17137 if test "${HAVE_X11}" = "yes" ; then
17139 $as_echo "#define HAVE_X11 1" >>confdefs.h
17142 if test "$USE_X_TOOLKIT" = "none"; then
17143 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17144 else
17145 OLDXMENU="\${lwlibdir}/liblw.a"
17147 LIBXMENU="\$(OLDXMENU)"
17148 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17149 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
17150 else
17151 ## For a syntactically valid Makefile; not actually used for anything.
17152 ## See comments in src/Makefile.in.
17153 OLDXMENU=nothing
17154 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17155 if test "${HAVE_X_WINDOWS}" = "yes"; then
17156 LIBXMENU="-lXMenu"
17157 else
17158 LIBXMENU=
17160 LIBX_OTHER=
17161 OLDXMENU_DEPS=
17164 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17165 OLDXMENU_TARGET=
17166 OLDXMENU=nothing
17167 LIBXMENU=
17168 OLDXMENU_DEPS=
17177 if test "${HAVE_MENUS}" = "yes" ; then
17179 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
17183 if test "${GNU_MALLOC}" = "yes" ; then
17185 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
17189 RALLOC_OBJ=
17190 if test "${REL_ALLOC}" = "yes" ; then
17192 $as_echo "#define REL_ALLOC 1" >>confdefs.h
17195 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17199 if test "$opsys" = "cygwin"; then
17200 CYGWIN_OBJ="sheap.o cygw32.o"
17201 ## Cygwin differs because of its unexec().
17202 PRE_ALLOC_OBJ=
17203 POST_ALLOC_OBJ=lastfile.o
17204 elif test "$opsys" = "mingw32"; then
17205 CYGWIN_OBJ=
17206 PRE_ALLOC_OBJ=
17207 POST_ALLOC_OBJ=lastfile.o
17208 else
17209 CYGWIN_OBJ=
17210 PRE_ALLOC_OBJ=lastfile.o
17211 POST_ALLOC_OBJ=
17217 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17218 # it temporarily reverts them to their pre-pkg-config values,
17219 # because gnulib needs to work with both src (which uses the
17220 # pkg-config stuff) and lib-src (which does not). For example, gnulib
17221 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17222 # and it therefore needs to run in an environment where LIBS does not
17223 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17224 # for some package unrelated to lib-src.
17225 SAVE_CFLAGS=$CFLAGS
17226 SAVE_LIBS=$LIBS
17227 CFLAGS=$pre_PKG_CONFIG_CFLAGS
17228 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
17240 LIBC_FATAL_STDERR_=1
17241 export LIBC_FATAL_STDERR_
17243 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17244 # for constant arguments. Useless!
17245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17246 $as_echo_n "checking for working alloca.h... " >&6; }
17247 if test "${ac_cv_working_alloca_h+set}" = set; then :
17248 $as_echo_n "(cached) " >&6
17249 else
17250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17251 /* end confdefs.h. */
17252 #include <alloca.h>
17254 main ()
17256 char *p = (char *) alloca (2 * sizeof (int));
17257 if (p) return 0;
17259 return 0;
17261 _ACEOF
17262 if ac_fn_c_try_link "$LINENO"; then :
17263 ac_cv_working_alloca_h=yes
17264 else
17265 ac_cv_working_alloca_h=no
17267 rm -f core conftest.err conftest.$ac_objext \
17268 conftest$ac_exeext conftest.$ac_ext
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17271 $as_echo "$ac_cv_working_alloca_h" >&6; }
17272 if test $ac_cv_working_alloca_h = yes; then
17274 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17279 $as_echo_n "checking for alloca... " >&6; }
17280 if test "${ac_cv_func_alloca_works+set}" = set; then :
17281 $as_echo_n "(cached) " >&6
17282 else
17283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17284 /* end confdefs.h. */
17285 #ifdef __GNUC__
17286 # define alloca __builtin_alloca
17287 #else
17288 # ifdef _MSC_VER
17289 # include <malloc.h>
17290 # define alloca _alloca
17291 # else
17292 # ifdef HAVE_ALLOCA_H
17293 # include <alloca.h>
17294 # else
17295 # ifdef _AIX
17296 #pragma alloca
17297 # else
17298 # ifndef alloca /* predefined by HP cc +Olibcalls */
17299 char *alloca ();
17300 # endif
17301 # endif
17302 # endif
17303 # endif
17304 #endif
17307 main ()
17309 char *p = (char *) alloca (1);
17310 if (p) return 0;
17312 return 0;
17314 _ACEOF
17315 if ac_fn_c_try_link "$LINENO"; then :
17316 ac_cv_func_alloca_works=yes
17317 else
17318 ac_cv_func_alloca_works=no
17320 rm -f core conftest.err conftest.$ac_objext \
17321 conftest$ac_exeext conftest.$ac_ext
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17324 $as_echo "$ac_cv_func_alloca_works" >&6; }
17326 if test $ac_cv_func_alloca_works = yes; then
17328 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17330 else
17331 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17332 # that cause trouble. Some versions do not even contain alloca or
17333 # contain a buggy version. If you still want to use their alloca,
17334 # use ar to extract alloca.o from them instead of compiling alloca.c.
17340 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
17342 $as_echo "#define C_ALLOCA 1" >>confdefs.h
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17346 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17347 if test "${ac_cv_os_cray+set}" = set; then :
17348 $as_echo_n "(cached) " >&6
17349 else
17350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17351 /* end confdefs.h. */
17352 #if defined CRAY && ! defined CRAY2
17353 webecray
17354 #else
17355 wenotbecray
17356 #endif
17358 _ACEOF
17359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17360 $EGREP "webecray" >/dev/null 2>&1; then :
17361 ac_cv_os_cray=yes
17362 else
17363 ac_cv_os_cray=no
17365 rm -f conftest*
17368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17369 $as_echo "$ac_cv_os_cray" >&6; }
17370 if test $ac_cv_os_cray = yes; then
17371 for ac_func in _getb67 GETB67 getb67; do
17372 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17373 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17374 eval as_val=\$$as_ac_var
17375 if test "x$as_val" = x""yes; then :
17377 cat >>confdefs.h <<_ACEOF
17378 #define CRAY_STACKSEG_END $ac_func
17379 _ACEOF
17381 break
17384 done
17387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17388 $as_echo_n "checking stack direction for C alloca... " >&6; }
17389 if test "${ac_cv_c_stack_direction+set}" = set; then :
17390 $as_echo_n "(cached) " >&6
17391 else
17392 if test "$cross_compiling" = yes; then :
17393 ac_cv_c_stack_direction=0
17394 else
17395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17396 /* end confdefs.h. */
17397 $ac_includes_default
17399 find_stack_direction (int *addr, int depth)
17401 int dir, dummy = 0;
17402 if (! addr)
17403 addr = &dummy;
17404 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17405 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17406 return dir + dummy;
17410 main (int argc, char **argv)
17412 return find_stack_direction (0, argc + !argv + 20) < 0;
17414 _ACEOF
17415 if ac_fn_c_try_run "$LINENO"; then :
17416 ac_cv_c_stack_direction=1
17417 else
17418 ac_cv_c_stack_direction=-1
17420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17421 conftest.$ac_objext conftest.beam conftest.$ac_ext
17425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17426 $as_echo "$ac_cv_c_stack_direction" >&6; }
17427 cat >>confdefs.h <<_ACEOF
17428 #define STACK_DIRECTION $ac_cv_c_stack_direction
17429 _ACEOF
17437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17438 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17439 if test "${ac_cv_c_bigendian+set}" = set; then :
17440 $as_echo_n "(cached) " >&6
17441 else
17442 ac_cv_c_bigendian=unknown
17443 # See if we're dealing with a universal compiler.
17444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17445 /* end confdefs.h. */
17446 #ifndef __APPLE_CC__
17447 not a universal capable compiler
17448 #endif
17449 typedef int dummy;
17451 _ACEOF
17452 if ac_fn_c_try_compile "$LINENO"; then :
17454 # Check for potential -arch flags. It is not universal unless
17455 # there are at least two -arch flags with different values.
17456 ac_arch=
17457 ac_prev=
17458 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17459 if test -n "$ac_prev"; then
17460 case $ac_word in
17461 i?86 | x86_64 | ppc | ppc64)
17462 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17463 ac_arch=$ac_word
17464 else
17465 ac_cv_c_bigendian=universal
17466 break
17469 esac
17470 ac_prev=
17471 elif test "x$ac_word" = "x-arch"; then
17472 ac_prev=arch
17474 done
17476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17477 if test $ac_cv_c_bigendian = unknown; then
17478 # See if sys/param.h defines the BYTE_ORDER macro.
17479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17480 /* end confdefs.h. */
17481 #include <sys/types.h>
17482 #include <sys/param.h>
17485 main ()
17487 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17488 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17489 && LITTLE_ENDIAN)
17490 bogus endian macros
17491 #endif
17494 return 0;
17496 _ACEOF
17497 if ac_fn_c_try_compile "$LINENO"; then :
17498 # It does; now see whether it defined to BIG_ENDIAN or not.
17499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17500 /* end confdefs.h. */
17501 #include <sys/types.h>
17502 #include <sys/param.h>
17505 main ()
17507 #if BYTE_ORDER != BIG_ENDIAN
17508 not big endian
17509 #endif
17512 return 0;
17514 _ACEOF
17515 if ac_fn_c_try_compile "$LINENO"; then :
17516 ac_cv_c_bigendian=yes
17517 else
17518 ac_cv_c_bigendian=no
17520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17524 if test $ac_cv_c_bigendian = unknown; then
17525 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17527 /* end confdefs.h. */
17528 #include <limits.h>
17531 main ()
17533 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17534 bogus endian macros
17535 #endif
17538 return 0;
17540 _ACEOF
17541 if ac_fn_c_try_compile "$LINENO"; then :
17542 # It does; now see whether it defined to _BIG_ENDIAN or not.
17543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17544 /* end confdefs.h. */
17545 #include <limits.h>
17548 main ()
17550 #ifndef _BIG_ENDIAN
17551 not big endian
17552 #endif
17555 return 0;
17557 _ACEOF
17558 if ac_fn_c_try_compile "$LINENO"; then :
17559 ac_cv_c_bigendian=yes
17560 else
17561 ac_cv_c_bigendian=no
17563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17567 if test $ac_cv_c_bigendian = unknown; then
17568 # Compile a test program.
17569 if test "$cross_compiling" = yes; then :
17570 # Try to guess by grepping values from an object file.
17571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17572 /* end confdefs.h. */
17573 short int ascii_mm[] =
17574 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17575 short int ascii_ii[] =
17576 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17577 int use_ascii (int i) {
17578 return ascii_mm[i] + ascii_ii[i];
17580 short int ebcdic_ii[] =
17581 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17582 short int ebcdic_mm[] =
17583 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17584 int use_ebcdic (int i) {
17585 return ebcdic_mm[i] + ebcdic_ii[i];
17587 extern int foo;
17590 main ()
17592 return use_ascii (foo) == use_ebcdic (foo);
17594 return 0;
17596 _ACEOF
17597 if ac_fn_c_try_compile "$LINENO"; then :
17598 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17599 ac_cv_c_bigendian=yes
17601 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17602 if test "$ac_cv_c_bigendian" = unknown; then
17603 ac_cv_c_bigendian=no
17604 else
17605 # finding both strings is unlikely to happen, but who knows?
17606 ac_cv_c_bigendian=unknown
17610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17611 else
17612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17613 /* end confdefs.h. */
17614 $ac_includes_default
17616 main ()
17619 /* Are we little or big endian? From Harbison&Steele. */
17620 union
17622 long int l;
17623 char c[sizeof (long int)];
17624 } u;
17625 u.l = 1;
17626 return u.c[sizeof (long int) - 1] == 1;
17629 return 0;
17631 _ACEOF
17632 if ac_fn_c_try_run "$LINENO"; then :
17633 ac_cv_c_bigendian=no
17634 else
17635 ac_cv_c_bigendian=yes
17637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17638 conftest.$ac_objext conftest.beam conftest.$ac_ext
17643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17644 $as_echo "$ac_cv_c_bigendian" >&6; }
17645 case $ac_cv_c_bigendian in #(
17646 yes)
17647 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17648 ;; #(
17650 ;; #(
17651 universal)
17653 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
17655 ;; #(
17657 as_fn_error "unknown endianness
17658 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17659 esac
17663 GNULIB_CHDIR=0;
17664 GNULIB_CHOWN=0;
17665 GNULIB_CLOSE=0;
17666 GNULIB_DUP=0;
17667 GNULIB_DUP2=0;
17668 GNULIB_DUP3=0;
17669 GNULIB_ENVIRON=0;
17670 GNULIB_EUIDACCESS=0;
17671 GNULIB_FACCESSAT=0;
17672 GNULIB_FCHDIR=0;
17673 GNULIB_FCHOWNAT=0;
17674 GNULIB_FDATASYNC=0;
17675 GNULIB_FSYNC=0;
17676 GNULIB_FTRUNCATE=0;
17677 GNULIB_GETCWD=0;
17678 GNULIB_GETDOMAINNAME=0;
17679 GNULIB_GETDTABLESIZE=0;
17680 GNULIB_GETGROUPS=0;
17681 GNULIB_GETHOSTNAME=0;
17682 GNULIB_GETLOGIN=0;
17683 GNULIB_GETLOGIN_R=0;
17684 GNULIB_GETPAGESIZE=0;
17685 GNULIB_GETUSERSHELL=0;
17686 GNULIB_GROUP_MEMBER=0;
17687 GNULIB_ISATTY=0;
17688 GNULIB_LCHOWN=0;
17689 GNULIB_LINK=0;
17690 GNULIB_LINKAT=0;
17691 GNULIB_LSEEK=0;
17692 GNULIB_PIPE=0;
17693 GNULIB_PIPE2=0;
17694 GNULIB_PREAD=0;
17695 GNULIB_PWRITE=0;
17696 GNULIB_READ=0;
17697 GNULIB_READLINK=0;
17698 GNULIB_READLINKAT=0;
17699 GNULIB_RMDIR=0;
17700 GNULIB_SETHOSTNAME=0;
17701 GNULIB_SLEEP=0;
17702 GNULIB_SYMLINK=0;
17703 GNULIB_SYMLINKAT=0;
17704 GNULIB_TTYNAME_R=0;
17705 GNULIB_UNISTD_H_NONBLOCKING=0;
17706 GNULIB_UNISTD_H_SIGPIPE=0;
17707 GNULIB_UNLINK=0;
17708 GNULIB_UNLINKAT=0;
17709 GNULIB_USLEEP=0;
17710 GNULIB_WRITE=0;
17711 HAVE_CHOWN=1;
17712 HAVE_DUP2=1;
17713 HAVE_DUP3=1;
17714 HAVE_EUIDACCESS=1;
17715 HAVE_FACCESSAT=1;
17716 HAVE_FCHDIR=1;
17717 HAVE_FCHOWNAT=1;
17718 HAVE_FDATASYNC=1;
17719 HAVE_FSYNC=1;
17720 HAVE_FTRUNCATE=1;
17721 HAVE_GETDTABLESIZE=1;
17722 HAVE_GETGROUPS=1;
17723 HAVE_GETHOSTNAME=1;
17724 HAVE_GETLOGIN=1;
17725 HAVE_GETPAGESIZE=1;
17726 HAVE_GROUP_MEMBER=1;
17727 HAVE_LCHOWN=1;
17728 HAVE_LINK=1;
17729 HAVE_LINKAT=1;
17730 HAVE_PIPE=1;
17731 HAVE_PIPE2=1;
17732 HAVE_PREAD=1;
17733 HAVE_PWRITE=1;
17734 HAVE_READLINK=1;
17735 HAVE_READLINKAT=1;
17736 HAVE_SETHOSTNAME=1;
17737 HAVE_SLEEP=1;
17738 HAVE_SYMLINK=1;
17739 HAVE_SYMLINKAT=1;
17740 HAVE_UNLINKAT=1;
17741 HAVE_USLEEP=1;
17742 HAVE_DECL_ENVIRON=1;
17743 HAVE_DECL_FCHDIR=1;
17744 HAVE_DECL_FDATASYNC=1;
17745 HAVE_DECL_GETDOMAINNAME=1;
17746 HAVE_DECL_GETLOGIN_R=1;
17747 HAVE_DECL_GETPAGESIZE=1;
17748 HAVE_DECL_GETUSERSHELL=1;
17749 HAVE_DECL_SETHOSTNAME=1;
17750 HAVE_DECL_TTYNAME_R=1;
17751 HAVE_OS_H=0;
17752 HAVE_SYS_PARAM_H=0;
17753 REPLACE_CHOWN=0;
17754 REPLACE_CLOSE=0;
17755 REPLACE_DUP=0;
17756 REPLACE_DUP2=0;
17757 REPLACE_FCHOWNAT=0;
17758 REPLACE_FTRUNCATE=0;
17759 REPLACE_GETCWD=0;
17760 REPLACE_GETDOMAINNAME=0;
17761 REPLACE_GETLOGIN_R=0;
17762 REPLACE_GETGROUPS=0;
17763 REPLACE_GETPAGESIZE=0;
17764 REPLACE_ISATTY=0;
17765 REPLACE_LCHOWN=0;
17766 REPLACE_LINK=0;
17767 REPLACE_LINKAT=0;
17768 REPLACE_LSEEK=0;
17769 REPLACE_PREAD=0;
17770 REPLACE_PWRITE=0;
17771 REPLACE_READ=0;
17772 REPLACE_READLINK=0;
17773 REPLACE_RMDIR=0;
17774 REPLACE_SLEEP=0;
17775 REPLACE_SYMLINK=0;
17776 REPLACE_TTYNAME_R=0;
17777 REPLACE_UNLINK=0;
17778 REPLACE_UNLINKAT=0;
17779 REPLACE_USLEEP=0;
17780 REPLACE_WRITE=0;
17781 UNISTD_H_HAVE_WINSOCK2_H=0;
17782 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
17786 GNULIB_OPENDIR=0;
17787 GNULIB_READDIR=0;
17788 GNULIB_REWINDDIR=0;
17789 GNULIB_CLOSEDIR=0;
17790 GNULIB_DIRFD=0;
17791 GNULIB_FDOPENDIR=0;
17792 GNULIB_SCANDIR=0;
17793 GNULIB_ALPHASORT=0;
17794 HAVE_OPENDIR=1;
17795 HAVE_READDIR=1;
17796 HAVE_REWINDDIR=1;
17797 HAVE_CLOSEDIR=1;
17798 HAVE_DECL_DIRFD=1;
17799 HAVE_DECL_FDOPENDIR=1;
17800 HAVE_FDOPENDIR=1;
17801 HAVE_SCANDIR=1;
17802 HAVE_ALPHASORT=1;
17803 REPLACE_OPENDIR=0;
17804 REPLACE_CLOSEDIR=0;
17805 REPLACE_DIRFD=0;
17806 REPLACE_FDOPENDIR=0;
17810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17811 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17812 if test "${gl_cv_have_include_next+set}" = set; then :
17813 $as_echo_n "(cached) " >&6
17814 else
17815 rm -rf conftestd1a conftestd1b conftestd2
17816 mkdir conftestd1a conftestd1b conftestd2
17817 cat <<EOF > conftestd1a/conftest.h
17818 #define DEFINED_IN_CONFTESTD1
17819 #include_next <conftest.h>
17820 #ifdef DEFINED_IN_CONFTESTD2
17821 int foo;
17822 #else
17823 #error "include_next doesn't work"
17824 #endif
17826 cat <<EOF > conftestd1b/conftest.h
17827 #define DEFINED_IN_CONFTESTD1
17828 #include <stdio.h>
17829 #include_next <conftest.h>
17830 #ifdef DEFINED_IN_CONFTESTD2
17831 int foo;
17832 #else
17833 #error "include_next doesn't work"
17834 #endif
17836 cat <<EOF > conftestd2/conftest.h
17837 #ifndef DEFINED_IN_CONFTESTD1
17838 #error "include_next test doesn't work"
17839 #endif
17840 #define DEFINED_IN_CONFTESTD2
17842 gl_save_CPPFLAGS="$CPPFLAGS"
17843 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17845 /* end confdefs.h. */
17846 #include <conftest.h>
17847 _ACEOF
17848 if ac_fn_c_try_compile "$LINENO"; then :
17849 gl_cv_have_include_next=yes
17850 else
17851 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17853 /* end confdefs.h. */
17854 #include <conftest.h>
17855 _ACEOF
17856 if ac_fn_c_try_compile "$LINENO"; then :
17857 gl_cv_have_include_next=buggy
17858 else
17859 gl_cv_have_include_next=no
17861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17865 CPPFLAGS="$gl_save_CPPFLAGS"
17866 rm -rf conftestd1a conftestd1b conftestd2
17869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17870 $as_echo "$gl_cv_have_include_next" >&6; }
17871 PRAGMA_SYSTEM_HEADER=
17872 if test $gl_cv_have_include_next = yes; then
17873 INCLUDE_NEXT=include_next
17874 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17875 if test -n "$GCC"; then
17876 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17878 else
17879 if test $gl_cv_have_include_next = buggy; then
17880 INCLUDE_NEXT=include
17881 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17882 else
17883 INCLUDE_NEXT=include
17884 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17891 $as_echo_n "checking whether system header files limit the line length... " >&6; }
17892 if test "${gl_cv_pragma_columns+set}" = set; then :
17893 $as_echo_n "(cached) " >&6
17894 else
17895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17896 /* end confdefs.h. */
17898 #ifdef __TANDEM
17899 choke me
17900 #endif
17902 _ACEOF
17903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17904 $EGREP "choke me" >/dev/null 2>&1; then :
17905 gl_cv_pragma_columns=yes
17906 else
17907 gl_cv_pragma_columns=no
17909 rm -f conftest*
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17914 $as_echo "$gl_cv_pragma_columns" >&6; }
17915 if test $gl_cv_pragma_columns = yes; then
17916 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17917 else
17918 PRAGMA_COLUMNS=
17925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17926 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
17927 if test "${gl_cv_func_c99_strtold+set}" = set; then :
17928 $as_echo_n "(cached) " >&6
17929 else
17930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17931 /* end confdefs.h. */
17932 /* On HP-UX before 11.23, strtold returns a struct instead of
17933 long double. Reject implementations like that, by requiring
17934 compatibility with the C99 prototype. */
17935 #include <stdlib.h>
17936 static long double (*p) (char const *, char **) = strtold;
17937 static long double
17938 test (char const *nptr, char **endptr)
17940 long double r;
17941 r = strtold (nptr, endptr);
17942 return r;
17945 main ()
17947 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
17949 return 0;
17951 _ACEOF
17952 if ac_fn_c_try_link "$LINENO"; then :
17953 gl_cv_func_c99_strtold=yes
17954 else
17955 gl_cv_func_c99_strtold=no
17957 rm -f core conftest.err conftest.$ac_objext \
17958 conftest$ac_exeext conftest.$ac_ext
17960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
17961 $as_echo "$gl_cv_func_c99_strtold" >&6; }
17962 if test $gl_cv_func_c99_strtold = yes; then
17964 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
17975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17976 $as_echo_n "checking if environ is properly declared... " >&6; }
17977 if test "${gt_cv_var_environ_declaration+set}" = set; then :
17978 $as_echo_n "(cached) " >&6
17979 else
17981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17982 /* end confdefs.h. */
17983 #if HAVE_UNISTD_H
17984 #include <unistd.h>
17985 #endif
17986 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
17987 #include <stdlib.h>
17989 extern struct { int foo; } environ;
17991 main ()
17993 environ.foo = 1;
17995 return 0;
17997 _ACEOF
17998 if ac_fn_c_try_compile "$LINENO"; then :
17999 gt_cv_var_environ_declaration=no
18000 else
18001 gt_cv_var_environ_declaration=yes
18003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18007 $as_echo "$gt_cv_var_environ_declaration" >&6; }
18008 if test $gt_cv_var_environ_declaration = yes; then
18010 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18015 if test $gt_cv_var_environ_declaration != yes; then
18016 HAVE_DECL_ENVIRON=0
18021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18022 $as_echo_n "checking for complete errno.h... " >&6; }
18023 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18024 $as_echo_n "(cached) " >&6
18025 else
18027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18028 /* end confdefs.h. */
18030 #include <errno.h>
18031 #if !defined ETXTBSY
18032 booboo
18033 #endif
18034 #if !defined ENOMSG
18035 booboo
18036 #endif
18037 #if !defined EIDRM
18038 booboo
18039 #endif
18040 #if !defined ENOLINK
18041 booboo
18042 #endif
18043 #if !defined EPROTO
18044 booboo
18045 #endif
18046 #if !defined EMULTIHOP
18047 booboo
18048 #endif
18049 #if !defined EBADMSG
18050 booboo
18051 #endif
18052 #if !defined EOVERFLOW
18053 booboo
18054 #endif
18055 #if !defined ENOTSUP
18056 booboo
18057 #endif
18058 #if !defined ENETRESET
18059 booboo
18060 #endif
18061 #if !defined ECONNABORTED
18062 booboo
18063 #endif
18064 #if !defined ESTALE
18065 booboo
18066 #endif
18067 #if !defined EDQUOT
18068 booboo
18069 #endif
18070 #if !defined ECANCELED
18071 booboo
18072 #endif
18073 #if !defined EOWNERDEAD
18074 booboo
18075 #endif
18076 #if !defined ENOTRECOVERABLE
18077 booboo
18078 #endif
18079 #if !defined EILSEQ
18080 booboo
18081 #endif
18083 _ACEOF
18084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18085 $EGREP "booboo" >/dev/null 2>&1; then :
18086 gl_cv_header_errno_h_complete=no
18087 else
18088 gl_cv_header_errno_h_complete=yes
18090 rm -f conftest*
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18095 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
18096 if test $gl_cv_header_errno_h_complete = yes; then
18097 ERRNO_H=''
18098 else
18107 if test $gl_cv_have_include_next = yes; then
18108 gl_cv_next_errno_h='<'errno.h'>'
18109 else
18110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18111 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
18112 if test "${gl_cv_next_errno_h+set}" = set; then :
18113 $as_echo_n "(cached) " >&6
18114 else
18116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18117 /* end confdefs.h. */
18118 #include <errno.h>
18120 _ACEOF
18121 case "$host_os" in
18122 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18123 *) gl_absname_cpp="$ac_cpp" ;;
18124 esac
18126 case "$host_os" in
18127 mingw*)
18128 gl_dirsep_regex='[/\\]'
18131 gl_dirsep_regex='\/'
18133 esac
18134 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18136 gl_header_literal_regex=`echo 'errno.h' \
18137 | sed -e "$gl_make_literal_regex_sed"`
18138 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18139 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18140 s|^/[^/]|//&|
18144 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18145 sed -n "$gl_absolute_header_sed"`'"'
18149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18150 $as_echo "$gl_cv_next_errno_h" >&6; }
18152 NEXT_ERRNO_H=$gl_cv_next_errno_h
18154 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18155 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18156 gl_next_as_first_directive='<'errno.h'>'
18157 else
18158 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18159 gl_next_as_first_directive=$gl_cv_next_errno_h
18161 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
18166 ERRNO_H='errno.h'
18169 if test -n "$ERRNO_H"; then
18170 GL_GENERATE_ERRNO_H_TRUE=
18171 GL_GENERATE_ERRNO_H_FALSE='#'
18172 else
18173 GL_GENERATE_ERRNO_H_TRUE='#'
18174 GL_GENERATE_ERRNO_H_FALSE=
18178 if test -n "$ERRNO_H"; then
18179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18180 $as_echo_n "checking for EMULTIHOP value... " >&6; }
18181 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18182 $as_echo_n "(cached) " >&6
18183 else
18185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18186 /* end confdefs.h. */
18188 #include <errno.h>
18189 #ifdef EMULTIHOP
18191 #endif
18193 _ACEOF
18194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18195 $EGREP "yes" >/dev/null 2>&1; then :
18196 gl_cv_header_errno_h_EMULTIHOP=yes
18197 else
18198 gl_cv_header_errno_h_EMULTIHOP=no
18200 rm -f conftest*
18202 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18204 /* end confdefs.h. */
18206 #define _XOPEN_SOURCE_EXTENDED 1
18207 #include <errno.h>
18208 #ifdef EMULTIHOP
18210 #endif
18212 _ACEOF
18213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18214 $EGREP "yes" >/dev/null 2>&1; then :
18215 gl_cv_header_errno_h_EMULTIHOP=hidden
18217 rm -f conftest*
18219 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18220 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18221 #define _XOPEN_SOURCE_EXTENDED 1
18222 #include <errno.h>
18223 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18224 #include <stdio.h>
18225 #include <stdlib.h>
18226 "; then :
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18235 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18236 case $gl_cv_header_errno_h_EMULTIHOP in
18237 yes | no)
18238 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18241 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18243 esac
18249 if test -n "$ERRNO_H"; then
18250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18251 $as_echo_n "checking for ENOLINK value... " >&6; }
18252 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
18253 $as_echo_n "(cached) " >&6
18254 else
18256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18257 /* end confdefs.h. */
18259 #include <errno.h>
18260 #ifdef ENOLINK
18262 #endif
18264 _ACEOF
18265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18266 $EGREP "yes" >/dev/null 2>&1; then :
18267 gl_cv_header_errno_h_ENOLINK=yes
18268 else
18269 gl_cv_header_errno_h_ENOLINK=no
18271 rm -f conftest*
18273 if test $gl_cv_header_errno_h_ENOLINK = no; then
18274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18275 /* end confdefs.h. */
18277 #define _XOPEN_SOURCE_EXTENDED 1
18278 #include <errno.h>
18279 #ifdef ENOLINK
18281 #endif
18283 _ACEOF
18284 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18285 $EGREP "yes" >/dev/null 2>&1; then :
18286 gl_cv_header_errno_h_ENOLINK=hidden
18288 rm -f conftest*
18290 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18291 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18292 #define _XOPEN_SOURCE_EXTENDED 1
18293 #include <errno.h>
18294 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18295 #include <stdio.h>
18296 #include <stdlib.h>
18297 "; then :
18305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18306 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18307 case $gl_cv_header_errno_h_ENOLINK in
18308 yes | no)
18309 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18312 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18314 esac
18320 if test -n "$ERRNO_H"; then
18321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18322 $as_echo_n "checking for EOVERFLOW value... " >&6; }
18323 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18324 $as_echo_n "(cached) " >&6
18325 else
18327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18328 /* end confdefs.h. */
18330 #include <errno.h>
18331 #ifdef EOVERFLOW
18333 #endif
18335 _ACEOF
18336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18337 $EGREP "yes" >/dev/null 2>&1; then :
18338 gl_cv_header_errno_h_EOVERFLOW=yes
18339 else
18340 gl_cv_header_errno_h_EOVERFLOW=no
18342 rm -f conftest*
18344 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18346 /* end confdefs.h. */
18348 #define _XOPEN_SOURCE_EXTENDED 1
18349 #include <errno.h>
18350 #ifdef EOVERFLOW
18352 #endif
18354 _ACEOF
18355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18356 $EGREP "yes" >/dev/null 2>&1; then :
18357 gl_cv_header_errno_h_EOVERFLOW=hidden
18359 rm -f conftest*
18361 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18362 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18363 #define _XOPEN_SOURCE_EXTENDED 1
18364 #include <errno.h>
18365 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18366 #include <stdio.h>
18367 #include <stdlib.h>
18368 "; then :
18376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18377 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18378 case $gl_cv_header_errno_h_EOVERFLOW in
18379 yes | no)
18380 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18383 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18385 esac
18399 GNULIB_FCNTL=0;
18400 GNULIB_NONBLOCKING=0;
18401 GNULIB_OPEN=0;
18402 GNULIB_OPENAT=0;
18403 HAVE_FCNTL=1;
18404 HAVE_OPENAT=1;
18405 REPLACE_FCNTL=0;
18406 REPLACE_OPEN=0;
18407 REPLACE_OPENAT=0;
18412 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18413 if test "x$ac_cv_type_mode_t" = x""yes; then :
18415 else
18417 cat >>confdefs.h <<_ACEOF
18418 #define mode_t int
18419 _ACEOF
18423 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18424 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18425 ac_have_decl=1
18426 else
18427 ac_have_decl=0
18430 cat >>confdefs.h <<_ACEOF
18431 #define HAVE_DECL_FDATASYNC $ac_have_decl
18432 _ACEOF
18436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18437 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18438 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18439 $as_echo_n "(cached) " >&6
18440 else
18441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18442 /* end confdefs.h. */
18444 #include <sys/types.h>
18445 #include <sys/stat.h>
18447 main ()
18449 struct stat s; s.st_dm_mode;
18451 return 0;
18453 _ACEOF
18454 if ac_fn_c_try_compile "$LINENO"; then :
18455 ac_cv_struct_st_dm_mode=yes
18456 else
18457 ac_cv_struct_st_dm_mode=no
18459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18462 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18464 if test $ac_cv_struct_st_dm_mode = yes; then
18466 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18471 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18472 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18473 ac_have_decl=1
18474 else
18475 ac_have_decl=0
18478 cat >>confdefs.h <<_ACEOF
18479 #define HAVE_DECL_STRMODE $ac_have_decl
18480 _ACEOF
18487 GNULIB_FCHMODAT=0;
18488 GNULIB_FSTAT=0;
18489 GNULIB_FSTATAT=0;
18490 GNULIB_FUTIMENS=0;
18491 GNULIB_LCHMOD=0;
18492 GNULIB_LSTAT=0;
18493 GNULIB_MKDIRAT=0;
18494 GNULIB_MKFIFO=0;
18495 GNULIB_MKFIFOAT=0;
18496 GNULIB_MKNOD=0;
18497 GNULIB_MKNODAT=0;
18498 GNULIB_STAT=0;
18499 GNULIB_UTIMENSAT=0;
18500 HAVE_FCHMODAT=1;
18501 HAVE_FSTATAT=1;
18502 HAVE_FUTIMENS=1;
18503 HAVE_LCHMOD=1;
18504 HAVE_LSTAT=1;
18505 HAVE_MKDIRAT=1;
18506 HAVE_MKFIFO=1;
18507 HAVE_MKFIFOAT=1;
18508 HAVE_MKNOD=1;
18509 HAVE_MKNODAT=1;
18510 HAVE_UTIMENSAT=1;
18511 REPLACE_FSTAT=0;
18512 REPLACE_FSTATAT=0;
18513 REPLACE_FUTIMENS=0;
18514 REPLACE_LSTAT=0;
18515 REPLACE_MKDIR=0;
18516 REPLACE_MKFIFO=0;
18517 REPLACE_MKNOD=0;
18518 REPLACE_STAT=0;
18519 REPLACE_UTIMENSAT=0;
18522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18523 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18524 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18525 $as_echo_n "(cached) " >&6
18526 else
18527 rm -f conftest.sym conftest.file
18528 echo >conftest.file
18529 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18530 if test "$cross_compiling" = yes; then :
18531 case "$host_os" in
18532 # Guess yes on glibc systems.
18533 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18534 # If we don't know, assume the worst.
18535 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18536 esac
18538 else
18539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18540 /* end confdefs.h. */
18541 $ac_includes_default
18543 main ()
18545 struct stat sbuf;
18546 /* Linux will dereference the symlink and fail, as required by
18547 POSIX. That is better in the sense that it means we will not
18548 have to compile and use the lstat wrapper. */
18549 return lstat ("conftest.sym/", &sbuf) == 0;
18552 return 0;
18554 _ACEOF
18555 if ac_fn_c_try_run "$LINENO"; then :
18556 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18557 else
18558 gl_cv_func_lstat_dereferences_slashed_symlink=no
18560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18561 conftest.$ac_objext conftest.beam conftest.$ac_ext
18564 else
18565 # If the 'ln -s' command failed, then we probably don't even
18566 # have an lstat function.
18567 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18569 rm -f conftest.sym conftest.file
18572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18573 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18574 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18575 *yes)
18577 cat >>confdefs.h <<_ACEOF
18578 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18579 _ACEOF
18582 esac
18589 GNULIB__EXIT=0;
18590 GNULIB_ATOLL=0;
18591 GNULIB_CALLOC_POSIX=0;
18592 GNULIB_CANONICALIZE_FILE_NAME=0;
18593 GNULIB_GETLOADAVG=0;
18594 GNULIB_GETSUBOPT=0;
18595 GNULIB_GRANTPT=0;
18596 GNULIB_MALLOC_POSIX=0;
18597 GNULIB_MBTOWC=0;
18598 GNULIB_MKDTEMP=0;
18599 GNULIB_MKOSTEMP=0;
18600 GNULIB_MKOSTEMPS=0;
18601 GNULIB_MKSTEMP=0;
18602 GNULIB_MKSTEMPS=0;
18603 GNULIB_POSIX_OPENPT=0;
18604 GNULIB_PTSNAME=0;
18605 GNULIB_PTSNAME_R=0;
18606 GNULIB_PUTENV=0;
18607 GNULIB_RANDOM=0;
18608 GNULIB_RANDOM_R=0;
18609 GNULIB_REALLOC_POSIX=0;
18610 GNULIB_REALPATH=0;
18611 GNULIB_RPMATCH=0;
18612 GNULIB_SECURE_GETENV=0;
18613 GNULIB_SETENV=0;
18614 GNULIB_STRTOD=0;
18615 GNULIB_STRTOLL=0;
18616 GNULIB_STRTOULL=0;
18617 GNULIB_SYSTEM_POSIX=0;
18618 GNULIB_UNLOCKPT=0;
18619 GNULIB_UNSETENV=0;
18620 GNULIB_WCTOMB=0;
18621 HAVE__EXIT=1;
18622 HAVE_ATOLL=1;
18623 HAVE_CANONICALIZE_FILE_NAME=1;
18624 HAVE_DECL_GETLOADAVG=1;
18625 HAVE_GETSUBOPT=1;
18626 HAVE_GRANTPT=1;
18627 HAVE_MKDTEMP=1;
18628 HAVE_MKOSTEMP=1;
18629 HAVE_MKOSTEMPS=1;
18630 HAVE_MKSTEMP=1;
18631 HAVE_MKSTEMPS=1;
18632 HAVE_POSIX_OPENPT=1;
18633 HAVE_PTSNAME=1;
18634 HAVE_PTSNAME_R=1;
18635 HAVE_RANDOM=1;
18636 HAVE_RANDOM_H=1;
18637 HAVE_RANDOM_R=1;
18638 HAVE_REALPATH=1;
18639 HAVE_RPMATCH=1;
18640 HAVE_SECURE_GETENV=1;
18641 HAVE_SETENV=1;
18642 HAVE_DECL_SETENV=1;
18643 HAVE_STRTOD=1;
18644 HAVE_STRTOLL=1;
18645 HAVE_STRTOULL=1;
18646 HAVE_STRUCT_RANDOM_DATA=1;
18647 HAVE_SYS_LOADAVG_H=0;
18648 HAVE_UNLOCKPT=1;
18649 HAVE_DECL_UNSETENV=1;
18650 REPLACE_CALLOC=0;
18651 REPLACE_CANONICALIZE_FILE_NAME=0;
18652 REPLACE_MALLOC=0;
18653 REPLACE_MBTOWC=0;
18654 REPLACE_MKSTEMP=0;
18655 REPLACE_PTSNAME=0;
18656 REPLACE_PTSNAME_R=0;
18657 REPLACE_PUTENV=0;
18658 REPLACE_RANDOM_R=0;
18659 REPLACE_REALLOC=0;
18660 REPLACE_REALPATH=0;
18661 REPLACE_SETENV=0;
18662 REPLACE_STRTOD=0;
18663 REPLACE_UNSETENV=0;
18664 REPLACE_WCTOMB=0;
18681 if test $gl_cv_have_include_next = yes; then
18682 gl_cv_next_getopt_h='<'getopt.h'>'
18683 else
18684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18685 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
18686 if test "${gl_cv_next_getopt_h+set}" = set; then :
18687 $as_echo_n "(cached) " >&6
18688 else
18690 if test $ac_cv_header_getopt_h = yes; then
18693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18694 /* end confdefs.h. */
18695 #include <getopt.h>
18697 _ACEOF
18698 case "$host_os" in
18699 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18700 *) gl_absname_cpp="$ac_cpp" ;;
18701 esac
18703 case "$host_os" in
18704 mingw*)
18705 gl_dirsep_regex='[/\\]'
18708 gl_dirsep_regex='\/'
18710 esac
18711 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18713 gl_header_literal_regex=`echo 'getopt.h' \
18714 | sed -e "$gl_make_literal_regex_sed"`
18715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18717 s|^/[^/]|//&|
18721 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18722 sed -n "$gl_absolute_header_sed"`'"'
18723 else
18724 gl_cv_next_getopt_h='<'getopt.h'>'
18729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18730 $as_echo "$gl_cv_next_getopt_h" >&6; }
18732 NEXT_GETOPT_H=$gl_cv_next_getopt_h
18734 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18735 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18736 gl_next_as_first_directive='<'getopt.h'>'
18737 else
18738 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18739 gl_next_as_first_directive=$gl_cv_next_getopt_h
18741 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
18746 if test $ac_cv_header_getopt_h = yes; then
18747 HAVE_GETOPT_H=1
18748 else
18749 HAVE_GETOPT_H=0
18753 gl_replace_getopt=
18755 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18756 for ac_header in getopt.h
18757 do :
18758 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18759 if test "x$ac_cv_header_getopt_h" = x""yes; then :
18760 cat >>confdefs.h <<_ACEOF
18761 #define HAVE_GETOPT_H 1
18762 _ACEOF
18764 else
18765 gl_replace_getopt=yes
18768 done
18772 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18773 for ac_func in getopt_long_only
18774 do :
18775 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18776 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
18777 cat >>confdefs.h <<_ACEOF
18778 #define HAVE_GETOPT_LONG_ONLY 1
18779 _ACEOF
18781 else
18782 gl_replace_getopt=yes
18784 done
18788 if test -z "$gl_replace_getopt"; then
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18790 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
18791 if test "${gl_cv_func_getopt_posix+set}" = set; then :
18792 $as_echo_n "(cached) " >&6
18793 else
18795 if test $cross_compiling = no; then
18796 if test "$cross_compiling" = yes; then :
18797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18798 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18799 as_fn_error "cannot run test program while cross compiling
18800 See \`config.log' for more details." "$LINENO" 5; }
18801 else
18802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18803 /* end confdefs.h. */
18805 #include <unistd.h>
18806 #include <stdlib.h>
18807 #include <string.h>
18810 main ()
18812 static char program[] = "program";
18813 static char a[] = "-a";
18814 static char foo[] = "foo";
18815 static char bar[] = "bar";
18816 char *argv[] = { program, a, foo, bar, NULL };
18817 int c;
18819 c = getopt (4, argv, "ab");
18820 if (!(c == 'a'))
18821 return 1;
18822 c = getopt (4, argv, "ab");
18823 if (!(c == -1))
18824 return 2;
18825 if (!(optind == 2))
18826 return 3;
18827 return 0;
18830 _ACEOF
18831 if ac_fn_c_try_run "$LINENO"; then :
18832 gl_cv_func_getopt_posix=maybe
18833 else
18834 gl_cv_func_getopt_posix=no
18836 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18837 conftest.$ac_objext conftest.beam conftest.$ac_ext
18840 if test $gl_cv_func_getopt_posix = maybe; then
18841 if test "$cross_compiling" = yes; then :
18842 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18843 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18844 as_fn_error "cannot run test program while cross compiling
18845 See \`config.log' for more details." "$LINENO" 5; }
18846 else
18847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848 /* end confdefs.h. */
18850 #include <unistd.h>
18851 #include <stdlib.h>
18852 #include <string.h>
18855 main ()
18857 static char program[] = "program";
18858 static char donald[] = "donald";
18859 static char p[] = "-p";
18860 static char billy[] = "billy";
18861 static char duck[] = "duck";
18862 static char a[] = "-a";
18863 static char bar[] = "bar";
18864 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
18865 int c;
18867 c = getopt (7, argv, "+abp:q:");
18868 if (!(c == -1))
18869 return 4;
18870 if (!(strcmp (argv[0], "program") == 0))
18871 return 5;
18872 if (!(strcmp (argv[1], "donald") == 0))
18873 return 6;
18874 if (!(strcmp (argv[2], "-p") == 0))
18875 return 7;
18876 if (!(strcmp (argv[3], "billy") == 0))
18877 return 8;
18878 if (!(strcmp (argv[4], "duck") == 0))
18879 return 9;
18880 if (!(strcmp (argv[5], "-a") == 0))
18881 return 10;
18882 if (!(strcmp (argv[6], "bar") == 0))
18883 return 11;
18884 if (!(optind == 1))
18885 return 12;
18886 return 0;
18889 _ACEOF
18890 if ac_fn_c_try_run "$LINENO"; then :
18891 gl_cv_func_getopt_posix=maybe
18892 else
18893 gl_cv_func_getopt_posix=no
18895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18896 conftest.$ac_objext conftest.beam conftest.$ac_ext
18900 if test $gl_cv_func_getopt_posix = maybe; then
18901 if test "$cross_compiling" = yes; then :
18902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18903 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18904 as_fn_error "cannot run test program while cross compiling
18905 See \`config.log' for more details." "$LINENO" 5; }
18906 else
18907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18908 /* end confdefs.h. */
18910 #include <unistd.h>
18911 #include <stdlib.h>
18912 #include <string.h>
18915 main ()
18917 static char program[] = "program";
18918 static char ab[] = "-ab";
18919 char *argv[3] = { program, ab, NULL };
18920 if (getopt (2, argv, "ab:") != 'a')
18921 return 13;
18922 if (getopt (2, argv, "ab:") != '?')
18923 return 14;
18924 if (optopt != 'b')
18925 return 15;
18926 if (optind != 2)
18927 return 16;
18928 return 0;
18931 _ACEOF
18932 if ac_fn_c_try_run "$LINENO"; then :
18933 gl_cv_func_getopt_posix=yes
18934 else
18935 gl_cv_func_getopt_posix=no
18937 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18938 conftest.$ac_objext conftest.beam conftest.$ac_ext
18942 else
18943 case "$host_os" in
18944 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
18945 *) gl_cv_func_getopt_posix="guessing yes";;
18946 esac
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
18951 $as_echo "$gl_cv_func_getopt_posix" >&6; }
18952 case "$gl_cv_func_getopt_posix" in
18953 *no) gl_replace_getopt=yes ;;
18954 esac
18957 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
18959 $as_echo_n "checking for working GNU getopt function... " >&6; }
18960 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
18961 $as_echo_n "(cached) " >&6
18962 else
18963 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
18964 # optstring is necessary for programs like m4 that have POSIX-mandated
18965 # semantics for supporting options interspersed with files.
18966 # Also, since getopt_long is a GNU extension, we require optind=0.
18967 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
18968 # so take care to revert to the correct (non-)export state.
18969 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
18970 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
18971 xx) gl_had_POSIXLY_CORRECT=exported ;;
18972 x) gl_had_POSIXLY_CORRECT=yes ;;
18973 *) gl_had_POSIXLY_CORRECT= ;;
18974 esac
18975 POSIXLY_CORRECT=1
18976 export POSIXLY_CORRECT
18977 if test "$cross_compiling" = yes; then :
18978 gl_cv_func_getopt_gnu="guessing no"
18980 else
18981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18982 /* end confdefs.h. */
18983 #include <getopt.h>
18984 #include <stddef.h>
18985 #include <string.h>
18987 #include <stdlib.h>
18988 #if defined __MACH__ && defined __APPLE__
18989 /* Avoid a crash on Mac OS X. */
18990 #include <mach/mach.h>
18991 #include <mach/mach_error.h>
18992 #include <mach/thread_status.h>
18993 #include <mach/exception.h>
18994 #include <mach/task.h>
18995 #include <pthread.h>
18996 /* The exception port on which our thread listens. */
18997 static mach_port_t our_exception_port;
18998 /* The main function of the thread listening for exceptions of type
18999 EXC_BAD_ACCESS. */
19000 static void *
19001 mach_exception_thread (void *arg)
19003 /* Buffer for a message to be received. */
19004 struct {
19005 mach_msg_header_t head;
19006 mach_msg_body_t msgh_body;
19007 char data[1024];
19008 } msg;
19009 mach_msg_return_t retval;
19010 /* Wait for a message on the exception port. */
19011 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19012 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19013 if (retval != MACH_MSG_SUCCESS)
19014 abort ();
19015 exit (1);
19017 static void
19018 nocrash_init (void)
19020 mach_port_t self = mach_task_self ();
19021 /* Allocate a port on which the thread shall listen for exceptions. */
19022 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19023 == KERN_SUCCESS) {
19024 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19025 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19026 MACH_MSG_TYPE_MAKE_SEND)
19027 == KERN_SUCCESS) {
19028 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19029 for us. */
19030 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19031 /* Create the thread listening on the exception port. */
19032 pthread_attr_t attr;
19033 pthread_t thread;
19034 if (pthread_attr_init (&attr) == 0
19035 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19036 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19037 pthread_attr_destroy (&attr);
19038 /* Replace the exception port info for these exceptions with our own.
19039 Note that we replace the exception port for the entire task, not only
19040 for a particular thread. This has the effect that when our exception
19041 port gets the message, the thread specific exception port has already
19042 been asked, and we don't need to bother about it.
19043 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19044 task_set_exception_ports (self, mask, our_exception_port,
19045 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19050 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19051 /* Avoid a crash on native Windows. */
19052 #define WIN32_LEAN_AND_MEAN
19053 #include <windows.h>
19054 #include <winerror.h>
19055 static LONG WINAPI
19056 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19058 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19060 case EXCEPTION_ACCESS_VIOLATION:
19061 case EXCEPTION_IN_PAGE_ERROR:
19062 case EXCEPTION_STACK_OVERFLOW:
19063 case EXCEPTION_GUARD_PAGE:
19064 case EXCEPTION_PRIV_INSTRUCTION:
19065 case EXCEPTION_ILLEGAL_INSTRUCTION:
19066 case EXCEPTION_DATATYPE_MISALIGNMENT:
19067 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19068 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19069 exit (1);
19071 return EXCEPTION_CONTINUE_SEARCH;
19073 static void
19074 nocrash_init (void)
19076 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19078 #else
19079 /* Avoid a crash on POSIX systems. */
19080 #include <signal.h>
19081 /* A POSIX signal handler. */
19082 static void
19083 exception_handler (int sig)
19085 exit (1);
19087 static void
19088 nocrash_init (void)
19090 #ifdef SIGSEGV
19091 signal (SIGSEGV, exception_handler);
19092 #endif
19093 #ifdef SIGBUS
19094 signal (SIGBUS, exception_handler);
19095 #endif
19097 #endif
19101 main ()
19104 int result = 0;
19106 nocrash_init();
19108 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19109 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19110 OSF/1 5.1, Solaris 10. */
19112 static char conftest[] = "conftest";
19113 static char plus[] = "-+";
19114 char *argv[3] = { conftest, plus, NULL };
19115 opterr = 0;
19116 if (getopt (2, argv, "+a") != '?')
19117 result |= 1;
19119 /* This code succeeds on glibc 2.8, mingw,
19120 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19121 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19123 static char program[] = "program";
19124 static char p[] = "-p";
19125 static char foo[] = "foo";
19126 static char bar[] = "bar";
19127 char *argv[] = { program, p, foo, bar, NULL };
19129 optind = 1;
19130 if (getopt (4, argv, "p::") != 'p')
19131 result |= 2;
19132 else if (optarg != NULL)
19133 result |= 4;
19134 else if (getopt (4, argv, "p::") != -1)
19135 result |= 6;
19136 else if (optind != 2)
19137 result |= 8;
19139 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19141 static char program[] = "program";
19142 static char foo[] = "foo";
19143 static char p[] = "-p";
19144 char *argv[] = { program, foo, p, NULL };
19145 optind = 0;
19146 if (getopt (3, argv, "-p") != 1)
19147 result |= 16;
19148 else if (getopt (3, argv, "-p") != 'p')
19149 result |= 16;
19151 /* This code fails on glibc 2.11. */
19153 static char program[] = "program";
19154 static char b[] = "-b";
19155 static char a[] = "-a";
19156 char *argv[] = { program, b, a, NULL };
19157 optind = opterr = 0;
19158 if (getopt (3, argv, "+:a:b") != 'b')
19159 result |= 32;
19160 else if (getopt (3, argv, "+:a:b") != ':')
19161 result |= 32;
19163 /* This code dumps core on glibc 2.14. */
19165 static char program[] = "program";
19166 static char w[] = "-W";
19167 static char dummy[] = "dummy";
19168 char *argv[] = { program, w, dummy, NULL };
19169 optind = opterr = 1;
19170 if (getopt (3, argv, "W;") != 'W')
19171 result |= 64;
19173 return result;
19176 return 0;
19178 _ACEOF
19179 if ac_fn_c_try_run "$LINENO"; then :
19180 gl_cv_func_getopt_gnu=yes
19181 else
19182 gl_cv_func_getopt_gnu=no
19184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19185 conftest.$ac_objext conftest.beam conftest.$ac_ext
19188 case $gl_had_POSIXLY_CORRECT in
19189 exported) ;;
19190 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19191 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19192 esac
19195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19196 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
19197 if test "$gl_cv_func_getopt_gnu" != yes; then
19198 gl_replace_getopt=yes
19199 else
19200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19201 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
19202 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
19203 $as_echo_n "(cached) " >&6
19204 else
19205 if test "$cross_compiling" = yes; then :
19206 case "$host_os" in
19207 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19208 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19209 esac
19211 else
19212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19213 /* end confdefs.h. */
19214 #include <getopt.h>
19215 #include <stddef.h>
19216 #include <string.h>
19219 main ()
19221 static const struct option long_options[] =
19223 { "xtremely-",no_argument, NULL, 1003 },
19224 { "xtra", no_argument, NULL, 1001 },
19225 { "xtreme", no_argument, NULL, 1002 },
19226 { "xtremely", no_argument, NULL, 1003 },
19227 { NULL, 0, NULL, 0 }
19229 /* This code fails on OpenBSD 5.0. */
19231 static char program[] = "program";
19232 static char xtremel[] = "--xtremel";
19233 char *argv[] = { program, xtremel, NULL };
19234 int option_index;
19235 optind = 1; opterr = 0;
19236 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19237 return 1;
19239 return 0;
19242 return 0;
19244 _ACEOF
19245 if ac_fn_c_try_run "$LINENO"; then :
19246 gl_cv_func_getopt_long_gnu=yes
19247 else
19248 gl_cv_func_getopt_long_gnu=no
19250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19251 conftest.$ac_objext conftest.beam conftest.$ac_ext
19256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19257 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19258 case "$gl_cv_func_getopt_long_gnu" in
19259 *yes) ;;
19260 *) gl_replace_getopt=yes ;;
19261 esac
19270 REPLACE_GETOPT=0
19271 if test -n "$gl_replace_getopt"; then
19272 REPLACE_GETOPT=1
19275 if test $REPLACE_GETOPT = 1; then
19277 GETOPT_H=getopt.h
19279 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
19285 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19286 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19287 ac_have_decl=1
19288 else
19289 ac_have_decl=0
19292 cat >>confdefs.h <<_ACEOF
19293 #define HAVE_DECL_GETENV $ac_have_decl
19294 _ACEOF
19301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19302 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19303 if test "${ac_cv_c_restrict+set}" = set; then :
19304 $as_echo_n "(cached) " >&6
19305 else
19306 ac_cv_c_restrict=no
19307 # The order here caters to the fact that C++ does not require restrict.
19308 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19310 /* end confdefs.h. */
19311 typedef int * int_ptr;
19312 int foo (int_ptr $ac_kw ip) {
19313 return ip[0];
19316 main ()
19318 int s[1];
19319 int * $ac_kw t = s;
19320 t[0] = 0;
19321 return foo(t)
19323 return 0;
19325 _ACEOF
19326 if ac_fn_c_try_compile "$LINENO"; then :
19327 ac_cv_c_restrict=$ac_kw
19329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19330 test "$ac_cv_c_restrict" != no && break
19331 done
19334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19335 $as_echo "$ac_cv_c_restrict" >&6; }
19337 case $ac_cv_c_restrict in
19338 restrict) ;;
19339 no) $as_echo "#define restrict /**/" >>confdefs.h
19341 *) cat >>confdefs.h <<_ACEOF
19342 #define restrict $ac_cv_c_restrict
19343 _ACEOF
19345 esac
19348 GNULIB_GETTIMEOFDAY=0;
19349 HAVE_GETTIMEOFDAY=1;
19350 HAVE_STRUCT_TIMEVAL=1;
19351 HAVE_SYS_TIME_H=1;
19352 REPLACE_GETTIMEOFDAY=0;
19353 REPLACE_STRUCT_TIMEVAL=0;
19370 if test $gl_cv_have_include_next = yes; then
19371 gl_cv_next_sys_time_h='<'sys/time.h'>'
19372 else
19373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19374 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19375 if test "${gl_cv_next_sys_time_h+set}" = set; then :
19376 $as_echo_n "(cached) " >&6
19377 else
19379 if test $ac_cv_header_sys_time_h = yes; then
19382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19383 /* end confdefs.h. */
19384 #include <sys/time.h>
19386 _ACEOF
19387 case "$host_os" in
19388 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19389 *) gl_absname_cpp="$ac_cpp" ;;
19390 esac
19392 case "$host_os" in
19393 mingw*)
19394 gl_dirsep_regex='[/\\]'
19397 gl_dirsep_regex='\/'
19399 esac
19400 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19402 gl_header_literal_regex=`echo 'sys/time.h' \
19403 | sed -e "$gl_make_literal_regex_sed"`
19404 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19405 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19406 s|^/[^/]|//&|
19410 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19411 sed -n "$gl_absolute_header_sed"`'"'
19412 else
19413 gl_cv_next_sys_time_h='<'sys/time.h'>'
19418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19419 $as_echo "$gl_cv_next_sys_time_h" >&6; }
19421 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
19423 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19425 gl_next_as_first_directive='<'sys/time.h'>'
19426 else
19427 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19428 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19430 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
19436 if test $ac_cv_header_sys_time_h != yes; then
19437 HAVE_SYS_TIME_H=0
19444 if test $ac_cv_header_sys_socket_h != yes; then
19445 for ac_header in winsock2.h
19446 do :
19447 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19448 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19449 cat >>confdefs.h <<_ACEOF
19450 #define HAVE_WINSOCK2_H 1
19451 _ACEOF
19455 done
19458 if test "$ac_cv_header_winsock2_h" = yes; then
19459 HAVE_WINSOCK2_H=1
19460 UNISTD_H_HAVE_WINSOCK2_H=1
19461 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19462 else
19463 HAVE_WINSOCK2_H=0
19467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19468 $as_echo_n "checking for struct timeval... " >&6; }
19469 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19470 $as_echo_n "(cached) " >&6
19471 else
19472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19473 /* end confdefs.h. */
19474 #if HAVE_SYS_TIME_H
19475 #include <sys/time.h>
19476 #endif
19477 #include <time.h>
19478 #if HAVE_WINSOCK2_H
19479 # include <winsock2.h>
19480 #endif
19483 main ()
19485 static struct timeval x; x.tv_sec = x.tv_usec;
19487 return 0;
19489 _ACEOF
19490 if ac_fn_c_try_compile "$LINENO"; then :
19491 gl_cv_sys_struct_timeval=yes
19492 else
19493 gl_cv_sys_struct_timeval=no
19495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19499 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
19500 if test $gl_cv_sys_struct_timeval != yes; then
19501 HAVE_STRUCT_TIMEVAL=0
19502 else
19503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19504 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19505 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19506 $as_echo_n "(cached) " >&6
19507 else
19508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19509 /* end confdefs.h. */
19510 #if HAVE_SYS_TIME_H
19511 #include <sys/time.h>
19512 #endif
19513 #include <time.h>
19514 #if HAVE_WINSOCK2_H
19515 # include <winsock2.h>
19516 #endif
19519 main ()
19521 static struct timeval x;
19522 typedef int verify_tv_sec_type[
19523 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
19527 return 0;
19529 _ACEOF
19530 if ac_fn_c_try_compile "$LINENO"; then :
19531 gl_cv_sys_struct_timeval_tv_sec=yes
19532 else
19533 gl_cv_sys_struct_timeval_tv_sec=no
19535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
19539 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
19540 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
19541 REPLACE_STRUCT_TIMEVAL=1
19551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19552 $as_echo_n "checking for unsigned long long int... " >&6; }
19553 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
19554 $as_echo_n "(cached) " >&6
19555 else
19556 ac_cv_type_unsigned_long_long_int=yes
19557 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19559 /* end confdefs.h. */
19561 /* For now, do not test the preprocessor; as of 2007 there are too many
19562 implementations with broken preprocessors. Perhaps this can
19563 be revisited in 2012. In the meantime, code should not expect
19564 #if to work with literals wider than 32 bits. */
19565 /* Test literals. */
19566 long long int ll = 9223372036854775807ll;
19567 long long int nll = -9223372036854775807LL;
19568 unsigned long long int ull = 18446744073709551615ULL;
19569 /* Test constant expressions. */
19570 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19571 ? 1 : -1)];
19572 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19573 ? 1 : -1)];
19574 int i = 63;
19576 main ()
19578 /* Test availability of runtime routines for shift and division. */
19579 long long int llmax = 9223372036854775807ll;
19580 unsigned long long int ullmax = 18446744073709551615ull;
19581 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19582 | (llmax / ll) | (llmax % ll)
19583 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19584 | (ullmax / ull) | (ullmax % ull));
19586 return 0;
19589 _ACEOF
19590 if ac_fn_c_try_link "$LINENO"; then :
19592 else
19593 ac_cv_type_unsigned_long_long_int=no
19595 rm -f core conftest.err conftest.$ac_objext \
19596 conftest$ac_exeext conftest.$ac_ext
19599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19600 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19601 if test $ac_cv_type_unsigned_long_long_int = yes; then
19603 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19610 $as_echo_n "checking for long long int... " >&6; }
19611 if test "${ac_cv_type_long_long_int+set}" = set; then :
19612 $as_echo_n "(cached) " >&6
19613 else
19614 ac_cv_type_long_long_int=yes
19615 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19616 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19617 if test $ac_cv_type_long_long_int = yes; then
19618 if test "$cross_compiling" = yes; then :
19620 else
19621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19622 /* end confdefs.h. */
19623 #include <limits.h>
19624 #ifndef LLONG_MAX
19625 # define HALF \
19626 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19627 # define LLONG_MAX (HALF - 1 + HALF)
19628 #endif
19630 main ()
19632 long long int n = 1;
19633 int i;
19634 for (i = 0; ; i++)
19636 long long int m = n << i;
19637 if (m >> i != n)
19638 return 1;
19639 if (LLONG_MAX / 2 < m)
19640 break;
19642 return 0;
19644 return 0;
19646 _ACEOF
19647 if ac_fn_c_try_run "$LINENO"; then :
19649 else
19650 ac_cv_type_long_long_int=no
19652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19653 conftest.$ac_objext conftest.beam conftest.$ac_ext
19659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19660 $as_echo "$ac_cv_type_long_long_int" >&6; }
19661 if test $ac_cv_type_long_long_int = yes; then
19663 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
19672 gl_cv_c_multiarch=no
19673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19674 /* end confdefs.h. */
19675 #ifndef __APPLE_CC__
19676 not a universal capable compiler
19677 #endif
19678 typedef int dummy;
19680 _ACEOF
19681 if ac_fn_c_try_compile "$LINENO"; then :
19683 arch=
19684 prev=
19685 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19686 if test -n "$prev"; then
19687 case $word in
19688 i?86 | x86_64 | ppc | ppc64)
19689 if test -z "$arch" || test "$arch" = "$word"; then
19690 arch="$word"
19691 else
19692 gl_cv_c_multiarch=yes
19695 esac
19696 prev=
19697 else
19698 if test "x$word" = "x-arch"; then
19699 prev=arch
19702 done
19705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19706 if test $gl_cv_c_multiarch = yes; then
19707 APPLE_UNIVERSAL_BUILD=1
19708 else
19709 APPLE_UNIVERSAL_BUILD=0
19716 if test $ac_cv_type_long_long_int = yes; then
19717 HAVE_LONG_LONG_INT=1
19718 else
19719 HAVE_LONG_LONG_INT=0
19723 if test $ac_cv_type_unsigned_long_long_int = yes; then
19724 HAVE_UNSIGNED_LONG_LONG_INT=1
19725 else
19726 HAVE_UNSIGNED_LONG_LONG_INT=0
19731 if test $ac_cv_header_wchar_h = yes; then
19732 HAVE_WCHAR_H=1
19733 else
19734 HAVE_WCHAR_H=0
19738 if test $ac_cv_header_inttypes_h = yes; then
19739 HAVE_INTTYPES_H=1
19740 else
19741 HAVE_INTTYPES_H=0
19745 if test $ac_cv_header_sys_types_h = yes; then
19746 HAVE_SYS_TYPES_H=1
19747 else
19748 HAVE_SYS_TYPES_H=0
19761 if test $gl_cv_have_include_next = yes; then
19762 gl_cv_next_stdint_h='<'stdint.h'>'
19763 else
19764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19765 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19766 if test "${gl_cv_next_stdint_h+set}" = set; then :
19767 $as_echo_n "(cached) " >&6
19768 else
19770 if test $ac_cv_header_stdint_h = yes; then
19773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19774 /* end confdefs.h. */
19775 #include <stdint.h>
19777 _ACEOF
19778 case "$host_os" in
19779 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19780 *) gl_absname_cpp="$ac_cpp" ;;
19781 esac
19783 case "$host_os" in
19784 mingw*)
19785 gl_dirsep_regex='[/\\]'
19788 gl_dirsep_regex='\/'
19790 esac
19791 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19793 gl_header_literal_regex=`echo 'stdint.h' \
19794 | sed -e "$gl_make_literal_regex_sed"`
19795 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19796 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19797 s|^/[^/]|//&|
19801 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19802 sed -n "$gl_absolute_header_sed"`'"'
19803 else
19804 gl_cv_next_stdint_h='<'stdint.h'>'
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19810 $as_echo "$gl_cv_next_stdint_h" >&6; }
19812 NEXT_STDINT_H=$gl_cv_next_stdint_h
19814 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19815 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19816 gl_next_as_first_directive='<'stdint.h'>'
19817 else
19818 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19819 gl_next_as_first_directive=$gl_cv_next_stdint_h
19821 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
19826 if test $ac_cv_header_stdint_h = yes; then
19827 HAVE_STDINT_H=1
19828 else
19829 HAVE_STDINT_H=0
19833 if test $ac_cv_header_stdint_h = yes; then
19834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19835 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
19836 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
19837 $as_echo_n "(cached) " >&6
19838 else
19839 gl_cv_header_working_stdint_h=no
19840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19841 /* end confdefs.h. */
19844 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19845 #include <stdint.h>
19846 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
19847 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
19848 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
19849 #endif
19852 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19853 included before <wchar.h>. */
19854 #include <stddef.h>
19855 #include <signal.h>
19856 #if HAVE_WCHAR_H
19857 # include <stdio.h>
19858 # include <time.h>
19859 # include <wchar.h>
19860 #endif
19863 #ifdef INT8_MAX
19864 int8_t a1 = INT8_MAX;
19865 int8_t a1min = INT8_MIN;
19866 #endif
19867 #ifdef INT16_MAX
19868 int16_t a2 = INT16_MAX;
19869 int16_t a2min = INT16_MIN;
19870 #endif
19871 #ifdef INT32_MAX
19872 int32_t a3 = INT32_MAX;
19873 int32_t a3min = INT32_MIN;
19874 #endif
19875 #ifdef INT64_MAX
19876 int64_t a4 = INT64_MAX;
19877 int64_t a4min = INT64_MIN;
19878 #endif
19879 #ifdef UINT8_MAX
19880 uint8_t b1 = UINT8_MAX;
19881 #else
19882 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
19883 #endif
19884 #ifdef UINT16_MAX
19885 uint16_t b2 = UINT16_MAX;
19886 #endif
19887 #ifdef UINT32_MAX
19888 uint32_t b3 = UINT32_MAX;
19889 #endif
19890 #ifdef UINT64_MAX
19891 uint64_t b4 = UINT64_MAX;
19892 #endif
19893 int_least8_t c1 = INT8_C (0x7f);
19894 int_least8_t c1max = INT_LEAST8_MAX;
19895 int_least8_t c1min = INT_LEAST8_MIN;
19896 int_least16_t c2 = INT16_C (0x7fff);
19897 int_least16_t c2max = INT_LEAST16_MAX;
19898 int_least16_t c2min = INT_LEAST16_MIN;
19899 int_least32_t c3 = INT32_C (0x7fffffff);
19900 int_least32_t c3max = INT_LEAST32_MAX;
19901 int_least32_t c3min = INT_LEAST32_MIN;
19902 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
19903 int_least64_t c4max = INT_LEAST64_MAX;
19904 int_least64_t c4min = INT_LEAST64_MIN;
19905 uint_least8_t d1 = UINT8_C (0xff);
19906 uint_least8_t d1max = UINT_LEAST8_MAX;
19907 uint_least16_t d2 = UINT16_C (0xffff);
19908 uint_least16_t d2max = UINT_LEAST16_MAX;
19909 uint_least32_t d3 = UINT32_C (0xffffffff);
19910 uint_least32_t d3max = UINT_LEAST32_MAX;
19911 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
19912 uint_least64_t d4max = UINT_LEAST64_MAX;
19913 int_fast8_t e1 = INT_FAST8_MAX;
19914 int_fast8_t e1min = INT_FAST8_MIN;
19915 int_fast16_t e2 = INT_FAST16_MAX;
19916 int_fast16_t e2min = INT_FAST16_MIN;
19917 int_fast32_t e3 = INT_FAST32_MAX;
19918 int_fast32_t e3min = INT_FAST32_MIN;
19919 int_fast64_t e4 = INT_FAST64_MAX;
19920 int_fast64_t e4min = INT_FAST64_MIN;
19921 uint_fast8_t f1 = UINT_FAST8_MAX;
19922 uint_fast16_t f2 = UINT_FAST16_MAX;
19923 uint_fast32_t f3 = UINT_FAST32_MAX;
19924 uint_fast64_t f4 = UINT_FAST64_MAX;
19925 #ifdef INTPTR_MAX
19926 intptr_t g = INTPTR_MAX;
19927 intptr_t gmin = INTPTR_MIN;
19928 #endif
19929 #ifdef UINTPTR_MAX
19930 uintptr_t h = UINTPTR_MAX;
19931 #endif
19932 intmax_t i = INTMAX_MAX;
19933 uintmax_t j = UINTMAX_MAX;
19935 #include <limits.h> /* for CHAR_BIT */
19936 #define TYPE_MINIMUM(t) \
19937 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
19938 #define TYPE_MAXIMUM(t) \
19939 ((t) ((t) 0 < (t) -1 \
19940 ? (t) -1 \
19941 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
19942 struct s {
19943 int check_PTRDIFF:
19944 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
19945 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
19946 ? 1 : -1;
19947 /* Detect bug in FreeBSD 6.0 / ia64. */
19948 int check_SIG_ATOMIC:
19949 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
19950 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
19951 ? 1 : -1;
19952 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
19953 int check_WCHAR:
19954 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
19955 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
19956 ? 1 : -1;
19957 /* Detect bug in mingw. */
19958 int check_WINT:
19959 WINT_MIN == TYPE_MINIMUM (wint_t)
19960 && WINT_MAX == TYPE_MAXIMUM (wint_t)
19961 ? 1 : -1;
19963 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
19964 int check_UINT8_C:
19965 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
19966 int check_UINT16_C:
19967 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
19969 /* Detect bugs in OpenBSD 3.9 stdint.h. */
19970 #ifdef UINT8_MAX
19971 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
19972 #endif
19973 #ifdef UINT16_MAX
19974 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
19975 #endif
19976 #ifdef UINT32_MAX
19977 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
19978 #endif
19979 #ifdef UINT64_MAX
19980 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
19981 #endif
19982 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
19983 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
19984 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
19985 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
19986 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
19987 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
19988 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
19989 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
19990 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
19991 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
19992 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
19996 main ()
20000 return 0;
20002 _ACEOF
20003 if ac_fn_c_try_compile "$LINENO"; then :
20004 if test "$cross_compiling" = yes; then :
20005 gl_cv_header_working_stdint_h=yes
20007 else
20008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20009 /* end confdefs.h. */
20012 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20013 #include <stdint.h>
20016 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20017 included before <wchar.h>. */
20018 #include <stddef.h>
20019 #include <signal.h>
20020 #if HAVE_WCHAR_H
20021 # include <stdio.h>
20022 # include <time.h>
20023 # include <wchar.h>
20024 #endif
20027 #include <stdio.h>
20028 #include <string.h>
20029 #define MVAL(macro) MVAL1(macro)
20030 #define MVAL1(expression) #expression
20031 static const char *macro_values[] =
20033 #ifdef INT8_MAX
20034 MVAL (INT8_MAX),
20035 #endif
20036 #ifdef INT16_MAX
20037 MVAL (INT16_MAX),
20038 #endif
20039 #ifdef INT32_MAX
20040 MVAL (INT32_MAX),
20041 #endif
20042 #ifdef INT64_MAX
20043 MVAL (INT64_MAX),
20044 #endif
20045 #ifdef UINT8_MAX
20046 MVAL (UINT8_MAX),
20047 #endif
20048 #ifdef UINT16_MAX
20049 MVAL (UINT16_MAX),
20050 #endif
20051 #ifdef UINT32_MAX
20052 MVAL (UINT32_MAX),
20053 #endif
20054 #ifdef UINT64_MAX
20055 MVAL (UINT64_MAX),
20056 #endif
20057 NULL
20061 main ()
20064 const char **mv;
20065 for (mv = macro_values; *mv != NULL; mv++)
20067 const char *value = *mv;
20068 /* Test whether it looks like a cast expression. */
20069 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20070 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20071 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20072 || strncmp (value, "((int)"/*)*/, 6) == 0
20073 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20074 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20075 return mv - macro_values + 1;
20077 return 0;
20080 return 0;
20082 _ACEOF
20083 if ac_fn_c_try_run "$LINENO"; then :
20084 gl_cv_header_working_stdint_h=yes
20086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20087 conftest.$ac_objext conftest.beam conftest.$ac_ext
20092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20096 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
20098 if test "$gl_cv_header_working_stdint_h" = yes; then
20099 STDINT_H=
20100 else
20101 for ac_header in sys/inttypes.h sys/bitypes.h
20102 do :
20103 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20104 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20105 eval as_val=\$$as_ac_Header
20106 if test "x$as_val" = x""yes; then :
20107 cat >>confdefs.h <<_ACEOF
20108 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20109 _ACEOF
20113 done
20115 if test $ac_cv_header_sys_inttypes_h = yes; then
20116 HAVE_SYS_INTTYPES_H=1
20117 else
20118 HAVE_SYS_INTTYPES_H=0
20121 if test $ac_cv_header_sys_bitypes_h = yes; then
20122 HAVE_SYS_BITYPES_H=1
20123 else
20124 HAVE_SYS_BITYPES_H=0
20130 if test $APPLE_UNIVERSAL_BUILD = 0; then
20133 for gltype in ptrdiff_t size_t ; do
20134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20135 $as_echo_n "checking for bit size of $gltype... " >&6; }
20136 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20137 $as_echo_n "(cached) " >&6
20138 else
20139 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20140 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20141 included before <wchar.h>. */
20142 #include <stddef.h>
20143 #include <signal.h>
20144 #if HAVE_WCHAR_H
20145 # include <stdio.h>
20146 # include <time.h>
20147 # include <wchar.h>
20148 #endif
20150 #include <limits.h>"; then :
20152 else
20153 result=unknown
20156 eval gl_cv_bitsizeof_${gltype}=\$result
20159 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20161 $as_echo "$ac_res" >&6; }
20162 eval result=\$gl_cv_bitsizeof_${gltype}
20163 if test $result = unknown; then
20164 result=0
20166 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20167 cat >>confdefs.h <<_ACEOF
20168 #define BITSIZEOF_${GLTYPE} $result
20169 _ACEOF
20171 eval BITSIZEOF_${GLTYPE}=\$result
20172 done
20178 for gltype in sig_atomic_t wchar_t wint_t ; do
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20180 $as_echo_n "checking for bit size of $gltype... " >&6; }
20181 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20182 $as_echo_n "(cached) " >&6
20183 else
20184 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20185 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20186 included before <wchar.h>. */
20187 #include <stddef.h>
20188 #include <signal.h>
20189 #if HAVE_WCHAR_H
20190 # include <stdio.h>
20191 # include <time.h>
20192 # include <wchar.h>
20193 #endif
20195 #include <limits.h>"; then :
20197 else
20198 result=unknown
20201 eval gl_cv_bitsizeof_${gltype}=\$result
20204 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20206 $as_echo "$ac_res" >&6; }
20207 eval result=\$gl_cv_bitsizeof_${gltype}
20208 if test $result = unknown; then
20209 result=0
20211 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20212 cat >>confdefs.h <<_ACEOF
20213 #define BITSIZEOF_${GLTYPE} $result
20214 _ACEOF
20216 eval BITSIZEOF_${GLTYPE}=\$result
20217 done
20222 for gltype in sig_atomic_t wchar_t wint_t ; do
20223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20224 $as_echo_n "checking whether $gltype is signed... " >&6; }
20225 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
20226 $as_echo_n "(cached) " >&6
20227 else
20228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20229 /* end confdefs.h. */
20231 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20232 included before <wchar.h>. */
20233 #include <stddef.h>
20234 #include <signal.h>
20235 #if HAVE_WCHAR_H
20236 # include <stdio.h>
20237 # include <time.h>
20238 # include <wchar.h>
20239 #endif
20241 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20243 main ()
20247 return 0;
20249 _ACEOF
20250 if ac_fn_c_try_compile "$LINENO"; then :
20251 result=yes
20252 else
20253 result=no
20255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20256 eval gl_cv_type_${gltype}_signed=\$result
20259 eval ac_res=\$gl_cv_type_${gltype}_signed
20260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20261 $as_echo "$ac_res" >&6; }
20262 eval result=\$gl_cv_type_${gltype}_signed
20263 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20264 if test "$result" = yes; then
20265 cat >>confdefs.h <<_ACEOF
20266 #define HAVE_SIGNED_${GLTYPE} 1
20267 _ACEOF
20269 eval HAVE_SIGNED_${GLTYPE}=1
20270 else
20271 eval HAVE_SIGNED_${GLTYPE}=0
20273 done
20276 gl_cv_type_ptrdiff_t_signed=yes
20277 gl_cv_type_size_t_signed=no
20278 if test $APPLE_UNIVERSAL_BUILD = 0; then
20281 for gltype in ptrdiff_t size_t ; do
20282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20283 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20284 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20285 $as_echo_n "(cached) " >&6
20286 else
20287 eval gl_cv_type_${gltype}_suffix=no
20288 eval result=\$gl_cv_type_${gltype}_signed
20289 if test "$result" = yes; then
20290 glsufu=
20291 else
20292 glsufu=u
20294 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20295 case $glsuf in
20296 '') gltype1='int';;
20297 l) gltype1='long int';;
20298 ll) gltype1='long long int';;
20299 i64) gltype1='__int64';;
20300 u) gltype1='unsigned int';;
20301 ul) gltype1='unsigned long int';;
20302 ull) gltype1='unsigned long long int';;
20303 ui64)gltype1='unsigned __int64';;
20304 esac
20305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20306 /* end confdefs.h. */
20308 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20309 included before <wchar.h>. */
20310 #include <stddef.h>
20311 #include <signal.h>
20312 #if HAVE_WCHAR_H
20313 # include <stdio.h>
20314 # include <time.h>
20315 # include <wchar.h>
20316 #endif
20318 extern $gltype foo;
20319 extern $gltype1 foo;
20321 main ()
20325 return 0;
20327 _ACEOF
20328 if ac_fn_c_try_compile "$LINENO"; then :
20329 eval gl_cv_type_${gltype}_suffix=\$glsuf
20331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20332 eval result=\$gl_cv_type_${gltype}_suffix
20333 test "$result" != no && break
20334 done
20336 eval ac_res=\$gl_cv_type_${gltype}_suffix
20337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20338 $as_echo "$ac_res" >&6; }
20339 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20340 eval result=\$gl_cv_type_${gltype}_suffix
20341 test "$result" = no && result=
20342 eval ${GLTYPE}_SUFFIX=\$result
20343 cat >>confdefs.h <<_ACEOF
20344 #define ${GLTYPE}_SUFFIX $result
20345 _ACEOF
20347 done
20353 for gltype in sig_atomic_t wchar_t wint_t ; do
20354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20355 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20356 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20357 $as_echo_n "(cached) " >&6
20358 else
20359 eval gl_cv_type_${gltype}_suffix=no
20360 eval result=\$gl_cv_type_${gltype}_signed
20361 if test "$result" = yes; then
20362 glsufu=
20363 else
20364 glsufu=u
20366 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20367 case $glsuf in
20368 '') gltype1='int';;
20369 l) gltype1='long int';;
20370 ll) gltype1='long long int';;
20371 i64) gltype1='__int64';;
20372 u) gltype1='unsigned int';;
20373 ul) gltype1='unsigned long int';;
20374 ull) gltype1='unsigned long long int';;
20375 ui64)gltype1='unsigned __int64';;
20376 esac
20377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20378 /* end confdefs.h. */
20380 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20381 included before <wchar.h>. */
20382 #include <stddef.h>
20383 #include <signal.h>
20384 #if HAVE_WCHAR_H
20385 # include <stdio.h>
20386 # include <time.h>
20387 # include <wchar.h>
20388 #endif
20390 extern $gltype foo;
20391 extern $gltype1 foo;
20393 main ()
20397 return 0;
20399 _ACEOF
20400 if ac_fn_c_try_compile "$LINENO"; then :
20401 eval gl_cv_type_${gltype}_suffix=\$glsuf
20403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20404 eval result=\$gl_cv_type_${gltype}_suffix
20405 test "$result" != no && break
20406 done
20408 eval ac_res=\$gl_cv_type_${gltype}_suffix
20409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20410 $as_echo "$ac_res" >&6; }
20411 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20412 eval result=\$gl_cv_type_${gltype}_suffix
20413 test "$result" = no && result=
20414 eval ${GLTYPE}_SUFFIX=\$result
20415 cat >>confdefs.h <<_ACEOF
20416 #define ${GLTYPE}_SUFFIX $result
20417 _ACEOF
20419 done
20423 if test $BITSIZEOF_WINT_T -lt 32; then
20424 BITSIZEOF_WINT_T=32
20427 STDINT_H=stdint.h
20430 if test -n "$STDINT_H"; then
20431 GL_GENERATE_STDINT_H_TRUE=
20432 GL_GENERATE_STDINT_H_FALSE='#'
20433 else
20434 GL_GENERATE_STDINT_H_TRUE='#'
20435 GL_GENERATE_STDINT_H_FALSE=
20442 GNULIB_IMAXABS=0;
20443 GNULIB_IMAXDIV=0;
20444 GNULIB_STRTOIMAX=0;
20445 GNULIB_STRTOUMAX=0;
20446 HAVE_DECL_IMAXABS=1;
20447 HAVE_DECL_IMAXDIV=1;
20448 HAVE_DECL_STRTOIMAX=1;
20449 HAVE_DECL_STRTOUMAX=1;
20450 REPLACE_STRTOIMAX=0;
20451 INT32_MAX_LT_INTMAX_MAX=1;
20452 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20453 PRI_MACROS_BROKEN=0;
20454 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20455 UINT32_MAX_LT_UINTMAX_MAX=1;
20456 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
20472 if test $gl_cv_have_include_next = yes; then
20473 gl_cv_next_inttypes_h='<'inttypes.h'>'
20474 else
20475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20476 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20477 if test "${gl_cv_next_inttypes_h+set}" = set; then :
20478 $as_echo_n "(cached) " >&6
20479 else
20481 if test $ac_cv_header_inttypes_h = yes; then
20484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20485 /* end confdefs.h. */
20486 #include <inttypes.h>
20488 _ACEOF
20489 case "$host_os" in
20490 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20491 *) gl_absname_cpp="$ac_cpp" ;;
20492 esac
20494 case "$host_os" in
20495 mingw*)
20496 gl_dirsep_regex='[/\\]'
20499 gl_dirsep_regex='\/'
20501 esac
20502 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20504 gl_header_literal_regex=`echo 'inttypes.h' \
20505 | sed -e "$gl_make_literal_regex_sed"`
20506 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20507 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20508 s|^/[^/]|//&|
20512 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20513 sed -n "$gl_absolute_header_sed"`'"'
20514 else
20515 gl_cv_next_inttypes_h='<'inttypes.h'>'
20520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20521 $as_echo "$gl_cv_next_inttypes_h" >&6; }
20523 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
20525 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20526 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20527 gl_next_as_first_directive='<'inttypes.h'>'
20528 else
20529 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20530 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20532 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
20544 case "$host_os" in
20545 mingw*)
20546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20547 $as_echo_n "checking for 64-bit off_t... " >&6; }
20548 if test "${gl_cv_type_off_t_64+set}" = set; then :
20549 $as_echo_n "(cached) " >&6
20550 else
20551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20552 /* end confdefs.h. */
20553 #include <sys/types.h>
20554 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20557 main ()
20561 return 0;
20563 _ACEOF
20564 if ac_fn_c_try_compile "$LINENO"; then :
20565 gl_cv_type_off_t_64=yes
20566 else
20567 gl_cv_type_off_t_64=no
20569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20573 $as_echo "$gl_cv_type_off_t_64" >&6; }
20574 if test $gl_cv_type_off_t_64 = no; then
20575 WINDOWS_64_BIT_OFF_T=1
20576 else
20577 WINDOWS_64_BIT_OFF_T=0
20579 WINDOWS_64_BIT_ST_SIZE=1
20582 WINDOWS_64_BIT_OFF_T=0
20583 WINDOWS_64_BIT_ST_SIZE=0
20585 esac
20590 GNULIB_FFSL=0;
20591 GNULIB_FFSLL=0;
20592 GNULIB_MEMCHR=0;
20593 GNULIB_MEMMEM=0;
20594 GNULIB_MEMPCPY=0;
20595 GNULIB_MEMRCHR=0;
20596 GNULIB_RAWMEMCHR=0;
20597 GNULIB_STPCPY=0;
20598 GNULIB_STPNCPY=0;
20599 GNULIB_STRCHRNUL=0;
20600 GNULIB_STRDUP=0;
20601 GNULIB_STRNCAT=0;
20602 GNULIB_STRNDUP=0;
20603 GNULIB_STRNLEN=0;
20604 GNULIB_STRPBRK=0;
20605 GNULIB_STRSEP=0;
20606 GNULIB_STRSTR=0;
20607 GNULIB_STRCASESTR=0;
20608 GNULIB_STRTOK_R=0;
20609 GNULIB_MBSLEN=0;
20610 GNULIB_MBSNLEN=0;
20611 GNULIB_MBSCHR=0;
20612 GNULIB_MBSRCHR=0;
20613 GNULIB_MBSSTR=0;
20614 GNULIB_MBSCASECMP=0;
20615 GNULIB_MBSNCASECMP=0;
20616 GNULIB_MBSPCASECMP=0;
20617 GNULIB_MBSCASESTR=0;
20618 GNULIB_MBSCSPN=0;
20619 GNULIB_MBSPBRK=0;
20620 GNULIB_MBSSPN=0;
20621 GNULIB_MBSSEP=0;
20622 GNULIB_MBSTOK_R=0;
20623 GNULIB_STRERROR=0;
20624 GNULIB_STRERROR_R=0;
20625 GNULIB_STRSIGNAL=0;
20626 GNULIB_STRVERSCMP=0;
20627 HAVE_MBSLEN=0;
20628 HAVE_FFSL=1;
20629 HAVE_FFSLL=1;
20630 HAVE_MEMCHR=1;
20631 HAVE_DECL_MEMMEM=1;
20632 HAVE_MEMPCPY=1;
20633 HAVE_DECL_MEMRCHR=1;
20634 HAVE_RAWMEMCHR=1;
20635 HAVE_STPCPY=1;
20636 HAVE_STPNCPY=1;
20637 HAVE_STRCHRNUL=1;
20638 HAVE_DECL_STRDUP=1;
20639 HAVE_DECL_STRNDUP=1;
20640 HAVE_DECL_STRNLEN=1;
20641 HAVE_STRPBRK=1;
20642 HAVE_STRSEP=1;
20643 HAVE_STRCASESTR=1;
20644 HAVE_DECL_STRTOK_R=1;
20645 HAVE_DECL_STRERROR_R=1;
20646 HAVE_DECL_STRSIGNAL=1;
20647 HAVE_STRVERSCMP=1;
20648 REPLACE_MEMCHR=0;
20649 REPLACE_MEMMEM=0;
20650 REPLACE_STPNCPY=0;
20651 REPLACE_STRDUP=0;
20652 REPLACE_STRSTR=0;
20653 REPLACE_STRCASESTR=0;
20654 REPLACE_STRCHRNUL=0;
20655 REPLACE_STRERROR=0;
20656 REPLACE_STRERROR_R=0;
20657 REPLACE_STRNCAT=0;
20658 REPLACE_STRNDUP=0;
20659 REPLACE_STRNLEN=0;
20660 REPLACE_STRSIGNAL=0;
20661 REPLACE_STRTOK_R=0;
20662 UNDEFINE_STRTOK_R=0;
20664 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
20665 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
20666 ac_have_decl=1
20667 else
20668 ac_have_decl=0
20671 cat >>confdefs.h <<_ACEOF
20672 #define HAVE_DECL_MEMRCHR $ac_have_decl
20673 _ACEOF
20676 GNULIB_MKTIME=0;
20677 GNULIB_NANOSLEEP=0;
20678 GNULIB_STRPTIME=0;
20679 GNULIB_TIMEGM=0;
20680 GNULIB_TIME_R=0;
20681 HAVE_DECL_LOCALTIME_R=1;
20682 HAVE_NANOSLEEP=1;
20683 HAVE_STRPTIME=1;
20684 HAVE_TIMEGM=1;
20685 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20686 REPLACE_MKTIME=GNULIB_PORTCHECK;
20687 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20688 REPLACE_TIMEGM=GNULIB_PORTCHECK;
20690 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
20691 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
20692 ac_have_decl=1
20693 else
20694 ac_have_decl=0
20697 cat >>confdefs.h <<_ACEOF
20698 #define HAVE_DECL_ALARM $ac_have_decl
20699 _ACEOF
20704 GNULIB_PSELECT=0;
20705 GNULIB_SELECT=0;
20706 HAVE_PSELECT=1;
20707 REPLACE_PSELECT=0;
20708 REPLACE_SELECT=0;
20715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20716 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
20717 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
20718 $as_echo_n "(cached) " >&6
20719 else
20721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722 /* end confdefs.h. */
20723 #include <sys/select.h>
20725 main ()
20727 struct timeval b;
20729 return 0;
20731 _ACEOF
20732 if ac_fn_c_try_compile "$LINENO"; then :
20733 gl_cv_header_sys_select_h_selfcontained=yes
20734 else
20735 gl_cv_header_sys_select_h_selfcontained=no
20737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20738 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20740 /* end confdefs.h. */
20741 #include <sys/select.h>
20743 main ()
20745 int memset; int bzero;
20747 return 0;
20750 _ACEOF
20751 if ac_fn_c_try_compile "$LINENO"; then :
20752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20753 /* end confdefs.h. */
20754 #include <sys/select.h>
20756 main ()
20759 #undef memset
20760 #define memset nonexistent_memset
20761 extern
20762 #ifdef __cplusplus
20764 #endif
20765 void *memset (void *, int, unsigned long);
20766 #undef bzero
20767 #define bzero nonexistent_bzero
20768 extern
20769 #ifdef __cplusplus
20771 #endif
20772 void bzero (void *, unsigned long);
20773 fd_set fds;
20774 FD_ZERO (&fds);
20777 return 0;
20780 _ACEOF
20781 if ac_fn_c_try_link "$LINENO"; then :
20783 else
20784 gl_cv_header_sys_select_h_selfcontained=no
20786 rm -f core conftest.err conftest.$ac_objext \
20787 conftest$ac_exeext conftest.$ac_ext
20790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20795 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
20805 if test $gl_cv_have_include_next = yes; then
20806 gl_cv_next_sys_select_h='<'sys/select.h'>'
20807 else
20808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20809 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
20810 if test "${gl_cv_next_sys_select_h+set}" = set; then :
20811 $as_echo_n "(cached) " >&6
20812 else
20814 if test $ac_cv_header_sys_select_h = yes; then
20817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20818 /* end confdefs.h. */
20819 #include <sys/select.h>
20821 _ACEOF
20822 case "$host_os" in
20823 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20824 *) gl_absname_cpp="$ac_cpp" ;;
20825 esac
20827 case "$host_os" in
20828 mingw*)
20829 gl_dirsep_regex='[/\\]'
20832 gl_dirsep_regex='\/'
20834 esac
20835 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20837 gl_header_literal_regex=`echo 'sys/select.h' \
20838 | sed -e "$gl_make_literal_regex_sed"`
20839 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20840 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20841 s|^/[^/]|//&|
20845 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20846 sed -n "$gl_absolute_header_sed"`'"'
20847 else
20848 gl_cv_next_sys_select_h='<'sys/select.h'>'
20853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
20854 $as_echo "$gl_cv_next_sys_select_h" >&6; }
20856 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
20858 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20859 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20860 gl_next_as_first_directive='<'sys/select.h'>'
20861 else
20862 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20863 gl_next_as_first_directive=$gl_cv_next_sys_select_h
20865 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
20870 if test $ac_cv_header_sys_select_h = yes; then
20871 HAVE_SYS_SELECT_H=1
20872 else
20873 HAVE_SYS_SELECT_H=0
20880 if test $ac_cv_header_sys_socket_h != yes; then
20881 for ac_header in winsock2.h
20882 do :
20883 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20884 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
20885 cat >>confdefs.h <<_ACEOF
20886 #define HAVE_WINSOCK2_H 1
20887 _ACEOF
20891 done
20894 if test "$ac_cv_header_winsock2_h" = yes; then
20895 HAVE_WINSOCK2_H=1
20896 UNISTD_H_HAVE_WINSOCK2_H=1
20897 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20898 else
20899 HAVE_WINSOCK2_H=0
20909 GNULIB_PTHREAD_SIGMASK=0;
20910 GNULIB_RAISE=0;
20911 GNULIB_SIGNAL_H_SIGPIPE=0;
20912 GNULIB_SIGPROCMASK=0;
20913 GNULIB_SIGACTION=0;
20914 HAVE_POSIX_SIGNALBLOCKING=1;
20915 HAVE_PTHREAD_SIGMASK=1;
20916 HAVE_RAISE=1;
20917 HAVE_SIGSET_T=1;
20918 HAVE_SIGINFO_T=1;
20919 HAVE_SIGACTION=1;
20920 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20922 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20924 HAVE_SIGHANDLER_T=1;
20925 REPLACE_PTHREAD_SIGMASK=0;
20926 REPLACE_RAISE=0;
20934 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20935 #include <signal.h>
20936 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20937 #include <sys/types.h>
20940 if test "x$ac_cv_type_sigset_t" = x""yes; then :
20942 cat >>confdefs.h <<_ACEOF
20943 #define HAVE_SIGSET_T 1
20944 _ACEOF
20946 gl_cv_type_sigset_t=yes
20947 else
20948 gl_cv_type_sigset_t=no
20951 if test $gl_cv_type_sigset_t != yes; then
20952 HAVE_SIGSET_T=0
20957 if test $ac_cv_header_sys_socket_h = no; then
20958 for ac_header in ws2tcpip.h
20959 do :
20960 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
20961 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
20962 cat >>confdefs.h <<_ACEOF
20963 #define HAVE_WS2TCPIP_H 1
20964 _ACEOF
20968 done
20972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20973 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
20974 if test "${ac_cv_header_stdbool_h+set}" = set; then :
20975 $as_echo_n "(cached) " >&6
20976 else
20977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20978 /* end confdefs.h. */
20980 #include <stdbool.h>
20981 #ifndef bool
20982 "error: bool is not defined"
20983 #endif
20984 #ifndef false
20985 "error: false is not defined"
20986 #endif
20987 #if false
20988 "error: false is not 0"
20989 #endif
20990 #ifndef true
20991 "error: true is not defined"
20992 #endif
20993 #if true != 1
20994 "error: true is not 1"
20995 #endif
20996 #ifndef __bool_true_false_are_defined
20997 "error: __bool_true_false_are_defined is not defined"
20998 #endif
21000 struct s { _Bool s: 1; _Bool t; } s;
21002 char a[true == 1 ? 1 : -1];
21003 char b[false == 0 ? 1 : -1];
21004 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21005 char d[(bool) 0.5 == true ? 1 : -1];
21006 /* See body of main program for 'e'. */
21007 char f[(_Bool) 0.0 == false ? 1 : -1];
21008 char g[true];
21009 char h[sizeof (_Bool)];
21010 char i[sizeof s.t];
21011 enum { j = false, k = true, l = false * true, m = true * 256 };
21012 /* The following fails for
21013 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21014 _Bool n[m];
21015 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21016 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21017 /* Catch a bug in an HP-UX C compiler. See
21018 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21019 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21021 _Bool q = true;
21022 _Bool *pq = &q;
21025 main ()
21028 bool e = &s;
21029 *pq |= q;
21030 *pq |= ! q;
21031 /* Refer to every declared value, to avoid compiler optimizations. */
21032 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21033 + !m + !n + !o + !p + !q + !pq);
21036 return 0;
21038 _ACEOF
21039 if ac_fn_c_try_compile "$LINENO"; then :
21040 ac_cv_header_stdbool_h=yes
21041 else
21042 ac_cv_header_stdbool_h=no
21044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21047 $as_echo "$ac_cv_header_stdbool_h" >&6; }
21048 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21049 if test "x$ac_cv_type__Bool" = x""yes; then :
21051 cat >>confdefs.h <<_ACEOF
21052 #define HAVE__BOOL 1
21053 _ACEOF
21060 REPLACE_NULL=0;
21061 HAVE_WCHAR_T=1;
21064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21065 $as_echo_n "checking for wchar_t... " >&6; }
21066 if test "${gt_cv_c_wchar_t+set}" = set; then :
21067 $as_echo_n "(cached) " >&6
21068 else
21069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21070 /* end confdefs.h. */
21071 #include <stddef.h>
21072 wchar_t foo = (wchar_t)'\0';
21074 main ()
21078 return 0;
21080 _ACEOF
21081 if ac_fn_c_try_compile "$LINENO"; then :
21082 gt_cv_c_wchar_t=yes
21083 else
21084 gt_cv_c_wchar_t=no
21086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21089 $as_echo "$gt_cv_c_wchar_t" >&6; }
21090 if test $gt_cv_c_wchar_t = yes; then
21092 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21097 GNULIB_DPRINTF=0;
21098 GNULIB_FCLOSE=0;
21099 GNULIB_FDOPEN=0;
21100 GNULIB_FFLUSH=0;
21101 GNULIB_FGETC=0;
21102 GNULIB_FGETS=0;
21103 GNULIB_FOPEN=0;
21104 GNULIB_FPRINTF=0;
21105 GNULIB_FPRINTF_POSIX=0;
21106 GNULIB_FPURGE=0;
21107 GNULIB_FPUTC=0;
21108 GNULIB_FPUTS=0;
21109 GNULIB_FREAD=0;
21110 GNULIB_FREOPEN=0;
21111 GNULIB_FSCANF=0;
21112 GNULIB_FSEEK=0;
21113 GNULIB_FSEEKO=0;
21114 GNULIB_FTELL=0;
21115 GNULIB_FTELLO=0;
21116 GNULIB_FWRITE=0;
21117 GNULIB_GETC=0;
21118 GNULIB_GETCHAR=0;
21119 GNULIB_GETDELIM=0;
21120 GNULIB_GETLINE=0;
21121 GNULIB_OBSTACK_PRINTF=0;
21122 GNULIB_OBSTACK_PRINTF_POSIX=0;
21123 GNULIB_PCLOSE=0;
21124 GNULIB_PERROR=0;
21125 GNULIB_POPEN=0;
21126 GNULIB_PRINTF=0;
21127 GNULIB_PRINTF_POSIX=0;
21128 GNULIB_PUTC=0;
21129 GNULIB_PUTCHAR=0;
21130 GNULIB_PUTS=0;
21131 GNULIB_REMOVE=0;
21132 GNULIB_RENAME=0;
21133 GNULIB_RENAMEAT=0;
21134 GNULIB_SCANF=0;
21135 GNULIB_SNPRINTF=0;
21136 GNULIB_SPRINTF_POSIX=0;
21137 GNULIB_STDIO_H_NONBLOCKING=0;
21138 GNULIB_STDIO_H_SIGPIPE=0;
21139 GNULIB_TMPFILE=0;
21140 GNULIB_VASPRINTF=0;
21141 GNULIB_VFSCANF=0;
21142 GNULIB_VSCANF=0;
21143 GNULIB_VDPRINTF=0;
21144 GNULIB_VFPRINTF=0;
21145 GNULIB_VFPRINTF_POSIX=0;
21146 GNULIB_VPRINTF=0;
21147 GNULIB_VPRINTF_POSIX=0;
21148 GNULIB_VSNPRINTF=0;
21149 GNULIB_VSPRINTF_POSIX=0;
21150 HAVE_DECL_FPURGE=1;
21151 HAVE_DECL_FSEEKO=1;
21152 HAVE_DECL_FTELLO=1;
21153 HAVE_DECL_GETDELIM=1;
21154 HAVE_DECL_GETLINE=1;
21155 HAVE_DECL_OBSTACK_PRINTF=1;
21156 HAVE_DECL_SNPRINTF=1;
21157 HAVE_DECL_VSNPRINTF=1;
21158 HAVE_DPRINTF=1;
21159 HAVE_FSEEKO=1;
21160 HAVE_FTELLO=1;
21161 HAVE_PCLOSE=1;
21162 HAVE_POPEN=1;
21163 HAVE_RENAMEAT=1;
21164 HAVE_VASPRINTF=1;
21165 HAVE_VDPRINTF=1;
21166 REPLACE_DPRINTF=0;
21167 REPLACE_FCLOSE=0;
21168 REPLACE_FDOPEN=0;
21169 REPLACE_FFLUSH=0;
21170 REPLACE_FOPEN=0;
21171 REPLACE_FPRINTF=0;
21172 REPLACE_FPURGE=0;
21173 REPLACE_FREOPEN=0;
21174 REPLACE_FSEEK=0;
21175 REPLACE_FSEEKO=0;
21176 REPLACE_FTELL=0;
21177 REPLACE_FTELLO=0;
21178 REPLACE_GETDELIM=0;
21179 REPLACE_GETLINE=0;
21180 REPLACE_OBSTACK_PRINTF=0;
21181 REPLACE_PERROR=0;
21182 REPLACE_POPEN=0;
21183 REPLACE_PRINTF=0;
21184 REPLACE_REMOVE=0;
21185 REPLACE_RENAME=0;
21186 REPLACE_RENAMEAT=0;
21187 REPLACE_SNPRINTF=0;
21188 REPLACE_SPRINTF=0;
21189 REPLACE_STDIO_READ_FUNCS=0;
21190 REPLACE_STDIO_WRITE_FUNCS=0;
21191 REPLACE_TMPFILE=0;
21192 REPLACE_VASPRINTF=0;
21193 REPLACE_VDPRINTF=0;
21194 REPLACE_VFPRINTF=0;
21195 REPLACE_VPRINTF=0;
21196 REPLACE_VSNPRINTF=0;
21197 REPLACE_VSPRINTF=0;
21199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21200 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21201 if test "${ac_cv_struct_tm+set}" = set; then :
21202 $as_echo_n "(cached) " >&6
21203 else
21204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21205 /* end confdefs.h. */
21206 #include <sys/types.h>
21207 #include <time.h>
21210 main ()
21212 struct tm tm;
21213 int *p = &tm.tm_sec;
21214 return !p;
21216 return 0;
21218 _ACEOF
21219 if ac_fn_c_try_compile "$LINENO"; then :
21220 ac_cv_struct_tm=time.h
21221 else
21222 ac_cv_struct_tm=sys/time.h
21224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21227 $as_echo "$ac_cv_struct_tm" >&6; }
21228 if test $ac_cv_struct_tm = sys/time.h; then
21230 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
21234 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21235 #include <$ac_cv_struct_tm>
21238 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
21240 cat >>confdefs.h <<_ACEOF
21241 #define HAVE_STRUCT_TM_TM_ZONE 1
21242 _ACEOF
21247 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21249 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
21251 else
21252 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21254 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21255 ac_have_decl=1
21256 else
21257 ac_have_decl=0
21260 cat >>confdefs.h <<_ACEOF
21261 #define HAVE_DECL_TZNAME $ac_have_decl
21262 _ACEOF
21264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21265 $as_echo_n "checking for tzname... " >&6; }
21266 if test "${ac_cv_var_tzname+set}" = set; then :
21267 $as_echo_n "(cached) " >&6
21268 else
21269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21270 /* end confdefs.h. */
21271 #include <time.h>
21272 #if !HAVE_DECL_TZNAME
21273 extern char *tzname[];
21274 #endif
21277 main ()
21279 return tzname[0][0];
21281 return 0;
21283 _ACEOF
21284 if ac_fn_c_try_link "$LINENO"; then :
21285 ac_cv_var_tzname=yes
21286 else
21287 ac_cv_var_tzname=no
21289 rm -f core conftest.err conftest.$ac_objext \
21290 conftest$ac_exeext conftest.$ac_ext
21292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21293 $as_echo "$ac_cv_var_tzname" >&6; }
21294 if test $ac_cv_var_tzname = yes; then
21296 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
21302 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21304 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21306 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
21322 if test $gl_cv_have_include_next = yes; then
21323 gl_cv_next_string_h='<'string.h'>'
21324 else
21325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21326 $as_echo_n "checking absolute name of <string.h>... " >&6; }
21327 if test "${gl_cv_next_string_h+set}" = set; then :
21328 $as_echo_n "(cached) " >&6
21329 else
21331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21332 /* end confdefs.h. */
21333 #include <string.h>
21335 _ACEOF
21336 case "$host_os" in
21337 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21338 *) gl_absname_cpp="$ac_cpp" ;;
21339 esac
21341 case "$host_os" in
21342 mingw*)
21343 gl_dirsep_regex='[/\\]'
21346 gl_dirsep_regex='\/'
21348 esac
21349 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21351 gl_header_literal_regex=`echo 'string.h' \
21352 | sed -e "$gl_make_literal_regex_sed"`
21353 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21354 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21355 s|^/[^/]|//&|
21359 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21360 sed -n "$gl_absolute_header_sed"`'"'
21364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21365 $as_echo "$gl_cv_next_string_h" >&6; }
21367 NEXT_STRING_H=$gl_cv_next_string_h
21369 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21370 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21371 gl_next_as_first_directive='<'string.h'>'
21372 else
21373 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21374 gl_next_as_first_directive=$gl_cv_next_string_h
21376 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21386 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21387 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21388 ac_have_decl=1
21389 else
21390 ac_have_decl=0
21393 cat >>confdefs.h <<_ACEOF
21394 #define HAVE_DECL_STRTOIMAX $ac_have_decl
21395 _ACEOF
21399 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21400 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21401 ac_have_decl=1
21402 else
21403 ac_have_decl=0
21406 cat >>confdefs.h <<_ACEOF
21407 #define HAVE_DECL_STRTOUMAX $ac_have_decl
21408 _ACEOF
21412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21413 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21414 if test "${ac_cv_header_stat_broken+set}" = set; then :
21415 $as_echo_n "(cached) " >&6
21416 else
21417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21418 /* end confdefs.h. */
21419 #include <sys/types.h>
21420 #include <sys/stat.h>
21422 #if defined S_ISBLK && defined S_IFDIR
21423 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21424 #endif
21426 #if defined S_ISBLK && defined S_IFCHR
21427 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21428 #endif
21430 #if defined S_ISLNK && defined S_IFREG
21431 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21432 #endif
21434 #if defined S_ISSOCK && defined S_IFREG
21435 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21436 #endif
21438 _ACEOF
21439 if ac_fn_c_try_compile "$LINENO"; then :
21440 ac_cv_header_stat_broken=no
21441 else
21442 ac_cv_header_stat_broken=yes
21444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21447 $as_echo "$ac_cv_header_stat_broken" >&6; }
21448 if test $ac_cv_header_stat_broken = yes; then
21450 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
21458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21459 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21460 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21461 $as_echo_n "(cached) " >&6
21462 else
21463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21464 /* end confdefs.h. */
21465 #include <time.h>
21468 main ()
21470 static struct timespec x; x.tv_sec = x.tv_nsec;
21472 return 0;
21474 _ACEOF
21475 if ac_fn_c_try_compile "$LINENO"; then :
21476 gl_cv_sys_struct_timespec_in_time_h=yes
21477 else
21478 gl_cv_sys_struct_timespec_in_time_h=no
21480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21483 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21485 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21486 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21487 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21488 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21489 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21490 else
21491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21492 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21493 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21494 $as_echo_n "(cached) " >&6
21495 else
21496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21497 /* end confdefs.h. */
21498 #include <sys/time.h>
21501 main ()
21503 static struct timespec x; x.tv_sec = x.tv_nsec;
21505 return 0;
21507 _ACEOF
21508 if ac_fn_c_try_compile "$LINENO"; then :
21509 gl_cv_sys_struct_timespec_in_sys_time_h=yes
21510 else
21511 gl_cv_sys_struct_timespec_in_sys_time_h=no
21513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21516 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21517 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21518 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21519 else
21520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21521 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21522 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
21523 $as_echo_n "(cached) " >&6
21524 else
21525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21526 /* end confdefs.h. */
21527 #include <pthread.h>
21530 main ()
21532 static struct timespec x; x.tv_sec = x.tv_nsec;
21534 return 0;
21536 _ACEOF
21537 if ac_fn_c_try_compile "$LINENO"; then :
21538 gl_cv_sys_struct_timespec_in_pthread_h=yes
21539 else
21540 gl_cv_sys_struct_timespec_in_pthread_h=no
21542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21545 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21546 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21547 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21566 if test $gl_cv_have_include_next = yes; then
21567 gl_cv_next_time_h='<'time.h'>'
21568 else
21569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21570 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21571 if test "${gl_cv_next_time_h+set}" = set; then :
21572 $as_echo_n "(cached) " >&6
21573 else
21575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21576 /* end confdefs.h. */
21577 #include <time.h>
21579 _ACEOF
21580 case "$host_os" in
21581 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21582 *) gl_absname_cpp="$ac_cpp" ;;
21583 esac
21585 case "$host_os" in
21586 mingw*)
21587 gl_dirsep_regex='[/\\]'
21590 gl_dirsep_regex='\/'
21592 esac
21593 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21595 gl_header_literal_regex=`echo 'time.h' \
21596 | sed -e "$gl_make_literal_regex_sed"`
21597 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21598 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21599 s|^/[^/]|//&|
21603 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21604 sed -n "$gl_absolute_header_sed"`'"'
21608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21609 $as_echo "$gl_cv_next_time_h" >&6; }
21611 NEXT_TIME_H=$gl_cv_next_time_h
21613 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21614 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21615 gl_next_as_first_directive='<'time.h'>'
21616 else
21617 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21618 gl_next_as_first_directive=$gl_cv_next_time_h
21620 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21635 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21636 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21637 ac_have_decl=1
21638 else
21639 ac_have_decl=0
21642 cat >>confdefs.h <<_ACEOF
21643 #define HAVE_DECL_UNSETENV $ac_have_decl
21644 _ACEOF
21647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21648 $as_echo_n "checking whether the utimes function works... " >&6; }
21649 if test "${gl_cv_func_working_utimes+set}" = set; then :
21650 $as_echo_n "(cached) " >&6
21651 else
21653 if test "$cross_compiling" = yes; then :
21654 gl_cv_func_working_utimes=no
21655 else
21656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21657 /* end confdefs.h. */
21659 #include <sys/types.h>
21660 #include <sys/stat.h>
21661 #include <fcntl.h>
21662 #include <sys/time.h>
21663 #include <time.h>
21664 #include <unistd.h>
21665 #include <stdlib.h>
21666 #include <stdio.h>
21667 #include <utime.h>
21669 static int
21670 inorder (time_t a, time_t b, time_t c)
21672 return a <= b && b <= c;
21676 main ()
21678 int result = 0;
21679 char const *file = "conftest.utimes";
21680 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
21682 /* Test whether utimes() essentially works. */
21684 struct stat sbuf;
21685 FILE *f = fopen (file, "w");
21686 if (f == NULL)
21687 result |= 1;
21688 else if (fclose (f) != 0)
21689 result |= 1;
21690 else if (utimes (file, timeval) != 0)
21691 result |= 2;
21692 else if (lstat (file, &sbuf) != 0)
21693 result |= 1;
21694 else if (!(sbuf.st_atime == timeval[0].tv_sec
21695 && sbuf.st_mtime == timeval[1].tv_sec))
21696 result |= 4;
21697 if (unlink (file) != 0)
21698 result |= 1;
21701 /* Test whether utimes() with a NULL argument sets the file's timestamp
21702 to the current time. Use 'fstat' as well as 'time' to
21703 determine the "current" time, to accommodate NFS file systems
21704 if there is a time skew between the host and the NFS server. */
21706 int fd = open (file, O_WRONLY|O_CREAT, 0644);
21707 if (fd < 0)
21708 result |= 1;
21709 else
21711 time_t t0, t2;
21712 struct stat st0, st1, st2;
21713 if (time (&t0) == (time_t) -1)
21714 result |= 1;
21715 else if (fstat (fd, &st0) != 0)
21716 result |= 1;
21717 else if (utimes (file, timeval) != 0)
21718 result |= 2;
21719 else if (utimes (file, NULL) != 0)
21720 result |= 8;
21721 else if (fstat (fd, &st1) != 0)
21722 result |= 1;
21723 else if (write (fd, "\n", 1) != 1)
21724 result |= 1;
21725 else if (fstat (fd, &st2) != 0)
21726 result |= 1;
21727 else if (time (&t2) == (time_t) -1)
21728 result |= 1;
21729 else
21731 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
21732 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
21733 if (! (st1.st_atime == st1.st_mtime))
21734 result |= 16;
21735 if (! (m_ok_POSIX || m_ok_NFS))
21736 result |= 32;
21738 if (close (fd) != 0)
21739 result |= 1;
21741 if (unlink (file) != 0)
21742 result |= 1;
21745 /* Test whether utimes() with a NULL argument works on read-only files. */
21747 int fd = open (file, O_WRONLY|O_CREAT, 0444);
21748 if (fd < 0)
21749 result |= 1;
21750 else if (close (fd) != 0)
21751 result |= 1;
21752 else if (utimes (file, NULL) != 0)
21753 result |= 64;
21754 if (unlink (file) != 0)
21755 result |= 1;
21758 return result;
21761 _ACEOF
21762 if ac_fn_c_try_run "$LINENO"; then :
21763 gl_cv_func_working_utimes=yes
21764 else
21765 gl_cv_func_working_utimes=no
21767 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21768 conftest.$ac_objext conftest.beam conftest.$ac_ext
21772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
21773 $as_echo "$gl_cv_func_working_utimes" >&6; }
21775 if test $gl_cv_func_working_utimes = yes; then
21777 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
21785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
21786 $as_echo_n "checking for struct utimbuf... " >&6; }
21787 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
21788 $as_echo_n "(cached) " >&6
21789 else
21790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21791 /* end confdefs.h. */
21792 #if HAVE_SYS_TIME_H
21793 #include <sys/time.h>
21794 #endif
21795 #include <time.h>
21796 #ifdef HAVE_UTIME_H
21797 #include <utime.h>
21798 #endif
21801 main ()
21803 static struct utimbuf x; x.actime = x.modtime;
21805 return 0;
21807 _ACEOF
21808 if ac_fn_c_try_compile "$LINENO"; then :
21809 gl_cv_sys_struct_utimbuf=yes
21810 else
21811 gl_cv_sys_struct_utimbuf=no
21813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
21816 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
21818 if test $gl_cv_sys_struct_utimbuf = yes; then
21820 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
21834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
21835 $as_echo_n "checking type of array argument to getgroups... " >&6; }
21836 if test "${ac_cv_type_getgroups+set}" = set; then :
21837 $as_echo_n "(cached) " >&6
21838 else
21839 if test "$cross_compiling" = yes; then :
21840 ac_cv_type_getgroups=cross
21841 else
21842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21843 /* end confdefs.h. */
21844 /* Thanks to Mike Rendell for this test. */
21845 $ac_includes_default
21846 #define NGID 256
21847 #undef MAX
21848 #define MAX(x, y) ((x) > (y) ? (x) : (y))
21851 main ()
21853 gid_t gidset[NGID];
21854 int i, n;
21855 union { gid_t gval; long int lval; } val;
21857 val.lval = -1;
21858 for (i = 0; i < NGID; i++)
21859 gidset[i] = val.gval;
21860 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
21861 gidset);
21862 /* Exit non-zero if getgroups seems to require an array of ints. This
21863 happens when gid_t is short int but getgroups modifies an array
21864 of ints. */
21865 return n > 0 && gidset[n] != val.gval;
21867 _ACEOF
21868 if ac_fn_c_try_run "$LINENO"; then :
21869 ac_cv_type_getgroups=gid_t
21870 else
21871 ac_cv_type_getgroups=int
21873 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21874 conftest.$ac_objext conftest.beam conftest.$ac_ext
21877 if test $ac_cv_type_getgroups = cross; then
21878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21879 /* end confdefs.h. */
21880 #include <unistd.h>
21882 _ACEOF
21883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21884 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
21885 ac_cv_type_getgroups=gid_t
21886 else
21887 ac_cv_type_getgroups=int
21889 rm -f conftest*
21893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
21894 $as_echo "$ac_cv_type_getgroups" >&6; }
21896 cat >>confdefs.h <<_ACEOF
21897 #define GETGROUPS_T $ac_cv_type_getgroups
21898 _ACEOF
21905 if false; then
21906 GL_COND_LIBTOOL_TRUE=
21907 GL_COND_LIBTOOL_FALSE='#'
21908 else
21909 GL_COND_LIBTOOL_TRUE='#'
21910 GL_COND_LIBTOOL_FALSE=
21913 gl_cond_libtool=false
21914 gl_libdeps=
21915 gl_ltlibdeps=
21916 gl_m4_base='m4'
21926 gl_source_base='lib'
21929 if test $ac_cv_func_alloca_works = no; then
21933 # Define an additional variable used in the Makefile substitution.
21934 if test $ac_cv_working_alloca_h = yes; then
21935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
21936 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
21937 if test "${gl_cv_rpl_alloca+set}" = set; then :
21938 $as_echo_n "(cached) " >&6
21939 else
21941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21942 /* end confdefs.h. */
21944 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
21945 Need own alloca
21946 #endif
21948 _ACEOF
21949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21950 $EGREP "Need own alloca" >/dev/null 2>&1; then :
21951 gl_cv_rpl_alloca=yes
21952 else
21953 gl_cv_rpl_alloca=no
21955 rm -f conftest*
21959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
21960 $as_echo "$gl_cv_rpl_alloca" >&6; }
21961 if test $gl_cv_rpl_alloca = yes; then
21963 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
21965 ALLOCA_H=alloca.h
21966 else
21967 ALLOCA_H=
21969 else
21970 ALLOCA_H=alloca.h
21973 if test -n "$ALLOCA_H"; then
21974 GL_GENERATE_ALLOCA_H_TRUE=
21975 GL_GENERATE_ALLOCA_H_FALSE='#'
21976 else
21977 GL_GENERATE_ALLOCA_H_TRUE='#'
21978 GL_GENERATE_ALLOCA_H_FALSE=
21986 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
21987 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
21989 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
21990 # programs in the package would end up linked with that potentially-shared
21991 # library, inducing unnecessary run-time overhead.
21992 LIB_CLOCK_GETTIME=
21994 gl_saved_libs=$LIBS
21995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21996 $as_echo_n "checking for library containing clock_gettime... " >&6; }
21997 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21998 $as_echo_n "(cached) " >&6
21999 else
22000 ac_func_search_save_LIBS=$LIBS
22001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22002 /* end confdefs.h. */
22004 /* Override any GCC internal prototype to avoid an error.
22005 Use char because int might match the return type of a GCC
22006 builtin and then its argument prototype would still apply. */
22007 #ifdef __cplusplus
22008 extern "C"
22009 #endif
22010 char clock_gettime ();
22012 main ()
22014 return clock_gettime ();
22016 return 0;
22018 _ACEOF
22019 for ac_lib in '' rt posix4; do
22020 if test -z "$ac_lib"; then
22021 ac_res="none required"
22022 else
22023 ac_res=-l$ac_lib
22024 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22026 if ac_fn_c_try_link "$LINENO"; then :
22027 ac_cv_search_clock_gettime=$ac_res
22029 rm -f core conftest.err conftest.$ac_objext \
22030 conftest$ac_exeext
22031 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22032 break
22034 done
22035 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22037 else
22038 ac_cv_search_clock_gettime=no
22040 rm conftest.$ac_ext
22041 LIBS=$ac_func_search_save_LIBS
22043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22044 $as_echo "$ac_cv_search_clock_gettime" >&6; }
22045 ac_res=$ac_cv_search_clock_gettime
22046 if test "$ac_res" != no; then :
22047 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22048 test "$ac_cv_search_clock_gettime" = "none required" ||
22049 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22052 for ac_func in clock_gettime clock_settime
22053 do :
22054 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22055 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22056 eval as_val=\$$as_ac_var
22057 if test "x$as_val" = x""yes; then :
22058 cat >>confdefs.h <<_ACEOF
22059 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22060 _ACEOF
22063 done
22065 LIBS=$gl_saved_libs
22072 cat >>confdefs.h <<_ACEOF
22073 #define GNULIB_CLOSE_STREAM 1
22074 _ACEOF
22103 if test $gl_cv_have_include_next = yes; then
22104 gl_cv_next_dirent_h='<'dirent.h'>'
22105 else
22106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22107 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22108 if test "${gl_cv_next_dirent_h+set}" = set; then :
22109 $as_echo_n "(cached) " >&6
22110 else
22112 if test $ac_cv_header_dirent_h = yes; then
22115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22116 /* end confdefs.h. */
22117 #include <dirent.h>
22119 _ACEOF
22120 case "$host_os" in
22121 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22122 *) gl_absname_cpp="$ac_cpp" ;;
22123 esac
22125 case "$host_os" in
22126 mingw*)
22127 gl_dirsep_regex='[/\\]'
22130 gl_dirsep_regex='\/'
22132 esac
22133 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22135 gl_header_literal_regex=`echo 'dirent.h' \
22136 | sed -e "$gl_make_literal_regex_sed"`
22137 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22138 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22139 s|^/[^/]|//&|
22143 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22144 sed -n "$gl_absolute_header_sed"`'"'
22145 else
22146 gl_cv_next_dirent_h='<'dirent.h'>'
22151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22152 $as_echo "$gl_cv_next_dirent_h" >&6; }
22154 NEXT_DIRENT_H=$gl_cv_next_dirent_h
22156 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22157 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22158 gl_next_as_first_directive='<'dirent.h'>'
22159 else
22160 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22161 gl_next_as_first_directive=$gl_cv_next_dirent_h
22163 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
22168 if test $ac_cv_header_dirent_h = yes; then
22169 HAVE_DIRENT_H=1
22170 else
22171 HAVE_DIRENT_H=0
22183 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
22186 if test $HAVE_DUP2 = 1; then
22187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22188 $as_echo_n "checking whether dup2 works... " >&6; }
22189 if test "${gl_cv_func_dup2_works+set}" = set; then :
22190 $as_echo_n "(cached) " >&6
22191 else
22192 if test "$cross_compiling" = yes; then :
22193 case "$host_os" in
22194 mingw*) # on this platform, dup2 always returns 0 for success
22195 gl_cv_func_dup2_works="guessing no" ;;
22196 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22197 gl_cv_func_dup2_works="guessing no" ;;
22198 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22199 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22200 gl_cv_func_dup2_works="guessing no" ;;
22201 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22202 gl_cv_func_dup2_works="guessing no" ;;
22203 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22204 gl_cv_func_dup2_works="guessing no" ;;
22205 *) gl_cv_func_dup2_works="guessing yes" ;;
22206 esac
22207 else
22208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22209 /* end confdefs.h. */
22211 #include <unistd.h>
22212 #include <fcntl.h>
22213 #include <errno.h>
22215 main ()
22217 int result = 0;
22218 #ifdef FD_CLOEXEC
22219 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22220 result |= 1;
22221 #endif
22222 if (dup2 (1, 1) == 0)
22223 result |= 2;
22224 #ifdef FD_CLOEXEC
22225 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22226 result |= 4;
22227 #endif
22228 close (0);
22229 if (dup2 (0, 0) != -1)
22230 result |= 8;
22231 /* Many gnulib modules require POSIX conformance of EBADF. */
22232 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22233 result |= 16;
22234 /* Flush out a cygwin core dump. */
22235 if (dup2 (2, -1) != -1 || errno != EBADF)
22236 result |= 32;
22237 return result;
22240 return 0;
22243 _ACEOF
22244 if ac_fn_c_try_run "$LINENO"; then :
22245 gl_cv_func_dup2_works=yes
22246 else
22247 gl_cv_func_dup2_works=no
22249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22250 conftest.$ac_objext conftest.beam conftest.$ac_ext
22255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22256 $as_echo "$gl_cv_func_dup2_works" >&6; }
22257 case "$gl_cv_func_dup2_works" in
22258 *yes) ;;
22260 REPLACE_DUP2=1
22262 esac
22266 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22275 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22284 GNULIB_DUP2=1
22296 GNULIB_ENVIRON=1
22306 LIB_EXECINFO=''
22307 EXECINFO_H='execinfo.h'
22309 if test $ac_cv_header_execinfo_h = yes; then
22310 gl_saved_libs=$LIBS
22311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22312 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22313 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22314 $as_echo_n "(cached) " >&6
22315 else
22316 ac_func_search_save_LIBS=$LIBS
22317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22318 /* end confdefs.h. */
22320 /* Override any GCC internal prototype to avoid an error.
22321 Use char because int might match the return type of a GCC
22322 builtin and then its argument prototype would still apply. */
22323 #ifdef __cplusplus
22324 extern "C"
22325 #endif
22326 char backtrace_symbols_fd ();
22328 main ()
22330 return backtrace_symbols_fd ();
22332 return 0;
22334 _ACEOF
22335 for ac_lib in '' execinfo; do
22336 if test -z "$ac_lib"; then
22337 ac_res="none required"
22338 else
22339 ac_res=-l$ac_lib
22340 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22342 if ac_fn_c_try_link "$LINENO"; then :
22343 ac_cv_search_backtrace_symbols_fd=$ac_res
22345 rm -f core conftest.err conftest.$ac_objext \
22346 conftest$ac_exeext
22347 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22348 break
22350 done
22351 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22353 else
22354 ac_cv_search_backtrace_symbols_fd=no
22356 rm conftest.$ac_ext
22357 LIBS=$ac_func_search_save_LIBS
22359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22360 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22361 ac_res=$ac_cv_search_backtrace_symbols_fd
22362 if test "$ac_res" != no; then :
22363 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22364 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22365 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22368 LIBS=$gl_saved_libs
22369 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22372 if test -n "$EXECINFO_H"; then
22381 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22387 if test -n "$EXECINFO_H"; then
22388 GL_GENERATE_EXECINFO_H_TRUE=
22389 GL_GENERATE_EXECINFO_H_FALSE='#'
22390 else
22391 GL_GENERATE_EXECINFO_H_TRUE='#'
22392 GL_GENERATE_EXECINFO_H_FALSE=
22403 if test $ac_cv_func_faccessat = no; then
22404 HAVE_FACCESSAT=0
22407 if test $HAVE_FACCESSAT = 0; then
22416 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22419 for ac_func in access
22420 do :
22421 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22422 if test "x$ac_cv_func_access" = x""yes; then :
22423 cat >>confdefs.h <<_ACEOF
22424 #define HAVE_ACCESS 1
22425 _ACEOF
22428 done
22434 cat >>confdefs.h <<_ACEOF
22435 #define GNULIB_FACCESSAT 1
22436 _ACEOF
22444 GNULIB_FACCESSAT=1
22455 if test $ac_cv_func_fcntl = no; then
22459 if test $ac_cv_func_fcntl = no; then
22460 HAVE_FCNTL=0
22461 else
22462 REPLACE_FCNTL=1
22465 else
22466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22467 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22468 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
22469 $as_echo_n "(cached) " >&6
22470 else
22471 if test "$cross_compiling" = yes; then :
22472 # Guess that it works on glibc systems
22473 case $host_os in #((
22474 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22475 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22476 esac
22477 else
22478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22479 /* end confdefs.h. */
22481 #include <fcntl.h>
22482 #include <errno.h>
22485 main ()
22487 int result = 0;
22488 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22489 if (errno != EINVAL) result |= 2;
22490 return result;
22493 return 0;
22495 _ACEOF
22496 if ac_fn_c_try_run "$LINENO"; then :
22497 gl_cv_func_fcntl_f_dupfd_works=yes
22498 else
22499 gl_cv_func_fcntl_f_dupfd_works=no
22501 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22502 conftest.$ac_objext conftest.beam conftest.$ac_ext
22506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22507 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22508 case $gl_cv_func_fcntl_f_dupfd_works in
22509 *yes) ;;
22513 if test $ac_cv_func_fcntl = no; then
22514 HAVE_FCNTL=0
22515 else
22516 REPLACE_FCNTL=1
22520 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22522 esac
22524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22525 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22526 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
22527 $as_echo_n "(cached) " >&6
22528 else
22529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22530 /* end confdefs.h. */
22532 #include <fcntl.h>
22533 #ifndef F_DUPFD_CLOEXEC
22534 choke me
22535 #endif
22538 main ()
22542 return 0;
22544 _ACEOF
22545 if ac_fn_c_try_compile "$LINENO"; then :
22546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22547 /* end confdefs.h. */
22549 #ifdef __linux__
22550 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22551 it to support the semantics on older kernels that failed with EINVAL. */
22552 choke me
22553 #endif
22556 main ()
22560 return 0;
22562 _ACEOF
22563 if ac_fn_c_try_compile "$LINENO"; then :
22564 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22565 else
22566 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22569 else
22570 gl_cv_func_fcntl_f_dupfd_cloexec=no
22572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22575 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22576 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22580 if test $ac_cv_func_fcntl = no; then
22581 HAVE_FCNTL=0
22582 else
22583 REPLACE_FCNTL=1
22590 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22599 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22607 GNULIB_FCNTL=1
22624 if test $gl_cv_have_include_next = yes; then
22625 gl_cv_next_fcntl_h='<'fcntl.h'>'
22626 else
22627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22628 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22629 if test "${gl_cv_next_fcntl_h+set}" = set; then :
22630 $as_echo_n "(cached) " >&6
22631 else
22633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22634 /* end confdefs.h. */
22635 #include <fcntl.h>
22637 _ACEOF
22638 case "$host_os" in
22639 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22640 *) gl_absname_cpp="$ac_cpp" ;;
22641 esac
22643 case "$host_os" in
22644 mingw*)
22645 gl_dirsep_regex='[/\\]'
22648 gl_dirsep_regex='\/'
22650 esac
22651 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22653 gl_header_literal_regex=`echo 'fcntl.h' \
22654 | sed -e "$gl_make_literal_regex_sed"`
22655 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22656 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22657 s|^/[^/]|//&|
22661 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22662 sed -n "$gl_absolute_header_sed"`'"'
22666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22667 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22669 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22671 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22672 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22673 gl_next_as_first_directive='<'fcntl.h'>'
22674 else
22675 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22676 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22678 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22694 LIB_FDATASYNC=
22697 if test $ac_cv_have_decl_fdatasync = no; then
22698 HAVE_DECL_FDATASYNC=0
22699 for ac_func in fdatasync
22700 do :
22701 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
22702 if test "x$ac_cv_func_fdatasync" = x""yes; then :
22703 cat >>confdefs.h <<_ACEOF
22704 #define HAVE_FDATASYNC 1
22705 _ACEOF
22708 done
22710 if test $ac_cv_func_fdatasync = no; then
22711 HAVE_FDATASYNC=0
22713 else
22714 gl_saved_libs=$LIBS
22715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
22716 $as_echo_n "checking for library containing fdatasync... " >&6; }
22717 if test "${ac_cv_search_fdatasync+set}" = set; then :
22718 $as_echo_n "(cached) " >&6
22719 else
22720 ac_func_search_save_LIBS=$LIBS
22721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22722 /* end confdefs.h. */
22724 /* Override any GCC internal prototype to avoid an error.
22725 Use char because int might match the return type of a GCC
22726 builtin and then its argument prototype would still apply. */
22727 #ifdef __cplusplus
22728 extern "C"
22729 #endif
22730 char fdatasync ();
22732 main ()
22734 return fdatasync ();
22736 return 0;
22738 _ACEOF
22739 for ac_lib in '' rt posix4; do
22740 if test -z "$ac_lib"; then
22741 ac_res="none required"
22742 else
22743 ac_res=-l$ac_lib
22744 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22746 if ac_fn_c_try_link "$LINENO"; then :
22747 ac_cv_search_fdatasync=$ac_res
22749 rm -f core conftest.err conftest.$ac_objext \
22750 conftest$ac_exeext
22751 if test "${ac_cv_search_fdatasync+set}" = set; then :
22752 break
22754 done
22755 if test "${ac_cv_search_fdatasync+set}" = set; then :
22757 else
22758 ac_cv_search_fdatasync=no
22760 rm conftest.$ac_ext
22761 LIBS=$ac_func_search_save_LIBS
22763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
22764 $as_echo "$ac_cv_search_fdatasync" >&6; }
22765 ac_res=$ac_cv_search_fdatasync
22766 if test "$ac_res" != no; then :
22767 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22768 test "$ac_cv_search_fdatasync" = "none required" ||
22769 LIB_FDATASYNC=$ac_cv_search_fdatasync
22772 LIBS=$gl_saved_libs
22775 if test $HAVE_FDATASYNC = 0; then
22784 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
22792 GNULIB_FDATASYNC=1
22803 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22804 #include <dirent.h>
22807 if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
22808 ac_have_decl=1
22809 else
22810 ac_have_decl=0
22813 cat >>confdefs.h <<_ACEOF
22814 #define HAVE_DECL_FDOPENDIR $ac_have_decl
22815 _ACEOF
22816 if test $ac_have_decl = 1; then :
22818 else
22819 HAVE_DECL_FDOPENDIR=0
22823 if test $ac_cv_func_fdopendir = no; then
22824 HAVE_FDOPENDIR=0
22825 else
22826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22827 $as_echo_n "checking whether fdopendir works... " >&6; }
22828 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
22829 $as_echo_n "(cached) " >&6
22830 else
22831 if test "$cross_compiling" = yes; then :
22832 case "$host_os" in
22833 # Guess yes on glibc systems.
22834 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22835 # If we don't know, assume the worst.
22836 *) gl_cv_func_fdopendir_works="guessing no" ;;
22837 esac
22839 else
22840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22841 /* end confdefs.h. */
22843 #include <dirent.h>
22844 #include <fcntl.h>
22845 #include <unistd.h>
22846 #if !HAVE_DECL_FDOPENDIR
22847 extern
22848 # ifdef __cplusplus
22850 # endif
22851 DIR *fdopendir (int);
22852 #endif
22855 main ()
22857 int result = 0;
22858 int fd = open ("conftest.c", O_RDONLY);
22859 if (fd < 0) result |= 1;
22860 if (fdopendir (fd)) result |= 2;
22861 if (close (fd)) result |= 4;
22862 return result;
22864 return 0;
22866 _ACEOF
22867 if ac_fn_c_try_run "$LINENO"; then :
22868 gl_cv_func_fdopendir_works=yes
22869 else
22870 gl_cv_func_fdopendir_works=no
22872 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22873 conftest.$ac_objext conftest.beam conftest.$ac_ext
22877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22878 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
22879 case "$gl_cv_func_fdopendir_works" in
22880 *yes) ;;
22882 REPLACE_FDOPENDIR=1
22884 esac
22887 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22896 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22904 GNULIB_FDOPENDIR=1
22912 cat >>confdefs.h <<_ACEOF
22913 #define GNULIB_FDOPENDIR 1
22914 _ACEOF
22924 fp_headers='
22925 # include <stdio.h>
22926 # if HAVE_STDIO_EXT_H
22927 # include <stdio_ext.h>
22928 # endif
22930 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22932 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
22933 ac_have_decl=1
22934 else
22935 ac_have_decl=0
22938 cat >>confdefs.h <<_ACEOF
22939 #define HAVE_DECL___FPENDING $ac_have_decl
22940 _ACEOF
22943 if test $ac_cv_func___fpending = no; then
22952 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
22956 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
22957 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
22958 $as_echo_n "(cached) " >&6
22959 else
22961 for ac_expr in \
22963 '# glibc2' \
22964 'fp->_IO_write_ptr - fp->_IO_write_base' \
22966 '# traditional Unix' \
22967 'fp->_ptr - fp->_base' \
22969 '# BSD' \
22970 'fp->_p - fp->_bf._base' \
22972 '# SCO, Unixware' \
22973 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
22975 '# QNX' \
22976 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
22978 '# old glibc?' \
22979 'fp->__bufp - fp->__buffer' \
22981 '# old glibc iostream?' \
22982 'fp->_pptr - fp->_pbase' \
22984 '# emx+gcc' \
22985 'fp->_ptr - fp->_buffer' \
22987 '# Minix' \
22988 'fp->_ptr - fp->_buf' \
22990 '# Plan9' \
22991 'fp->wp - fp->buf' \
22993 '# VMS' \
22994 '(*fp)->_ptr - (*fp)->_base' \
22996 '# e.g., DGUX R4.11; the info is not available' \
22998 ; do
23000 # Skip each embedded comment.
23001 case "$ac_expr" in '#'*) continue;; esac
23003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23004 /* end confdefs.h. */
23005 #include <stdio.h>
23007 main ()
23009 FILE *fp = stdin; (void) ($ac_expr);
23011 return 0;
23013 _ACEOF
23014 if ac_fn_c_try_compile "$LINENO"; then :
23015 fp_done=yes
23018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23019 test "$fp_done" = yes && break
23020 done
23022 ac_cv_sys_pending_output_n_bytes=$ac_expr
23026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23027 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23029 cat >>confdefs.h <<_ACEOF
23030 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23031 _ACEOF
23041 if test $ac_cv_func_fstatat = no; then
23042 HAVE_FSTATAT=0
23043 else
23044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23045 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23046 if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23047 $as_echo_n "(cached) " >&6
23048 else
23049 if test "$cross_compiling" = yes; then :
23050 case "$host_os" in
23051 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23052 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23053 esac
23055 else
23056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23057 /* end confdefs.h. */
23059 #include <fcntl.h>
23060 #include <sys/stat.h>
23062 main (void)
23064 struct stat a;
23065 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23068 _ACEOF
23069 if ac_fn_c_try_run "$LINENO"; then :
23070 gl_cv_func_fstatat_zero_flag=yes
23071 else
23072 gl_cv_func_fstatat_zero_flag=no
23074 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23075 conftest.$ac_objext conftest.beam conftest.$ac_ext
23080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23081 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23083 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23084 *yes+*yes) ;;
23085 *) REPLACE_FSTATAT=1
23086 case $gl_cv_func_fstatat_zero_flag in
23087 *yes)
23089 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23092 esac
23094 esac
23097 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23106 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23114 GNULIB_FSTATAT=1
23123 if test $ac_cv_func_fsync = no; then
23124 HAVE_FSYNC=0
23127 if test $HAVE_FSYNC = 0; then
23136 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23145 GNULIB_FSYNC=1
23153 # Persuade glibc <stdlib.h> to declare getloadavg().
23156 gl_save_LIBS=$LIBS
23158 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23159 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23160 HAVE_GETLOADAVG=1
23161 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23162 if test "x$ac_cv_func_getloadavg" = x""yes; then :
23164 else
23165 gl_func_getloadavg_done=no
23167 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23168 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23169 # to get the right answer into the cache.
23170 # For kstat on solaris, we need to test for libelf and libkvm to force the
23171 # definition of SVR4 below.
23172 if test $gl_func_getloadavg_done = no; then
23173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23174 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
23175 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
23176 $as_echo_n "(cached) " >&6
23177 else
23178 ac_check_lib_save_LIBS=$LIBS
23179 LIBS="-lelf $LIBS"
23180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23181 /* end confdefs.h. */
23183 /* Override any GCC internal prototype to avoid an error.
23184 Use char because int might match the return type of a GCC
23185 builtin and then its argument prototype would still apply. */
23186 #ifdef __cplusplus
23187 extern "C"
23188 #endif
23189 char elf_begin ();
23191 main ()
23193 return elf_begin ();
23195 return 0;
23197 _ACEOF
23198 if ac_fn_c_try_link "$LINENO"; then :
23199 ac_cv_lib_elf_elf_begin=yes
23200 else
23201 ac_cv_lib_elf_elf_begin=no
23203 rm -f core conftest.err conftest.$ac_objext \
23204 conftest$ac_exeext conftest.$ac_ext
23205 LIBS=$ac_check_lib_save_LIBS
23207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23208 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23209 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23210 LIBS="-lelf $LIBS"
23213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23214 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23215 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
23216 $as_echo_n "(cached) " >&6
23217 else
23218 ac_check_lib_save_LIBS=$LIBS
23219 LIBS="-lkvm $LIBS"
23220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23221 /* end confdefs.h. */
23223 /* Override any GCC internal prototype to avoid an error.
23224 Use char because int might match the return type of a GCC
23225 builtin and then its argument prototype would still apply. */
23226 #ifdef __cplusplus
23227 extern "C"
23228 #endif
23229 char kvm_open ();
23231 main ()
23233 return kvm_open ();
23235 return 0;
23237 _ACEOF
23238 if ac_fn_c_try_link "$LINENO"; then :
23239 ac_cv_lib_kvm_kvm_open=yes
23240 else
23241 ac_cv_lib_kvm_kvm_open=no
23243 rm -f core conftest.err conftest.$ac_objext \
23244 conftest$ac_exeext conftest.$ac_ext
23245 LIBS=$ac_check_lib_save_LIBS
23247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23248 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23249 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23250 LIBS="-lkvm $LIBS"
23253 # Check for the 4.4BSD definition of getloadavg.
23254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23255 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
23256 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
23257 $as_echo_n "(cached) " >&6
23258 else
23259 ac_check_lib_save_LIBS=$LIBS
23260 LIBS="-lutil $LIBS"
23261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23262 /* end confdefs.h. */
23264 /* Override any GCC internal prototype to avoid an error.
23265 Use char because int might match the return type of a GCC
23266 builtin and then its argument prototype would still apply. */
23267 #ifdef __cplusplus
23268 extern "C"
23269 #endif
23270 char getloadavg ();
23272 main ()
23274 return getloadavg ();
23276 return 0;
23278 _ACEOF
23279 if ac_fn_c_try_link "$LINENO"; then :
23280 ac_cv_lib_util_getloadavg=yes
23281 else
23282 ac_cv_lib_util_getloadavg=no
23284 rm -f core conftest.err conftest.$ac_objext \
23285 conftest$ac_exeext conftest.$ac_ext
23286 LIBS=$ac_check_lib_save_LIBS
23288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23289 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23290 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23291 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
23296 if test $gl_func_getloadavg_done = no; then
23297 # There is a commonly available library for RS/6000 AIX.
23298 # Since it is not a standard part of AIX, it might be installed locally.
23299 gl_getloadavg_LIBS=$LIBS
23300 LIBS="-L/usr/local/lib $LIBS"
23301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23302 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23303 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
23304 $as_echo_n "(cached) " >&6
23305 else
23306 ac_check_lib_save_LIBS=$LIBS
23307 LIBS="-lgetloadavg $LIBS"
23308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23309 /* end confdefs.h. */
23311 /* Override any GCC internal prototype to avoid an error.
23312 Use char because int might match the return type of a GCC
23313 builtin and then its argument prototype would still apply. */
23314 #ifdef __cplusplus
23315 extern "C"
23316 #endif
23317 char getloadavg ();
23319 main ()
23321 return getloadavg ();
23323 return 0;
23325 _ACEOF
23326 if ac_fn_c_try_link "$LINENO"; then :
23327 ac_cv_lib_getloadavg_getloadavg=yes
23328 else
23329 ac_cv_lib_getloadavg_getloadavg=no
23331 rm -f core conftest.err conftest.$ac_objext \
23332 conftest$ac_exeext conftest.$ac_ext
23333 LIBS=$ac_check_lib_save_LIBS
23335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23336 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23337 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23338 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23339 else
23340 LIBS=$gl_getloadavg_LIBS
23345 # Set up the replacement function if necessary.
23346 if test $gl_func_getloadavg_done = no; then
23347 HAVE_GETLOADAVG=0
23349 # Solaris has libkstat which does not require root.
23350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23351 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23352 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
23353 $as_echo_n "(cached) " >&6
23354 else
23355 ac_check_lib_save_LIBS=$LIBS
23356 LIBS="-lkstat $LIBS"
23357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23358 /* end confdefs.h. */
23360 /* Override any GCC internal prototype to avoid an error.
23361 Use char because int might match the return type of a GCC
23362 builtin and then its argument prototype would still apply. */
23363 #ifdef __cplusplus
23364 extern "C"
23365 #endif
23366 char kstat_open ();
23368 main ()
23370 return kstat_open ();
23372 return 0;
23374 _ACEOF
23375 if ac_fn_c_try_link "$LINENO"; then :
23376 ac_cv_lib_kstat_kstat_open=yes
23377 else
23378 ac_cv_lib_kstat_kstat_open=no
23380 rm -f core conftest.err conftest.$ac_objext \
23381 conftest$ac_exeext conftest.$ac_ext
23382 LIBS=$ac_check_lib_save_LIBS
23384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23385 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23386 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
23387 cat >>confdefs.h <<_ACEOF
23388 #define HAVE_LIBKSTAT 1
23389 _ACEOF
23391 LIBS="-lkstat $LIBS"
23395 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
23397 # AIX has libperfstat which does not require root
23398 if test $gl_func_getloadavg_done = no; then
23399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23400 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23401 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
23402 $as_echo_n "(cached) " >&6
23403 else
23404 ac_check_lib_save_LIBS=$LIBS
23405 LIBS="-lperfstat $LIBS"
23406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23407 /* end confdefs.h. */
23409 /* Override any GCC internal prototype to avoid an error.
23410 Use char because int might match the return type of a GCC
23411 builtin and then its argument prototype would still apply. */
23412 #ifdef __cplusplus
23413 extern "C"
23414 #endif
23415 char perfstat_cpu_total ();
23417 main ()
23419 return perfstat_cpu_total ();
23421 return 0;
23423 _ACEOF
23424 if ac_fn_c_try_link "$LINENO"; then :
23425 ac_cv_lib_perfstat_perfstat_cpu_total=yes
23426 else
23427 ac_cv_lib_perfstat_perfstat_cpu_total=no
23429 rm -f core conftest.err conftest.$ac_objext \
23430 conftest$ac_exeext conftest.$ac_ext
23431 LIBS=$ac_check_lib_save_LIBS
23433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23434 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23435 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23436 cat >>confdefs.h <<_ACEOF
23437 #define HAVE_LIBPERFSTAT 1
23438 _ACEOF
23440 LIBS="-lperfstat $LIBS"
23444 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23447 if test $gl_func_getloadavg_done = no; then
23448 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23449 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23450 gl_func_getloadavg_done=yes
23452 $as_echo "#define DGUX 1" >>confdefs.h
23454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23455 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23456 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
23457 $as_echo_n "(cached) " >&6
23458 else
23459 ac_check_lib_save_LIBS=$LIBS
23460 LIBS="-ldgc $LIBS"
23461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23462 /* end confdefs.h. */
23464 /* Override any GCC internal prototype to avoid an error.
23465 Use char because int might match the return type of a GCC
23466 builtin and then its argument prototype would still apply. */
23467 #ifdef __cplusplus
23468 extern "C"
23469 #endif
23470 char dg_sys_info ();
23472 main ()
23474 return dg_sys_info ();
23476 return 0;
23478 _ACEOF
23479 if ac_fn_c_try_link "$LINENO"; then :
23480 ac_cv_lib_dgc_dg_sys_info=yes
23481 else
23482 ac_cv_lib_dgc_dg_sys_info=no
23484 rm -f core conftest.err conftest.$ac_objext \
23485 conftest$ac_exeext conftest.$ac_ext
23486 LIBS=$ac_check_lib_save_LIBS
23488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23489 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23490 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23491 cat >>confdefs.h <<_ACEOF
23492 #define HAVE_LIBDGC 1
23493 _ACEOF
23495 LIBS="-ldgc $LIBS"
23507 if test "x$gl_save_LIBS" = x; then
23508 GETLOADAVG_LIBS=$LIBS
23509 else
23510 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
23512 LIBS=$gl_save_LIBS
23515 # Test whether the system declares getloadavg. Solaris has the function
23516 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
23517 for ac_header in sys/loadavg.h
23518 do :
23519 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
23520 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
23521 cat >>confdefs.h <<_ACEOF
23522 #define HAVE_SYS_LOADAVG_H 1
23523 _ACEOF
23527 done
23529 if test $ac_cv_header_sys_loadavg_h = yes; then
23530 HAVE_SYS_LOADAVG_H=1
23531 else
23532 HAVE_SYS_LOADAVG_H=0
23534 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
23535 # include <sys/loadavg.h>
23536 #endif
23537 #include <stdlib.h>
23539 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
23541 else
23542 HAVE_DECL_GETLOADAVG=0
23546 if test $HAVE_GETLOADAVG = 0; then
23555 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
23558 # Figure out what our getloadavg.c needs.
23562 # On HPUX9, an unprivileged user can get load averages this way.
23563 if test $gl_func_getloadavg_done = no; then
23564 for ac_func in pstat_getdynamic
23565 do :
23566 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
23567 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
23568 cat >>confdefs.h <<_ACEOF
23569 #define HAVE_PSTAT_GETDYNAMIC 1
23570 _ACEOF
23571 gl_func_getloadavg_done=yes
23573 done
23577 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
23578 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
23579 # Irix 4.0.5F has the header but not the library.
23580 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
23581 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
23582 gl_func_getloadavg_done=yes
23584 $as_echo "#define SVR4 1" >>confdefs.h
23588 if test $gl_func_getloadavg_done = no; then
23589 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
23590 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
23591 gl_func_getloadavg_done=yes
23593 $as_echo "#define UMAX 1" >>confdefs.h
23596 $as_echo "#define UMAX4_3 1" >>confdefs.h
23603 if test $gl_func_getloadavg_done = no; then
23604 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
23605 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
23606 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
23613 if test $gl_func_getloadavg_done = no; then
23614 for ac_header in mach/mach.h
23615 do :
23616 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
23617 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
23618 cat >>confdefs.h <<_ACEOF
23619 #define HAVE_MACH_MACH_H 1
23620 _ACEOF
23624 done
23628 for ac_header in nlist.h
23629 do :
23630 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
23631 if test "x$ac_cv_header_nlist_h" = x""yes; then :
23632 cat >>confdefs.h <<_ACEOF
23633 #define HAVE_NLIST_H 1
23634 _ACEOF
23635 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
23637 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
23639 cat >>confdefs.h <<_ACEOF
23640 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
23641 _ACEOF
23646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23647 /* end confdefs.h. */
23648 #include <nlist.h>
23650 main ()
23652 struct nlist x;
23653 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
23654 x.n_un.n_name = "";
23655 #else
23656 x.n_name = "";
23657 #endif
23659 return 0;
23661 _ACEOF
23662 if ac_fn_c_try_link "$LINENO"; then :
23664 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
23667 rm -f core conftest.err conftest.$ac_objext \
23668 conftest$ac_exeext conftest.$ac_ext
23672 done
23680 GNULIB_GETLOADAVG=1
23691 if test $REPLACE_GETOPT = 1; then
23700 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23710 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23715 GNULIB_GL_UNISTD_H_GETOPT=1
23724 REPLACE_GETOPT=0
23725 if test -n "$gl_replace_getopt"; then
23726 REPLACE_GETOPT=1
23729 if test $REPLACE_GETOPT = 1; then
23731 GETOPT_H=getopt.h
23733 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23739 if test $REPLACE_GETOPT = 1; then
23748 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23758 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23763 GNULIB_GL_UNISTD_H_GETOPT=1
23777 gl_gettimeofday_timezone=void
23778 if test $ac_cv_func_gettimeofday != yes; then
23779 HAVE_GETTIMEOFDAY=0
23780 else
23784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23785 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23786 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
23787 $as_echo_n "(cached) " >&6
23788 else
23789 if test "$cross_compiling" = yes; then :
23790 # When cross-compiling:
23791 case "$host_os" in
23792 # Guess all is fine on glibc systems.
23793 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23794 # If we don't know, assume the worst.
23795 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23796 esac
23798 else
23799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23800 /* end confdefs.h. */
23801 #include <string.h>
23802 #include <sys/time.h>
23803 #include <time.h>
23804 #include <stdlib.h>
23807 main ()
23810 time_t t = 0;
23811 struct tm *lt;
23812 struct tm saved_lt;
23813 struct timeval tv;
23814 lt = localtime (&t);
23815 saved_lt = *lt;
23816 gettimeofday (&tv, NULL);
23817 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23820 return 0;
23822 _ACEOF
23823 if ac_fn_c_try_run "$LINENO"; then :
23824 gl_cv_func_gettimeofday_clobber=no
23825 else
23826 gl_cv_func_gettimeofday_clobber=yes
23828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23829 conftest.$ac_objext conftest.beam conftest.$ac_ext
23833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23834 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23836 case "$gl_cv_func_gettimeofday_clobber" in
23837 *yes)
23838 REPLACE_GETTIMEOFDAY=1
23841 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
23844 $as_echo "#define localtime rpl_localtime" >>confdefs.h
23848 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23851 esac
23853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23854 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23855 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
23856 $as_echo_n "(cached) " >&6
23857 else
23858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23859 /* end confdefs.h. */
23860 #include <sys/time.h>
23861 struct timeval c;
23862 int gettimeofday (struct timeval *restrict, void *restrict);
23865 main ()
23867 /* glibc uses struct timezone * rather than the POSIX void *
23868 if _GNU_SOURCE is defined. However, since the only portable
23869 use of gettimeofday uses NULL as the second parameter, and
23870 since the glibc definition is actually more typesafe, it is
23871 not worth wrapping this to get a compliant signature. */
23872 int (*f) (struct timeval *restrict, void *restrict)
23873 = gettimeofday;
23874 int x = f (&c, 0);
23875 return !(x | c.tv_sec | c.tv_usec);
23878 return 0;
23880 _ACEOF
23881 if ac_fn_c_try_compile "$LINENO"; then :
23882 gl_cv_func_gettimeofday_posix_signature=yes
23883 else
23884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23885 /* end confdefs.h. */
23886 #include <sys/time.h>
23887 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23890 main ()
23894 return 0;
23896 _ACEOF
23897 if ac_fn_c_try_compile "$LINENO"; then :
23898 gl_cv_func_gettimeofday_posix_signature=almost
23899 else
23900 gl_cv_func_gettimeofday_posix_signature=no
23902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23907 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23908 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23909 gl_gettimeofday_timezone='struct timezone'
23910 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23911 REPLACE_GETTIMEOFDAY=1
23913 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23914 REPLACE_GETTIMEOFDAY=1
23919 cat >>confdefs.h <<_ACEOF
23920 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23921 _ACEOF
23924 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23933 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
23936 for ac_header in sys/timeb.h
23937 do :
23938 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23939 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
23940 cat >>confdefs.h <<_ACEOF
23941 #define HAVE_SYS_TIMEB_H 1
23942 _ACEOF
23946 done
23948 for ac_func in _ftime
23949 do :
23950 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23951 if test "x$ac_cv_func__ftime" = x""yes; then :
23952 cat >>confdefs.h <<_ACEOF
23953 #define HAVE__FTIME 1
23954 _ACEOF
23957 done
23966 GNULIB_GETTIMEOFDAY=1
23977 if test $ac_cv_func_lstat = yes; then
23979 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23980 *no)
23981 REPLACE_LSTAT=1
23983 esac
23984 else
23985 HAVE_LSTAT=0
23988 if test $REPLACE_LSTAT = 1; then
23997 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24006 GNULIB_LSTAT=1
24017 if test $ac_cv_have_decl_memrchr = no; then
24018 HAVE_DECL_MEMRCHR=0
24021 for ac_func in memrchr
24022 do :
24023 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24024 if test "x$ac_cv_func_memrchr" = x""yes; then :
24025 cat >>confdefs.h <<_ACEOF
24026 #define HAVE_MEMRCHR 1
24027 _ACEOF
24030 done
24033 if test $ac_cv_func_memrchr = no; then
24042 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24051 GNULIB_MEMRCHR=1
24063 if test $APPLE_UNIVERSAL_BUILD = 1; then
24064 # A universal build on Apple Mac OS X platforms.
24065 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24066 # But we need a configuration result that is valid in both modes.
24067 gl_cv_func_working_mktime=no
24069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24070 $as_echo_n "checking for working mktime... " >&6; }
24071 if test "${gl_cv_func_working_mktime+set}" = set; then :
24072 $as_echo_n "(cached) " >&6
24073 else
24074 if test "$cross_compiling" = yes; then :
24075 gl_cv_func_working_mktime=no
24076 else
24077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24078 /* end confdefs.h. */
24079 /* Test program from Paul Eggert and Tony Leneis. */
24080 #include <limits.h>
24081 #include <stdlib.h>
24082 #include <time.h>
24084 #ifdef HAVE_UNISTD_H
24085 # include <unistd.h>
24086 #endif
24088 #if HAVE_DECL_ALARM
24089 # include <signal.h>
24090 #endif
24092 /* Work around redefinition to rpl_putenv by other config tests. */
24093 #undef putenv
24095 static time_t time_t_max;
24096 static time_t time_t_min;
24098 /* Values we'll use to set the TZ environment variable. */
24099 static char *tz_strings[] = {
24100 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24101 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24103 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24105 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
24106 Based on a problem report from Andreas Jaeger. */
24107 static int
24108 spring_forward_gap ()
24110 /* glibc (up to about 1998-10-07) failed this test. */
24111 struct tm tm;
24113 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24114 instead of "TZ=America/Vancouver" in order to detect the bug even
24115 on systems that don't support the Olson extension, or don't have the
24116 full zoneinfo tables installed. */
24117 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24119 tm.tm_year = 98;
24120 tm.tm_mon = 3;
24121 tm.tm_mday = 5;
24122 tm.tm_hour = 2;
24123 tm.tm_min = 0;
24124 tm.tm_sec = 0;
24125 tm.tm_isdst = -1;
24126 return mktime (&tm) != (time_t) -1;
24129 static int
24130 mktime_test1 (time_t now)
24132 struct tm *lt;
24133 return ! (lt = localtime (&now)) || mktime (lt) == now;
24136 static int
24137 mktime_test (time_t now)
24139 return (mktime_test1 (now)
24140 && mktime_test1 ((time_t) (time_t_max - now))
24141 && mktime_test1 ((time_t) (time_t_min + now)));
24144 static int
24145 irix_6_4_bug ()
24147 /* Based on code from Ariel Faigon. */
24148 struct tm tm;
24149 tm.tm_year = 96;
24150 tm.tm_mon = 3;
24151 tm.tm_mday = 0;
24152 tm.tm_hour = 0;
24153 tm.tm_min = 0;
24154 tm.tm_sec = 0;
24155 tm.tm_isdst = -1;
24156 mktime (&tm);
24157 return tm.tm_mon == 2 && tm.tm_mday == 31;
24160 static int
24161 bigtime_test (int j)
24163 struct tm tm;
24164 time_t now;
24165 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24166 now = mktime (&tm);
24167 if (now != (time_t) -1)
24169 struct tm *lt = localtime (&now);
24170 if (! (lt
24171 && lt->tm_year == tm.tm_year
24172 && lt->tm_mon == tm.tm_mon
24173 && lt->tm_mday == tm.tm_mday
24174 && lt->tm_hour == tm.tm_hour
24175 && lt->tm_min == tm.tm_min
24176 && lt->tm_sec == tm.tm_sec
24177 && lt->tm_yday == tm.tm_yday
24178 && lt->tm_wday == tm.tm_wday
24179 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24180 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24181 return 0;
24183 return 1;
24186 static int
24187 year_2050_test ()
24189 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24190 ignoring leap seconds. */
24191 unsigned long int answer = 2527315200UL;
24193 struct tm tm;
24194 time_t t;
24195 tm.tm_year = 2050 - 1900;
24196 tm.tm_mon = 2 - 1;
24197 tm.tm_mday = 1;
24198 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24199 tm.tm_isdst = -1;
24201 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24202 instead of "TZ=America/Vancouver" in order to detect the bug even
24203 on systems that don't support the Olson extension, or don't have the
24204 full zoneinfo tables installed. */
24205 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24207 t = mktime (&tm);
24209 /* Check that the result is either a failure, or close enough
24210 to the correct answer that we can assume the discrepancy is
24211 due to leap seconds. */
24212 return (t == (time_t) -1
24213 || (0 < t && answer - 120 <= t && t <= answer + 120));
24217 main ()
24219 int result = 0;
24220 time_t t, delta;
24221 int i, j;
24222 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24223 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24225 #if HAVE_DECL_ALARM
24226 /* This test makes some buggy mktime implementations loop.
24227 Give up after 60 seconds; a mktime slower than that
24228 isn't worth using anyway. */
24229 signal (SIGALRM, SIG_DFL);
24230 alarm (60);
24231 #endif
24233 time_t_max = (! time_t_signed
24234 ? (time_t) -1
24235 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24236 * 2 + 1));
24237 time_t_min = (! time_t_signed
24238 ? (time_t) 0
24239 : time_t_signed_magnitude
24240 ? ~ (time_t) 0
24241 : ~ time_t_max);
24243 delta = time_t_max / 997; /* a suitable prime number */
24244 for (i = 0; i < N_STRINGS; i++)
24246 if (tz_strings[i])
24247 putenv (tz_strings[i]);
24249 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24250 if (! mktime_test (t))
24251 result |= 1;
24252 if ((result & 2) == 0
24253 && ! (mktime_test ((time_t) 1)
24254 && mktime_test ((time_t) (60 * 60))
24255 && mktime_test ((time_t) (60 * 60 * 24))))
24256 result |= 2;
24258 for (j = 1; (result & 4) == 0; j <<= 1)
24260 if (! bigtime_test (j))
24261 result |= 4;
24262 if (INT_MAX / 2 < j)
24263 break;
24265 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24266 result |= 8;
24268 if (! irix_6_4_bug ())
24269 result |= 16;
24270 if (! spring_forward_gap ())
24271 result |= 32;
24272 if (! year_2050_test ())
24273 result |= 64;
24274 return result;
24276 _ACEOF
24277 if ac_fn_c_try_run "$LINENO"; then :
24278 gl_cv_func_working_mktime=yes
24279 else
24280 gl_cv_func_working_mktime=no
24282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24283 conftest.$ac_objext conftest.beam conftest.$ac_ext
24288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24289 $as_echo "$gl_cv_func_working_mktime" >&6; }
24291 if test $gl_cv_func_working_mktime = no; then
24292 REPLACE_MKTIME=1
24293 else
24294 REPLACE_MKTIME=0
24297 if test $REPLACE_MKTIME = 1; then
24306 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24315 GNULIB_MKTIME=1
24328 if test $ac_cv_func_pipe2 != yes; then
24329 HAVE_PIPE2=0
24337 GNULIB_PIPE2=1
24348 if test $ac_cv_func_pselect = yes; then
24349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24350 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24351 if test "${gl_cv_sig_pselect+set}" = set; then :
24352 $as_echo_n "(cached) " >&6
24353 else
24354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24355 /* end confdefs.h. */
24356 #include <sys/select.h>
24359 main ()
24361 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24362 struct timespec const *restrict,
24363 sigset_t const *restrict) = pselect;
24364 return !p;
24366 return 0;
24368 _ACEOF
24369 if ac_fn_c_try_link "$LINENO"; then :
24370 gl_cv_sig_pselect=yes
24371 else
24372 gl_cv_sig_pselect=no
24374 rm -f core conftest.err conftest.$ac_objext \
24375 conftest$ac_exeext conftest.$ac_ext
24377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24378 $as_echo "$gl_cv_sig_pselect" >&6; }
24380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24381 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24382 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24383 $as_echo_n "(cached) " >&6
24384 else
24386 if test "$cross_compiling" = yes; then :
24388 case "$host_os" in
24389 # Guess yes on glibc systems.
24390 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24391 # If we don't know, assume the worst.
24392 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24393 esac
24395 else
24396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24397 /* end confdefs.h. */
24399 #include <sys/types.h>
24400 #include <sys/time.h>
24401 #if HAVE_SYS_SELECT_H
24402 # include <sys/select.h>
24403 #endif
24404 #include <unistd.h>
24405 #include <errno.h>
24408 main ()
24411 fd_set set;
24412 dup2(0, 16);
24413 FD_ZERO(&set);
24414 FD_SET(16, &set);
24415 close(16);
24416 struct timespec timeout;
24417 timeout.tv_sec = 0;
24418 timeout.tv_nsec = 5000;
24419 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24422 return 0;
24424 _ACEOF
24425 if ac_fn_c_try_run "$LINENO"; then :
24426 gl_cv_func_pselect_detects_ebadf=yes
24427 else
24428 gl_cv_func_pselect_detects_ebadf=no
24430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24431 conftest.$ac_objext conftest.beam conftest.$ac_ext
24436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24437 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24438 case $gl_cv_func_pselect_detects_ebadf in
24439 *yes) ;;
24440 *) REPLACE_PSELECT=1 ;;
24441 esac
24444 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24445 REPLACE_PSELECT=1
24448 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
24457 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
24465 GNULIB_PSELECT=1
24475 LIB_PTHREAD_SIGMASK=
24480 if test "$gl_threads_api" = posix; then
24481 if test $ac_cv_func_pthread_sigmask = yes; then
24483 else
24484 if test -n "$LIBMULTITHREAD"; then
24485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
24486 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
24487 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
24488 $as_echo_n "(cached) " >&6
24489 else
24490 gl_save_LIBS="$LIBS"
24491 LIBS="$LIBS $LIBMULTITHREAD"
24492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24493 /* end confdefs.h. */
24494 #include <pthread.h>
24495 #include <signal.h>
24498 main ()
24500 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
24502 return 0;
24505 _ACEOF
24506 if ac_fn_c_try_link "$LINENO"; then :
24507 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
24508 else
24509 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
24511 rm -f core conftest.err conftest.$ac_objext \
24512 conftest$ac_exeext conftest.$ac_ext
24513 LIBS="$gl_save_LIBS"
24516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
24517 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
24518 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
24519 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
24520 else
24521 HAVE_PTHREAD_SIGMASK=0
24523 else
24524 HAVE_PTHREAD_SIGMASK=0
24527 else
24528 if test $ac_cv_func_pthread_sigmask = yes; then
24529 REPLACE_PTHREAD_SIGMASK=1
24530 else
24531 HAVE_PTHREAD_SIGMASK=0
24538 if test $HAVE_PTHREAD_SIGMASK = 1; then
24541 if test -z "$LIB_PTHREAD_SIGMASK"; then
24542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
24543 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
24544 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
24545 $as_echo_n "(cached) " >&6
24546 else
24548 if test "$cross_compiling" = yes; then :
24550 case "$host_os" in
24551 freebsd* | hpux* | solaris | solaris2.[2-9]*)
24552 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
24554 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
24555 esac
24557 else
24558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24559 /* end confdefs.h. */
24561 #include <pthread.h>
24562 #include <signal.h>
24563 #include <stddef.h>
24564 int main ()
24566 sigset_t set;
24567 sigemptyset (&set);
24568 return pthread_sigmask (1729, &set, NULL) != 0;
24570 _ACEOF
24571 if ac_fn_c_try_run "$LINENO"; then :
24572 gl_cv_func_pthread_sigmask_in_libc_works=no
24573 else
24574 gl_cv_func_pthread_sigmask_in_libc_works=yes
24576 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24577 conftest.$ac_objext conftest.beam conftest.$ac_ext
24582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
24583 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
24584 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
24585 *no)
24586 REPLACE_PTHREAD_SIGMASK=1
24588 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
24591 esac
24594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
24595 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
24596 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
24597 $as_echo_n "(cached) " >&6
24598 else
24600 gl_save_LIBS="$LIBS"
24601 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
24602 if test "$cross_compiling" = yes; then :
24603 case "$host_os" in
24604 cygwin*)
24605 gl_cv_func_pthread_sigmask_return_works="guessing no";;
24607 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
24608 esac
24610 else
24611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24612 /* end confdefs.h. */
24614 #include <pthread.h>
24615 #include <signal.h>
24616 #include <stddef.h>
24617 int main ()
24619 sigset_t set;
24620 sigemptyset (&set);
24621 if (pthread_sigmask (1729, &set, NULL) == -1)
24622 return 1;
24623 return 0;
24625 _ACEOF
24626 if ac_fn_c_try_run "$LINENO"; then :
24627 gl_cv_func_pthread_sigmask_return_works=yes
24628 else
24629 gl_cv_func_pthread_sigmask_return_works=no
24631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24632 conftest.$ac_objext conftest.beam conftest.$ac_ext
24635 LIBS="$gl_save_LIBS"
24638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
24639 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
24640 case "$gl_cv_func_pthread_sigmask_return_works" in
24641 *no)
24642 REPLACE_PTHREAD_SIGMASK=1
24644 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
24647 esac
24649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
24650 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
24651 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
24652 $as_echo_n "(cached) " >&6
24653 else
24655 case "$host_os" in
24656 irix*)
24657 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
24659 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
24660 esac
24661 gl_save_LIBS="$LIBS"
24662 LIBS="$LIBS $LIBMULTITHREAD"
24663 if test "$cross_compiling" = yes; then :
24665 else
24666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24667 /* end confdefs.h. */
24669 #include <pthread.h>
24670 #include <signal.h>
24671 #include <stdio.h>
24672 #include <stdlib.h>
24673 #include <unistd.h>
24674 static volatile int sigint_occurred;
24675 static void
24676 sigint_handler (int sig)
24678 sigint_occurred++;
24680 int main ()
24682 sigset_t set;
24683 int pid = getpid ();
24684 char command[80];
24685 signal (SIGINT, sigint_handler);
24686 sigemptyset (&set);
24687 sigaddset (&set, SIGINT);
24688 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
24689 return 1;
24690 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
24691 if (!(system (command) == 0))
24692 return 2;
24693 sleep (2);
24694 if (!(sigint_occurred == 0))
24695 return 3;
24696 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
24697 return 4;
24698 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
24699 return 5;
24700 return 0;
24702 _ACEOF
24703 if ac_fn_c_try_run "$LINENO"; then :
24705 else
24706 gl_cv_func_pthread_sigmask_unblock_works=no
24708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24709 conftest.$ac_objext conftest.beam conftest.$ac_ext
24712 LIBS="$gl_save_LIBS"
24715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
24716 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
24717 case "$gl_cv_func_pthread_sigmask_unblock_works" in
24718 *no)
24719 REPLACE_PTHREAD_SIGMASK=1
24721 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
24724 esac
24727 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
24736 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
24739 if test $HAVE_PTHREAD_SIGMASK = 1; then
24741 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
24751 GNULIB_PTHREAD_SIGMASK=1
24759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
24760 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
24761 if test "${gl_cv_func_svid_putenv+set}" = set; then :
24762 $as_echo_n "(cached) " >&6
24763 else
24764 if test "$cross_compiling" = yes; then :
24765 case "$host_os" in
24766 # Guess yes on glibc systems.
24767 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
24768 # If we don't know, assume the worst.
24769 *) gl_cv_func_svid_putenv="guessing no" ;;
24770 esac
24772 else
24773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24774 /* end confdefs.h. */
24775 $ac_includes_default
24777 main ()
24780 /* Put it in env. */
24781 if (putenv ("CONFTEST_putenv=val"))
24782 return 1;
24784 /* Try to remove it. */
24785 if (putenv ("CONFTEST_putenv"))
24786 return 2;
24788 /* Make sure it was deleted. */
24789 if (getenv ("CONFTEST_putenv") != 0)
24790 return 3;
24792 return 0;
24795 return 0;
24797 _ACEOF
24798 if ac_fn_c_try_run "$LINENO"; then :
24799 gl_cv_func_svid_putenv=yes
24800 else
24801 gl_cv_func_svid_putenv=no
24803 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24804 conftest.$ac_objext conftest.beam conftest.$ac_ext
24809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
24810 $as_echo "$gl_cv_func_svid_putenv" >&6; }
24811 case "$gl_cv_func_svid_putenv" in
24812 *yes) ;;
24814 REPLACE_PUTENV=1
24816 esac
24818 if test $REPLACE_PUTENV = 1; then
24827 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
24830 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
24831 if test "x$ac_cv_have_decl__putenv" = x""yes; then :
24832 ac_have_decl=1
24833 else
24834 ac_have_decl=0
24837 cat >>confdefs.h <<_ACEOF
24838 #define HAVE_DECL__PUTENV $ac_have_decl
24839 _ACEOF
24848 GNULIB_PUTENV=1
24855 # Check whether --enable-acl was given.
24856 if test "${enable_acl+set}" = set; then :
24857 enableval=$enable_acl;
24858 else
24859 enable_acl=auto
24863 LIB_ACL=
24864 use_acl=0
24865 if test "x$enable_acl" != "xno"; then
24866 for ac_header in sys/acl.h
24867 do :
24868 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
24869 if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
24870 cat >>confdefs.h <<_ACEOF
24871 #define HAVE_SYS_ACL_H 1
24872 _ACEOF
24876 done
24878 if test $ac_cv_header_sys_acl_h = yes; then
24879 ac_save_LIBS=$LIBS
24881 if test $use_acl = 0; then
24882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
24883 $as_echo_n "checking for library containing acl_get_file... " >&6; }
24884 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24885 $as_echo_n "(cached) " >&6
24886 else
24887 ac_func_search_save_LIBS=$LIBS
24888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24889 /* end confdefs.h. */
24891 /* Override any GCC internal prototype to avoid an error.
24892 Use char because int might match the return type of a GCC
24893 builtin and then its argument prototype would still apply. */
24894 #ifdef __cplusplus
24895 extern "C"
24896 #endif
24897 char acl_get_file ();
24899 main ()
24901 return acl_get_file ();
24903 return 0;
24905 _ACEOF
24906 for ac_lib in '' acl pacl; do
24907 if test -z "$ac_lib"; then
24908 ac_res="none required"
24909 else
24910 ac_res=-l$ac_lib
24911 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24913 if ac_fn_c_try_link "$LINENO"; then :
24914 ac_cv_search_acl_get_file=$ac_res
24916 rm -f core conftest.err conftest.$ac_objext \
24917 conftest$ac_exeext
24918 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24919 break
24921 done
24922 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24924 else
24925 ac_cv_search_acl_get_file=no
24927 rm conftest.$ac_ext
24928 LIBS=$ac_func_search_save_LIBS
24930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
24931 $as_echo "$ac_cv_search_acl_get_file" >&6; }
24932 ac_res=$ac_cv_search_acl_get_file
24933 if test "$ac_res" != no; then :
24934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24935 if test "$ac_cv_search_acl_get_file" != "none required"; then
24936 LIB_ACL=$ac_cv_search_acl_get_file
24938 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
24939 acl_free acl_from_mode acl_from_text \
24940 acl_delete_def_file acl_extended_file \
24941 acl_delete_fd_np acl_delete_file_np \
24942 acl_copy_ext_native acl_create_entry_np \
24943 acl_to_short_text acl_free_text
24944 do :
24945 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24946 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24947 eval as_val=\$$as_ac_var
24948 if test "x$as_val" = x""yes; then :
24949 cat >>confdefs.h <<_ACEOF
24950 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24951 _ACEOF
24954 done
24956 # If the acl_get_file bug is detected, don't enable the ACL support.
24958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
24959 $as_echo_n "checking for working acl_get_file... " >&6; }
24960 if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
24961 $as_echo_n "(cached) " >&6
24962 else
24963 if test "$cross_compiling" = yes; then :
24964 gl_cv_func_working_acl_get_file=cross-compiling
24965 else
24966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24967 /* end confdefs.h. */
24968 #include <sys/types.h>
24969 #include <sys/acl.h>
24970 #include <errno.h>
24973 main ()
24975 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
24976 return 1;
24977 return 0;
24980 return 0;
24982 _ACEOF
24983 if ac_fn_c_try_run "$LINENO"; then :
24984 gl_cv_func_working_acl_get_file=yes
24985 else
24986 gl_cv_func_working_acl_get_file=no
24988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24989 conftest.$ac_objext conftest.beam conftest.$ac_ext
24993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
24994 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
24996 if test $gl_cv_func_working_acl_get_file = yes; then :
24997 use_acl=1
25000 if test $use_acl = 1; then
25001 for ac_header in acl/libacl.h
25002 do :
25003 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25004 if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
25005 cat >>confdefs.h <<_ACEOF
25006 #define HAVE_ACL_LIBACL_H 1
25007 _ACEOF
25011 done
25021 for ac_func in acl_entries
25022 do :
25023 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25024 if test "x$ac_cv_func_acl_entries" = x""yes; then :
25025 cat >>confdefs.h <<_ACEOF
25026 #define HAVE_ACL_ENTRIES 1
25027 _ACEOF
25029 else
25031 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25034 done
25037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25038 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25039 if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
25040 $as_echo_n "(cached) " >&6
25041 else
25042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25043 /* end confdefs.h. */
25044 #include <sys/types.h>
25045 #include <sys/acl.h>
25046 int type = ACL_FIRST_ENTRY;
25048 main ()
25052 return 0;
25054 _ACEOF
25055 if ac_fn_c_try_compile "$LINENO"; then :
25056 gl_cv_acl_ACL_FIRST_ENTRY=yes
25057 else
25058 gl_cv_acl_ACL_FIRST_ENTRY=no
25060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25063 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25064 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25066 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25070 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25071 if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25072 $as_echo_n "(cached) " >&6
25073 else
25074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25075 /* end confdefs.h. */
25076 #include <sys/types.h>
25077 #include <sys/acl.h>
25078 int type = ACL_TYPE_EXTENDED;
25080 main ()
25084 return 0;
25086 _ACEOF
25087 if ac_fn_c_try_compile "$LINENO"; then :
25088 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25089 else
25090 gl_cv_acl_ACL_TYPE_EXTENDED=no
25092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25095 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25096 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25098 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25101 else
25102 LIB_ACL=
25109 if test $use_acl = 0; then
25110 for ac_func in facl
25111 do :
25112 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25113 if test "x$ac_cv_func_facl" = x""yes; then :
25114 cat >>confdefs.h <<_ACEOF
25115 #define HAVE_FACL 1
25116 _ACEOF
25119 done
25121 if test $ac_cv_func_facl = yes; then
25122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25123 $as_echo_n "checking for library containing acl_trivial... " >&6; }
25124 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25125 $as_echo_n "(cached) " >&6
25126 else
25127 ac_func_search_save_LIBS=$LIBS
25128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25129 /* end confdefs.h. */
25131 /* Override any GCC internal prototype to avoid an error.
25132 Use char because int might match the return type of a GCC
25133 builtin and then its argument prototype would still apply. */
25134 #ifdef __cplusplus
25135 extern "C"
25136 #endif
25137 char acl_trivial ();
25139 main ()
25141 return acl_trivial ();
25143 return 0;
25145 _ACEOF
25146 for ac_lib in '' sec; do
25147 if test -z "$ac_lib"; then
25148 ac_res="none required"
25149 else
25150 ac_res=-l$ac_lib
25151 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25153 if ac_fn_c_try_link "$LINENO"; then :
25154 ac_cv_search_acl_trivial=$ac_res
25156 rm -f core conftest.err conftest.$ac_objext \
25157 conftest$ac_exeext
25158 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25159 break
25161 done
25162 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25164 else
25165 ac_cv_search_acl_trivial=no
25167 rm conftest.$ac_ext
25168 LIBS=$ac_func_search_save_LIBS
25170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25171 $as_echo "$ac_cv_search_acl_trivial" >&6; }
25172 ac_res=$ac_cv_search_acl_trivial
25173 if test "$ac_res" != no; then :
25174 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25175 if test "$ac_cv_search_acl_trivial" != "none required"; then
25176 LIB_ACL=$ac_cv_search_acl_trivial
25181 for ac_func in acl_trivial
25182 do :
25183 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25184 if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25185 cat >>confdefs.h <<_ACEOF
25186 #define HAVE_ACL_TRIVIAL 1
25187 _ACEOF
25190 done
25192 use_acl=1
25196 if test $use_acl = 0; then
25197 for ac_func in getacl
25198 do :
25199 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25200 if test "x$ac_cv_func_getacl" = x""yes; then :
25201 cat >>confdefs.h <<_ACEOF
25202 #define HAVE_GETACL 1
25203 _ACEOF
25206 done
25208 if test $ac_cv_func_getacl = yes; then
25209 use_acl=1
25211 for ac_header in aclv.h
25212 do :
25213 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25215 if test "x$ac_cv_header_aclv_h" = x""yes; then :
25216 cat >>confdefs.h <<_ACEOF
25217 #define HAVE_ACLV_H 1
25218 _ACEOF
25222 done
25226 if test $use_acl = 0; then
25227 for ac_func in aclx_get
25228 do :
25229 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25230 if test "x$ac_cv_func_aclx_get" = x""yes; then :
25231 cat >>confdefs.h <<_ACEOF
25232 #define HAVE_ACLX_GET 1
25233 _ACEOF
25236 done
25238 if test $ac_cv_func_aclx_get = yes; then
25239 use_acl=1
25243 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25244 for ac_func in statacl
25245 do :
25246 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25247 if test "x$ac_cv_func_statacl" = x""yes; then :
25248 cat >>confdefs.h <<_ACEOF
25249 #define HAVE_STATACL 1
25250 _ACEOF
25253 done
25255 if test $ac_cv_func_statacl = yes; then
25256 use_acl=1
25260 if test $use_acl = 0; then
25261 for ac_func in aclsort
25262 do :
25263 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25264 if test "x$ac_cv_func_aclsort" = x""yes; then :
25265 cat >>confdefs.h <<_ACEOF
25266 #define HAVE_ACLSORT 1
25267 _ACEOF
25270 done
25272 if test $ac_cv_func_aclsort = yes; then
25273 use_acl=1
25277 LIBS=$ac_save_LIBS
25279 if test "x$enable_acl$use_acl" = "xyes0"; then
25280 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25281 elif test "x$enable_acl$use_acl" = "xauto0"; then
25282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25283 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25285 $as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25290 cat >>confdefs.h <<_ACEOF
25291 #define USE_ACL $use_acl
25292 _ACEOF
25294 USE_ACL=$use_acl
25300 if test $ac_cv_func_readlink = no; then
25301 HAVE_READLINK=0
25302 else
25303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25304 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25305 if test "${gl_cv_decl_readlink_works+set}" = set; then :
25306 $as_echo_n "(cached) " >&6
25307 else
25308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25309 /* end confdefs.h. */
25310 #include <unistd.h>
25311 /* Cause compilation failure if original declaration has wrong type. */
25312 ssize_t readlink (const char *, char *, size_t);
25314 main ()
25318 return 0;
25320 _ACEOF
25321 if ac_fn_c_try_compile "$LINENO"; then :
25322 gl_cv_decl_readlink_works=yes
25323 else
25324 gl_cv_decl_readlink_works=no
25326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25329 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25331 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25332 if test "${gl_cv_func_readlink_works+set}" = set; then :
25333 $as_echo_n "(cached) " >&6
25334 else
25335 # We have readlink, so assume ln -s works.
25336 ln -s conftest.no-such conftest.link
25337 ln -s conftest.link conftest.lnk2
25338 if test "$cross_compiling" = yes; then :
25339 case "$host_os" in
25340 # Guess yes on glibc systems.
25341 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25342 # If we don't know, assume the worst.
25343 *) gl_cv_func_readlink_works="guessing no" ;;
25344 esac
25346 else
25347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25348 /* end confdefs.h. */
25349 #include <unistd.h>
25352 main ()
25354 char buf[20];
25355 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25357 return 0;
25359 _ACEOF
25360 if ac_fn_c_try_run "$LINENO"; then :
25361 gl_cv_func_readlink_works=yes
25362 else
25363 gl_cv_func_readlink_works=no
25365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25366 conftest.$ac_objext conftest.beam conftest.$ac_ext
25369 rm -f conftest.link conftest.lnk2
25371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25372 $as_echo "$gl_cv_func_readlink_works" >&6; }
25373 case "$gl_cv_func_readlink_works" in
25374 *yes)
25375 if test "$gl_cv_decl_readlink_works" != yes; then
25376 REPLACE_READLINK=1
25381 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25383 REPLACE_READLINK=1
25385 esac
25388 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25397 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25408 GNULIB_READLINK=1
25418 if test $ac_cv_func_readlinkat = no; then
25419 HAVE_READLINKAT=0
25422 if test $HAVE_READLINKAT = 0; then
25431 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25439 GNULIB_READLINKAT=1
25446 for ac_func in sig2str
25447 do :
25448 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25449 if test "x$ac_cv_func_sig2str" = x""yes; then :
25450 cat >>confdefs.h <<_ACEOF
25451 #define HAVE_SIG2STR 1
25452 _ACEOF
25455 done
25458 if test $ac_cv_func_sig2str = no; then
25467 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
25484 if test $gl_cv_have_include_next = yes; then
25485 gl_cv_next_signal_h='<'signal.h'>'
25486 else
25487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25488 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
25489 if test "${gl_cv_next_signal_h+set}" = set; then :
25490 $as_echo_n "(cached) " >&6
25491 else
25493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25494 /* end confdefs.h. */
25495 #include <signal.h>
25497 _ACEOF
25498 case "$host_os" in
25499 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25500 *) gl_absname_cpp="$ac_cpp" ;;
25501 esac
25503 case "$host_os" in
25504 mingw*)
25505 gl_dirsep_regex='[/\\]'
25508 gl_dirsep_regex='\/'
25510 esac
25511 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25513 gl_header_literal_regex=`echo 'signal.h' \
25514 | sed -e "$gl_make_literal_regex_sed"`
25515 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25516 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25517 s|^/[^/]|//&|
25521 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25522 sed -n "$gl_absolute_header_sed"`'"'
25526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25527 $as_echo "$gl_cv_next_signal_h" >&6; }
25529 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25531 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25532 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25533 gl_next_as_first_directive='<'signal.h'>'
25534 else
25535 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25536 gl_next_as_first_directive=$gl_cv_next_signal_h
25538 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25544 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25545 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25546 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25547 #include <signal.h>
25550 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
25552 else
25553 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25562 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25563 #include <signal.h>
25566 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
25568 else
25569 HAVE_SIGHANDLER_T=0
25575 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25576 /* <sys/types.h> is not needed according to POSIX, but the
25577 <sys/socket.h> in i386-unknown-freebsd4.10 and
25578 powerpc-apple-darwin5.5 required it. */
25579 #include <sys/types.h>
25580 #if HAVE_SYS_SOCKET_H
25581 # include <sys/socket.h>
25582 #elif HAVE_WS2TCPIP_H
25583 # include <ws2tcpip.h>
25584 #endif
25587 if test "x$ac_cv_type_socklen_t" = x""yes; then :
25589 else
25590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25591 $as_echo_n "checking for socklen_t equivalent... " >&6; }
25592 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
25593 $as_echo_n "(cached) " >&6
25594 else
25595 # Systems have either "struct sockaddr *" or
25596 # "void *" as the second argument to getpeername
25597 gl_cv_socklen_t_equiv=
25598 for arg2 in "struct sockaddr" void; do
25599 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25601 /* end confdefs.h. */
25602 #include <sys/types.h>
25603 #include <sys/socket.h>
25605 int getpeername (int, $arg2 *, $t *);
25607 main ()
25609 $t len;
25610 getpeername (0, 0, &len);
25612 return 0;
25614 _ACEOF
25615 if ac_fn_c_try_compile "$LINENO"; then :
25616 gl_cv_socklen_t_equiv="$t"
25618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25619 test "$gl_cv_socklen_t_equiv" != "" && break
25620 done
25621 test "$gl_cv_socklen_t_equiv" != "" && break
25622 done
25626 if test "$gl_cv_socklen_t_equiv" = ""; then
25627 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25630 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
25632 cat >>confdefs.h <<_ACEOF
25633 #define socklen_t $gl_cv_socklen_t_equiv
25634 _ACEOF
25639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25640 $as_echo_n "checking for ssize_t... " >&6; }
25641 if test "${gt_cv_ssize_t+set}" = set; then :
25642 $as_echo_n "(cached) " >&6
25643 else
25644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25645 /* end confdefs.h. */
25646 #include <sys/types.h>
25648 main ()
25650 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25651 return !x;
25653 return 0;
25655 _ACEOF
25656 if ac_fn_c_try_compile "$LINENO"; then :
25657 gt_cv_ssize_t=yes
25658 else
25659 gt_cv_ssize_t=no
25661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25664 $as_echo "$gt_cv_ssize_t" >&6; }
25665 if test $gt_cv_ssize_t = no; then
25667 $as_echo "#define ssize_t int" >>confdefs.h
25675 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>
25676 #include <sys/stat.h>
25678 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
25680 cat >>confdefs.h <<_ACEOF
25681 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25682 _ACEOF
25684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25685 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25686 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
25687 $as_echo_n "(cached) " >&6
25688 else
25689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25690 /* end confdefs.h. */
25692 #include <sys/types.h>
25693 #include <sys/stat.h>
25694 #if HAVE_SYS_TIME_H
25695 # include <sys/time.h>
25696 #endif
25697 #include <time.h>
25698 struct timespec ts;
25699 struct stat st;
25702 main ()
25705 st.st_atim = ts;
25708 return 0;
25710 _ACEOF
25711 if ac_fn_c_try_compile "$LINENO"; then :
25712 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25713 else
25714 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25719 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25720 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25722 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25725 else
25726 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>
25727 #include <sys/stat.h>
25729 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
25731 cat >>confdefs.h <<_ACEOF
25732 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25733 _ACEOF
25736 else
25737 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25738 #include <sys/stat.h>
25740 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
25742 cat >>confdefs.h <<_ACEOF
25743 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25744 _ACEOF
25747 else
25748 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>
25749 #include <sys/stat.h>
25751 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
25753 cat >>confdefs.h <<_ACEOF
25754 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25755 _ACEOF
25770 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>
25771 #include <sys/stat.h>
25773 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
25775 cat >>confdefs.h <<_ACEOF
25776 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25777 _ACEOF
25780 else
25781 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25782 #include <sys/stat.h>
25784 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
25786 cat >>confdefs.h <<_ACEOF
25787 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25788 _ACEOF
25791 else
25792 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>
25793 #include <sys/stat.h>
25795 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
25797 cat >>confdefs.h <<_ACEOF
25798 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25799 _ACEOF
25810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25811 $as_echo_n "checking for working stdalign.h... " >&6; }
25812 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
25813 $as_echo_n "(cached) " >&6
25814 else
25815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25816 /* end confdefs.h. */
25817 #include <stdalign.h>
25818 #include <stddef.h>
25820 /* Test that alignof yields a result consistent with offsetof.
25821 This catches GCC bug 52023
25822 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25823 #ifdef __cplusplus
25824 template <class t> struct alignof_helper { char a; t b; };
25825 # define ao(type) offsetof (alignof_helper<type>, b)
25826 #else
25827 # define ao(type) offsetof (struct { char a; type b; }, b)
25828 #endif
25829 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25830 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25831 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25833 /* Test _Alignas only on platforms where gnulib can help. */
25834 #if \
25835 ((defined __cplusplus && 201103 <= __cplusplus) \
25836 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
25837 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
25838 struct alignas_test { char c; char alignas (8) alignas_8; };
25839 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25840 ? 1 : -1];
25841 #endif
25844 main ()
25848 return 0;
25850 _ACEOF
25851 if ac_fn_c_try_compile "$LINENO"; then :
25852 gl_cv_header_working_stdalign_h=yes
25853 else
25854 gl_cv_header_working_stdalign_h=no
25856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25859 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25861 if test $gl_cv_header_working_stdalign_h = yes; then
25862 STDALIGN_H=''
25863 else
25864 STDALIGN_H='stdalign.h'
25868 if test -n "$STDALIGN_H"; then
25869 GL_GENERATE_STDALIGN_H_TRUE=
25870 GL_GENERATE_STDALIGN_H_FALSE='#'
25871 else
25872 GL_GENERATE_STDALIGN_H_TRUE='#'
25873 GL_GENERATE_STDALIGN_H_FALSE=
25878 STDARG_H=''
25879 NEXT_STDARG_H='<stdarg.h>'
25880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25881 $as_echo_n "checking for va_copy... " >&6; }
25882 if test "${gl_cv_func_va_copy+set}" = set; then :
25883 $as_echo_n "(cached) " >&6
25884 else
25886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25887 /* end confdefs.h. */
25888 #include <stdarg.h>
25890 main ()
25893 #ifndef va_copy
25894 void (*func) (va_list, va_list) = va_copy;
25895 #endif
25898 return 0;
25900 _ACEOF
25901 if ac_fn_c_try_compile "$LINENO"; then :
25902 gl_cv_func_va_copy=yes
25903 else
25904 gl_cv_func_va_copy=no
25906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25910 $as_echo "$gl_cv_func_va_copy" >&6; }
25911 if test $gl_cv_func_va_copy = no; then
25912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25913 /* end confdefs.h. */
25914 #if defined _AIX && !defined __GNUC__
25915 AIX vaccine
25916 #endif
25918 _ACEOF
25919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25920 $EGREP "vaccine" >/dev/null 2>&1; then :
25921 gl_aixcc=yes
25922 else
25923 gl_aixcc=no
25925 rm -f conftest*
25927 if test $gl_aixcc = yes; then
25928 STDARG_H=stdarg.h
25937 if test $gl_cv_have_include_next = yes; then
25938 gl_cv_next_stdarg_h='<'stdarg.h'>'
25939 else
25940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
25941 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
25942 if test "${gl_cv_next_stdarg_h+set}" = set; then :
25943 $as_echo_n "(cached) " >&6
25944 else
25946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25947 /* end confdefs.h. */
25948 #include <stdarg.h>
25950 _ACEOF
25951 case "$host_os" in
25952 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25953 *) gl_absname_cpp="$ac_cpp" ;;
25954 esac
25956 case "$host_os" in
25957 mingw*)
25958 gl_dirsep_regex='[/\\]'
25961 gl_dirsep_regex='\/'
25963 esac
25964 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25966 gl_header_literal_regex=`echo 'stdarg.h' \
25967 | sed -e "$gl_make_literal_regex_sed"`
25968 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25969 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25970 s|^/[^/]|//&|
25974 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25975 sed -n "$gl_absolute_header_sed"`'"'
25979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
25980 $as_echo "$gl_cv_next_stdarg_h" >&6; }
25982 NEXT_STDARG_H=$gl_cv_next_stdarg_h
25984 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25986 gl_next_as_first_directive='<'stdarg.h'>'
25987 else
25988 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25989 gl_next_as_first_directive=$gl_cv_next_stdarg_h
25991 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
25996 if test "$gl_cv_next_stdarg_h" = '""'; then
25997 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
25998 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
26000 else
26002 saved_as_echo_n="$as_echo_n"
26003 as_echo_n=':'
26004 if test "${gl_cv_func___va_copy+set}" = set; then :
26005 $as_echo_n "(cached) " >&6
26006 else
26008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26009 /* end confdefs.h. */
26010 #include <stdarg.h>
26012 main ()
26015 #ifndef __va_copy
26016 error, bail out
26017 #endif
26020 return 0;
26022 _ACEOF
26023 if ac_fn_c_try_compile "$LINENO"; then :
26024 gl_cv_func___va_copy=yes
26025 else
26026 gl_cv_func___va_copy=no
26028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26031 as_echo_n="$saved_as_echo_n"
26033 if test $gl_cv_func___va_copy = yes; then
26035 $as_echo "#define va_copy __va_copy" >>confdefs.h
26037 else
26040 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
26046 if test -n "$STDARG_H"; then
26047 GL_GENERATE_STDARG_H_TRUE=
26048 GL_GENERATE_STDARG_H_FALSE='#'
26049 else
26050 GL_GENERATE_STDARG_H_TRUE='#'
26051 GL_GENERATE_STDARG_H_FALSE=
26059 # Define two additional variables used in the Makefile substitution.
26061 if test "$ac_cv_header_stdbool_h" = yes; then
26062 STDBOOL_H=''
26063 else
26064 STDBOOL_H='stdbool.h'
26067 if test -n "$STDBOOL_H"; then
26068 GL_GENERATE_STDBOOL_H_TRUE=
26069 GL_GENERATE_STDBOOL_H_FALSE='#'
26070 else
26071 GL_GENERATE_STDBOOL_H_TRUE='#'
26072 GL_GENERATE_STDBOOL_H_FALSE=
26076 if test "$ac_cv_type__Bool" = yes; then
26077 HAVE__BOOL=1
26078 else
26079 HAVE__BOOL=0
26086 STDDEF_H=
26087 if test $gt_cv_c_wchar_t = no; then
26088 HAVE_WCHAR_T=0
26089 STDDEF_H=stddef.h
26091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26092 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26093 if test "${gl_cv_decl_null_works+set}" = set; then :
26094 $as_echo_n "(cached) " >&6
26095 else
26096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26097 /* end confdefs.h. */
26098 #include <stddef.h>
26099 int test[2 * (sizeof NULL == sizeof (void *)) -1];
26102 main ()
26106 return 0;
26108 _ACEOF
26109 if ac_fn_c_try_compile "$LINENO"; then :
26110 gl_cv_decl_null_works=yes
26111 else
26112 gl_cv_decl_null_works=no
26114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26117 $as_echo "$gl_cv_decl_null_works" >&6; }
26118 if test $gl_cv_decl_null_works = no; then
26119 REPLACE_NULL=1
26120 STDDEF_H=stddef.h
26123 if test -n "$STDDEF_H"; then
26124 GL_GENERATE_STDDEF_H_TRUE=
26125 GL_GENERATE_STDDEF_H_FALSE='#'
26126 else
26127 GL_GENERATE_STDDEF_H_TRUE='#'
26128 GL_GENERATE_STDDEF_H_FALSE=
26131 if test -n "$STDDEF_H"; then
26140 if test $gl_cv_have_include_next = yes; then
26141 gl_cv_next_stddef_h='<'stddef.h'>'
26142 else
26143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26144 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26145 if test "${gl_cv_next_stddef_h+set}" = set; then :
26146 $as_echo_n "(cached) " >&6
26147 else
26149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26150 /* end confdefs.h. */
26151 #include <stddef.h>
26153 _ACEOF
26154 case "$host_os" in
26155 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26156 *) gl_absname_cpp="$ac_cpp" ;;
26157 esac
26159 case "$host_os" in
26160 mingw*)
26161 gl_dirsep_regex='[/\\]'
26164 gl_dirsep_regex='\/'
26166 esac
26167 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26169 gl_header_literal_regex=`echo 'stddef.h' \
26170 | sed -e "$gl_make_literal_regex_sed"`
26171 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26172 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26173 s|^/[^/]|//&|
26177 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26178 sed -n "$gl_absolute_header_sed"`'"'
26182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26183 $as_echo "$gl_cv_next_stddef_h" >&6; }
26185 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26187 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26188 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26189 gl_next_as_first_directive='<'stddef.h'>'
26190 else
26191 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26192 gl_next_as_first_directive=$gl_cv_next_stddef_h
26194 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26212 if test $gl_cv_have_include_next = yes; then
26213 gl_cv_next_stdio_h='<'stdio.h'>'
26214 else
26215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26216 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26217 if test "${gl_cv_next_stdio_h+set}" = set; then :
26218 $as_echo_n "(cached) " >&6
26219 else
26221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26222 /* end confdefs.h. */
26223 #include <stdio.h>
26225 _ACEOF
26226 case "$host_os" in
26227 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26228 *) gl_absname_cpp="$ac_cpp" ;;
26229 esac
26231 case "$host_os" in
26232 mingw*)
26233 gl_dirsep_regex='[/\\]'
26236 gl_dirsep_regex='\/'
26238 esac
26239 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26241 gl_header_literal_regex=`echo 'stdio.h' \
26242 | sed -e "$gl_make_literal_regex_sed"`
26243 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26244 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26245 s|^/[^/]|//&|
26249 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26250 sed -n "$gl_absolute_header_sed"`'"'
26254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26255 $as_echo "$gl_cv_next_stdio_h" >&6; }
26257 NEXT_STDIO_H=$gl_cv_next_stdio_h
26259 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26260 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26261 gl_next_as_first_directive='<'stdio.h'>'
26262 else
26263 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26264 gl_next_as_first_directive=$gl_cv_next_stdio_h
26266 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26272 GNULIB_FSCANF=1
26275 cat >>confdefs.h <<_ACEOF
26276 #define GNULIB_FSCANF 1
26277 _ACEOF
26280 GNULIB_SCANF=1
26283 cat >>confdefs.h <<_ACEOF
26284 #define GNULIB_SCANF 1
26285 _ACEOF
26288 GNULIB_FGETC=1
26289 GNULIB_GETC=1
26290 GNULIB_GETCHAR=1
26291 GNULIB_FGETS=1
26292 GNULIB_FREAD=1
26295 GNULIB_FPRINTF=1
26296 GNULIB_PRINTF=1
26297 GNULIB_VFPRINTF=1
26298 GNULIB_VPRINTF=1
26299 GNULIB_FPUTC=1
26300 GNULIB_PUTC=1
26301 GNULIB_PUTCHAR=1
26302 GNULIB_FPUTS=1
26303 GNULIB_PUTS=1
26304 GNULIB_FWRITE=1
26320 if test $gl_cv_have_include_next = yes; then
26321 gl_cv_next_stdlib_h='<'stdlib.h'>'
26322 else
26323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26324 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26325 if test "${gl_cv_next_stdlib_h+set}" = set; then :
26326 $as_echo_n "(cached) " >&6
26327 else
26329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26330 /* end confdefs.h. */
26331 #include <stdlib.h>
26333 _ACEOF
26334 case "$host_os" in
26335 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26336 *) gl_absname_cpp="$ac_cpp" ;;
26337 esac
26339 case "$host_os" in
26340 mingw*)
26341 gl_dirsep_regex='[/\\]'
26344 gl_dirsep_regex='\/'
26346 esac
26347 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26349 gl_header_literal_regex=`echo 'stdlib.h' \
26350 | sed -e "$gl_make_literal_regex_sed"`
26351 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26352 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26353 s|^/[^/]|//&|
26357 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26358 sed -n "$gl_absolute_header_sed"`'"'
26362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26363 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26365 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26367 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26368 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26369 gl_next_as_first_directive='<'stdlib.h'>'
26370 else
26371 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26372 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26374 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26384 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
26392 $as_echo "#define my_strftime nstrftime" >>confdefs.h
26404 if test "$ac_cv_have_decl_strtoimax" != yes; then
26405 HAVE_DECL_STRTOIMAX=0
26408 if test $ac_cv_func_strtoimax = yes; then
26409 HAVE_STRTOIMAX=1
26410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26411 $as_echo_n "checking whether strtoimax works... " >&6; }
26412 if test "${gl_cv_func_strtoimax+set}" = set; then :
26413 $as_echo_n "(cached) " >&6
26414 else
26415 if test "$cross_compiling" = yes; then :
26416 case "$host_os" in
26417 # Guess no on AIX 5.
26418 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26419 # Guess yes otherwise.
26420 *) gl_cv_func_strtoimax="guessing yes" ;;
26421 esac
26423 else
26424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26425 /* end confdefs.h. */
26427 #include <errno.h>
26428 #include <string.h>
26429 #include <inttypes.h>
26430 int main ()
26432 if (sizeof (intmax_t) > sizeof (int))
26434 const char *s = "4294967295";
26435 char *p;
26436 intmax_t res;
26437 errno = 0;
26438 res = strtoimax (s, &p, 10);
26439 if (p != s + strlen (s))
26440 return 1;
26441 if (errno != 0)
26442 return 2;
26443 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26444 return 3;
26446 else
26448 const char *s = "2147483647";
26449 char *p;
26450 intmax_t res;
26451 errno = 0;
26452 res = strtoimax (s, &p, 10);
26453 if (p != s + strlen (s))
26454 return 1;
26455 if (errno != 0)
26456 return 2;
26457 if (res != 2147483647)
26458 return 3;
26460 return 0;
26463 _ACEOF
26464 if ac_fn_c_try_run "$LINENO"; then :
26465 gl_cv_func_strtoimax=yes
26466 else
26467 gl_cv_func_strtoimax=no
26469 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26470 conftest.$ac_objext conftest.beam conftest.$ac_ext
26475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
26476 $as_echo "$gl_cv_func_strtoimax" >&6; }
26477 case "$gl_cv_func_strtoimax" in
26478 *no) REPLACE_STRTOIMAX=1 ;;
26479 esac
26480 else
26481 HAVE_STRTOIMAX=0
26484 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
26493 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
26496 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
26497 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
26498 ac_have_decl=1
26499 else
26500 ac_have_decl=0
26503 cat >>confdefs.h <<_ACEOF
26504 #define HAVE_DECL_STRTOLL $ac_have_decl
26505 _ACEOF
26515 GNULIB_STRTOIMAX=1
26525 if test "$ac_cv_have_decl_strtoumax" != yes; then
26526 HAVE_DECL_STRTOUMAX=0
26529 if test $ac_cv_func_strtoumax = no; then
26538 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
26541 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
26542 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
26543 ac_have_decl=1
26544 else
26545 ac_have_decl=0
26548 cat >>confdefs.h <<_ACEOF
26549 #define HAVE_DECL_STRTOULL $ac_have_decl
26550 _ACEOF
26560 GNULIB_STRTOUMAX=1
26568 if test $ac_cv_func_symlink = no; then
26569 HAVE_SYMLINK=0
26570 else
26571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
26572 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
26573 if test "${gl_cv_func_symlink_works+set}" = set; then :
26574 $as_echo_n "(cached) " >&6
26575 else
26576 if test "$cross_compiling" = yes; then :
26577 case "$host_os" in
26578 # Guess yes on glibc systems.
26579 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
26580 # If we don't know, assume the worst.
26581 *) gl_cv_func_symlink_works="guessing no" ;;
26582 esac
26584 else
26585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26586 /* end confdefs.h. */
26587 #include <unistd.h>
26590 main ()
26592 int result = 0;
26593 if (!symlink ("a", "conftest.link/"))
26594 result |= 1;
26595 if (symlink ("conftest.f", "conftest.lnk2"))
26596 result |= 2;
26597 else if (!symlink ("a", "conftest.lnk2/"))
26598 result |= 4;
26599 return result;
26602 return 0;
26604 _ACEOF
26605 if ac_fn_c_try_run "$LINENO"; then :
26606 gl_cv_func_symlink_works=yes
26607 else
26608 gl_cv_func_symlink_works=no
26610 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26611 conftest.$ac_objext conftest.beam conftest.$ac_ext
26614 rm -f conftest.f conftest.link conftest.lnk2
26616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
26617 $as_echo "$gl_cv_func_symlink_works" >&6; }
26618 case "$gl_cv_func_symlink_works" in
26619 *yes) ;;
26621 REPLACE_SYMLINK=1
26623 esac
26626 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
26635 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
26643 GNULIB_SYMLINK=1
26652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
26653 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
26654 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
26655 $as_echo_n "(cached) " >&6
26656 else
26658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26659 /* end confdefs.h. */
26660 #include <sys/select.h>
26662 main ()
26664 struct timeval b;
26666 return 0;
26668 _ACEOF
26669 if ac_fn_c_try_compile "$LINENO"; then :
26670 gl_cv_header_sys_select_h_selfcontained=yes
26671 else
26672 gl_cv_header_sys_select_h_selfcontained=no
26674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26675 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
26676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26677 /* end confdefs.h. */
26678 #include <sys/select.h>
26680 main ()
26682 int memset; int bzero;
26684 return 0;
26687 _ACEOF
26688 if ac_fn_c_try_compile "$LINENO"; then :
26689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26690 /* end confdefs.h. */
26691 #include <sys/select.h>
26693 main ()
26696 #undef memset
26697 #define memset nonexistent_memset
26698 extern
26699 #ifdef __cplusplus
26701 #endif
26702 void *memset (void *, int, unsigned long);
26703 #undef bzero
26704 #define bzero nonexistent_bzero
26705 extern
26706 #ifdef __cplusplus
26708 #endif
26709 void bzero (void *, unsigned long);
26710 fd_set fds;
26711 FD_ZERO (&fds);
26714 return 0;
26717 _ACEOF
26718 if ac_fn_c_try_link "$LINENO"; then :
26720 else
26721 gl_cv_header_sys_select_h_selfcontained=no
26723 rm -f core conftest.err conftest.$ac_objext \
26724 conftest$ac_exeext conftest.$ac_ext
26727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
26732 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
26742 if test $gl_cv_have_include_next = yes; then
26743 gl_cv_next_sys_select_h='<'sys/select.h'>'
26744 else
26745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
26746 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
26747 if test "${gl_cv_next_sys_select_h+set}" = set; then :
26748 $as_echo_n "(cached) " >&6
26749 else
26751 if test $ac_cv_header_sys_select_h = yes; then
26754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26755 /* end confdefs.h. */
26756 #include <sys/select.h>
26758 _ACEOF
26759 case "$host_os" in
26760 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26761 *) gl_absname_cpp="$ac_cpp" ;;
26762 esac
26764 case "$host_os" in
26765 mingw*)
26766 gl_dirsep_regex='[/\\]'
26769 gl_dirsep_regex='\/'
26771 esac
26772 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26774 gl_header_literal_regex=`echo 'sys/select.h' \
26775 | sed -e "$gl_make_literal_regex_sed"`
26776 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26777 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26778 s|^/[^/]|//&|
26782 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26783 sed -n "$gl_absolute_header_sed"`'"'
26784 else
26785 gl_cv_next_sys_select_h='<'sys/select.h'>'
26790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
26791 $as_echo "$gl_cv_next_sys_select_h" >&6; }
26793 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
26795 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26796 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26797 gl_next_as_first_directive='<'sys/select.h'>'
26798 else
26799 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26800 gl_next_as_first_directive=$gl_cv_next_sys_select_h
26802 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26807 if test $ac_cv_header_sys_select_h = yes; then
26808 HAVE_SYS_SELECT_H=1
26809 else
26810 HAVE_SYS_SELECT_H=0
26817 if test $ac_cv_header_sys_socket_h != yes; then
26818 for ac_header in winsock2.h
26819 do :
26820 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26821 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
26822 cat >>confdefs.h <<_ACEOF
26823 #define HAVE_WINSOCK2_H 1
26824 _ACEOF
26828 done
26831 if test "$ac_cv_header_winsock2_h" = yes; then
26832 HAVE_WINSOCK2_H=1
26833 UNISTD_H_HAVE_WINSOCK2_H=1
26834 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26835 else
26836 HAVE_WINSOCK2_H=0
26858 if test $gl_cv_have_include_next = yes; then
26859 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26860 else
26861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26862 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26863 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
26864 $as_echo_n "(cached) " >&6
26865 else
26867 if test $ac_cv_header_sys_stat_h = yes; then
26870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26871 /* end confdefs.h. */
26872 #include <sys/stat.h>
26874 _ACEOF
26875 case "$host_os" in
26876 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26877 *) gl_absname_cpp="$ac_cpp" ;;
26878 esac
26880 case "$host_os" in
26881 mingw*)
26882 gl_dirsep_regex='[/\\]'
26885 gl_dirsep_regex='\/'
26887 esac
26888 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26890 gl_header_literal_regex=`echo 'sys/stat.h' \
26891 | sed -e "$gl_make_literal_regex_sed"`
26892 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26893 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26894 s|^/[^/]|//&|
26898 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26899 sed -n "$gl_absolute_header_sed"`'"'
26900 else
26901 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26907 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26909 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26911 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26912 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26913 gl_next_as_first_directive='<'sys/stat.h'>'
26914 else
26915 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26916 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26918 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26930 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26932 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26936 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26937 #include <sys/stat.h>
26939 if test "x$ac_cv_type_nlink_t" = x""yes; then :
26941 else
26943 $as_echo "#define nlink_t int" >>confdefs.h
26964 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
26966 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
26967 ac_have_decl=1
26968 else
26969 ac_have_decl=0
26972 cat >>confdefs.h <<_ACEOF
26973 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
26974 _ACEOF
26976 if test $ac_cv_have_decl_localtime_r = no; then
26977 HAVE_DECL_LOCALTIME_R=0
26981 if test $ac_cv_func_localtime_r = yes; then
26982 HAVE_LOCALTIME_R=1
26983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
26984 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
26985 if test "${gl_cv_time_r_posix+set}" = set; then :
26986 $as_echo_n "(cached) " >&6
26987 else
26988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26989 /* end confdefs.h. */
26990 #include <time.h>
26992 main ()
26994 /* We don't need to append 'restrict's to the argument types,
26995 even though the POSIX signature has the 'restrict's,
26996 since C99 says they can't affect type compatibility. */
26997 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
26998 if (ptr) return 0;
26999 /* Check the return type is a pointer.
27000 On HP-UX 10 it is 'int'. */
27001 *localtime_r (0, 0);
27003 return 0;
27006 _ACEOF
27007 if ac_fn_c_try_compile "$LINENO"; then :
27008 gl_cv_time_r_posix=yes
27009 else
27010 gl_cv_time_r_posix=no
27012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27016 $as_echo "$gl_cv_time_r_posix" >&6; }
27017 if test $gl_cv_time_r_posix = yes; then
27018 REPLACE_LOCALTIME_R=0
27019 else
27020 REPLACE_LOCALTIME_R=1
27022 else
27023 HAVE_LOCALTIME_R=0
27026 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
27035 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27046 GNULIB_TIME_R=1
27057 LIB_TIMER_TIME=
27059 gl_saved_libs=$LIBS
27060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27061 $as_echo_n "checking for library containing timer_settime... " >&6; }
27062 if test "${ac_cv_search_timer_settime+set}" = set; then :
27063 $as_echo_n "(cached) " >&6
27064 else
27065 ac_func_search_save_LIBS=$LIBS
27066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27067 /* end confdefs.h. */
27069 /* Override any GCC internal prototype to avoid an error.
27070 Use char because int might match the return type of a GCC
27071 builtin and then its argument prototype would still apply. */
27072 #ifdef __cplusplus
27073 extern "C"
27074 #endif
27075 char timer_settime ();
27077 main ()
27079 return timer_settime ();
27081 return 0;
27083 _ACEOF
27084 for ac_lib in '' rt posix4; do
27085 if test -z "$ac_lib"; then
27086 ac_res="none required"
27087 else
27088 ac_res=-l$ac_lib
27089 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27091 if ac_fn_c_try_link "$LINENO"; then :
27092 ac_cv_search_timer_settime=$ac_res
27094 rm -f core conftest.err conftest.$ac_objext \
27095 conftest$ac_exeext
27096 if test "${ac_cv_search_timer_settime+set}" = set; then :
27097 break
27099 done
27100 if test "${ac_cv_search_timer_settime+set}" = set; then :
27102 else
27103 ac_cv_search_timer_settime=no
27105 rm conftest.$ac_ext
27106 LIBS=$ac_func_search_save_LIBS
27108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27109 $as_echo "$ac_cv_search_timer_settime" >&6; }
27110 ac_res=$ac_cv_search_timer_settime
27111 if test "$ac_res" != no; then :
27112 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27113 test "$ac_cv_search_timer_settime" = "none required" ||
27114 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27118 /* end confdefs.h. */
27120 #include <features.h>
27121 #ifdef __GNU_LIBRARY__
27122 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27123 && !defined __UCLIBC__
27124 Thread emulation available
27125 #endif
27126 #endif
27128 _ACEOF
27129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27130 $EGREP "Thread" >/dev/null 2>&1; then :
27131 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27133 rm -f conftest*
27135 for ac_func in timer_settime
27136 do :
27137 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27138 if test "x$ac_cv_func_timer_settime" = x""yes; then :
27139 cat >>confdefs.h <<_ACEOF
27140 #define HAVE_TIMER_SETTIME 1
27141 _ACEOF
27144 done
27146 LIBS=$gl_saved_libs
27161 if test $gl_cv_have_include_next = yes; then
27162 gl_cv_next_unistd_h='<'unistd.h'>'
27163 else
27164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27165 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27166 if test "${gl_cv_next_unistd_h+set}" = set; then :
27167 $as_echo_n "(cached) " >&6
27168 else
27170 if test $ac_cv_header_unistd_h = yes; then
27173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27174 /* end confdefs.h. */
27175 #include <unistd.h>
27177 _ACEOF
27178 case "$host_os" in
27179 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27180 *) gl_absname_cpp="$ac_cpp" ;;
27181 esac
27183 case "$host_os" in
27184 mingw*)
27185 gl_dirsep_regex='[/\\]'
27188 gl_dirsep_regex='\/'
27190 esac
27191 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27193 gl_header_literal_regex=`echo 'unistd.h' \
27194 | sed -e "$gl_make_literal_regex_sed"`
27195 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27196 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27197 s|^/[^/]|//&|
27201 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27202 sed -n "$gl_absolute_header_sed"`'"'
27203 else
27204 gl_cv_next_unistd_h='<'unistd.h'>'
27209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27210 $as_echo "$gl_cv_next_unistd_h" >&6; }
27212 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27214 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27215 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27216 gl_next_as_first_directive='<'unistd.h'>'
27217 else
27218 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27219 gl_next_as_first_directive=$gl_cv_next_unistd_h
27221 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27226 if test $ac_cv_header_unistd_h = yes; then
27227 HAVE_UNISTD_H=1
27228 else
27229 HAVE_UNISTD_H=0
27242 if test $ac_cv_have_decl_unsetenv = no; then
27243 HAVE_DECL_UNSETENV=0
27245 for ac_func in unsetenv
27246 do :
27247 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27248 if test "x$ac_cv_func_unsetenv" = x""yes; then :
27249 cat >>confdefs.h <<_ACEOF
27250 #define HAVE_UNSETENV 1
27251 _ACEOF
27254 done
27256 if test $ac_cv_func_unsetenv = no; then
27257 HAVE_UNSETENV=0
27258 else
27259 HAVE_UNSETENV=1
27260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27261 $as_echo_n "checking for unsetenv() return type... " >&6; }
27262 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27263 $as_echo_n "(cached) " >&6
27264 else
27265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27266 /* end confdefs.h. */
27268 #undef _BSD
27269 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27270 #include <stdlib.h>
27271 extern
27272 #ifdef __cplusplus
27274 #endif
27275 int unsetenv (const char *name);
27278 main ()
27282 return 0;
27284 _ACEOF
27285 if ac_fn_c_try_compile "$LINENO"; then :
27286 gt_cv_func_unsetenv_ret='int'
27287 else
27288 gt_cv_func_unsetenv_ret='void'
27290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27293 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27294 if test $gt_cv_func_unsetenv_ret = 'void'; then
27296 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27298 REPLACE_UNSETENV=1
27301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27302 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27303 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27304 $as_echo_n "(cached) " >&6
27305 else
27306 if test "$cross_compiling" = yes; then :
27307 case "$host_os" in
27308 # Guess yes on glibc systems.
27309 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27310 # If we don't know, assume the worst.
27311 *) gl_cv_func_unsetenv_works="guessing no" ;;
27312 esac
27314 else
27315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27316 /* end confdefs.h. */
27318 #include <stdlib.h>
27319 #include <errno.h>
27320 extern char **environ;
27323 main ()
27326 char entry1[] = "a=1";
27327 char entry2[] = "b=2";
27328 char *env[] = { entry1, entry2, NULL };
27329 if (putenv ((char *) "a=1")) return 1;
27330 if (putenv (entry2)) return 2;
27331 entry2[0] = 'a';
27332 unsetenv ("a");
27333 if (getenv ("a")) return 3;
27334 if (!unsetenv ("") || errno != EINVAL) return 4;
27335 entry2[0] = 'b';
27336 environ = env;
27337 if (!getenv ("a")) return 5;
27338 entry2[0] = 'a';
27339 unsetenv ("a");
27340 if (getenv ("a")) return 6;
27343 return 0;
27345 _ACEOF
27346 if ac_fn_c_try_run "$LINENO"; then :
27347 gl_cv_func_unsetenv_works=yes
27348 else
27349 gl_cv_func_unsetenv_works=no
27351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27352 conftest.$ac_objext conftest.beam conftest.$ac_ext
27356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27357 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27358 case "$gl_cv_func_unsetenv_works" in
27359 *yes) ;;
27361 REPLACE_UNSETENV=1
27363 esac
27366 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27375 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27387 GNULIB_UNSETENV=1
27399 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27401 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27402 if test "${gl_cv_func_futimesat_works+set}" = set; then :
27403 $as_echo_n "(cached) " >&6
27404 else
27405 touch conftest.file
27406 if test "$cross_compiling" = yes; then :
27407 case "$host_os" in
27408 # Guess yes on glibc systems.
27409 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27410 # If we don't know, assume the worst.
27411 *) gl_cv_func_futimesat_works="guessing no" ;;
27412 esac
27414 else
27415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27416 /* end confdefs.h. */
27418 #include <stddef.h>
27419 #include <sys/times.h>
27420 #include <fcntl.h>
27423 main ()
27425 int fd = open ("conftest.file", O_RDWR);
27426 if (fd < 0) return 1;
27427 if (futimesat (fd, NULL, NULL)) return 2;
27430 return 0;
27432 _ACEOF
27433 if ac_fn_c_try_run "$LINENO"; then :
27434 gl_cv_func_futimesat_works=yes
27435 else
27436 gl_cv_func_futimesat_works=no
27438 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27439 conftest.$ac_objext conftest.beam conftest.$ac_ext
27442 rm -f conftest.file
27444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27445 $as_echo "$gl_cv_func_futimesat_works" >&6; }
27446 case "$gl_cv_func_futimesat_works" in
27447 *yes) ;;
27450 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
27453 esac
27456 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
27457 gl_gnulib_enabled_dosname=false
27458 gl_gnulib_enabled_euidaccess=false
27459 gl_gnulib_enabled_getdtablesize=false
27460 gl_gnulib_enabled_getgroups=false
27461 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
27462 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
27463 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
27464 gl_gnulib_enabled_pathmax=false
27465 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
27466 gl_gnulib_enabled_stat=false
27467 gl_gnulib_enabled_strtoll=false
27468 gl_gnulib_enabled_strtoull=false
27469 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
27470 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
27472 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27481 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
27483 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
27486 func_gl_gnulib_m4code_dosname ()
27488 if ! $gl_gnulib_enabled_dosname; then
27489 gl_gnulib_enabled_dosname=true
27492 func_gl_gnulib_m4code_euidaccess ()
27494 if ! $gl_gnulib_enabled_euidaccess; then
27500 for ac_func in euidaccess
27501 do :
27502 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
27503 if test "x$ac_cv_func_euidaccess" = x""yes; then :
27504 cat >>confdefs.h <<_ACEOF
27505 #define HAVE_EUIDACCESS 1
27506 _ACEOF
27509 done
27511 if test $ac_cv_func_euidaccess = no; then
27512 HAVE_EUIDACCESS=0
27515 if test $HAVE_EUIDACCESS = 0; then
27524 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
27528 for ac_header in libgen.h
27529 do :
27530 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
27531 if test "x$ac_cv_header_libgen_h" = x""yes; then :
27532 cat >>confdefs.h <<_ACEOF
27533 #define HAVE_LIBGEN_H 1
27534 _ACEOF
27538 done
27541 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27542 if test "x$ac_cv_func_getgroups" = x""yes; then :
27547 # If we don't yet have getgroups, see if it's in -lbsd.
27548 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27549 ac_save_LIBS=$LIBS
27550 if test $ac_cv_func_getgroups = no; then
27551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27552 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27553 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27554 $as_echo_n "(cached) " >&6
27555 else
27556 ac_check_lib_save_LIBS=$LIBS
27557 LIBS="-lbsd $LIBS"
27558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27559 /* end confdefs.h. */
27561 /* Override any GCC internal prototype to avoid an error.
27562 Use char because int might match the return type of a GCC
27563 builtin and then its argument prototype would still apply. */
27564 #ifdef __cplusplus
27565 extern "C"
27566 #endif
27567 char getgroups ();
27569 main ()
27571 return getgroups ();
27573 return 0;
27575 _ACEOF
27576 if ac_fn_c_try_link "$LINENO"; then :
27577 ac_cv_lib_bsd_getgroups=yes
27578 else
27579 ac_cv_lib_bsd_getgroups=no
27581 rm -f core conftest.err conftest.$ac_objext \
27582 conftest$ac_exeext conftest.$ac_ext
27583 LIBS=$ac_check_lib_save_LIBS
27585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27586 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27587 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27588 GETGROUPS_LIB=-lbsd
27593 # Run the program to test the functionality of the system-supplied
27594 # getgroups function only if there is such a function.
27595 if test $ac_cv_func_getgroups = yes; then
27596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27597 $as_echo_n "checking for working getgroups... " >&6; }
27598 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27599 $as_echo_n "(cached) " >&6
27600 else
27601 if test "$cross_compiling" = yes; then :
27602 case "$host_os" in # ((
27603 # Guess yes on glibc systems.
27604 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27605 # If we don't know, assume the worst.
27606 *) ac_cv_func_getgroups_works="guessing no" ;;
27607 esac
27609 else
27610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27611 /* end confdefs.h. */
27612 $ac_includes_default
27614 main ()
27616 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27617 return getgroups (0, 0) == -1;
27619 return 0;
27622 _ACEOF
27623 if ac_fn_c_try_run "$LINENO"; then :
27624 ac_cv_func_getgroups_works=yes
27625 else
27626 ac_cv_func_getgroups_works=no
27628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27629 conftest.$ac_objext conftest.beam conftest.$ac_ext
27634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27635 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27636 else
27637 ac_cv_func_getgroups_works=no
27639 case "$ac_cv_func_getgroups_works" in
27640 *yes)
27642 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27645 esac
27646 LIBS=$ac_save_LIBS
27649 # Solaris 9 and 10 need -lgen to get the eaccess function.
27650 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
27651 # programs in the package would end up linked with that potentially-shared
27652 # library, inducing unnecessary run-time overhead.
27653 LIB_EACCESS=
27655 gl_saved_libs=$LIBS
27656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
27657 $as_echo_n "checking for library containing eaccess... " >&6; }
27658 if test "${ac_cv_search_eaccess+set}" = set; then :
27659 $as_echo_n "(cached) " >&6
27660 else
27661 ac_func_search_save_LIBS=$LIBS
27662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27663 /* end confdefs.h. */
27665 /* Override any GCC internal prototype to avoid an error.
27666 Use char because int might match the return type of a GCC
27667 builtin and then its argument prototype would still apply. */
27668 #ifdef __cplusplus
27669 extern "C"
27670 #endif
27671 char eaccess ();
27673 main ()
27675 return eaccess ();
27677 return 0;
27679 _ACEOF
27680 for ac_lib in '' gen; do
27681 if test -z "$ac_lib"; then
27682 ac_res="none required"
27683 else
27684 ac_res=-l$ac_lib
27685 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27687 if ac_fn_c_try_link "$LINENO"; then :
27688 ac_cv_search_eaccess=$ac_res
27690 rm -f core conftest.err conftest.$ac_objext \
27691 conftest$ac_exeext
27692 if test "${ac_cv_search_eaccess+set}" = set; then :
27693 break
27695 done
27696 if test "${ac_cv_search_eaccess+set}" = set; then :
27698 else
27699 ac_cv_search_eaccess=no
27701 rm conftest.$ac_ext
27702 LIBS=$ac_func_search_save_LIBS
27704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
27705 $as_echo "$ac_cv_search_eaccess" >&6; }
27706 ac_res=$ac_cv_search_eaccess
27707 if test "$ac_res" != no; then :
27708 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27709 test "$ac_cv_search_eaccess" = "none required" ||
27710 LIB_EACCESS=$ac_cv_search_eaccess
27713 for ac_func in eaccess
27714 do :
27715 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
27716 if test "x$ac_cv_func_eaccess" = x""yes; then :
27717 cat >>confdefs.h <<_ACEOF
27718 #define HAVE_EACCESS 1
27719 _ACEOF
27722 done
27724 LIBS=$gl_saved_libs
27732 GNULIB_EUIDACCESS=1
27738 gl_gnulib_enabled_euidaccess=true
27739 if test $HAVE_EUIDACCESS = 0; then
27740 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
27742 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
27743 if test $HAVE_EUIDACCESS = 0; then
27744 func_gl_gnulib_m4code_stat
27748 func_gl_gnulib_m4code_getdtablesize ()
27750 if ! $gl_gnulib_enabled_getdtablesize; then
27754 if test $ac_cv_func_getdtablesize != yes; then
27755 HAVE_GETDTABLESIZE=0
27758 if test $HAVE_GETDTABLESIZE = 0; then
27767 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
27776 GNULIB_GETDTABLESIZE=1
27782 gl_gnulib_enabled_getdtablesize=true
27785 func_gl_gnulib_m4code_getgroups ()
27787 if ! $gl_gnulib_enabled_getgroups; then
27793 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27794 if test "x$ac_cv_func_getgroups" = x""yes; then :
27799 # If we don't yet have getgroups, see if it's in -lbsd.
27800 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27801 ac_save_LIBS=$LIBS
27802 if test $ac_cv_func_getgroups = no; then
27803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27804 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27805 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27806 $as_echo_n "(cached) " >&6
27807 else
27808 ac_check_lib_save_LIBS=$LIBS
27809 LIBS="-lbsd $LIBS"
27810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27811 /* end confdefs.h. */
27813 /* Override any GCC internal prototype to avoid an error.
27814 Use char because int might match the return type of a GCC
27815 builtin and then its argument prototype would still apply. */
27816 #ifdef __cplusplus
27817 extern "C"
27818 #endif
27819 char getgroups ();
27821 main ()
27823 return getgroups ();
27825 return 0;
27827 _ACEOF
27828 if ac_fn_c_try_link "$LINENO"; then :
27829 ac_cv_lib_bsd_getgroups=yes
27830 else
27831 ac_cv_lib_bsd_getgroups=no
27833 rm -f core conftest.err conftest.$ac_objext \
27834 conftest$ac_exeext conftest.$ac_ext
27835 LIBS=$ac_check_lib_save_LIBS
27837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27838 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27839 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27840 GETGROUPS_LIB=-lbsd
27845 # Run the program to test the functionality of the system-supplied
27846 # getgroups function only if there is such a function.
27847 if test $ac_cv_func_getgroups = yes; then
27848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27849 $as_echo_n "checking for working getgroups... " >&6; }
27850 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27851 $as_echo_n "(cached) " >&6
27852 else
27853 if test "$cross_compiling" = yes; then :
27854 case "$host_os" in # ((
27855 # Guess yes on glibc systems.
27856 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27857 # If we don't know, assume the worst.
27858 *) ac_cv_func_getgroups_works="guessing no" ;;
27859 esac
27861 else
27862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27863 /* end confdefs.h. */
27864 $ac_includes_default
27866 main ()
27868 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27869 return getgroups (0, 0) == -1;
27871 return 0;
27874 _ACEOF
27875 if ac_fn_c_try_run "$LINENO"; then :
27876 ac_cv_func_getgroups_works=yes
27877 else
27878 ac_cv_func_getgroups_works=no
27880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27881 conftest.$ac_objext conftest.beam conftest.$ac_ext
27886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27887 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27888 else
27889 ac_cv_func_getgroups_works=no
27891 case "$ac_cv_func_getgroups_works" in
27892 *yes)
27894 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27897 esac
27898 LIBS=$ac_save_LIBS
27900 if test $ac_cv_func_getgroups != yes; then
27901 HAVE_GETGROUPS=0
27902 else
27903 if test "$ac_cv_type_getgroups" != gid_t \
27904 || { case "$ac_cv_func_getgroups_works" in
27905 *yes) false;;
27906 *) true;;
27907 esac
27908 }; then
27909 REPLACE_GETGROUPS=1
27911 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
27913 else
27914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
27915 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
27916 if test "${gl_cv_func_getgroups_works+set}" = set; then :
27917 $as_echo_n "(cached) " >&6
27918 else
27919 if test "$cross_compiling" = yes; then :
27920 case "$host_os" in
27921 # Guess yes on glibc systems.
27922 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
27923 # If we don't know, assume the worst.
27924 *) gl_cv_func_getgroups_works="guessing no" ;;
27925 esac
27927 else
27928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27929 /* end confdefs.h. */
27930 $ac_includes_default
27932 main ()
27934 int size = getgroups (0, 0);
27935 gid_t *list = malloc (size * sizeof *list);
27936 return getgroups (-1, list) != -1;
27938 return 0;
27940 _ACEOF
27941 if ac_fn_c_try_run "$LINENO"; then :
27942 gl_cv_func_getgroups_works=yes
27943 else
27944 gl_cv_func_getgroups_works=no
27946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27947 conftest.$ac_objext conftest.beam conftest.$ac_ext
27951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
27952 $as_echo "$gl_cv_func_getgroups_works" >&6; }
27953 case "$gl_cv_func_getgroups_works" in
27954 *yes) ;;
27955 *) REPLACE_GETGROUPS=1 ;;
27956 esac
27959 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
27961 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
27970 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
27978 GNULIB_GETGROUPS=1
27984 gl_gnulib_enabled_getgroups=true
27987 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
27989 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
27992 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
27995 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
27997 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28003 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
28004 if test "x$ac_cv_func_group_member" = x""yes; then :
28006 else
28008 HAVE_GROUP_MEMBER=0
28013 if test $HAVE_GROUP_MEMBER = 0; then
28022 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
28033 GNULIB_GROUP_MEMBER=1
28039 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
28040 if test $HAVE_GROUP_MEMBER = 0; then
28041 func_gl_gnulib_m4code_getgroups
28043 if test $HAVE_GROUP_MEMBER = 0; then
28044 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
28048 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
28050 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28051 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
28054 func_gl_gnulib_m4code_pathmax ()
28056 if ! $gl_gnulib_enabled_pathmax; then
28060 gl_gnulib_enabled_pathmax=true
28063 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
28065 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28066 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
28069 func_gl_gnulib_m4code_stat ()
28071 if ! $gl_gnulib_enabled_stat; then
28075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28076 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28077 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
28078 $as_echo_n "(cached) " >&6
28079 else
28080 if test "$cross_compiling" = yes; then :
28081 case $host_os in
28082 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28083 *) gl_cv_func_stat_dir_slash="guessing yes";;
28084 esac
28085 else
28086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28087 /* end confdefs.h. */
28088 #include <sys/stat.h>
28091 main ()
28093 struct stat st; return stat (".", &st) != stat ("./", &st);
28095 return 0;
28097 _ACEOF
28098 if ac_fn_c_try_run "$LINENO"; then :
28099 gl_cv_func_stat_dir_slash=yes
28100 else
28101 gl_cv_func_stat_dir_slash=no
28103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28104 conftest.$ac_objext conftest.beam conftest.$ac_ext
28108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28109 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28111 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28112 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28113 $as_echo_n "(cached) " >&6
28114 else
28115 touch conftest.tmp
28116 # Assume that if we have lstat, we can also check symlinks.
28117 if test $ac_cv_func_lstat = yes; then
28118 ln -s conftest.tmp conftest.lnk
28120 if test "$cross_compiling" = yes; then :
28121 case "$host_os" in
28122 # Guess yes on glibc systems.
28123 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28124 # If we don't know, assume the worst.
28125 *) gl_cv_func_stat_file_slash="guessing no" ;;
28126 esac
28128 else
28129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28130 /* end confdefs.h. */
28131 #include <sys/stat.h>
28134 main ()
28136 int result = 0;
28137 struct stat st;
28138 if (!stat ("conftest.tmp/", &st))
28139 result |= 1;
28140 #if HAVE_LSTAT
28141 if (!stat ("conftest.lnk/", &st))
28142 result |= 2;
28143 #endif
28144 return result;
28147 return 0;
28149 _ACEOF
28150 if ac_fn_c_try_run "$LINENO"; then :
28151 gl_cv_func_stat_file_slash=yes
28152 else
28153 gl_cv_func_stat_file_slash=no
28155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28156 conftest.$ac_objext conftest.beam conftest.$ac_ext
28159 rm -f conftest.tmp conftest.lnk
28161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28162 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28163 case $gl_cv_func_stat_dir_slash in
28164 *no) REPLACE_STAT=1
28166 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28168 esac
28169 case $gl_cv_func_stat_file_slash in
28170 *no) REPLACE_STAT=1
28172 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28174 esac
28176 if test $REPLACE_STAT = 1; then
28185 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28194 GNULIB_STAT=1
28200 gl_gnulib_enabled_stat=true
28201 if test $REPLACE_STAT = 1; then
28202 func_gl_gnulib_m4code_dosname
28204 if test $REPLACE_STAT = 1; then
28205 func_gl_gnulib_m4code_pathmax
28209 func_gl_gnulib_m4code_strtoll ()
28211 if ! $gl_gnulib_enabled_strtoll; then
28215 if test "$ac_cv_type_long_long_int" = yes; then
28216 for ac_func in strtoll
28217 do :
28218 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28219 if test "x$ac_cv_func_strtoll" = x""yes; then :
28220 cat >>confdefs.h <<_ACEOF
28221 #define HAVE_STRTOLL 1
28222 _ACEOF
28225 done
28227 if test $ac_cv_func_strtoll = no; then
28228 HAVE_STRTOLL=0
28232 if test $HAVE_STRTOLL = 0; then
28241 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
28252 GNULIB_STRTOLL=1
28258 gl_gnulib_enabled_strtoll=true
28261 func_gl_gnulib_m4code_strtoull ()
28263 if ! $gl_gnulib_enabled_strtoull; then
28267 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28268 for ac_func in strtoull
28269 do :
28270 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28271 if test "x$ac_cv_func_strtoull" = x""yes; then :
28272 cat >>confdefs.h <<_ACEOF
28273 #define HAVE_STRTOULL 1
28274 _ACEOF
28277 done
28279 if test $ac_cv_func_strtoull = no; then
28280 HAVE_STRTOULL=0
28284 if test $HAVE_STRTOULL = 0; then
28293 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
28304 GNULIB_STRTOULL=1
28310 gl_gnulib_enabled_strtoull=true
28313 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28315 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28316 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28319 if test $HAVE_FACCESSAT = 0; then
28320 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28322 if test $HAVE_FACCESSAT = 0; then
28323 func_gl_gnulib_m4code_dosname
28325 if test $HAVE_FACCESSAT = 0; then
28326 func_gl_gnulib_m4code_euidaccess
28328 if test $HAVE_FACCESSAT = 0; then
28329 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28331 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
28332 func_gl_gnulib_m4code_getdtablesize
28334 if test $HAVE_FDOPENDIR = 0; then
28335 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28337 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28338 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28340 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28341 func_gl_gnulib_m4code_dosname
28343 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28344 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28346 if test $REPLACE_GETOPT = 1; then
28347 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
28349 if test $REPLACE_LSTAT = 1; then
28350 func_gl_gnulib_m4code_dosname
28352 if test $REPLACE_LSTAT = 1; then
28353 func_gl_gnulib_m4code_stat
28355 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
28356 func_gl_gnulib_m4code_stat
28358 if test $HAVE_READLINKAT = 0; then
28359 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28361 if test $HAVE_READLINKAT = 0; then
28362 func_gl_gnulib_m4code_dosname
28364 if test $HAVE_READLINKAT = 0; then
28365 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28367 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
28368 func_gl_gnulib_m4code_strtoll
28370 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
28371 func_gl_gnulib_m4code_strtoull
28374 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28375 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
28376 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
28377 else
28378 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
28379 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
28382 if $gl_gnulib_enabled_dosname; then
28383 gl_GNULIB_ENABLED_dosname_TRUE=
28384 gl_GNULIB_ENABLED_dosname_FALSE='#'
28385 else
28386 gl_GNULIB_ENABLED_dosname_TRUE='#'
28387 gl_GNULIB_ENABLED_dosname_FALSE=
28390 if $gl_gnulib_enabled_euidaccess; then
28391 gl_GNULIB_ENABLED_euidaccess_TRUE=
28392 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
28393 else
28394 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
28395 gl_GNULIB_ENABLED_euidaccess_FALSE=
28398 if $gl_gnulib_enabled_getdtablesize; then
28399 gl_GNULIB_ENABLED_getdtablesize_TRUE=
28400 gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
28401 else
28402 gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
28403 gl_GNULIB_ENABLED_getdtablesize_FALSE=
28406 if $gl_gnulib_enabled_getgroups; then
28407 gl_GNULIB_ENABLED_getgroups_TRUE=
28408 gl_GNULIB_ENABLED_getgroups_FALSE='#'
28409 else
28410 gl_GNULIB_ENABLED_getgroups_TRUE='#'
28411 gl_GNULIB_ENABLED_getgroups_FALSE=
28414 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28415 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
28416 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
28417 else
28418 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
28419 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
28422 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28423 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
28424 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
28425 else
28426 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
28427 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
28430 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28431 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
28432 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
28433 else
28434 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
28435 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
28438 if $gl_gnulib_enabled_pathmax; then
28439 gl_GNULIB_ENABLED_pathmax_TRUE=
28440 gl_GNULIB_ENABLED_pathmax_FALSE='#'
28441 else
28442 gl_GNULIB_ENABLED_pathmax_TRUE='#'
28443 gl_GNULIB_ENABLED_pathmax_FALSE=
28446 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28447 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
28448 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
28449 else
28450 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
28451 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
28454 if $gl_gnulib_enabled_stat; then
28455 gl_GNULIB_ENABLED_stat_TRUE=
28456 gl_GNULIB_ENABLED_stat_FALSE='#'
28457 else
28458 gl_GNULIB_ENABLED_stat_TRUE='#'
28459 gl_GNULIB_ENABLED_stat_FALSE=
28462 if $gl_gnulib_enabled_strtoll; then
28463 gl_GNULIB_ENABLED_strtoll_TRUE=
28464 gl_GNULIB_ENABLED_strtoll_FALSE='#'
28465 else
28466 gl_GNULIB_ENABLED_strtoll_TRUE='#'
28467 gl_GNULIB_ENABLED_strtoll_FALSE=
28470 if $gl_gnulib_enabled_strtoull; then
28471 gl_GNULIB_ENABLED_strtoull_TRUE=
28472 gl_GNULIB_ENABLED_strtoull_FALSE='#'
28473 else
28474 gl_GNULIB_ENABLED_strtoull_TRUE='#'
28475 gl_GNULIB_ENABLED_strtoull_FALSE=
28478 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28479 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
28480 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
28481 else
28482 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
28483 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
28486 # End of code from modules
28496 gltests_libdeps=
28497 gltests_ltlibdeps=
28507 gl_source_base='tests'
28508 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
28510 gl_module_indicator_condition=$gltests_WITNESS
28521 LIBGNU_LIBDEPS="$gl_libdeps"
28523 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28526 CFLAGS=$SAVE_CFLAGS
28527 LIBS=$SAVE_LIBS
28529 if test "${opsys}" = "mingw32"; then
28530 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
28531 # Remove unneeded switches from the value of CC that goes to Makefiles
28532 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
28535 case "$opsys" in
28536 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
28538 darwin)
28539 ## The -headerpad option tells ld (see man page) to leave room at the
28540 ## end of the header for adding load commands. Needed for dumping.
28541 ## 0x690 is the total size of 30 segment load commands (at 56
28542 ## each); under Cocoa 31 commands are required.
28543 if test "$HAVE_NS" = "yes"; then
28544 libs_nsgui="-framework AppKit"
28545 if test "$NS_IMPL_COCOA" = "yes"; then
28546 libs_nsgui="$libs_nsgui -framework IOKit"
28548 headerpad_extra=6C8
28549 else
28550 libs_nsgui=
28551 headerpad_extra=690
28553 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
28555 ## This is here because src/Makefile.in did some extra fiddling around
28556 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
28557 ## LD_SWITCH_SYSTEM_TEMACS instead,
28558 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
28559 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
28562 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
28563 ## find X at run-time.
28564 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
28565 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
28566 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
28567 ## had different values in configure (in ac_link) and src/Makefile.in.
28568 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
28569 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
28571 mingw32)
28572 ## MinGW64 does not prepend an underscore to symbols, so we must
28573 ## pass a different -entry switch to linker. FIXME: It is better
28574 ## to make the entry points the same by changing unexw32.c.
28575 case "$canonical" in
28576 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
28577 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
28578 esac
28581 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
28583 *) LD_SWITCH_SYSTEM_TEMACS= ;;
28584 esac
28586 if test x$ac_enable_profiling != x ; then
28587 case $opsys in
28588 *freebsd | gnu-linux) ;;
28589 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
28590 esac
28595 ## MinGW-specific post-link processing of temacs.
28596 TEMACS_POST_LINK=":"
28597 ADDSECTION=
28598 EMACS_HEAPSIZE=
28599 if test "${opsys}" = "mingw32"; then
28600 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
28601 ADDSECTION="../nt/addsection\$(EXEEXT)"
28602 ## Preload heap size of temacs.exe in MB.
28603 case "$canonical" in
28604 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
28605 *) EMACS_HEAPSIZE=27 ;;
28606 esac
28613 ## Common for all window systems
28614 if test "$window_system" != "none"; then
28616 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
28618 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
28625 #### Report on what we decided to do.
28626 #### Report GTK as a toolkit, even if it doesn't use Xt.
28627 #### It makes printing result more understandable as using GTK sets
28628 #### toolkit_scroll_bars to yes by default.
28629 if test "${HAVE_GTK}" = "yes"; then
28630 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
28633 if test $USE_ACL -ne 0; then
28634 acl_summary="yes $LIB_ACL"
28635 else
28636 acl_summary=no
28639 echo "
28640 Configured for \`${canonical}'.
28642 Where should the build process find the source code? ${srcdir}
28643 What compiler should emacs be built with? ${CC} ${CFLAGS}
28644 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
28645 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
28646 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
28647 What window system should Emacs use? ${window_system}
28648 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
28650 if test -n "${x_includes}"; then
28651 echo " Where do we find X Windows header files? ${x_includes}"
28652 else
28653 echo " Where do we find X Windows header files? Standard dirs"
28655 if test -n "${x_libraries}"; then
28656 echo " Where do we find X Windows libraries? ${x_libraries}"
28657 else
28658 echo " Where do we find X Windows libraries? Standard dirs"
28661 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
28662 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
28663 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
28664 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
28665 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
28666 echo " Does Emacs use -lpng? ${HAVE_PNG}"
28667 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
28668 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
28670 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
28671 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
28672 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
28673 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
28674 echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
28675 echo " Does Emacs use access control lists? ${acl_summary}"
28676 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
28677 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
28678 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
28680 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
28681 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
28682 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
28683 echo " Does Emacs use -lxft? ${HAVE_XFT}"
28685 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
28686 echo
28688 if test -n "${EMACSDATA}"; then
28689 echo " Environment variable EMACSDATA set to: $EMACSDATA"
28691 if test -n "${EMACSDOC}"; then
28692 echo " Environment variable EMACSDOC set to: $EMACSDOC"
28695 echo
28697 if test "$HAVE_NS" = "yes"; then
28698 echo
28699 echo "You must run \"${MAKE-make} install\" in order to test the built application.
28700 The installed application will go to nextstep/Emacs.app and can be
28701 run or moved from there."
28702 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
28703 echo "The application will be fully self-contained."
28704 else
28705 echo "The lisp resources for the application will be installed under ${prefix}.
28706 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
28707 to run if these resources are not installed."
28709 echo
28712 if test "${opsys}" = "cygwin"; then
28713 case `uname -r` in
28714 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
28715 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
28716 echo
28718 esac
28721 # Remove any trailing slashes in these variables.
28722 test "${prefix}" != NONE &&
28723 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
28724 test "${exec_prefix}" != NONE &&
28725 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
28727 if test "$HAVE_NS" = "yes"; then
28728 if test "$NS_IMPL_GNUSTEP" = yes; then
28729 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"
28731 else
28732 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"
28737 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"
28739 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"
28742 opt_makefile=test/automated/Makefile
28744 if test -f "$srcdir/$opt_makefile.in"; then
28745 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
28746 ac_config_files="$ac_config_files test/automated/Makefile"
28751 opt_makefile=admin/unidata/Makefile
28753 if test -f "$srcdir/$opt_makefile.in"; then
28754 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
28755 ac_config_files="$ac_config_files admin/unidata/Makefile"
28760 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
28764 ac_config_commands="$ac_config_commands mkdirs"
28767 ac_config_commands="$ac_config_commands epaths"
28770 ac_config_commands="$ac_config_commands gdbinit"
28773 cat >confcache <<\_ACEOF
28774 # This file is a shell script that caches the results of configure
28775 # tests run on this system so they can be shared between configure
28776 # scripts and configure runs, see configure's option --config-cache.
28777 # It is not useful on other systems. If it contains results you don't
28778 # want to keep, you may remove or edit it.
28780 # config.status only pays attention to the cache file if you give it
28781 # the --recheck option to rerun configure.
28783 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28784 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28785 # following values.
28787 _ACEOF
28789 # The following way of writing the cache mishandles newlines in values,
28790 # but we know of no workaround that is simple, portable, and efficient.
28791 # So, we kill variables containing newlines.
28792 # Ultrix sh set writes to stderr and can't be redirected directly,
28793 # and sets the high bit in the cache file unless we assign to the vars.
28795 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28796 eval ac_val=\$$ac_var
28797 case $ac_val in #(
28798 *${as_nl}*)
28799 case $ac_var in #(
28800 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28801 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28802 esac
28803 case $ac_var in #(
28804 _ | IFS | as_nl) ;; #(
28805 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28806 *) { eval $ac_var=; unset $ac_var;} ;;
28807 esac ;;
28808 esac
28809 done
28811 (set) 2>&1 |
28812 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28813 *${as_nl}ac_space=\ *)
28814 # `set' does not quote correctly, so add quotes: double-quote
28815 # substitution turns \\\\ into \\, and sed turns \\ into \.
28816 sed -n \
28817 "s/'/'\\\\''/g;
28818 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28819 ;; #(
28821 # `set' quotes correctly as required by POSIX, so do not add quotes.
28822 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28824 esac |
28825 sort
28827 sed '
28828 /^ac_cv_env_/b end
28829 t clear
28830 :clear
28831 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28832 t end
28833 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28834 :end' >>confcache
28835 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28836 if test -w "$cache_file"; then
28837 test "x$cache_file" != "x/dev/null" &&
28838 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28839 $as_echo "$as_me: updating cache $cache_file" >&6;}
28840 cat confcache >$cache_file
28841 else
28842 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28843 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
28846 rm -f confcache
28848 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28849 # Let make expand exec_prefix.
28850 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28852 DEFS=-DHAVE_CONFIG_H
28854 ac_libobjs=
28855 ac_ltlibobjs=
28856 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28857 # 1. Remove the extension, and $U if already installed.
28858 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28859 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
28860 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28861 # will be set to the directory where LIBOBJS objects are built.
28862 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28863 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28864 done
28865 LIBOBJS=$ac_libobjs
28867 LTLIBOBJS=$ac_ltlibobjs
28870 if test -n "$EXEEXT"; then
28871 am__EXEEXT_TRUE=
28872 am__EXEEXT_FALSE='#'
28873 else
28874 am__EXEEXT_TRUE='#'
28875 am__EXEEXT_FALSE=
28878 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28879 as_fn_error "conditional \"AMDEP\" was never defined.
28880 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28882 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28883 as_fn_error "conditional \"am__fastdepCC\" was never defined.
28884 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28886 if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
28887 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
28888 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28890 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28891 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
28892 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28894 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28895 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
28896 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28899 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28900 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28901 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28903 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
28904 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
28905 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28907 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
28908 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
28909 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28911 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
28912 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
28913 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28915 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
28916 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
28917 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28919 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
28920 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
28921 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28923 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
28924 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
28925 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28927 if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
28928 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
28929 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28931 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
28932 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
28933 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28935 if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
28936 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
28937 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28939 if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
28940 as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
28941 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28943 if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
28944 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
28945 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28947 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
28948 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
28949 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28951 if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
28952 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
28953 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28955 if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
28956 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
28957 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28959 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
28960 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
28961 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28963 if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
28964 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
28965 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28967 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
28968 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
28969 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28971 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
28972 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
28973 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28975 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
28976 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
28977 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28979 if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
28980 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
28981 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28984 gl_libobjs=
28985 gl_ltlibobjs=
28986 if test -n "$gl_LIBOBJS"; then
28987 # Remove the extension.
28988 sed_drop_objext='s/\.o$//;s/\.obj$//'
28989 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28990 gl_libobjs="$gl_libobjs $i.$ac_objext"
28991 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28992 done
28994 gl_LIBOBJS=$gl_libobjs
28996 gl_LTLIBOBJS=$gl_ltlibobjs
29000 gltests_libobjs=
29001 gltests_ltlibobjs=
29002 if test -n "$gltests_LIBOBJS"; then
29003 # Remove the extension.
29004 sed_drop_objext='s/\.o$//;s/\.obj$//'
29005 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29006 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29007 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29008 done
29010 gltests_LIBOBJS=$gltests_libobjs
29012 gltests_LTLIBOBJS=$gltests_ltlibobjs
29016 : ${CONFIG_STATUS=./config.status}
29017 ac_write_fail=0
29018 ac_clean_files_save=$ac_clean_files
29019 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29020 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29021 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29022 as_write_fail=0
29023 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29024 #! $SHELL
29025 # Generated by $as_me.
29026 # Run this file to recreate the current configuration.
29027 # Compiler output produced by configure, useful for debugging
29028 # configure, is in config.log if it exists.
29030 debug=false
29031 ac_cs_recheck=false
29032 ac_cs_silent=false
29034 SHELL=\${CONFIG_SHELL-$SHELL}
29035 export SHELL
29036 _ASEOF
29037 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29038 ## -------------------- ##
29039 ## M4sh Initialization. ##
29040 ## -------------------- ##
29042 # Be more Bourne compatible
29043 DUALCASE=1; export DUALCASE # for MKS sh
29044 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29045 emulate sh
29046 NULLCMD=:
29047 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29048 # is contrary to our usage. Disable this feature.
29049 alias -g '${1+"$@"}'='"$@"'
29050 setopt NO_GLOB_SUBST
29051 else
29052 case `(set -o) 2>/dev/null` in #(
29053 *posix*) :
29054 set -o posix ;; #(
29055 *) :
29057 esac
29061 as_nl='
29063 export as_nl
29064 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29065 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29066 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29067 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29068 # Prefer a ksh shell builtin over an external printf program on Solaris,
29069 # but without wasting forks for bash or zsh.
29070 if test -z "$BASH_VERSION$ZSH_VERSION" \
29071 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29072 as_echo='print -r --'
29073 as_echo_n='print -rn --'
29074 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29075 as_echo='printf %s\n'
29076 as_echo_n='printf %s'
29077 else
29078 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29079 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29080 as_echo_n='/usr/ucb/echo -n'
29081 else
29082 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29083 as_echo_n_body='eval
29084 arg=$1;
29085 case $arg in #(
29086 *"$as_nl"*)
29087 expr "X$arg" : "X\\(.*\\)$as_nl";
29088 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29089 esac;
29090 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29092 export as_echo_n_body
29093 as_echo_n='sh -c $as_echo_n_body as_echo'
29095 export as_echo_body
29096 as_echo='sh -c $as_echo_body as_echo'
29099 # The user is always right.
29100 if test "${PATH_SEPARATOR+set}" != set; then
29101 PATH_SEPARATOR=:
29102 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29103 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29104 PATH_SEPARATOR=';'
29109 # IFS
29110 # We need space, tab and new line, in precisely that order. Quoting is
29111 # there to prevent editors from complaining about space-tab.
29112 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29113 # splitting by setting IFS to empty value.)
29114 IFS=" "" $as_nl"
29116 # Find who we are. Look in the path if we contain no directory separator.
29117 case $0 in #((
29118 *[\\/]* ) as_myself=$0 ;;
29119 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29120 for as_dir in $PATH
29122 IFS=$as_save_IFS
29123 test -z "$as_dir" && as_dir=.
29124 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29125 done
29126 IFS=$as_save_IFS
29129 esac
29130 # We did not find ourselves, most probably we were run as `sh COMMAND'
29131 # in which case we are not to be found in the path.
29132 if test "x$as_myself" = x; then
29133 as_myself=$0
29135 if test ! -f "$as_myself"; then
29136 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29137 exit 1
29140 # Unset variables that we do not need and which cause bugs (e.g. in
29141 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29142 # suppresses any "Segmentation fault" message there. '((' could
29143 # trigger a bug in pdksh 5.2.14.
29144 for as_var in BASH_ENV ENV MAIL MAILPATH
29145 do eval test x\${$as_var+set} = xset \
29146 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29147 done
29148 PS1='$ '
29149 PS2='> '
29150 PS4='+ '
29152 # NLS nuisances.
29153 LC_ALL=C
29154 export LC_ALL
29155 LANGUAGE=C
29156 export LANGUAGE
29158 # CDPATH.
29159 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29162 # as_fn_error ERROR [LINENO LOG_FD]
29163 # ---------------------------------
29164 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29165 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29166 # script with status $?, using 1 if that was 0.
29167 as_fn_error ()
29169 as_status=$?; test $as_status -eq 0 && as_status=1
29170 if test "$3"; then
29171 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29172 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
29174 $as_echo "$as_me: error: $1" >&2
29175 as_fn_exit $as_status
29176 } # as_fn_error
29179 # as_fn_set_status STATUS
29180 # -----------------------
29181 # Set $? to STATUS, without forking.
29182 as_fn_set_status ()
29184 return $1
29185 } # as_fn_set_status
29187 # as_fn_exit STATUS
29188 # -----------------
29189 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29190 as_fn_exit ()
29192 set +e
29193 as_fn_set_status $1
29194 exit $1
29195 } # as_fn_exit
29197 # as_fn_unset VAR
29198 # ---------------
29199 # Portably unset VAR.
29200 as_fn_unset ()
29202 { eval $1=; unset $1;}
29204 as_unset=as_fn_unset
29205 # as_fn_append VAR VALUE
29206 # ----------------------
29207 # Append the text in VALUE to the end of the definition contained in VAR. Take
29208 # advantage of any shell optimizations that allow amortized linear growth over
29209 # repeated appends, instead of the typical quadratic growth present in naive
29210 # implementations.
29211 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29212 eval 'as_fn_append ()
29214 eval $1+=\$2
29216 else
29217 as_fn_append ()
29219 eval $1=\$$1\$2
29221 fi # as_fn_append
29223 # as_fn_arith ARG...
29224 # ------------------
29225 # Perform arithmetic evaluation on the ARGs, and store the result in the
29226 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29227 # must be portable across $(()) and expr.
29228 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29229 eval 'as_fn_arith ()
29231 as_val=$(( $* ))
29233 else
29234 as_fn_arith ()
29236 as_val=`expr "$@" || test $? -eq 1`
29238 fi # as_fn_arith
29241 if expr a : '\(a\)' >/dev/null 2>&1 &&
29242 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29243 as_expr=expr
29244 else
29245 as_expr=false
29248 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29249 as_basename=basename
29250 else
29251 as_basename=false
29254 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29255 as_dirname=dirname
29256 else
29257 as_dirname=false
29260 as_me=`$as_basename -- "$0" ||
29261 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29262 X"$0" : 'X\(//\)$' \| \
29263 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29264 $as_echo X/"$0" |
29265 sed '/^.*\/\([^/][^/]*\)\/*$/{
29266 s//\1/
29269 /^X\/\(\/\/\)$/{
29270 s//\1/
29273 /^X\/\(\/\).*/{
29274 s//\1/
29277 s/.*/./; q'`
29279 # Avoid depending upon Character Ranges.
29280 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29281 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29282 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29283 as_cr_digits='0123456789'
29284 as_cr_alnum=$as_cr_Letters$as_cr_digits
29286 ECHO_C= ECHO_N= ECHO_T=
29287 case `echo -n x` in #(((((
29288 -n*)
29289 case `echo 'xy\c'` in
29290 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29291 xy) ECHO_C='\c';;
29292 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29293 ECHO_T=' ';;
29294 esac;;
29296 ECHO_N='-n';;
29297 esac
29299 rm -f conf$$ conf$$.exe conf$$.file
29300 if test -d conf$$.dir; then
29301 rm -f conf$$.dir/conf$$.file
29302 else
29303 rm -f conf$$.dir
29304 mkdir conf$$.dir 2>/dev/null
29306 if (echo >conf$$.file) 2>/dev/null; then
29307 if ln -s conf$$.file conf$$ 2>/dev/null; then
29308 as_ln_s='ln -s'
29309 # ... but there are two gotchas:
29310 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29311 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29312 # In both cases, we have to default to `cp -p'.
29313 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29314 as_ln_s='cp -p'
29315 elif ln conf$$.file conf$$ 2>/dev/null; then
29316 as_ln_s=ln
29317 else
29318 as_ln_s='cp -p'
29320 else
29321 as_ln_s='cp -p'
29323 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29324 rmdir conf$$.dir 2>/dev/null
29327 # as_fn_mkdir_p
29328 # -------------
29329 # Create "$as_dir" as a directory, including parents if necessary.
29330 as_fn_mkdir_p ()
29333 case $as_dir in #(
29334 -*) as_dir=./$as_dir;;
29335 esac
29336 test -d "$as_dir" || eval $as_mkdir_p || {
29337 as_dirs=
29338 while :; do
29339 case $as_dir in #(
29340 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29341 *) as_qdir=$as_dir;;
29342 esac
29343 as_dirs="'$as_qdir' $as_dirs"
29344 as_dir=`$as_dirname -- "$as_dir" ||
29345 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29346 X"$as_dir" : 'X\(//\)[^/]' \| \
29347 X"$as_dir" : 'X\(//\)$' \| \
29348 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29349 $as_echo X"$as_dir" |
29350 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29351 s//\1/
29354 /^X\(\/\/\)[^/].*/{
29355 s//\1/
29358 /^X\(\/\/\)$/{
29359 s//\1/
29362 /^X\(\/\).*/{
29363 s//\1/
29366 s/.*/./; q'`
29367 test -d "$as_dir" && break
29368 done
29369 test -z "$as_dirs" || eval "mkdir $as_dirs"
29370 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
29373 } # as_fn_mkdir_p
29374 if mkdir -p . 2>/dev/null; then
29375 as_mkdir_p='mkdir -p "$as_dir"'
29376 else
29377 test -d ./-p && rmdir ./-p
29378 as_mkdir_p=false
29381 if test -x / >/dev/null 2>&1; then
29382 as_test_x='test -x'
29383 else
29384 if ls -dL / >/dev/null 2>&1; then
29385 as_ls_L_option=L
29386 else
29387 as_ls_L_option=
29389 as_test_x='
29390 eval sh -c '\''
29391 if test -d "$1"; then
29392 test -d "$1/.";
29393 else
29394 case $1 in #(
29395 -*)set "./$1";;
29396 esac;
29397 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
29398 ???[sx]*):;;*)false;;esac;fi
29399 '\'' sh
29402 as_executable_p=$as_test_x
29404 # Sed expression to map a string onto a valid CPP name.
29405 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29407 # Sed expression to map a string onto a valid variable name.
29408 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29411 exec 6>&1
29412 ## ----------------------------------- ##
29413 ## Main body of $CONFIG_STATUS script. ##
29414 ## ----------------------------------- ##
29415 _ASEOF
29416 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29418 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29419 # Save the log message, to keep $0 and so on meaningful, and to
29420 # report actual input values of CONFIG_FILES etc. instead of their
29421 # values after options handling.
29422 ac_log="
29423 This file was extended by emacs $as_me 24.3.50, which was
29424 generated by GNU Autoconf 2.65. Invocation command line was
29426 CONFIG_FILES = $CONFIG_FILES
29427 CONFIG_HEADERS = $CONFIG_HEADERS
29428 CONFIG_LINKS = $CONFIG_LINKS
29429 CONFIG_COMMANDS = $CONFIG_COMMANDS
29430 $ $0 $@
29432 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29435 _ACEOF
29437 case $ac_config_files in *"
29438 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29439 esac
29441 case $ac_config_headers in *"
29442 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29443 esac
29446 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29447 # Files that config.status was made for.
29448 config_files="$ac_config_files"
29449 config_headers="$ac_config_headers"
29450 config_commands="$ac_config_commands"
29452 _ACEOF
29454 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29455 ac_cs_usage="\
29456 \`$as_me' instantiates files and other configuration actions
29457 from templates according to the current configuration. Unless the files
29458 and actions are specified as TAGs, all are instantiated by default.
29460 Usage: $0 [OPTION]... [TAG]...
29462 -h, --help print this help, then exit
29463 -V, --version print version number and configuration settings, then exit
29464 --config print configuration, then exit
29465 -q, --quiet, --silent
29466 do not print progress messages
29467 -d, --debug don't remove temporary files
29468 --recheck update $as_me by reconfiguring in the same conditions
29469 --file=FILE[:TEMPLATE]
29470 instantiate the configuration file FILE
29471 --header=FILE[:TEMPLATE]
29472 instantiate the configuration header FILE
29474 Configuration files:
29475 $config_files
29477 Configuration headers:
29478 $config_headers
29480 Configuration commands:
29481 $config_commands
29483 Report bugs to the package provider."
29485 _ACEOF
29486 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29487 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29488 ac_cs_version="\\
29489 emacs config.status 24.3.50
29490 configured by $0, generated by GNU Autoconf 2.65,
29491 with options \\"\$ac_cs_config\\"
29493 Copyright (C) 2009 Free Software Foundation, Inc.
29494 This config.status script is free software; the Free Software Foundation
29495 gives unlimited permission to copy, distribute and modify it."
29497 ac_pwd='$ac_pwd'
29498 srcdir='$srcdir'
29499 INSTALL='$INSTALL'
29500 MKDIR_P='$MKDIR_P'
29501 AWK='$AWK'
29502 test -n "\$AWK" || AWK=awk
29503 _ACEOF
29505 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29506 # The default lists apply if the user does not specify any file.
29507 ac_need_defaults=:
29508 while test $# != 0
29510 case $1 in
29511 --*=*)
29512 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29513 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29514 ac_shift=:
29517 ac_option=$1
29518 ac_optarg=$2
29519 ac_shift=shift
29521 esac
29523 case $ac_option in
29524 # Handling of the options.
29525 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29526 ac_cs_recheck=: ;;
29527 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29528 $as_echo "$ac_cs_version"; exit ;;
29529 --config | --confi | --conf | --con | --co | --c )
29530 $as_echo "$ac_cs_config"; exit ;;
29531 --debug | --debu | --deb | --de | --d | -d )
29532 debug=: ;;
29533 --file | --fil | --fi | --f )
29534 $ac_shift
29535 case $ac_optarg in
29536 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29537 esac
29538 as_fn_append CONFIG_FILES " '$ac_optarg'"
29539 ac_need_defaults=false;;
29540 --header | --heade | --head | --hea )
29541 $ac_shift
29542 case $ac_optarg in
29543 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29544 esac
29545 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29546 ac_need_defaults=false;;
29547 --he | --h)
29548 # Conflict between --help and --header
29549 as_fn_error "ambiguous option: \`$1'
29550 Try \`$0 --help' for more information.";;
29551 --help | --hel | -h )
29552 $as_echo "$ac_cs_usage"; exit ;;
29553 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29554 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29555 ac_cs_silent=: ;;
29557 # This is an error.
29558 -*) as_fn_error "unrecognized option: \`$1'
29559 Try \`$0 --help' for more information." ;;
29561 *) as_fn_append ac_config_targets " $1"
29562 ac_need_defaults=false ;;
29564 esac
29565 shift
29566 done
29568 ac_configure_extra_args=
29570 if $ac_cs_silent; then
29571 exec 6>/dev/null
29572 ac_configure_extra_args="$ac_configure_extra_args --silent"
29575 _ACEOF
29576 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29577 if \$ac_cs_recheck; then
29578 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29579 shift
29580 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29581 CONFIG_SHELL='$SHELL'
29582 export CONFIG_SHELL
29583 exec "\$@"
29586 _ACEOF
29587 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29588 exec 5>>config.log
29590 echo
29591 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29592 ## Running $as_me. ##
29593 _ASBOX
29594 $as_echo "$ac_log"
29595 } >&5
29597 _ACEOF
29598 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29600 # INIT-COMMANDS
29602 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29603 GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
29605 _ACEOF
29607 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29609 # Handling of arguments.
29610 for ac_config_target in $ac_config_targets
29612 case $ac_config_target in
29613 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
29614 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29615 "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" ;;
29616 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
29617 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
29618 "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" ;;
29619 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29620 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29621 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
29622 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
29623 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
29624 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
29625 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
29626 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
29627 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
29628 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
29629 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
29630 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
29631 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
29632 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
29633 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
29634 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
29635 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
29636 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
29637 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
29639 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29640 esac
29641 done
29644 # If the user did not use the arguments to specify the items to instantiate,
29645 # then the envvar interface is used. Set only those that are not.
29646 # We use the long form for the default assignment because of an extremely
29647 # bizarre bug on SunOS 4.1.3.
29648 if $ac_need_defaults; then
29649 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29650 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29651 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29654 # Have a temporary directory for convenience. Make it in the build tree
29655 # simply because there is no reason against having it here, and in addition,
29656 # creating and moving files from /tmp can sometimes cause problems.
29657 # Hook for its removal unless debugging.
29658 # Note that there is a small window in which the directory will not be cleaned:
29659 # after its creation but before its name has been assigned to `$tmp'.
29660 $debug ||
29662 tmp=
29663 trap 'exit_status=$?
29664 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
29666 trap 'as_fn_exit 1' 1 2 13 15
29668 # Create a (secure) tmp directory for tmp files.
29671 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29672 test -n "$tmp" && test -d "$tmp"
29673 } ||
29675 tmp=./conf$$-$RANDOM
29676 (umask 077 && mkdir "$tmp")
29677 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
29679 # Set up the scripts for CONFIG_FILES section.
29680 # No need to generate them if there are no CONFIG_FILES.
29681 # This happens for instance with `./config.status config.h'.
29682 if test -n "$CONFIG_FILES"; then
29684 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
29685 ac_cs_awk_getline=:
29686 ac_cs_awk_pipe_init=
29687 ac_cs_awk_read_file='
29688 while ((getline aline < (F[key])) > 0)
29689 print(aline)
29690 close(F[key])'
29691 ac_cs_awk_pipe_fini=
29692 else
29693 ac_cs_awk_getline=false
29694 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
29695 ac_cs_awk_read_file='
29696 print "|#_!!_#|"
29697 print "cat " F[key] " &&"
29698 '$ac_cs_awk_pipe_init
29699 # The final `:' finishes the AND list.
29700 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
29702 ac_cr=`echo X | tr X '\015'`
29703 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29704 # But we know of no other shell where ac_cr would be empty at this
29705 # point, so we can use a bashism as a fallback.
29706 if test "x$ac_cr" = x; then
29707 eval ac_cr=\$\'\\r\'
29709 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29710 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29711 ac_cs_awk_cr='\r'
29712 else
29713 ac_cs_awk_cr=$ac_cr
29716 echo 'BEGIN {' >"$tmp/subs1.awk" &&
29717 _ACEOF
29719 # Create commands to substitute file output variables.
29721 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
29722 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
29723 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
29724 echo "_ACAWK" &&
29725 echo "_ACEOF"
29726 } >conf$$files.sh &&
29727 . ./conf$$files.sh ||
29728 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29729 rm -f conf$$files.sh
29732 echo "cat >conf$$subs.awk <<_ACEOF" &&
29733 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29734 echo "_ACEOF"
29735 } >conf$$subs.sh ||
29736 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29737 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
29738 ac_delim='%!_!# '
29739 for ac_last_try in false false false false false :; do
29740 . ./conf$$subs.sh ||
29741 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29743 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29744 if test $ac_delim_n = $ac_delim_num; then
29745 break
29746 elif $ac_last_try; then
29747 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29748 else
29749 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29751 done
29752 rm -f conf$$subs.sh
29754 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29755 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
29756 _ACEOF
29757 sed -n '
29759 s/^/S["/; s/!.*/"]=/
29762 s/^[^!]*!//
29763 :repl
29764 t repl
29765 s/'"$ac_delim"'$//
29766 t delim
29769 s/\(.\{148\}\)..*/\1/
29770 t more1
29771 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29774 b repl
29775 :more1
29776 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29779 s/.\{148\}//
29780 t nl
29781 :delim
29783 s/\(.\{148\}\)..*/\1/
29784 t more2
29785 s/["\\]/\\&/g; s/^/"/; s/$/"/
29788 :more2
29789 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29792 s/.\{148\}//
29793 t delim
29794 ' <conf$$subs.awk | sed '
29795 /^[^""]/{
29797 s/\n//
29799 ' >>$CONFIG_STATUS || ac_write_fail=1
29800 rm -f conf$$subs.awk
29801 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29802 _ACAWK
29803 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
29804 for (key in S) S_is_set[key] = 1
29805 FS = "\a"
29806 \$ac_cs_awk_pipe_init
29809 line = $ 0
29810 nfields = split(line, field, "@")
29811 substed = 0
29812 len = length(field[1])
29813 for (i = 2; i < nfields; i++) {
29814 key = field[i]
29815 keylen = length(key)
29816 if (S_is_set[key]) {
29817 value = S[key]
29818 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29819 len += length(value) + length(field[++i])
29820 substed = 1
29821 } else
29822 len += 1 + keylen
29824 if (nfields == 3 && !substed) {
29825 key = field[2]
29826 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
29827 \$ac_cs_awk_read_file
29828 next
29831 print line
29833 \$ac_cs_awk_pipe_fini
29834 _ACAWK
29835 _ACEOF
29836 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29837 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29838 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29839 else
29841 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
29842 || as_fn_error "could not setup config files machinery" "$LINENO" 5
29843 _ACEOF
29845 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29846 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29847 # trailing colons and then remove the whole line if VPATH becomes empty
29848 # (actually we leave an empty line to preserve line numbers).
29849 if test "x$srcdir" = x.; then
29850 ac_vpsub='/^[ ]*VPATH[ ]*=/{
29851 s/:*\$(srcdir):*/:/
29852 s/:*\${srcdir}:*/:/
29853 s/:*@srcdir@:*/:/
29854 s/^\([^=]*=[ ]*\):*/\1/
29855 s/:*$//
29856 s/^[^=]*=[ ]*$//
29860 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29861 fi # test -n "$CONFIG_FILES"
29863 # Set up the scripts for CONFIG_HEADERS section.
29864 # No need to generate them if there are no CONFIG_HEADERS.
29865 # This happens for instance with `./config.status Makefile'.
29866 if test -n "$CONFIG_HEADERS"; then
29867 cat >"$tmp/defines.awk" <<\_ACAWK ||
29868 BEGIN {
29869 _ACEOF
29871 # Transform confdefs.h into an awk script `defines.awk', embedded as
29872 # here-document in config.status, that substitutes the proper values into
29873 # config.h.in to produce config.h.
29875 # Create a delimiter string that does not exist in confdefs.h, to ease
29876 # handling of long lines.
29877 ac_delim='%!_!# '
29878 for ac_last_try in false false :; do
29879 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
29880 if test -z "$ac_t"; then
29881 break
29882 elif $ac_last_try; then
29883 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
29884 else
29885 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29887 done
29889 # For the awk script, D is an array of macro values keyed by name,
29890 # likewise P contains macro parameters if any. Preserve backslash
29891 # newline sequences.
29893 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29894 sed -n '
29895 s/.\{148\}/&'"$ac_delim"'/g
29896 t rset
29897 :rset
29898 s/^[ ]*#[ ]*define[ ][ ]*/ /
29899 t def
29901 :def
29902 s/\\$//
29903 t bsnl
29904 s/["\\]/\\&/g
29905 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29906 D["\1"]=" \3"/p
29907 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29909 :bsnl
29910 s/["\\]/\\&/g
29911 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29912 D["\1"]=" \3\\\\\\n"\\/p
29913 t cont
29914 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29915 t cont
29917 :cont
29919 s/.\{148\}/&'"$ac_delim"'/g
29920 t clear
29921 :clear
29922 s/\\$//
29923 t bsnlc
29924 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29926 :bsnlc
29927 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29928 b cont
29929 ' <confdefs.h | sed '
29930 s/'"$ac_delim"'/"\\\
29931 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29933 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29934 for (key in D) D_is_set[key] = 1
29935 FS = "\a"
29937 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29938 line = \$ 0
29939 split(line, arg, " ")
29940 if (arg[1] == "#") {
29941 defundef = arg[2]
29942 mac1 = arg[3]
29943 } else {
29944 defundef = substr(arg[1], 2)
29945 mac1 = arg[2]
29947 split(mac1, mac2, "(") #)
29948 macro = mac2[1]
29949 prefix = substr(line, 1, index(line, defundef) - 1)
29950 if (D_is_set[macro]) {
29951 # Preserve the white space surrounding the "#".
29952 print prefix "define", macro P[macro] D[macro]
29953 next
29954 } else {
29955 # Replace #undef with comments. This is necessary, for example,
29956 # in the case of _POSIX_SOURCE, which is predefined and required
29957 # on some systems where configure will not decide to define it.
29958 if (defundef == "undef") {
29959 print "/*", prefix defundef, macro, "*/"
29960 next
29964 { print }
29965 _ACAWK
29966 _ACEOF
29967 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29968 as_fn_error "could not setup config headers machinery" "$LINENO" 5
29969 fi # test -n "$CONFIG_HEADERS"
29972 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
29973 shift
29974 for ac_tag
29976 case $ac_tag in
29977 :[FHLC]) ac_mode=$ac_tag; continue;;
29978 esac
29979 case $ac_mode$ac_tag in
29980 :[FHL]*:*);;
29981 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
29982 :[FH]-) ac_tag=-:-;;
29983 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29984 esac
29985 ac_save_IFS=$IFS
29986 IFS=:
29987 set x $ac_tag
29988 IFS=$ac_save_IFS
29989 shift
29990 ac_file=$1
29991 shift
29993 case $ac_mode in
29994 :L) ac_source=$1;;
29995 :[FH])
29996 ac_file_inputs=
29997 for ac_f
29999 case $ac_f in
30000 -) ac_f="$tmp/stdin";;
30001 *) # Look for the file first in the build tree, then in the source tree
30002 # (if the path is not absolute). The absolute path cannot be DOS-style,
30003 # because $ac_f cannot contain `:'.
30004 test -f "$ac_f" ||
30005 case $ac_f in
30006 [\\/$]*) false;;
30007 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30008 esac ||
30009 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30010 esac
30011 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30012 as_fn_append ac_file_inputs " '$ac_f'"
30013 done
30015 # Let's still pretend it is `configure' which instantiates (i.e., don't
30016 # use $as_me), people would be surprised to read:
30017 # /* config.h. Generated by config.status. */
30018 configure_input='Generated from '`
30019 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30020 `' by configure.'
30021 if test x"$ac_file" != x-; then
30022 configure_input="$ac_file. $configure_input"
30023 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30024 $as_echo "$as_me: creating $ac_file" >&6;}
30026 # Neutralize special characters interpreted by sed in replacement strings.
30027 case $configure_input in #(
30028 *\&* | *\|* | *\\* )
30029 ac_sed_conf_input=`$as_echo "$configure_input" |
30030 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30031 *) ac_sed_conf_input=$configure_input;;
30032 esac
30034 case $ac_tag in
30035 *:-:* | *:-) cat >"$tmp/stdin" \
30036 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
30037 esac
30039 esac
30041 ac_dir=`$as_dirname -- "$ac_file" ||
30042 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30043 X"$ac_file" : 'X\(//\)[^/]' \| \
30044 X"$ac_file" : 'X\(//\)$' \| \
30045 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30046 $as_echo X"$ac_file" |
30047 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30048 s//\1/
30051 /^X\(\/\/\)[^/].*/{
30052 s//\1/
30055 /^X\(\/\/\)$/{
30056 s//\1/
30059 /^X\(\/\).*/{
30060 s//\1/
30063 s/.*/./; q'`
30064 as_dir="$ac_dir"; as_fn_mkdir_p
30065 ac_builddir=.
30067 case "$ac_dir" in
30068 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30070 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30071 # A ".." for each directory in $ac_dir_suffix.
30072 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30073 case $ac_top_builddir_sub in
30074 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30075 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30076 esac ;;
30077 esac
30078 ac_abs_top_builddir=$ac_pwd
30079 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30080 # for backward compatibility:
30081 ac_top_builddir=$ac_top_build_prefix
30083 case $srcdir in
30084 .) # We are building in place.
30085 ac_srcdir=.
30086 ac_top_srcdir=$ac_top_builddir_sub
30087 ac_abs_top_srcdir=$ac_pwd ;;
30088 [\\/]* | ?:[\\/]* ) # Absolute name.
30089 ac_srcdir=$srcdir$ac_dir_suffix;
30090 ac_top_srcdir=$srcdir
30091 ac_abs_top_srcdir=$srcdir ;;
30092 *) # Relative name.
30093 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30094 ac_top_srcdir=$ac_top_build_prefix$srcdir
30095 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30096 esac
30097 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30100 case $ac_mode in
30103 # CONFIG_FILE
30106 case $INSTALL in
30107 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30108 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30109 esac
30110 ac_MKDIR_P=$MKDIR_P
30111 case $MKDIR_P in
30112 [\\/$]* | ?:[\\/]* ) ;;
30113 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30114 esac
30115 _ACEOF
30117 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30118 # If the template does not know about datarootdir, expand it.
30119 # FIXME: This hack should be removed a few years after 2.60.
30120 ac_datarootdir_hack=; ac_datarootdir_seen=
30121 ac_sed_dataroot='
30122 /datarootdir/ {
30126 /@datadir@/p
30127 /@docdir@/p
30128 /@infodir@/p
30129 /@localedir@/p
30130 /@mandir@/p'
30131 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30132 *datarootdir*) ac_datarootdir_seen=yes;;
30133 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30135 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30136 _ACEOF
30137 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30138 ac_datarootdir_hack='
30139 s&@datadir@&$datadir&g
30140 s&@docdir@&$docdir&g
30141 s&@infodir@&$infodir&g
30142 s&@localedir@&$localedir&g
30143 s&@mandir@&$mandir&g
30144 s&\\\${datarootdir}&$datarootdir&g' ;;
30145 esac
30146 _ACEOF
30148 # Neutralize VPATH when `$srcdir' = `.'.
30149 # Shell code in configure.ac might set extrasub.
30150 # FIXME: do we really want to maintain this feature?
30151 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30152 ac_sed_extra="$ac_vpsub
30153 $extrasub
30154 _ACEOF
30155 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30157 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30158 s|@configure_input@|$ac_sed_conf_input|;t t
30159 s&@top_builddir@&$ac_top_builddir_sub&;t t
30160 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30161 s&@srcdir@&$ac_srcdir&;t t
30162 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30163 s&@top_srcdir@&$ac_top_srcdir&;t t
30164 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30165 s&@builddir@&$ac_builddir&;t t
30166 s&@abs_builddir@&$ac_abs_builddir&;t t
30167 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30168 s&@INSTALL@&$ac_INSTALL&;t t
30169 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30170 $ac_datarootdir_hack
30172 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30173 if $ac_cs_awk_getline; then
30174 $AWK -f "$tmp/subs.awk"
30175 else
30176 $AWK -f "$tmp/subs.awk" | $SHELL
30177 fi >$tmp/out \
30178 || as_fn_error "could not create $ac_file" "$LINENO" 5
30180 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30181 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30182 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
30183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30184 which seems to be undefined. Please make sure it is defined." >&5
30185 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30186 which seems to be undefined. Please make sure it is defined." >&2;}
30188 rm -f "$tmp/stdin"
30189 case $ac_file in
30190 -) cat "$tmp/out" && rm -f "$tmp/out";;
30191 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
30192 esac \
30193 || as_fn_error "could not create $ac_file" "$LINENO" 5
30197 # CONFIG_HEADER
30199 if test x"$ac_file" != x-; then
30201 $as_echo "/* $configure_input */" \
30202 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30203 } >"$tmp/config.h" \
30204 || as_fn_error "could not create $ac_file" "$LINENO" 5
30205 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
30206 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30207 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30208 else
30209 rm -f "$ac_file"
30210 mv "$tmp/config.h" "$ac_file" \
30211 || as_fn_error "could not create $ac_file" "$LINENO" 5
30213 else
30214 $as_echo "/* $configure_input */" \
30215 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30216 || as_fn_error "could not create -" "$LINENO" 5
30218 # Compute "$ac_file"'s index in $config_headers.
30219 _am_arg="$ac_file"
30220 _am_stamp_count=1
30221 for _am_header in $config_headers :; do
30222 case $_am_header in
30223 $_am_arg | $_am_arg:* )
30224 break ;;
30226 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30227 esac
30228 done
30229 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30230 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30231 X"$_am_arg" : 'X\(//\)[^/]' \| \
30232 X"$_am_arg" : 'X\(//\)$' \| \
30233 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30234 $as_echo X"$_am_arg" |
30235 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30236 s//\1/
30239 /^X\(\/\/\)[^/].*/{
30240 s//\1/
30243 /^X\(\/\/\)$/{
30244 s//\1/
30247 /^X\(\/\).*/{
30248 s//\1/
30251 s/.*/./; q'`/stamp-h$_am_stamp_count
30254 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30255 $as_echo "$as_me: executing $ac_file commands" >&6;}
30257 esac
30260 case $ac_file$ac_mode in
30261 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30262 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30263 # are listed without --file. Let's play safe and only enable the eval
30264 # if we detect the quoting.
30265 case $CONFIG_FILES in
30266 *\'*) eval set x "$CONFIG_FILES" ;;
30267 *) set x $CONFIG_FILES ;;
30268 esac
30269 shift
30270 for mf
30272 # Strip MF so we end up with the name of the file.
30273 mf=`echo "$mf" | sed -e 's/:.*$//'`
30274 # Check whether this is an Automake generated Makefile or not.
30275 # We used to match only the files named `Makefile.in', but
30276 # some people rename them; so instead we look at the file content.
30277 # Grep'ing the first line is not enough: some people post-process
30278 # each Makefile.in and add a new line on top of each file to say so.
30279 # Grep'ing the whole file is not good either: AIX grep has a line
30280 # limit of 2048, but all sed's we know have understand at least 4000.
30281 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30282 dirpart=`$as_dirname -- "$mf" ||
30283 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30284 X"$mf" : 'X\(//\)[^/]' \| \
30285 X"$mf" : 'X\(//\)$' \| \
30286 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30287 $as_echo X"$mf" |
30288 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30289 s//\1/
30292 /^X\(\/\/\)[^/].*/{
30293 s//\1/
30296 /^X\(\/\/\)$/{
30297 s//\1/
30300 /^X\(\/\).*/{
30301 s//\1/
30304 s/.*/./; q'`
30305 else
30306 continue
30308 # Extract the definition of DEPDIR, am__include, and am__quote
30309 # from the Makefile without running `make'.
30310 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30311 test -z "$DEPDIR" && continue
30312 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30313 test -z "am__include" && continue
30314 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30315 # When using ansi2knr, U may be empty or an underscore; expand it
30316 U=`sed -n 's/^U = //p' < "$mf"`
30317 # Find all dependency output files, they are included files with
30318 # $(DEPDIR) in their names. We invoke sed twice because it is the
30319 # simplest approach to changing $(DEPDIR) to its actual value in the
30320 # expansion.
30321 for file in `sed -n "
30322 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30323 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
30324 # Make sure the directory exists.
30325 test -f "$dirpart/$file" && continue
30326 fdir=`$as_dirname -- "$file" ||
30327 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30328 X"$file" : 'X\(//\)[^/]' \| \
30329 X"$file" : 'X\(//\)$' \| \
30330 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30331 $as_echo X"$file" |
30332 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30333 s//\1/
30336 /^X\(\/\/\)[^/].*/{
30337 s//\1/
30340 /^X\(\/\/\)$/{
30341 s//\1/
30344 /^X\(\/\).*/{
30345 s//\1/
30348 s/.*/./; q'`
30349 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30350 # echo "creating $dirpart/$file"
30351 echo '# dummy' > "$dirpart/$file"
30352 done
30353 done
30356 "mkdirs":C)
30357 for dir in etc lisp ; do
30358 test -d ${dir} || mkdir ${dir}
30359 done
30361 "epaths":C)
30362 echo creating src/epaths.h
30363 if test "${opsys}" = "mingw32"; then
30364 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
30365 else
30366 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
30369 "gdbinit":C)
30370 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
30371 echo creating src/.gdbinit
30372 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
30376 esac
30377 done # for ac_tag
30380 as_fn_exit 0
30381 _ACEOF
30382 ac_clean_files=$ac_clean_files_save
30384 test $ac_write_fail = 0 ||
30385 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
30388 # configure is writing to config.log, and then calls config.status.
30389 # config.status does its own redirection, appending to config.log.
30390 # Unfortunately, on DOS this fails, as config.log is still kept open
30391 # by configure, so config.status won't be able to write to it; its
30392 # output is simply discarded. So we exec the FD to /dev/null,
30393 # effectively closing config.log, so it can be properly (re)opened and
30394 # appended to by config.status. When coming back to configure, we
30395 # need to make the FD available again.
30396 if test "$no_create" != yes; then
30397 ac_cs_success=:
30398 ac_config_status_args=
30399 test "$silent" = yes &&
30400 ac_config_status_args="$ac_config_status_args --quiet"
30401 exec 5>/dev/null
30402 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30403 exec 5>>config.log
30404 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30405 # would make configure fail if this is the last instruction.
30406 $ac_cs_success || as_fn_exit $?
30408 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30409 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30410 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}