Mark tiny change from author without assignment
[emacs.git] / autogen / configure
blobc86812c00359a9fb2a6c5b9168e011ff3ff77509
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 ns_check_file
608 WINDOW_SYSTEM_OBJ
609 EMACS_HEAPSIZE
610 TEMACS_POST_LINK
611 ADDSECTION
612 LD_SWITCH_SYSTEM_TEMACS
613 LIBGNU_LTLIBDEPS
614 LIBGNU_LIBDEPS
615 gltests_WITNESS
616 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
617 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
618 gl_GNULIB_ENABLED_tempname_FALSE
619 gl_GNULIB_ENABLED_tempname_TRUE
620 gl_GNULIB_ENABLED_strtoull_FALSE
621 gl_GNULIB_ENABLED_strtoull_TRUE
622 gl_GNULIB_ENABLED_strtoll_FALSE
623 gl_GNULIB_ENABLED_strtoll_TRUE
624 gl_GNULIB_ENABLED_stat_FALSE
625 gl_GNULIB_ENABLED_stat_TRUE
626 gl_GNULIB_ENABLED_secure_getenv_FALSE
627 gl_GNULIB_ENABLED_secure_getenv_TRUE
628 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
629 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
630 gl_GNULIB_ENABLED_pathmax_FALSE
631 gl_GNULIB_ENABLED_pathmax_TRUE
632 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
633 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
634 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
635 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
636 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
637 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
638 gl_GNULIB_ENABLED_getgroups_FALSE
639 gl_GNULIB_ENABLED_getgroups_TRUE
640 gl_GNULIB_ENABLED_getdtablesize_FALSE
641 gl_GNULIB_ENABLED_getdtablesize_TRUE
642 gl_GNULIB_ENABLED_euidaccess_FALSE
643 gl_GNULIB_ENABLED_euidaccess_TRUE
644 gl_GNULIB_ENABLED_dosname_FALSE
645 gl_GNULIB_ENABLED_dosname_TRUE
646 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
647 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
648 LTLIBINTL
649 LIBINTL
650 LIB_EACCESS
651 WINDOWS_64_BIT_OFF_T
652 HAVE_UNISTD_H
653 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
654 NEXT_UNISTD_H
655 LIB_TIMER_TIME
656 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
657 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
658 TIME_H_DEFINES_STRUCT_TIMESPEC
659 NEXT_AS_FIRST_DIRECTIVE_TIME_H
660 NEXT_TIME_H
661 WINDOWS_64_BIT_ST_SIZE
662 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
663 NEXT_SYS_STAT_H
664 NEXT_AS_FIRST_DIRECTIVE_STRING_H
665 NEXT_STRING_H
666 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
667 NEXT_STDLIB_H
668 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
669 NEXT_STDIO_H
670 REPLACE_VSPRINTF
671 REPLACE_VSNPRINTF
672 REPLACE_VPRINTF
673 REPLACE_VFPRINTF
674 REPLACE_VDPRINTF
675 REPLACE_VASPRINTF
676 REPLACE_TMPFILE
677 REPLACE_STDIO_WRITE_FUNCS
678 REPLACE_STDIO_READ_FUNCS
679 REPLACE_SPRINTF
680 REPLACE_SNPRINTF
681 REPLACE_RENAMEAT
682 REPLACE_RENAME
683 REPLACE_REMOVE
684 REPLACE_PRINTF
685 REPLACE_POPEN
686 REPLACE_PERROR
687 REPLACE_OBSTACK_PRINTF
688 REPLACE_GETLINE
689 REPLACE_GETDELIM
690 REPLACE_FTELLO
691 REPLACE_FTELL
692 REPLACE_FSEEKO
693 REPLACE_FSEEK
694 REPLACE_FREOPEN
695 REPLACE_FPURGE
696 REPLACE_FPRINTF
697 REPLACE_FOPEN
698 REPLACE_FFLUSH
699 REPLACE_FDOPEN
700 REPLACE_FCLOSE
701 REPLACE_DPRINTF
702 HAVE_VDPRINTF
703 HAVE_VASPRINTF
704 HAVE_RENAMEAT
705 HAVE_POPEN
706 HAVE_PCLOSE
707 HAVE_FTELLO
708 HAVE_FSEEKO
709 HAVE_DPRINTF
710 HAVE_DECL_VSNPRINTF
711 HAVE_DECL_SNPRINTF
712 HAVE_DECL_OBSTACK_PRINTF
713 HAVE_DECL_GETLINE
714 HAVE_DECL_GETDELIM
715 HAVE_DECL_FTELLO
716 HAVE_DECL_FSEEKO
717 HAVE_DECL_FPURGE
718 GNULIB_VSPRINTF_POSIX
719 GNULIB_VSNPRINTF
720 GNULIB_VPRINTF_POSIX
721 GNULIB_VPRINTF
722 GNULIB_VFPRINTF_POSIX
723 GNULIB_VFPRINTF
724 GNULIB_VDPRINTF
725 GNULIB_VSCANF
726 GNULIB_VFSCANF
727 GNULIB_VASPRINTF
728 GNULIB_TMPFILE
729 GNULIB_STDIO_H_SIGPIPE
730 GNULIB_STDIO_H_NONBLOCKING
731 GNULIB_SPRINTF_POSIX
732 GNULIB_SNPRINTF
733 GNULIB_SCANF
734 GNULIB_RENAMEAT
735 GNULIB_RENAME
736 GNULIB_REMOVE
737 GNULIB_PUTS
738 GNULIB_PUTCHAR
739 GNULIB_PUTC
740 GNULIB_PRINTF_POSIX
741 GNULIB_PRINTF
742 GNULIB_POPEN
743 GNULIB_PERROR
744 GNULIB_PCLOSE
745 GNULIB_OBSTACK_PRINTF_POSIX
746 GNULIB_OBSTACK_PRINTF
747 GNULIB_GETLINE
748 GNULIB_GETDELIM
749 GNULIB_GETCHAR
750 GNULIB_GETC
751 GNULIB_FWRITE
752 GNULIB_FTELLO
753 GNULIB_FTELL
754 GNULIB_FSEEKO
755 GNULIB_FSEEK
756 GNULIB_FSCANF
757 GNULIB_FREOPEN
758 GNULIB_FREAD
759 GNULIB_FPUTS
760 GNULIB_FPUTC
761 GNULIB_FPURGE
762 GNULIB_FPRINTF_POSIX
763 GNULIB_FPRINTF
764 GNULIB_FOPEN
765 GNULIB_FGETS
766 GNULIB_FGETC
767 GNULIB_FFLUSH
768 GNULIB_FDOPEN
769 GNULIB_FCLOSE
770 GNULIB_DPRINTF
771 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
772 NEXT_STDDEF_H
773 GL_GENERATE_STDDEF_H_FALSE
774 GL_GENERATE_STDDEF_H_TRUE
775 STDDEF_H
776 HAVE_WCHAR_T
777 REPLACE_NULL
778 HAVE__BOOL
779 GL_GENERATE_STDBOOL_H_FALSE
780 GL_GENERATE_STDBOOL_H_TRUE
781 STDBOOL_H
782 GL_GENERATE_STDARG_H_FALSE
783 GL_GENERATE_STDARG_H_TRUE
784 STDARG_H
785 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
786 NEXT_STDARG_H
787 GL_GENERATE_STDALIGN_H_FALSE
788 GL_GENERATE_STDALIGN_H_TRUE
789 STDALIGN_H
790 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
791 NEXT_SIGNAL_H
792 USE_ACL
793 LIB_ACL
794 LIB_PTHREAD_SIGMASK
795 REPLACE_RAISE
796 REPLACE_PTHREAD_SIGMASK
797 HAVE_SIGHANDLER_T
798 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
799 HAVE_STRUCT_SIGACTION_SA_SIGACTION
800 HAVE_SIGACTION
801 HAVE_SIGINFO_T
802 HAVE_SIGSET_T
803 HAVE_RAISE
804 HAVE_PTHREAD_SIGMASK
805 HAVE_POSIX_SIGNALBLOCKING
806 GNULIB_SIGACTION
807 GNULIB_SIGPROCMASK
808 GNULIB_SIGNAL_H_SIGPIPE
809 GNULIB_RAISE
810 GNULIB_PTHREAD_SIGMASK
811 HAVE_SYS_SELECT_H
812 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
813 NEXT_SYS_SELECT_H
814 REPLACE_SELECT
815 REPLACE_PSELECT
816 HAVE_PSELECT
817 GNULIB_SELECT
818 GNULIB_PSELECT
819 REPLACE_TIMEGM
820 REPLACE_NANOSLEEP
821 REPLACE_MKTIME
822 REPLACE_LOCALTIME_R
823 HAVE_TIMEGM
824 HAVE_STRPTIME
825 HAVE_NANOSLEEP
826 HAVE_DECL_LOCALTIME_R
827 GNULIB_TIME_R
828 GNULIB_TIMEGM
829 GNULIB_STRPTIME
830 GNULIB_NANOSLEEP
831 GNULIB_MKTIME
832 UNDEFINE_STRTOK_R
833 REPLACE_STRTOK_R
834 REPLACE_STRSIGNAL
835 REPLACE_STRNLEN
836 REPLACE_STRNDUP
837 REPLACE_STRNCAT
838 REPLACE_STRERROR_R
839 REPLACE_STRERROR
840 REPLACE_STRCHRNUL
841 REPLACE_STRCASESTR
842 REPLACE_STRSTR
843 REPLACE_STRDUP
844 REPLACE_STPNCPY
845 REPLACE_MEMMEM
846 REPLACE_MEMCHR
847 HAVE_STRVERSCMP
848 HAVE_DECL_STRSIGNAL
849 HAVE_DECL_STRERROR_R
850 HAVE_DECL_STRTOK_R
851 HAVE_STRCASESTR
852 HAVE_STRSEP
853 HAVE_STRPBRK
854 HAVE_DECL_STRNLEN
855 HAVE_DECL_STRNDUP
856 HAVE_DECL_STRDUP
857 HAVE_STRCHRNUL
858 HAVE_STPNCPY
859 HAVE_STPCPY
860 HAVE_RAWMEMCHR
861 HAVE_DECL_MEMRCHR
862 HAVE_MEMPCPY
863 HAVE_DECL_MEMMEM
864 HAVE_MEMCHR
865 HAVE_FFSLL
866 HAVE_FFSL
867 HAVE_MBSLEN
868 GNULIB_STRVERSCMP
869 GNULIB_STRSIGNAL
870 GNULIB_STRERROR_R
871 GNULIB_STRERROR
872 GNULIB_MBSTOK_R
873 GNULIB_MBSSEP
874 GNULIB_MBSSPN
875 GNULIB_MBSPBRK
876 GNULIB_MBSCSPN
877 GNULIB_MBSCASESTR
878 GNULIB_MBSPCASECMP
879 GNULIB_MBSNCASECMP
880 GNULIB_MBSCASECMP
881 GNULIB_MBSSTR
882 GNULIB_MBSRCHR
883 GNULIB_MBSCHR
884 GNULIB_MBSNLEN
885 GNULIB_MBSLEN
886 GNULIB_STRTOK_R
887 GNULIB_STRCASESTR
888 GNULIB_STRSTR
889 GNULIB_STRSEP
890 GNULIB_STRPBRK
891 GNULIB_STRNLEN
892 GNULIB_STRNDUP
893 GNULIB_STRNCAT
894 GNULIB_STRDUP
895 GNULIB_STRCHRNUL
896 GNULIB_STPNCPY
897 GNULIB_STPCPY
898 GNULIB_RAWMEMCHR
899 GNULIB_MEMRCHR
900 GNULIB_MEMPCPY
901 GNULIB_MEMMEM
902 GNULIB_MEMCHR
903 GNULIB_FFSLL
904 GNULIB_FFSL
905 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
906 NEXT_INTTYPES_H
907 UINT64_MAX_EQ_ULONG_MAX
908 UINT32_MAX_LT_UINTMAX_MAX
909 PRIPTR_PREFIX
910 PRI_MACROS_BROKEN
911 INT64_MAX_EQ_LONG_MAX
912 INT32_MAX_LT_INTMAX_MAX
913 REPLACE_STRTOUMAX
914 REPLACE_STRTOIMAX
915 HAVE_DECL_STRTOUMAX
916 HAVE_DECL_STRTOIMAX
917 HAVE_DECL_IMAXDIV
918 HAVE_DECL_IMAXABS
919 GNULIB_STRTOUMAX
920 GNULIB_STRTOIMAX
921 GNULIB_IMAXDIV
922 GNULIB_IMAXABS
923 GL_GENERATE_STDINT_H_FALSE
924 GL_GENERATE_STDINT_H_TRUE
925 STDINT_H
926 WINT_T_SUFFIX
927 WCHAR_T_SUFFIX
928 SIG_ATOMIC_T_SUFFIX
929 SIZE_T_SUFFIX
930 PTRDIFF_T_SUFFIX
931 HAVE_SIGNED_WINT_T
932 HAVE_SIGNED_WCHAR_T
933 HAVE_SIGNED_SIG_ATOMIC_T
934 BITSIZEOF_WINT_T
935 BITSIZEOF_WCHAR_T
936 BITSIZEOF_SIG_ATOMIC_T
937 BITSIZEOF_SIZE_T
938 BITSIZEOF_PTRDIFF_T
939 APPLE_UNIVERSAL_BUILD
940 HAVE_SYS_BITYPES_H
941 HAVE_SYS_INTTYPES_H
942 HAVE_STDINT_H
943 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
944 NEXT_STDINT_H
945 HAVE_SYS_TYPES_H
946 HAVE_INTTYPES_H
947 HAVE_WCHAR_H
948 HAVE_UNSIGNED_LONG_LONG_INT
949 HAVE_LONG_LONG_INT
950 HAVE_WINSOCK2_H
951 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
952 NEXT_SYS_TIME_H
953 REPLACE_STRUCT_TIMEVAL
954 REPLACE_GETTIMEOFDAY
955 HAVE_SYS_TIME_H
956 HAVE_STRUCT_TIMEVAL
957 HAVE_GETTIMEOFDAY
958 GNULIB_GETTIMEOFDAY
959 GNULIB_GL_UNISTD_H_GETOPT
960 GETOPT_H
961 HAVE_GETOPT_H
962 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
963 NEXT_GETOPT_H
964 GETLOADAVG_LIBS
965 REPLACE_WCTOMB
966 REPLACE_UNSETENV
967 REPLACE_STRTOD
968 REPLACE_SETENV
969 REPLACE_REALPATH
970 REPLACE_REALLOC
971 REPLACE_RANDOM_R
972 REPLACE_PUTENV
973 REPLACE_PTSNAME_R
974 REPLACE_PTSNAME
975 REPLACE_MKSTEMP
976 REPLACE_MBTOWC
977 REPLACE_MALLOC
978 REPLACE_CANONICALIZE_FILE_NAME
979 REPLACE_CALLOC
980 HAVE_DECL_UNSETENV
981 HAVE_UNLOCKPT
982 HAVE_SYS_LOADAVG_H
983 HAVE_STRUCT_RANDOM_DATA
984 HAVE_STRTOULL
985 HAVE_STRTOLL
986 HAVE_STRTOD
987 HAVE_DECL_SETENV
988 HAVE_SETENV
989 HAVE_SECURE_GETENV
990 HAVE_RPMATCH
991 HAVE_REALPATH
992 HAVE_RANDOM_R
993 HAVE_RANDOM_H
994 HAVE_RANDOM
995 HAVE_PTSNAME_R
996 HAVE_PTSNAME
997 HAVE_POSIX_OPENPT
998 HAVE_MKSTEMPS
999 HAVE_MKSTEMP
1000 HAVE_MKOSTEMPS
1001 HAVE_MKOSTEMP
1002 HAVE_MKDTEMP
1003 HAVE_GRANTPT
1004 HAVE_GETSUBOPT
1005 HAVE_DECL_GETLOADAVG
1006 HAVE_CANONICALIZE_FILE_NAME
1007 HAVE_ATOLL
1008 HAVE__EXIT
1009 GNULIB_WCTOMB
1010 GNULIB_UNSETENV
1011 GNULIB_UNLOCKPT
1012 GNULIB_SYSTEM_POSIX
1013 GNULIB_STRTOULL
1014 GNULIB_STRTOLL
1015 GNULIB_STRTOD
1016 GNULIB_SETENV
1017 GNULIB_SECURE_GETENV
1018 GNULIB_RPMATCH
1019 GNULIB_REALPATH
1020 GNULIB_REALLOC_POSIX
1021 GNULIB_RANDOM_R
1022 GNULIB_RANDOM
1023 GNULIB_PUTENV
1024 GNULIB_PTSNAME_R
1025 GNULIB_PTSNAME
1026 GNULIB_POSIX_OPENPT
1027 GNULIB_MKSTEMPS
1028 GNULIB_MKSTEMP
1029 GNULIB_MKOSTEMPS
1030 GNULIB_MKOSTEMP
1031 GNULIB_MKDTEMP
1032 GNULIB_MBTOWC
1033 GNULIB_MALLOC_POSIX
1034 GNULIB_GRANTPT
1035 GNULIB_GETSUBOPT
1036 GNULIB_GETLOADAVG
1037 GNULIB_CANONICALIZE_FILE_NAME
1038 GNULIB_CALLOC_POSIX
1039 GNULIB_ATOLL
1040 GNULIB__EXIT
1041 REPLACE_UTIMENSAT
1042 REPLACE_STAT
1043 REPLACE_MKNOD
1044 REPLACE_MKFIFO
1045 REPLACE_MKDIR
1046 REPLACE_LSTAT
1047 REPLACE_FUTIMENS
1048 REPLACE_FSTATAT
1049 REPLACE_FSTAT
1050 HAVE_UTIMENSAT
1051 HAVE_MKNODAT
1052 HAVE_MKNOD
1053 HAVE_MKFIFOAT
1054 HAVE_MKFIFO
1055 HAVE_MKDIRAT
1056 HAVE_LSTAT
1057 HAVE_LCHMOD
1058 HAVE_FUTIMENS
1059 HAVE_FSTATAT
1060 HAVE_FCHMODAT
1061 GNULIB_UTIMENSAT
1062 GNULIB_STAT
1063 GNULIB_MKNODAT
1064 GNULIB_MKNOD
1065 GNULIB_MKFIFOAT
1066 GNULIB_MKFIFO
1067 GNULIB_MKDIRAT
1068 GNULIB_LSTAT
1069 GNULIB_LCHMOD
1070 GNULIB_FUTIMENS
1071 GNULIB_FSTATAT
1072 GNULIB_FSTAT
1073 GNULIB_FCHMODAT
1074 LIB_FDATASYNC
1075 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1076 NEXT_FCNTL_H
1077 REPLACE_OPENAT
1078 REPLACE_OPEN
1079 REPLACE_FCNTL
1080 HAVE_OPENAT
1081 HAVE_FCNTL
1082 GNULIB_OPENAT
1083 GNULIB_OPEN
1084 GNULIB_NONBLOCKING
1085 GNULIB_FCNTL
1086 GL_GENERATE_EXECINFO_H_FALSE
1087 GL_GENERATE_EXECINFO_H_TRUE
1088 LIB_EXECINFO
1089 EXECINFO_H
1090 EOVERFLOW_VALUE
1091 EOVERFLOW_HIDDEN
1092 ENOLINK_VALUE
1093 ENOLINK_HIDDEN
1094 EMULTIHOP_VALUE
1095 EMULTIHOP_HIDDEN
1096 GL_GENERATE_ERRNO_H_FALSE
1097 GL_GENERATE_ERRNO_H_TRUE
1098 ERRNO_H
1099 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1100 NEXT_ERRNO_H
1101 HAVE_DIRENT_H
1102 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1103 NEXT_DIRENT_H
1104 PRAGMA_COLUMNS
1105 PRAGMA_SYSTEM_HEADER
1106 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1107 INCLUDE_NEXT
1108 REPLACE_FDOPENDIR
1109 REPLACE_DIRFD
1110 REPLACE_CLOSEDIR
1111 REPLACE_OPENDIR
1112 HAVE_ALPHASORT
1113 HAVE_SCANDIR
1114 HAVE_FDOPENDIR
1115 HAVE_DECL_FDOPENDIR
1116 HAVE_DECL_DIRFD
1117 HAVE_CLOSEDIR
1118 HAVE_REWINDDIR
1119 HAVE_READDIR
1120 HAVE_OPENDIR
1121 GNULIB_ALPHASORT
1122 GNULIB_SCANDIR
1123 GNULIB_FDOPENDIR
1124 GNULIB_DIRFD
1125 GNULIB_CLOSEDIR
1126 GNULIB_REWINDDIR
1127 GNULIB_READDIR
1128 GNULIB_OPENDIR
1129 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1130 UNISTD_H_HAVE_WINSOCK2_H
1131 REPLACE_WRITE
1132 REPLACE_USLEEP
1133 REPLACE_UNLINKAT
1134 REPLACE_UNLINK
1135 REPLACE_TTYNAME_R
1136 REPLACE_SYMLINK
1137 REPLACE_SLEEP
1138 REPLACE_RMDIR
1139 REPLACE_READLINK
1140 REPLACE_READ
1141 REPLACE_PWRITE
1142 REPLACE_PREAD
1143 REPLACE_LSEEK
1144 REPLACE_LINKAT
1145 REPLACE_LINK
1146 REPLACE_LCHOWN
1147 REPLACE_ISATTY
1148 REPLACE_GETPAGESIZE
1149 REPLACE_GETGROUPS
1150 REPLACE_GETLOGIN_R
1151 REPLACE_GETDTABLESIZE
1152 REPLACE_GETDOMAINNAME
1153 REPLACE_GETCWD
1154 REPLACE_FTRUNCATE
1155 REPLACE_FCHOWNAT
1156 REPLACE_DUP2
1157 REPLACE_DUP
1158 REPLACE_CLOSE
1159 REPLACE_CHOWN
1160 HAVE_SYS_PARAM_H
1161 HAVE_OS_H
1162 HAVE_DECL_TTYNAME_R
1163 HAVE_DECL_SETHOSTNAME
1164 HAVE_DECL_GETUSERSHELL
1165 HAVE_DECL_GETPAGESIZE
1166 HAVE_DECL_GETLOGIN_R
1167 HAVE_DECL_GETDOMAINNAME
1168 HAVE_DECL_FDATASYNC
1169 HAVE_DECL_FCHDIR
1170 HAVE_DECL_ENVIRON
1171 HAVE_USLEEP
1172 HAVE_UNLINKAT
1173 HAVE_SYMLINKAT
1174 HAVE_SYMLINK
1175 HAVE_SLEEP
1176 HAVE_SETHOSTNAME
1177 HAVE_READLINKAT
1178 HAVE_READLINK
1179 HAVE_PWRITE
1180 HAVE_PREAD
1181 HAVE_PIPE2
1182 HAVE_PIPE
1183 HAVE_LINKAT
1184 HAVE_LINK
1185 HAVE_LCHOWN
1186 HAVE_GROUP_MEMBER
1187 HAVE_GETPAGESIZE
1188 HAVE_GETLOGIN
1189 HAVE_GETHOSTNAME
1190 HAVE_GETGROUPS
1191 HAVE_GETDTABLESIZE
1192 HAVE_FTRUNCATE
1193 HAVE_FSYNC
1194 HAVE_FDATASYNC
1195 HAVE_FCHOWNAT
1196 HAVE_FCHDIR
1197 HAVE_FACCESSAT
1198 HAVE_EUIDACCESS
1199 HAVE_DUP3
1200 HAVE_DUP2
1201 HAVE_CHOWN
1202 GNULIB_WRITE
1203 GNULIB_USLEEP
1204 GNULIB_UNLINKAT
1205 GNULIB_UNLINK
1206 GNULIB_UNISTD_H_SIGPIPE
1207 GNULIB_UNISTD_H_NONBLOCKING
1208 GNULIB_TTYNAME_R
1209 GNULIB_SYMLINKAT
1210 GNULIB_SYMLINK
1211 GNULIB_SLEEP
1212 GNULIB_SETHOSTNAME
1213 GNULIB_RMDIR
1214 GNULIB_READLINKAT
1215 GNULIB_READLINK
1216 GNULIB_READ
1217 GNULIB_PWRITE
1218 GNULIB_PREAD
1219 GNULIB_PIPE2
1220 GNULIB_PIPE
1221 GNULIB_LSEEK
1222 GNULIB_LINKAT
1223 GNULIB_LINK
1224 GNULIB_LCHOWN
1225 GNULIB_ISATTY
1226 GNULIB_GROUP_MEMBER
1227 GNULIB_GETUSERSHELL
1228 GNULIB_GETPAGESIZE
1229 GNULIB_GETLOGIN_R
1230 GNULIB_GETLOGIN
1231 GNULIB_GETHOSTNAME
1232 GNULIB_GETGROUPS
1233 GNULIB_GETDTABLESIZE
1234 GNULIB_GETDOMAINNAME
1235 GNULIB_GETCWD
1236 GNULIB_FTRUNCATE
1237 GNULIB_FSYNC
1238 GNULIB_FDATASYNC
1239 GNULIB_FCHOWNAT
1240 GNULIB_FCHDIR
1241 GNULIB_FACCESSAT
1242 GNULIB_EUIDACCESS
1243 GNULIB_ENVIRON
1244 GNULIB_DUP3
1245 GNULIB_DUP2
1246 GNULIB_DUP
1247 GNULIB_CLOSE
1248 GNULIB_CHOWN
1249 GNULIB_CHDIR
1250 LIB_CLOCK_GETTIME
1251 GL_GENERATE_BYTESWAP_H_FALSE
1252 GL_GENERATE_BYTESWAP_H_TRUE
1253 BYTESWAP_H
1254 GL_GENERATE_ALLOCA_H_FALSE
1255 GL_GENERATE_ALLOCA_H_TRUE
1256 ALLOCA_H
1257 ALLOCA
1258 GL_COND_LIBTOOL_FALSE
1259 GL_COND_LIBTOOL_TRUE
1260 POST_ALLOC_OBJ
1261 PRE_ALLOC_OBJ
1262 CYGWIN_OBJ
1263 RALLOC_OBJ
1264 OLDXMENU_DEPS
1265 LIBX_OTHER
1266 LIBXMENU
1267 OLDXMENU
1268 OLDXMENU_TARGET
1269 LIBXT_OTHER
1270 TOOLKIT_LIBW
1271 WIDGET_OBJ
1272 XOBJ
1273 XMENU_OBJ
1274 FONT_OBJ
1275 OTHER_FILES
1276 GNU_OBJC_CFLAGS
1277 ns_appsrc
1278 ns_appresdir
1279 ns_appbindir
1280 ns_appdir
1281 X_TOOLKIT_TYPE
1282 GNUSTEP_CFLAGS
1283 C_SWITCH_X_SITE
1284 LD_SWITCH_X_SITE
1285 gameuser
1286 gamedir
1287 bitmapdir
1288 etcdocdir
1289 archlibdir
1290 etcdir
1291 x_default_search_path
1292 lisppath
1293 locallisppath
1294 standardlisppath
1295 leimdir
1296 lispdir
1297 srcdir
1298 canonical
1299 configuration
1300 version
1301 copyright
1302 XGSELOBJ
1303 KRB4LIB
1304 DESLIB
1305 KRB5LIB
1306 CRYPTOLIB
1307 COM_ERRLIB
1308 LIBRESOLV
1309 LIBHESIOD
1310 TERMCAP_OBJ
1311 LIBS_TERMCAP
1312 BLESSMAIL_TARGET
1313 LIBS_MAIL
1314 liblockfile
1315 LIBXML2_LIBS
1316 LIBXML2_CFLAGS
1317 XINERAMA_LIBS
1318 XINERAMA_CFLAGS
1319 XRANDR_LIBS
1320 XRANDR_CFLAGS
1321 LIBXSM
1322 LIBGPM
1323 LIBGIF
1324 LIBTIFF
1325 LIBZ
1326 LIBPNG
1327 LIBJPEG
1328 LIBXPM
1329 M17N_FLT_LIBS
1330 M17N_FLT_CFLAGS
1331 LIBOTF_LIBS
1332 LIBOTF_CFLAGS
1333 FREETYPE_LIBS
1334 FREETYPE_CFLAGS
1335 XFT_LIBS
1336 XFT_CFLAGS
1337 FONTCONFIG_LIBS
1338 FONTCONFIG_CFLAGS
1339 LIBXMU
1340 LIBXTR6
1341 NOTIFY_OBJ
1342 GFILENOTIFY_LIBS
1343 GFILENOTIFY_CFLAGS
1344 LIBGNUTLS_LIBS
1345 LIBGNUTLS_CFLAGS
1346 LIBSELINUX_LIBS
1347 SETTINGS_LIBS
1348 SETTINGS_CFLAGS
1349 GOBJECT_LIBS
1350 GOBJECT_CFLAGS
1351 GCONF_LIBS
1352 GCONF_CFLAGS
1353 GSETTINGS_LIBS
1354 GSETTINGS_CFLAGS
1355 DBUS_OBJ
1356 DBUS_LIBS
1357 DBUS_CFLAGS
1358 GTK_OBJ
1359 GTK_LIBS
1360 GTK_CFLAGS
1361 IMAGEMAGICK_LIBS
1362 IMAGEMAGICK_CFLAGS
1363 RSVG_LIBS
1364 RSVG_CFLAGS
1365 LIB_PTHREAD
1366 VMLIMIT_OBJ
1367 GMALLOC_OBJ
1368 HAVE_XSERVER
1369 XARGS_LIMIT
1370 NTLIB
1371 LIB_WSOCK32
1372 LIBS_ECLIENT
1373 CM_OBJ
1374 NTDIR
1375 FIRSTFILE_OBJ
1376 W32_RES_LINK
1377 CLIENTW
1378 CLIENTRES
1379 UPDATE_MANIFEST
1380 EMACS_MANIFEST
1381 EMACSRES
1382 W32_LIBS
1383 W32_OBJ
1384 WINDRES
1385 NS_OBJC_OBJ
1386 NS_OBJ
1387 ns_self_contained
1388 INSTALL_ARCH_INDEP_EXTRA
1389 LIBS_GNUSTEP
1390 LD_SWITCH_X_SITE_RPATH
1391 XMKMF
1392 DEPFLAGS
1393 MKDEPDIR
1394 CFLAGS_SOUND
1395 ALSA_LIBS
1396 ALSA_CFLAGS
1397 LIBSOUND
1398 PKG_CONFIG
1399 LIB_MATH
1400 LIBS_SYSTEM
1401 C_SWITCH_SYSTEM
1402 UNEXEC_OBJ
1403 C_SWITCH_MACHINE
1404 LD_SWITCH_SYSTEM
1405 CANNOT_DUMP
1406 DOCMISC_W32
1407 INFO_OPTS
1408 INFO_EXT
1409 HAVE_MAKEINFO
1410 PAXCTL
1411 GZIP_PROG
1412 INSTALL_INFO
1413 LN_S_FILEONLY
1414 GNULIB_WARN_CFLAGS
1415 WERROR_CFLAGS
1416 WARN_CFLAGS
1417 RANLIB
1418 ARFLAGS
1420 EGREP
1421 GREP
1423 BUILDING_FOR_WINDOWSNT_FALSE
1424 BUILDING_FOR_WINDOWSNT_TRUE
1425 am__fastdepCC_FALSE
1426 am__fastdepCC_TRUE
1427 CCDEPMODE
1428 AMDEPBACKSLASH
1429 AMDEP_FALSE
1430 AMDEP_TRUE
1431 am__quote
1432 am__include
1433 DEPDIR
1434 OBJEXT
1435 EXEEXT
1436 ac_ct_CC
1437 CPPFLAGS
1438 LDFLAGS
1439 CFLAGS
1441 host_os
1442 host_vendor
1443 host_cpu
1444 host
1445 build_os
1446 build_vendor
1447 build_cpu
1448 build
1449 PROFILING_CFLAGS
1450 cache_file
1451 am__untar
1452 am__tar
1453 AMTAR
1454 am__leading_dot
1455 SET_MAKE
1457 mkdir_p
1458 MKDIR_P
1459 INSTALL_STRIP_PROGRAM
1460 STRIP
1461 install_sh
1462 MAKEINFO
1463 AUTOHEADER
1464 AUTOMAKE
1465 AUTOCONF
1466 ACLOCAL
1467 VERSION
1468 PACKAGE
1469 CYGPATH_W
1470 am__isrc
1471 INSTALL_DATA
1472 INSTALL_SCRIPT
1473 INSTALL_PROGRAM
1474 target_alias
1475 host_alias
1476 build_alias
1477 LIBS
1478 ECHO_T
1479 ECHO_N
1480 ECHO_C
1481 DEFS
1482 mandir
1483 localedir
1484 libdir
1485 psdir
1486 pdfdir
1487 dvidir
1488 htmldir
1489 infodir
1490 docdir
1491 oldincludedir
1492 includedir
1493 localstatedir
1494 sharedstatedir
1495 sysconfdir
1496 datadir
1497 datarootdir
1498 libexecdir
1499 sbindir
1500 bindir
1501 program_transform_name
1502 prefix
1503 exec_prefix
1504 PACKAGE_URL
1505 PACKAGE_BUGREPORT
1506 PACKAGE_STRING
1507 PACKAGE_VERSION
1508 PACKAGE_TARNAME
1509 PACKAGE_NAME
1510 PATH_SEPARATOR
1511 SHELL'
1512 ac_subst_files='deps_frag
1513 lisp_frag'
1514 ac_user_opts='
1515 enable_option_checking
1516 with_all
1517 with_pop
1518 with_kerberos
1519 with_kerberos5
1520 with_hesiod
1521 with_mmdf
1522 with_mail_unlink
1523 with_mailhost
1524 with_sound
1525 with_x_toolkit
1526 with_wide_int
1527 with_xpm
1528 with_jpeg
1529 with_tiff
1530 with_gif
1531 with_png
1532 with_rsvg
1533 with_xml2
1534 with_imagemagick
1535 with_xft
1536 with_libotf
1537 with_m17n_flt
1538 with_toolkit_scroll_bars
1539 with_xaw3d
1540 with_xim
1541 with_ns
1542 with_w32
1543 with_gpm
1544 with_dbus
1545 with_gconf
1546 with_gsettings
1547 with_selinux
1548 with_gnutls
1549 with_zlib
1550 with_file_notification
1551 with_makeinfo
1552 with_compress_install
1553 with_pkg_config_prog
1554 with_gameuser
1555 with_gnustep_conf
1556 enable_ns_self_contained
1557 enable_locallisppath
1558 enable_checking
1559 enable_check_lisp_object_type
1560 enable_profiling
1561 enable_autodepend
1562 enable_gtk_deprecation_warnings
1563 enable_dependency_tracking
1564 enable_largefile
1565 enable_gcc_warnings
1566 enable_link_time_optimization
1567 with_x
1568 enable_acl
1570 ac_precious_vars='build_alias
1571 host_alias
1572 target_alias
1574 CFLAGS
1575 LDFLAGS
1576 LIBS
1577 CPPFLAGS
1579 XMKMF'
1582 # Initialize some variables set by options.
1583 ac_init_help=
1584 ac_init_version=false
1585 ac_unrecognized_opts=
1586 ac_unrecognized_sep=
1587 # The variables have the same names as the options, with
1588 # dashes changed to underlines.
1589 cache_file=/dev/null
1590 exec_prefix=NONE
1591 no_create=
1592 no_recursion=
1593 prefix=NONE
1594 program_prefix=NONE
1595 program_suffix=NONE
1596 program_transform_name=s,x,x,
1597 silent=
1598 site=
1599 srcdir=
1600 verbose=
1601 x_includes=NONE
1602 x_libraries=NONE
1604 # Installation directory options.
1605 # These are left unexpanded so users can "make install exec_prefix=/foo"
1606 # and all the variables that are supposed to be based on exec_prefix
1607 # by default will actually change.
1608 # Use braces instead of parens because sh, perl, etc. also accept them.
1609 # (The list follows the same order as the GNU Coding Standards.)
1610 bindir='${exec_prefix}/bin'
1611 sbindir='${exec_prefix}/sbin'
1612 libexecdir='${exec_prefix}/libexec'
1613 datarootdir='${prefix}/share'
1614 datadir='${datarootdir}'
1615 sysconfdir='${prefix}/etc'
1616 sharedstatedir='${prefix}/com'
1617 localstatedir='${prefix}/var'
1618 includedir='${prefix}/include'
1619 oldincludedir='/usr/include'
1620 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1621 infodir='${datarootdir}/info'
1622 htmldir='${docdir}'
1623 dvidir='${docdir}'
1624 pdfdir='${docdir}'
1625 psdir='${docdir}'
1626 libdir='${exec_prefix}/lib'
1627 localedir='${datarootdir}/locale'
1628 mandir='${datarootdir}/man'
1630 ac_prev=
1631 ac_dashdash=
1632 for ac_option
1634 # If the previous option needs an argument, assign it.
1635 if test -n "$ac_prev"; then
1636 eval $ac_prev=\$ac_option
1637 ac_prev=
1638 continue
1641 case $ac_option in
1642 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1643 *) ac_optarg=yes ;;
1644 esac
1646 # Accept the important Cygnus configure options, so we can diagnose typos.
1648 case $ac_dashdash$ac_option in
1650 ac_dashdash=yes ;;
1652 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1653 ac_prev=bindir ;;
1654 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1655 bindir=$ac_optarg ;;
1657 -build | --build | --buil | --bui | --bu)
1658 ac_prev=build_alias ;;
1659 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1660 build_alias=$ac_optarg ;;
1662 -cache-file | --cache-file | --cache-fil | --cache-fi \
1663 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1664 ac_prev=cache_file ;;
1665 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1666 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1667 cache_file=$ac_optarg ;;
1669 --config-cache | -C)
1670 cache_file=config.cache ;;
1672 -datadir | --datadir | --datadi | --datad)
1673 ac_prev=datadir ;;
1674 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1675 datadir=$ac_optarg ;;
1677 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1678 | --dataroo | --dataro | --datar)
1679 ac_prev=datarootdir ;;
1680 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1681 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1682 datarootdir=$ac_optarg ;;
1684 -disable-* | --disable-*)
1685 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1686 # Reject names that are not valid shell variable names.
1687 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1688 as_fn_error "invalid feature name: $ac_useropt"
1689 ac_useropt_orig=$ac_useropt
1690 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1691 case $ac_user_opts in
1693 "enable_$ac_useropt"
1694 "*) ;;
1695 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1696 ac_unrecognized_sep=', ';;
1697 esac
1698 eval enable_$ac_useropt=no ;;
1700 -docdir | --docdir | --docdi | --doc | --do)
1701 ac_prev=docdir ;;
1702 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1703 docdir=$ac_optarg ;;
1705 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1706 ac_prev=dvidir ;;
1707 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1708 dvidir=$ac_optarg ;;
1710 -enable-* | --enable-*)
1711 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1712 # Reject names that are not valid shell variable names.
1713 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1714 as_fn_error "invalid feature name: $ac_useropt"
1715 ac_useropt_orig=$ac_useropt
1716 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1717 case $ac_user_opts in
1719 "enable_$ac_useropt"
1720 "*) ;;
1721 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1722 ac_unrecognized_sep=', ';;
1723 esac
1724 eval enable_$ac_useropt=\$ac_optarg ;;
1726 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1727 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1728 | --exec | --exe | --ex)
1729 ac_prev=exec_prefix ;;
1730 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1731 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1732 | --exec=* | --exe=* | --ex=*)
1733 exec_prefix=$ac_optarg ;;
1735 -gas | --gas | --ga | --g)
1736 # Obsolete; use --with-gas.
1737 with_gas=yes ;;
1739 -help | --help | --hel | --he | -h)
1740 ac_init_help=long ;;
1741 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1742 ac_init_help=recursive ;;
1743 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1744 ac_init_help=short ;;
1746 -host | --host | --hos | --ho)
1747 ac_prev=host_alias ;;
1748 -host=* | --host=* | --hos=* | --ho=*)
1749 host_alias=$ac_optarg ;;
1751 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1752 ac_prev=htmldir ;;
1753 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1754 | --ht=*)
1755 htmldir=$ac_optarg ;;
1757 -includedir | --includedir | --includedi | --included | --include \
1758 | --includ | --inclu | --incl | --inc)
1759 ac_prev=includedir ;;
1760 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1761 | --includ=* | --inclu=* | --incl=* | --inc=*)
1762 includedir=$ac_optarg ;;
1764 -infodir | --infodir | --infodi | --infod | --info | --inf)
1765 ac_prev=infodir ;;
1766 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1767 infodir=$ac_optarg ;;
1769 -libdir | --libdir | --libdi | --libd)
1770 ac_prev=libdir ;;
1771 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1772 libdir=$ac_optarg ;;
1774 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1775 | --libexe | --libex | --libe)
1776 ac_prev=libexecdir ;;
1777 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1778 | --libexe=* | --libex=* | --libe=*)
1779 libexecdir=$ac_optarg ;;
1781 -localedir | --localedir | --localedi | --localed | --locale)
1782 ac_prev=localedir ;;
1783 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1784 localedir=$ac_optarg ;;
1786 -localstatedir | --localstatedir | --localstatedi | --localstated \
1787 | --localstate | --localstat | --localsta | --localst | --locals)
1788 ac_prev=localstatedir ;;
1789 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1790 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1791 localstatedir=$ac_optarg ;;
1793 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1794 ac_prev=mandir ;;
1795 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1796 mandir=$ac_optarg ;;
1798 -nfp | --nfp | --nf)
1799 # Obsolete; use --without-fp.
1800 with_fp=no ;;
1802 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1803 | --no-cr | --no-c | -n)
1804 no_create=yes ;;
1806 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1807 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1808 no_recursion=yes ;;
1810 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1811 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1812 | --oldin | --oldi | --old | --ol | --o)
1813 ac_prev=oldincludedir ;;
1814 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1815 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1816 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1817 oldincludedir=$ac_optarg ;;
1819 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1820 ac_prev=prefix ;;
1821 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1822 prefix=$ac_optarg ;;
1824 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1825 | --program-pre | --program-pr | --program-p)
1826 ac_prev=program_prefix ;;
1827 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1828 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1829 program_prefix=$ac_optarg ;;
1831 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1832 | --program-suf | --program-su | --program-s)
1833 ac_prev=program_suffix ;;
1834 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1835 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1836 program_suffix=$ac_optarg ;;
1838 -program-transform-name | --program-transform-name \
1839 | --program-transform-nam | --program-transform-na \
1840 | --program-transform-n | --program-transform- \
1841 | --program-transform | --program-transfor \
1842 | --program-transfo | --program-transf \
1843 | --program-trans | --program-tran \
1844 | --progr-tra | --program-tr | --program-t)
1845 ac_prev=program_transform_name ;;
1846 -program-transform-name=* | --program-transform-name=* \
1847 | --program-transform-nam=* | --program-transform-na=* \
1848 | --program-transform-n=* | --program-transform-=* \
1849 | --program-transform=* | --program-transfor=* \
1850 | --program-transfo=* | --program-transf=* \
1851 | --program-trans=* | --program-tran=* \
1852 | --progr-tra=* | --program-tr=* | --program-t=*)
1853 program_transform_name=$ac_optarg ;;
1855 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1856 ac_prev=pdfdir ;;
1857 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1858 pdfdir=$ac_optarg ;;
1860 -psdir | --psdir | --psdi | --psd | --ps)
1861 ac_prev=psdir ;;
1862 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1863 psdir=$ac_optarg ;;
1865 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1866 | -silent | --silent | --silen | --sile | --sil)
1867 silent=yes ;;
1869 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1870 ac_prev=sbindir ;;
1871 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1872 | --sbi=* | --sb=*)
1873 sbindir=$ac_optarg ;;
1875 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1876 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1877 | --sharedst | --shareds | --shared | --share | --shar \
1878 | --sha | --sh)
1879 ac_prev=sharedstatedir ;;
1880 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1881 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1882 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1883 | --sha=* | --sh=*)
1884 sharedstatedir=$ac_optarg ;;
1886 -site | --site | --sit)
1887 ac_prev=site ;;
1888 -site=* | --site=* | --sit=*)
1889 site=$ac_optarg ;;
1891 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1892 ac_prev=srcdir ;;
1893 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1894 srcdir=$ac_optarg ;;
1896 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1897 | --syscon | --sysco | --sysc | --sys | --sy)
1898 ac_prev=sysconfdir ;;
1899 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1900 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1901 sysconfdir=$ac_optarg ;;
1903 -target | --target | --targe | --targ | --tar | --ta | --t)
1904 ac_prev=target_alias ;;
1905 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1906 target_alias=$ac_optarg ;;
1908 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1909 verbose=yes ;;
1911 -version | --version | --versio | --versi | --vers | -V)
1912 ac_init_version=: ;;
1914 -with-* | --with-*)
1915 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1916 # Reject names that are not valid shell variable names.
1917 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1918 as_fn_error "invalid package name: $ac_useropt"
1919 ac_useropt_orig=$ac_useropt
1920 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1921 case $ac_user_opts in
1923 "with_$ac_useropt"
1924 "*) ;;
1925 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1926 ac_unrecognized_sep=', ';;
1927 esac
1928 eval with_$ac_useropt=\$ac_optarg ;;
1930 -without-* | --without-*)
1931 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1932 # Reject names that are not valid shell variable names.
1933 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1934 as_fn_error "invalid package name: $ac_useropt"
1935 ac_useropt_orig=$ac_useropt
1936 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1937 case $ac_user_opts in
1939 "with_$ac_useropt"
1940 "*) ;;
1941 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1942 ac_unrecognized_sep=', ';;
1943 esac
1944 eval with_$ac_useropt=no ;;
1946 --x)
1947 # Obsolete; use --with-x.
1948 with_x=yes ;;
1950 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1951 | --x-incl | --x-inc | --x-in | --x-i)
1952 ac_prev=x_includes ;;
1953 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1954 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1955 x_includes=$ac_optarg ;;
1957 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1958 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1959 ac_prev=x_libraries ;;
1960 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1961 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1962 x_libraries=$ac_optarg ;;
1964 -*) as_fn_error "unrecognized option: \`$ac_option'
1965 Try \`$0 --help' for more information."
1968 *=*)
1969 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1970 # Reject names that are not valid shell variable names.
1971 case $ac_envvar in #(
1972 '' | [0-9]* | *[!_$as_cr_alnum]* )
1973 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1974 esac
1975 eval $ac_envvar=\$ac_optarg
1976 export $ac_envvar ;;
1979 # FIXME: should be removed in autoconf 3.0.
1980 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1981 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1982 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1983 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1986 esac
1987 done
1989 if test -n "$ac_prev"; then
1990 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1991 as_fn_error "missing argument to $ac_option"
1994 if test -n "$ac_unrecognized_opts"; then
1995 case $enable_option_checking in
1996 no) ;;
1997 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1998 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1999 esac
2002 # Check all directory arguments for consistency.
2003 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2004 datadir sysconfdir sharedstatedir localstatedir includedir \
2005 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2006 libdir localedir mandir
2008 eval ac_val=\$$ac_var
2009 # Remove trailing slashes.
2010 case $ac_val in
2011 */ )
2012 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2013 eval $ac_var=\$ac_val;;
2014 esac
2015 # Be sure to have absolute directory names.
2016 case $ac_val in
2017 [\\/$]* | ?:[\\/]* ) continue;;
2018 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2019 esac
2020 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2021 done
2023 # There might be people who depend on the old broken behavior: `$host'
2024 # used to hold the argument of --host etc.
2025 # FIXME: To remove some day.
2026 build=$build_alias
2027 host=$host_alias
2028 target=$target_alias
2030 # FIXME: To remove some day.
2031 if test "x$host_alias" != x; then
2032 if test "x$build_alias" = x; then
2033 cross_compiling=maybe
2034 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2035 If a cross compiler is detected then cross compile mode will be used." >&2
2036 elif test "x$build_alias" != "x$host_alias"; then
2037 cross_compiling=yes
2041 ac_tool_prefix=
2042 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2044 test "$silent" = yes && exec 6>/dev/null
2047 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2048 ac_ls_di=`ls -di .` &&
2049 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2050 as_fn_error "working directory cannot be determined"
2051 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2052 as_fn_error "pwd does not report name of working directory"
2055 # Find the source files, if location was not specified.
2056 if test -z "$srcdir"; then
2057 ac_srcdir_defaulted=yes
2058 # Try the directory containing this script, then the parent directory.
2059 ac_confdir=`$as_dirname -- "$as_myself" ||
2060 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2061 X"$as_myself" : 'X\(//\)[^/]' \| \
2062 X"$as_myself" : 'X\(//\)$' \| \
2063 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2064 $as_echo X"$as_myself" |
2065 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2066 s//\1/
2069 /^X\(\/\/\)[^/].*/{
2070 s//\1/
2073 /^X\(\/\/\)$/{
2074 s//\1/
2077 /^X\(\/\).*/{
2078 s//\1/
2081 s/.*/./; q'`
2082 srcdir=$ac_confdir
2083 if test ! -r "$srcdir/$ac_unique_file"; then
2084 srcdir=..
2086 else
2087 ac_srcdir_defaulted=no
2089 if test ! -r "$srcdir/$ac_unique_file"; then
2090 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2091 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2093 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2094 ac_abs_confdir=`(
2095 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2096 pwd)`
2097 # When building in place, set srcdir=.
2098 if test "$ac_abs_confdir" = "$ac_pwd"; then
2099 srcdir=.
2101 # Remove unnecessary trailing slashes from srcdir.
2102 # Double slashes in file names in object file debugging info
2103 # mess up M-x gdb in Emacs.
2104 case $srcdir in
2105 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2106 esac
2107 for ac_var in $ac_precious_vars; do
2108 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2109 eval ac_env_${ac_var}_value=\$${ac_var}
2110 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2111 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2112 done
2115 # Report the --help message.
2117 if test "$ac_init_help" = "long"; then
2118 # Omit some internal or obsolete options to make the list less imposing.
2119 # This message is too long to be a string in the A/UX 3.1 sh.
2120 cat <<_ACEOF
2121 \`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
2123 Usage: $0 [OPTION]... [VAR=VALUE]...
2125 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2126 VAR=VALUE. See below for descriptions of some of the useful variables.
2128 Defaults for the options are specified in brackets.
2130 Configuration:
2131 -h, --help display this help and exit
2132 --help=short display options specific to this package
2133 --help=recursive display the short help of all the included packages
2134 -V, --version display version information and exit
2135 -q, --quiet, --silent do not print \`checking...' messages
2136 --cache-file=FILE cache test results in FILE [disabled]
2137 -C, --config-cache alias for \`--cache-file=config.cache'
2138 -n, --no-create do not create output files
2139 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2141 Installation directories:
2142 --prefix=PREFIX install architecture-independent files in PREFIX
2143 [$ac_default_prefix]
2144 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2145 [PREFIX]
2147 By default, \`make install' will install all the files in
2148 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2149 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2150 for instance \`--prefix=\$HOME'.
2152 For better control, use the options below.
2154 Fine tuning of the installation directories:
2155 --bindir=DIR user executables [EPREFIX/bin]
2156 --sbindir=DIR system admin executables [EPREFIX/sbin]
2157 --libexecdir=DIR program executables [EPREFIX/libexec]
2158 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2159 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2160 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2161 --libdir=DIR object code libraries [EPREFIX/lib]
2162 --includedir=DIR C header files [PREFIX/include]
2163 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2164 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2165 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2166 --infodir=DIR info documentation [DATAROOTDIR/info]
2167 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2168 --mandir=DIR man documentation [DATAROOTDIR/man]
2169 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2170 --htmldir=DIR html documentation [DOCDIR]
2171 --dvidir=DIR dvi documentation [DOCDIR]
2172 --pdfdir=DIR pdf documentation [DOCDIR]
2173 --psdir=DIR ps documentation [DOCDIR]
2174 _ACEOF
2176 cat <<\_ACEOF
2178 Program names:
2179 --program-prefix=PREFIX prepend PREFIX to installed program names
2180 --program-suffix=SUFFIX append SUFFIX to installed program names
2181 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2183 X features:
2184 --x-includes=DIR X include files are in DIR
2185 --x-libraries=DIR X library files are in DIR
2187 System types:
2188 --build=BUILD configure for building on BUILD [guessed]
2189 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2190 _ACEOF
2193 if test -n "$ac_init_help"; then
2194 case $ac_init_help in
2195 short | recursive ) echo "Configuration of emacs 24.3.50:";;
2196 esac
2197 cat <<\_ACEOF
2199 Optional Features:
2200 --disable-option-checking ignore unrecognized --enable/--with options
2201 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2202 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2203 --disable-ns-self-contained
2204 disable self contained build under NeXTstep
2205 --enable-locallisppath=PATH
2206 directories Emacs should search for lisp files
2207 specific to this site
2208 --enable-checking[=LIST]
2209 enable expensive run-time checks. With LIST, enable
2210 only specific categories of checks. Categories are:
2211 all,yes,no. Flags are: stringbytes, stringoverrun,
2212 stringfreelist, xmallocoverrun, conslist, glyphs
2213 --enable-check-lisp-object-type
2214 enable compile time checks for the Lisp_Object data
2215 type. This is useful for development for catching
2216 certain types of bugs.
2217 --enable-profiling build emacs with low-level, gprof profiling support.
2218 Mainly useful for debugging Emacs itself. May not
2219 work on all platforms. Stops profiler.el working.
2220 --enable-autodepend automatically generate dependencies to .h-files.
2221 Requires GNU Make and Gcc. Enabled if GNU Make and
2222 Gcc is found
2223 --enable-gtk-deprecation-warnings
2224 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
2225 --disable-dependency-tracking speeds up one-time build
2226 --enable-dependency-tracking do not reject slow dependency extractors
2227 --disable-largefile omit support for large files
2228 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2229 intended for developers, and may generate false
2230 alarms when used with older or non-GNU development
2231 tools.
2232 --enable-link-time-optimization
2233 build emacs with link-time optimization. This is
2234 supported only for GCC since 4.5.0.
2235 --disable-acl do not support ACLs
2237 Optional Packages:
2238 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2239 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2240 --without-all omit almost all features and build small executable
2241 with minimal dependencies
2242 --without-pop don't support POP mail retrieval with movemail
2243 --with-kerberos support Kerberos-authenticated POP
2244 --with-kerberos5 support Kerberos version 5 authenticated POP
2245 --with-hesiod support Hesiod to get the POP server host
2246 --with-mmdf support MMDF mailboxes
2247 --with-mail-unlink unlink, rather than empty, mail spool after reading
2248 --with-mailhost=HOSTNAME
2249 string giving default POP mail host
2250 --with-sound=VALUE compile with sound support (VALUE one of: yes, alsa,
2251 oss, bsd-ossaudio, no; default yes). Only for
2252 GNU/Linux, FreeBSD, NetBSD, MinGW.
2253 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2254 gtk3, lucid or athena, motif, no)
2255 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2256 --without-xpm don't compile with XPM image support
2257 --without-jpeg don't compile with JPEG image support
2258 --without-tiff don't compile with TIFF image support
2259 --without-gif don't compile with GIF image support
2260 --without-png don't compile with PNG image support
2261 --without-rsvg don't compile with SVG image support
2262 --without-xml2 don't compile with XML parsing support
2263 --without-imagemagick don't compile with ImageMagick image support
2264 --without-xft don't use XFT for anti aliased fonts
2265 --without-libotf don't use libotf for OpenType font support
2266 --without-m17n-flt don't use m17n-flt for text shaping
2267 --without-toolkit-scroll-bars
2268 don't use Motif or Xaw3d scroll bars
2269 --without-xaw3d don't use Xaw3d
2270 --without-xim don't use X11 XIM
2271 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2272 --with-w32 use native MS Windows GUI in a Cygwin build
2273 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2274 console
2275 --without-dbus don't compile with D-Bus support
2276 --without-gconf don't compile with GConf support
2277 --without-gsettings don't compile with GSettings support
2278 --without-selinux don't compile with SELinux support
2279 --without-gnutls don't use -lgnutls for SSL/TLS support
2280 --without-zlib don't compile with zlib decompression support
2281 --with-file-notification=LIB
2282 use a file notification library (LIB one of: yes,
2283 gfile, inotify, w32, no)
2284 --without-makeinfo don't require makeinfo for building manuals
2285 --without-compress-install
2286 don't compress some files (.el, .info, etc.) when
2287 installing. Equivalent to: make GZIP_PROG= install
2288 --with-pkg-config-prog=FILENAME
2289 file name of pkg-config for finding GTK and librsvg
2290 --with-gameuser=USER user for shared game score files
2291 --with-gnustep-conf=FILENAME
2292 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2293 or /etc/GNUstep/GNUstep.conf
2294 --with-x use the X Window System
2296 Some influential environment variables:
2297 CC C compiler command
2298 CFLAGS C compiler flags
2299 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2300 nonstandard directory <lib dir>
2301 LIBS libraries to pass to the linker, e.g. -l<library>
2302 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2303 you have headers in a nonstandard directory <include dir>
2304 CPP C preprocessor
2305 XMKMF Path to xmkmf, Makefile generator for X Window System
2307 Use these variables to override the choices made by `configure' or to help
2308 it to find libraries and programs with nonstandard names/locations.
2310 Report bugs to the package provider.
2311 _ACEOF
2312 ac_status=$?
2315 if test "$ac_init_help" = "recursive"; then
2316 # If there are subdirs, report their specific --help.
2317 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2318 test -d "$ac_dir" ||
2319 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2320 continue
2321 ac_builddir=.
2323 case "$ac_dir" in
2324 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2326 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2327 # A ".." for each directory in $ac_dir_suffix.
2328 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2329 case $ac_top_builddir_sub in
2330 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2332 esac ;;
2333 esac
2334 ac_abs_top_builddir=$ac_pwd
2335 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2336 # for backward compatibility:
2337 ac_top_builddir=$ac_top_build_prefix
2339 case $srcdir in
2340 .) # We are building in place.
2341 ac_srcdir=.
2342 ac_top_srcdir=$ac_top_builddir_sub
2343 ac_abs_top_srcdir=$ac_pwd ;;
2344 [\\/]* | ?:[\\/]* ) # Absolute name.
2345 ac_srcdir=$srcdir$ac_dir_suffix;
2346 ac_top_srcdir=$srcdir
2347 ac_abs_top_srcdir=$srcdir ;;
2348 *) # Relative name.
2349 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2350 ac_top_srcdir=$ac_top_build_prefix$srcdir
2351 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2352 esac
2353 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2355 cd "$ac_dir" || { ac_status=$?; continue; }
2356 # Check for guested configure.
2357 if test -f "$ac_srcdir/configure.gnu"; then
2358 echo &&
2359 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2360 elif test -f "$ac_srcdir/configure"; then
2361 echo &&
2362 $SHELL "$ac_srcdir/configure" --help=recursive
2363 else
2364 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2365 fi || ac_status=$?
2366 cd "$ac_pwd" || { ac_status=$?; break; }
2367 done
2370 test -n "$ac_init_help" && exit $ac_status
2371 if $ac_init_version; then
2372 cat <<\_ACEOF
2373 emacs configure 24.3.50
2374 generated by GNU Autoconf 2.65
2376 Copyright (C) 2009 Free Software Foundation, Inc.
2377 This configure script is free software; the Free Software Foundation
2378 gives unlimited permission to copy, distribute and modify it.
2379 _ACEOF
2380 exit
2383 ## ------------------------ ##
2384 ## Autoconf initialization. ##
2385 ## ------------------------ ##
2387 # ac_fn_c_try_compile LINENO
2388 # --------------------------
2389 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2390 ac_fn_c_try_compile ()
2392 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393 rm -f conftest.$ac_objext
2394 if { { ac_try="$ac_compile"
2395 case "(($ac_try" in
2396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397 *) ac_try_echo=$ac_try;;
2398 esac
2399 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400 $as_echo "$ac_try_echo"; } >&5
2401 (eval "$ac_compile") 2>conftest.err
2402 ac_status=$?
2403 if test -s conftest.err; then
2404 grep -v '^ *+' conftest.err >conftest.er1
2405 cat conftest.er1 >&5
2406 mv -f conftest.er1 conftest.err
2408 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409 test $ac_status = 0; } && {
2410 test -z "$ac_c_werror_flag" ||
2411 test ! -s conftest.err
2412 } && test -s conftest.$ac_objext; then :
2413 ac_retval=0
2414 else
2415 $as_echo "$as_me: failed program was:" >&5
2416 sed 's/^/| /' conftest.$ac_ext >&5
2418 ac_retval=1
2420 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2421 as_fn_set_status $ac_retval
2423 } # ac_fn_c_try_compile
2425 # ac_fn_c_try_cpp LINENO
2426 # ----------------------
2427 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2428 ac_fn_c_try_cpp ()
2430 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431 if { { ac_try="$ac_cpp conftest.$ac_ext"
2432 case "(($ac_try" in
2433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2434 *) ac_try_echo=$ac_try;;
2435 esac
2436 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2437 $as_echo "$ac_try_echo"; } >&5
2438 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2439 ac_status=$?
2440 if test -s conftest.err; then
2441 grep -v '^ *+' conftest.err >conftest.er1
2442 cat conftest.er1 >&5
2443 mv -f conftest.er1 conftest.err
2445 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2446 test $ac_status = 0; } >/dev/null && {
2447 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2448 test ! -s conftest.err
2449 }; then :
2450 ac_retval=0
2451 else
2452 $as_echo "$as_me: failed program was:" >&5
2453 sed 's/^/| /' conftest.$ac_ext >&5
2455 ac_retval=1
2457 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2458 as_fn_set_status $ac_retval
2460 } # ac_fn_c_try_cpp
2462 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2463 # -------------------------------------------------------
2464 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2465 # the include files in INCLUDES and setting the cache variable VAR
2466 # accordingly.
2467 ac_fn_c_check_header_mongrel ()
2469 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2470 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2472 $as_echo_n "checking for $2... " >&6; }
2473 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2474 $as_echo_n "(cached) " >&6
2476 eval ac_res=\$$3
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2478 $as_echo "$ac_res" >&6; }
2479 else
2480 # Is the header compilable?
2481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2482 $as_echo_n "checking $2 usability... " >&6; }
2483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2484 /* end confdefs.h. */
2486 #include <$2>
2487 _ACEOF
2488 if ac_fn_c_try_compile "$LINENO"; then :
2489 ac_header_compiler=yes
2490 else
2491 ac_header_compiler=no
2493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2495 $as_echo "$ac_header_compiler" >&6; }
2497 # Is the header present?
2498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2499 $as_echo_n "checking $2 presence... " >&6; }
2500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2501 /* end confdefs.h. */
2502 #include <$2>
2503 _ACEOF
2504 if ac_fn_c_try_cpp "$LINENO"; then :
2505 ac_header_preproc=yes
2506 else
2507 ac_header_preproc=no
2509 rm -f conftest.err conftest.$ac_ext
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2511 $as_echo "$ac_header_preproc" >&6; }
2513 # So? What about this header?
2514 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2515 yes:no: )
2516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2517 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2518 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2519 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2521 no:yes:* )
2522 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2523 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2525 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2527 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2528 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2529 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2530 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2531 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2533 esac
2534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2535 $as_echo_n "checking for $2... " >&6; }
2536 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2537 $as_echo_n "(cached) " >&6
2538 else
2539 eval "$3=\$ac_header_compiler"
2541 eval ac_res=\$$3
2542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2543 $as_echo "$ac_res" >&6; }
2545 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2547 } # ac_fn_c_check_header_mongrel
2549 # ac_fn_c_try_run LINENO
2550 # ----------------------
2551 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2552 # that executables *can* be run.
2553 ac_fn_c_try_run ()
2555 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556 if { { ac_try="$ac_link"
2557 case "(($ac_try" in
2558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559 *) ac_try_echo=$ac_try;;
2560 esac
2561 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562 $as_echo "$ac_try_echo"; } >&5
2563 (eval "$ac_link") 2>&5
2564 ac_status=$?
2565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2566 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2567 { { case "(($ac_try" in
2568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569 *) ac_try_echo=$ac_try;;
2570 esac
2571 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572 $as_echo "$ac_try_echo"; } >&5
2573 (eval "$ac_try") 2>&5
2574 ac_status=$?
2575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2576 test $ac_status = 0; }; }; then :
2577 ac_retval=0
2578 else
2579 $as_echo "$as_me: program exited with status $ac_status" >&5
2580 $as_echo "$as_me: failed program was:" >&5
2581 sed 's/^/| /' conftest.$ac_ext >&5
2583 ac_retval=$ac_status
2585 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2586 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2587 as_fn_set_status $ac_retval
2589 } # ac_fn_c_try_run
2591 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2592 # -------------------------------------------------------
2593 # Tests whether HEADER exists and can be compiled using the include files in
2594 # INCLUDES, setting the cache variable VAR accordingly.
2595 ac_fn_c_check_header_compile ()
2597 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2599 $as_echo_n "checking for $2... " >&6; }
2600 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2601 $as_echo_n "(cached) " >&6
2602 else
2603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604 /* end confdefs.h. */
2606 #include <$2>
2607 _ACEOF
2608 if ac_fn_c_try_compile "$LINENO"; then :
2609 eval "$3=yes"
2610 else
2611 eval "$3=no"
2613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615 eval ac_res=\$$3
2616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2617 $as_echo "$ac_res" >&6; }
2618 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2620 } # ac_fn_c_check_header_compile
2622 # ac_fn_c_try_link LINENO
2623 # -----------------------
2624 # Try to link conftest.$ac_ext, and return whether this succeeded.
2625 ac_fn_c_try_link ()
2627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2628 rm -f conftest.$ac_objext conftest$ac_exeext
2629 if { { ac_try="$ac_link"
2630 case "(($ac_try" in
2631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2632 *) ac_try_echo=$ac_try;;
2633 esac
2634 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2635 $as_echo "$ac_try_echo"; } >&5
2636 (eval "$ac_link") 2>conftest.err
2637 ac_status=$?
2638 if test -s conftest.err; then
2639 grep -v '^ *+' conftest.err >conftest.er1
2640 cat conftest.er1 >&5
2641 mv -f conftest.er1 conftest.err
2643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2644 test $ac_status = 0; } && {
2645 test -z "$ac_c_werror_flag" ||
2646 test ! -s conftest.err
2647 } && test -s conftest$ac_exeext && {
2648 test "$cross_compiling" = yes ||
2649 $as_test_x conftest$ac_exeext
2650 }; then :
2651 ac_retval=0
2652 else
2653 $as_echo "$as_me: failed program was:" >&5
2654 sed 's/^/| /' conftest.$ac_ext >&5
2656 ac_retval=1
2658 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2659 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2660 # interfere with the next link command; also delete a directory that is
2661 # left behind by Apple's compiler. We do this before executing the actions.
2662 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2663 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2664 as_fn_set_status $ac_retval
2666 } # ac_fn_c_try_link
2668 # ac_fn_c_check_decl LINENO SYMBOL VAR
2669 # ------------------------------------
2670 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2671 ac_fn_c_check_decl ()
2673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2675 $as_echo_n "checking whether $2 is declared... " >&6; }
2676 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2677 $as_echo_n "(cached) " >&6
2678 else
2679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2680 /* end confdefs.h. */
2683 main ()
2685 #ifndef $2
2686 (void) $2;
2687 #endif
2690 return 0;
2692 _ACEOF
2693 if ac_fn_c_try_compile "$LINENO"; then :
2694 eval "$3=yes"
2695 else
2696 eval "$3=no"
2698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2700 eval ac_res=\$$3
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2702 $as_echo "$ac_res" >&6; }
2703 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2705 } # ac_fn_c_check_decl
2707 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2708 # ----------------------------------------------
2709 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2710 ac_fn_c_check_header_preproc ()
2712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2714 $as_echo_n "checking for $2... " >&6; }
2715 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2716 $as_echo_n "(cached) " >&6
2717 else
2718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719 /* end confdefs.h. */
2720 #include <$2>
2721 _ACEOF
2722 if ac_fn_c_try_cpp "$LINENO"; then :
2723 eval "$3=yes"
2724 else
2725 eval "$3=no"
2727 rm -f conftest.err conftest.$ac_ext
2729 eval ac_res=\$$3
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2731 $as_echo "$ac_res" >&6; }
2732 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2734 } # ac_fn_c_check_header_preproc
2736 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2737 # ----------------------------------------------------
2738 # Tries to find if the field MEMBER exists in type AGGR, after including
2739 # INCLUDES, setting cache variable VAR accordingly.
2740 ac_fn_c_check_member ()
2742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2744 $as_echo_n "checking for $2.$3... " >&6; }
2745 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2746 $as_echo_n "(cached) " >&6
2747 else
2748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2749 /* end confdefs.h. */
2752 main ()
2754 static $2 ac_aggr;
2755 if (ac_aggr.$3)
2756 return 0;
2758 return 0;
2760 _ACEOF
2761 if ac_fn_c_try_compile "$LINENO"; then :
2762 eval "$4=yes"
2763 else
2764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765 /* end confdefs.h. */
2768 main ()
2770 static $2 ac_aggr;
2771 if (sizeof ac_aggr.$3)
2772 return 0;
2774 return 0;
2776 _ACEOF
2777 if ac_fn_c_try_compile "$LINENO"; then :
2778 eval "$4=yes"
2779 else
2780 eval "$4=no"
2782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2786 eval ac_res=\$$4
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2788 $as_echo "$ac_res" >&6; }
2789 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2791 } # ac_fn_c_check_member
2793 # ac_fn_c_check_func LINENO FUNC VAR
2794 # ----------------------------------
2795 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2796 ac_fn_c_check_func ()
2798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2800 $as_echo_n "checking for $2... " >&6; }
2801 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2802 $as_echo_n "(cached) " >&6
2803 else
2804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2805 /* end confdefs.h. */
2806 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2807 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2808 #define $2 innocuous_$2
2810 /* System header to define __stub macros and hopefully few prototypes,
2811 which can conflict with char $2 (); below.
2812 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2813 <limits.h> exists even on freestanding compilers. */
2815 #ifdef __STDC__
2816 # include <limits.h>
2817 #else
2818 # include <assert.h>
2819 #endif
2821 #undef $2
2823 /* Override any GCC internal prototype to avoid an error.
2824 Use char because int might match the return type of a GCC
2825 builtin and then its argument prototype would still apply. */
2826 #ifdef __cplusplus
2827 extern "C"
2828 #endif
2829 char $2 ();
2830 /* The GNU C library defines this for functions which it implements
2831 to always fail with ENOSYS. Some functions are actually named
2832 something starting with __ and the normal name is an alias. */
2833 #if defined __stub_$2 || defined __stub___$2
2834 choke me
2835 #endif
2838 main ()
2840 return $2 ();
2842 return 0;
2844 _ACEOF
2845 if ac_fn_c_try_link "$LINENO"; then :
2846 eval "$3=yes"
2847 else
2848 eval "$3=no"
2850 rm -f core conftest.err conftest.$ac_objext \
2851 conftest$ac_exeext conftest.$ac_ext
2853 eval ac_res=\$$3
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2855 $as_echo "$ac_res" >&6; }
2856 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2858 } # ac_fn_c_check_func
2860 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2861 # -------------------------------------------
2862 # Tests whether TYPE exists after having included INCLUDES, setting cache
2863 # variable VAR accordingly.
2864 ac_fn_c_check_type ()
2866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868 $as_echo_n "checking for $2... " >&6; }
2869 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2870 $as_echo_n "(cached) " >&6
2871 else
2872 eval "$3=no"
2873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2874 /* end confdefs.h. */
2877 main ()
2879 if (sizeof ($2))
2880 return 0;
2882 return 0;
2884 _ACEOF
2885 if ac_fn_c_try_compile "$LINENO"; then :
2886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2887 /* end confdefs.h. */
2890 main ()
2892 if (sizeof (($2)))
2893 return 0;
2895 return 0;
2897 _ACEOF
2898 if ac_fn_c_try_compile "$LINENO"; then :
2900 else
2901 eval "$3=yes"
2903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907 eval ac_res=\$$3
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2909 $as_echo "$ac_res" >&6; }
2910 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2912 } # ac_fn_c_check_type
2914 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2915 # --------------------------------------------
2916 # Tries to find the compile-time value of EXPR in a program that includes
2917 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2918 # computed
2919 ac_fn_c_compute_int ()
2921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2922 if test "$cross_compiling" = yes; then
2923 # Depending upon the size, compute the lo and hi bounds.
2924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2925 /* end confdefs.h. */
2928 main ()
2930 static int test_array [1 - 2 * !(($2) >= 0)];
2931 test_array [0] = 0
2934 return 0;
2936 _ACEOF
2937 if ac_fn_c_try_compile "$LINENO"; then :
2938 ac_lo=0 ac_mid=0
2939 while :; do
2940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941 /* end confdefs.h. */
2944 main ()
2946 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2947 test_array [0] = 0
2950 return 0;
2952 _ACEOF
2953 if ac_fn_c_try_compile "$LINENO"; then :
2954 ac_hi=$ac_mid; break
2955 else
2956 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2957 if test $ac_lo -le $ac_mid; then
2958 ac_lo= ac_hi=
2959 break
2961 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2964 done
2965 else
2966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2967 /* end confdefs.h. */
2970 main ()
2972 static int test_array [1 - 2 * !(($2) < 0)];
2973 test_array [0] = 0
2976 return 0;
2978 _ACEOF
2979 if ac_fn_c_try_compile "$LINENO"; then :
2980 ac_hi=-1 ac_mid=-1
2981 while :; do
2982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983 /* end confdefs.h. */
2986 main ()
2988 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2989 test_array [0] = 0
2992 return 0;
2994 _ACEOF
2995 if ac_fn_c_try_compile "$LINENO"; then :
2996 ac_lo=$ac_mid; break
2997 else
2998 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2999 if test $ac_mid -le $ac_hi; then
3000 ac_lo= ac_hi=
3001 break
3003 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006 done
3007 else
3008 ac_lo= ac_hi=
3010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3013 # Binary search between lo and hi bounds.
3014 while test "x$ac_lo" != "x$ac_hi"; do
3015 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3017 /* end confdefs.h. */
3020 main ()
3022 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3023 test_array [0] = 0
3026 return 0;
3028 _ACEOF
3029 if ac_fn_c_try_compile "$LINENO"; then :
3030 ac_hi=$ac_mid
3031 else
3032 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3035 done
3036 case $ac_lo in #((
3037 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3038 '') ac_retval=1 ;;
3039 esac
3040 else
3041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3042 /* end confdefs.h. */
3044 static long int longval () { return $2; }
3045 static unsigned long int ulongval () { return $2; }
3046 #include <stdio.h>
3047 #include <stdlib.h>
3049 main ()
3052 FILE *f = fopen ("conftest.val", "w");
3053 if (! f)
3054 return 1;
3055 if (($2) < 0)
3057 long int i = longval ();
3058 if (i != ($2))
3059 return 1;
3060 fprintf (f, "%ld", i);
3062 else
3064 unsigned long int i = ulongval ();
3065 if (i != ($2))
3066 return 1;
3067 fprintf (f, "%lu", i);
3069 /* Do not output a trailing newline, as this causes \r\n confusion
3070 on some platforms. */
3071 return ferror (f) || fclose (f) != 0;
3074 return 0;
3076 _ACEOF
3077 if ac_fn_c_try_run "$LINENO"; then :
3078 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3079 else
3080 ac_retval=1
3082 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3083 conftest.$ac_objext conftest.beam conftest.$ac_ext
3084 rm -f conftest.val
3087 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3088 as_fn_set_status $ac_retval
3090 } # ac_fn_c_compute_int
3091 cat >config.log <<_ACEOF
3092 This file contains any messages produced by compilers while
3093 running configure, to aid debugging if configure makes a mistake.
3095 It was created by emacs $as_me 24.3.50, which was
3096 generated by GNU Autoconf 2.65. Invocation command line was
3098 $ $0 $@
3100 _ACEOF
3101 exec 5>>config.log
3103 cat <<_ASUNAME
3104 ## --------- ##
3105 ## Platform. ##
3106 ## --------- ##
3108 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3109 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3110 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3111 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3112 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3114 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3115 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3117 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3118 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3119 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3120 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3121 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3122 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3123 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3125 _ASUNAME
3127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128 for as_dir in $PATH
3130 IFS=$as_save_IFS
3131 test -z "$as_dir" && as_dir=.
3132 $as_echo "PATH: $as_dir"
3133 done
3134 IFS=$as_save_IFS
3136 } >&5
3138 cat >&5 <<_ACEOF
3141 ## ----------- ##
3142 ## Core tests. ##
3143 ## ----------- ##
3145 _ACEOF
3148 # Keep a trace of the command line.
3149 # Strip out --no-create and --no-recursion so they do not pile up.
3150 # Strip out --silent because we don't want to record it for future runs.
3151 # Also quote any args containing shell meta-characters.
3152 # Make two passes to allow for proper duplicate-argument suppression.
3153 ac_configure_args=
3154 ac_configure_args0=
3155 ac_configure_args1=
3156 ac_must_keep_next=false
3157 for ac_pass in 1 2
3159 for ac_arg
3161 case $ac_arg in
3162 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3164 | -silent | --silent | --silen | --sile | --sil)
3165 continue ;;
3166 *\'*)
3167 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3168 esac
3169 case $ac_pass in
3170 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3172 as_fn_append ac_configure_args1 " '$ac_arg'"
3173 if test $ac_must_keep_next = true; then
3174 ac_must_keep_next=false # Got value, back to normal.
3175 else
3176 case $ac_arg in
3177 *=* | --config-cache | -C | -disable-* | --disable-* \
3178 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3179 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3180 | -with-* | --with-* | -without-* | --without-* | --x)
3181 case "$ac_configure_args0 " in
3182 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3183 esac
3185 -* ) ac_must_keep_next=true ;;
3186 esac
3188 as_fn_append ac_configure_args " '$ac_arg'"
3190 esac
3191 done
3192 done
3193 { ac_configure_args0=; unset ac_configure_args0;}
3194 { ac_configure_args1=; unset ac_configure_args1;}
3196 # When interrupted or exit'd, cleanup temporary files, and complete
3197 # config.log. We remove comments because anyway the quotes in there
3198 # would cause problems or look ugly.
3199 # WARNING: Use '\'' to represent an apostrophe within the trap.
3200 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3201 trap 'exit_status=$?
3202 # Save into config.log some information that might help in debugging.
3204 echo
3206 cat <<\_ASBOX
3207 ## ---------------- ##
3208 ## Cache variables. ##
3209 ## ---------------- ##
3210 _ASBOX
3211 echo
3212 # The following way of writing the cache mishandles newlines in values,
3214 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3215 eval ac_val=\$$ac_var
3216 case $ac_val in #(
3217 *${as_nl}*)
3218 case $ac_var in #(
3219 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3220 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3221 esac
3222 case $ac_var in #(
3223 _ | IFS | as_nl) ;; #(
3224 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3225 *) { eval $ac_var=; unset $ac_var;} ;;
3226 esac ;;
3227 esac
3228 done
3229 (set) 2>&1 |
3230 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3231 *${as_nl}ac_space=\ *)
3232 sed -n \
3233 "s/'\''/'\''\\\\'\'''\''/g;
3234 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3235 ;; #(
3237 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3239 esac |
3240 sort
3242 echo
3244 cat <<\_ASBOX
3245 ## ----------------- ##
3246 ## Output variables. ##
3247 ## ----------------- ##
3248 _ASBOX
3249 echo
3250 for ac_var in $ac_subst_vars
3252 eval ac_val=\$$ac_var
3253 case $ac_val in
3254 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255 esac
3256 $as_echo "$ac_var='\''$ac_val'\''"
3257 done | sort
3258 echo
3260 if test -n "$ac_subst_files"; then
3261 cat <<\_ASBOX
3262 ## ------------------- ##
3263 ## File substitutions. ##
3264 ## ------------------- ##
3265 _ASBOX
3266 echo
3267 for ac_var in $ac_subst_files
3269 eval ac_val=\$$ac_var
3270 case $ac_val in
3271 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3272 esac
3273 $as_echo "$ac_var='\''$ac_val'\''"
3274 done | sort
3275 echo
3278 if test -s confdefs.h; then
3279 cat <<\_ASBOX
3280 ## ----------- ##
3281 ## confdefs.h. ##
3282 ## ----------- ##
3283 _ASBOX
3284 echo
3285 cat confdefs.h
3286 echo
3288 test "$ac_signal" != 0 &&
3289 $as_echo "$as_me: caught signal $ac_signal"
3290 $as_echo "$as_me: exit $exit_status"
3291 } >&5
3292 rm -f core *.core core.conftest.* &&
3293 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3294 exit $exit_status
3296 for ac_signal in 1 2 13 15; do
3297 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3298 done
3299 ac_signal=0
3301 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3302 rm -f -r conftest* confdefs.h
3304 $as_echo "/* confdefs.h */" > confdefs.h
3306 # Predefined preprocessor variables.
3308 cat >>confdefs.h <<_ACEOF
3309 #define PACKAGE_NAME "$PACKAGE_NAME"
3310 _ACEOF
3312 cat >>confdefs.h <<_ACEOF
3313 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3314 _ACEOF
3316 cat >>confdefs.h <<_ACEOF
3317 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3318 _ACEOF
3320 cat >>confdefs.h <<_ACEOF
3321 #define PACKAGE_STRING "$PACKAGE_STRING"
3322 _ACEOF
3324 cat >>confdefs.h <<_ACEOF
3325 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3326 _ACEOF
3328 cat >>confdefs.h <<_ACEOF
3329 #define PACKAGE_URL "$PACKAGE_URL"
3330 _ACEOF
3333 # Let the site file select an alternate cache file if it wants to.
3334 # Prefer an explicitly selected file to automatically selected ones.
3335 ac_site_file1=NONE
3336 ac_site_file2=NONE
3337 if test -n "$CONFIG_SITE"; then
3338 ac_site_file1=$CONFIG_SITE
3339 elif test "x$prefix" != xNONE; then
3340 ac_site_file1=$prefix/share/config.site
3341 ac_site_file2=$prefix/etc/config.site
3342 else
3343 ac_site_file1=$ac_default_prefix/share/config.site
3344 ac_site_file2=$ac_default_prefix/etc/config.site
3346 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348 test "x$ac_site_file" = xNONE && continue
3349 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3351 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3352 sed 's/^/| /' "$ac_site_file" >&5
3353 . "$ac_site_file"
3355 done
3357 if test -r "$cache_file"; then
3358 # Some versions of bash will fail to source /dev/null (special files
3359 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3360 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3361 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3362 $as_echo "$as_me: loading cache $cache_file" >&6;}
3363 case $cache_file in
3364 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3365 *) . "./$cache_file";;
3366 esac
3368 else
3369 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3370 $as_echo "$as_me: creating cache $cache_file" >&6;}
3371 >$cache_file
3374 as_fn_append ac_header_list " sys/systeminfo.h"
3375 as_fn_append ac_header_list " coff.h"
3376 as_fn_append ac_header_list " pty.h"
3377 as_fn_append ac_header_list " sys/resource.h"
3378 as_fn_append ac_header_list " sys/utsname.h"
3379 as_fn_append ac_header_list " pwd.h"
3380 as_fn_append ac_header_list " utmp.h"
3381 as_fn_append ac_header_list " util.h"
3382 as_fn_append ac_header_list " sys/socket.h"
3383 as_fn_append ac_header_list " stdlib.h"
3384 as_fn_append ac_header_list " unistd.h"
3385 as_fn_append ac_header_list " sys/param.h"
3386 as_fn_append ac_header_list " pthread.h"
3387 as_fn_append ac_header_list " malloc/malloc.h"
3388 as_fn_append ac_header_list " maillock.h"
3389 as_fn_append ac_header_list " sys/un.h"
3390 as_fn_append ac_func_list " tzset"
3391 as_fn_append ac_func_list " readlinkat"
3392 as_fn_append ac_header_list " dirent.h"
3393 as_fn_append ac_header_list " execinfo.h"
3394 as_fn_append ac_func_list " faccessat"
3395 as_fn_append ac_func_list " fcntl"
3396 as_fn_append ac_func_list " fdopendir"
3397 as_fn_append ac_header_list " stdio_ext.h"
3398 as_fn_append ac_func_list " fstatat"
3399 as_fn_append ac_func_list " fsync"
3400 gl_getopt_required=GNU
3401 as_fn_append ac_header_list " getopt.h"
3402 as_fn_append ac_func_list " gettimeofday"
3403 as_fn_append ac_func_list " nanotime"
3404 as_fn_append ac_header_list " sys/time.h"
3405 as_fn_append ac_header_list " wchar.h"
3406 as_fn_append ac_header_list " stdint.h"
3407 as_fn_append ac_header_list " inttypes.h"
3408 as_fn_append ac_func_list " lstat"
3409 as_fn_append ac_func_list " mkostemp"
3410 as_fn_append ac_func_list " pipe2"
3411 as_fn_append ac_header_list " sys/select.h"
3412 as_fn_append ac_func_list " pselect"
3413 as_fn_append ac_func_list " pthread_sigmask"
3414 as_fn_append ac_func_list " readlink"
3415 as_fn_append ac_func_list " strtoimax"
3416 as_fn_append ac_func_list " strtoumax"
3417 as_fn_append ac_func_list " symlink"
3418 as_fn_append ac_header_list " sys/stat.h"
3419 as_fn_append ac_func_list " localtime_r"
3420 as_fn_append ac_header_list " utime.h"
3421 as_fn_append ac_func_list " futimes"
3422 as_fn_append ac_func_list " futimesat"
3423 as_fn_append ac_func_list " futimens"
3424 as_fn_append ac_func_list " utimensat"
3425 as_fn_append ac_func_list " lutimes"
3426 as_fn_append ac_func_list " getdtablesize"
3427 as_fn_append ac_func_list " secure_getenv"
3428 # Check that the precious variables saved in the cache have kept the same
3429 # value.
3430 ac_cache_corrupted=false
3431 for ac_var in $ac_precious_vars; do
3432 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3433 eval ac_new_set=\$ac_env_${ac_var}_set
3434 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3435 eval ac_new_val=\$ac_env_${ac_var}_value
3436 case $ac_old_set,$ac_new_set in
3437 set,)
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3439 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3440 ac_cache_corrupted=: ;;
3441 ,set)
3442 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3443 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3444 ac_cache_corrupted=: ;;
3445 ,);;
3447 if test "x$ac_old_val" != "x$ac_new_val"; then
3448 # differences in whitespace do not lead to failure.
3449 ac_old_val_w=`echo x $ac_old_val`
3450 ac_new_val_w=`echo x $ac_new_val`
3451 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3452 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3453 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3454 ac_cache_corrupted=:
3455 else
3456 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3457 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3458 eval $ac_var=\$ac_old_val
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3461 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3462 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3463 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3464 fi;;
3465 esac
3466 # Pass precious variables to config.status.
3467 if test "$ac_new_set" = set; then
3468 case $ac_new_val in
3469 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3470 *) ac_arg=$ac_var=$ac_new_val ;;
3471 esac
3472 case " $ac_configure_args " in
3473 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3474 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3475 esac
3477 done
3478 if $ac_cache_corrupted; then
3479 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3480 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3482 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3483 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3485 ## -------------------- ##
3486 ## Main body of script. ##
3487 ## -------------------- ##
3489 ac_ext=c
3490 ac_cpp='$CPP $CPPFLAGS'
3491 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3492 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3493 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3497 emacs_config_options=
3498 optsep=
3499 for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
3500 case $opt in
3501 -n | --no-create | --no-recursion)
3502 continue ;;
3503 CFLAGS | CPPFLAGS | LDFLAGS)
3504 eval 'test "${'$opt'+set}" = set' || continue
3505 case " $*" in
3506 *" $opt="*) continue ;;
3507 esac
3508 eval opt=$opt=\$$opt ;;
3509 esac
3511 emacs_shell_specials=$IFS\''"#$&()*;<>?[\\`{|~'
3512 case $opt in
3513 *["$emacs_shell_specials"]*)
3514 case $opt in
3515 *\'*)
3516 emacs_quote_apostrophes="s/'/'\\\\''/g"
3517 opt=`$as_echo "$opt" | sed "$emacs_quote_apostrophes"` ;;
3518 esac
3519 opt="'$opt'"
3520 case $opt in
3521 *['"\\']*)
3522 emacs_quote_for_c='s/["\\]/\\&/g; $!s/$/\\n\\/'
3523 opt=`$as_echo "$opt" | sed "$emacs_quote_for_c"` ;;
3524 esac ;;
3525 esac
3526 as_fn_append emacs_config_options "$optsep$opt"
3527 optsep=' '
3528 done
3530 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3533 ac_aux_dir=
3534 for ac_dir in build-aux "$srcdir"/build-aux; do
3535 for ac_t in install-sh install.sh shtool; do
3536 if test -f "$ac_dir/$ac_t"; then
3537 ac_aux_dir=$ac_dir
3538 ac_install_sh="$ac_aux_dir/$ac_t -c"
3539 break 2
3541 done
3542 done
3543 if test -z "$ac_aux_dir"; then
3544 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3547 # These three variables are undocumented and unsupported,
3548 # and are intended to be withdrawn in a future Autoconf release.
3549 # They can cause serious problems if a builder's source tree is in a directory
3550 # whose full name contains unusual characters.
3551 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3552 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3553 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3556 am__api_version='1.11'
3558 # Find a good install program. We prefer a C program (faster),
3559 # so one script is as good as another. But avoid the broken or
3560 # incompatible versions:
3561 # SysV /etc/install, /usr/sbin/install
3562 # SunOS /usr/etc/install
3563 # IRIX /sbin/install
3564 # AIX /bin/install
3565 # AmigaOS /C/install, which installs bootblocks on floppy discs
3566 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3567 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3568 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3569 # OS/2's system install, which has a completely different semantic
3570 # ./install, which can be erroneously created by make from ./install.sh.
3571 # Reject install programs that cannot install multiple files.
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3573 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3574 if test -z "$INSTALL"; then
3575 if test "${ac_cv_path_install+set}" = set; then :
3576 $as_echo_n "(cached) " >&6
3577 else
3578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579 for as_dir in $PATH
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
3583 # Account for people who put trailing slashes in PATH elements.
3584 case $as_dir/ in #((
3585 ./ | .// | /[cC]/* | \
3586 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3587 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3588 /usr/ucb/* ) ;;
3590 # OSF1 and SCO ODT 3.0 have their own names for install.
3591 # Don't use installbsd from OSF since it installs stuff as root
3592 # by default.
3593 for ac_prog in ginstall scoinst install; do
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3596 if test $ac_prog = install &&
3597 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3598 # AIX install. It has an incompatible calling convention.
3600 elif test $ac_prog = install &&
3601 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3602 # program-specific install script used by HP pwplus--don't use.
3604 else
3605 rm -rf conftest.one conftest.two conftest.dir
3606 echo one > conftest.one
3607 echo two > conftest.two
3608 mkdir conftest.dir
3609 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3610 test -s conftest.one && test -s conftest.two &&
3611 test -s conftest.dir/conftest.one &&
3612 test -s conftest.dir/conftest.two
3613 then
3614 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3615 break 3
3619 done
3620 done
3622 esac
3624 done
3625 IFS=$as_save_IFS
3627 rm -rf conftest.one conftest.two conftest.dir
3630 if test "${ac_cv_path_install+set}" = set; then
3631 INSTALL=$ac_cv_path_install
3632 else
3633 # As a last resort, use the slow shell script. Don't cache a
3634 # value for INSTALL within a source directory, because that will
3635 # break other packages using the cache if that directory is
3636 # removed, or if the value is a relative name.
3637 INSTALL=$ac_install_sh
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3641 $as_echo "$INSTALL" >&6; }
3643 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3644 # It thinks the first close brace ends the variable substitution.
3645 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3647 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3649 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3652 $as_echo_n "checking whether build environment is sane... " >&6; }
3653 # Just in case
3654 sleep 1
3655 echo timestamp > conftest.file
3656 # Reject unsafe characters in $srcdir or the absolute working directory
3657 # name. Accept space and tab only in the latter.
3658 am_lf='
3660 case `pwd` in
3661 *[\\\"\#\$\&\'\`$am_lf]*)
3662 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3663 esac
3664 case $srcdir in
3665 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3666 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3667 esac
3669 # Do `set' in a subshell so we don't clobber the current shell's
3670 # arguments. Must try -L first in case configure is actually a
3671 # symlink; some systems play weird games with the mod time of symlinks
3672 # (eg FreeBSD returns the mod time of the symlink's containing
3673 # directory).
3674 if (
3675 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3676 if test "$*" = "X"; then
3677 # -L didn't work.
3678 set X `ls -t "$srcdir/configure" conftest.file`
3680 rm -f conftest.file
3681 if test "$*" != "X $srcdir/configure conftest.file" \
3682 && test "$*" != "X conftest.file $srcdir/configure"; then
3684 # If neither matched, then we have a broken ls. This can happen
3685 # if, for instance, CONFIG_SHELL is bash and it inherits a
3686 # broken ls alias from the environment. This has actually
3687 # happened. Such a system could not be considered "sane".
3688 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3689 alias in your environment" "$LINENO" 5
3692 test "$2" = conftest.file
3694 then
3695 # Ok.
3697 else
3698 as_fn_error "newly created file is older than distributed files!
3699 Check your system clock" "$LINENO" 5
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3702 $as_echo "yes" >&6; }
3703 test "$program_prefix" != NONE &&
3704 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3705 # Use a double $ so make ignores it.
3706 test "$program_suffix" != NONE &&
3707 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3708 # Double any \ or $.
3709 # By default was `s,x,x', remove it if useless.
3710 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3711 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3713 # expand $ac_aux_dir to an absolute path
3714 am_aux_dir=`cd $ac_aux_dir && pwd`
3716 if test x"${MISSING+set}" != xset; then
3717 case $am_aux_dir in
3718 *\ * | *\ *)
3719 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3721 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3722 esac
3724 # Use eval to expand $SHELL
3725 if eval "$MISSING --run true"; then
3726 am_missing_run="$MISSING --run "
3727 else
3728 am_missing_run=
3729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3730 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3733 if test x"${install_sh}" != xset; then
3734 case $am_aux_dir in
3735 *\ * | *\ *)
3736 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3738 install_sh="\${SHELL} $am_aux_dir/install-sh"
3739 esac
3742 # Installed binaries are usually stripped using `strip' when the user
3743 # run `make install-strip'. However `strip' might not be the right
3744 # tool to use in cross-compilation environments, therefore Automake
3745 # will honor the `STRIP' environment variable to overrule this program.
3746 if test "$cross_compiling" != no; then
3747 if test -n "$ac_tool_prefix"; then
3748 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3749 set dummy ${ac_tool_prefix}strip; ac_word=$2
3750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3751 $as_echo_n "checking for $ac_word... " >&6; }
3752 if test "${ac_cv_prog_STRIP+set}" = set; then :
3753 $as_echo_n "(cached) " >&6
3754 else
3755 if test -n "$STRIP"; then
3756 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3757 else
3758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3759 for as_dir in $PATH
3761 IFS=$as_save_IFS
3762 test -z "$as_dir" && as_dir=.
3763 for ac_exec_ext in '' $ac_executable_extensions; do
3764 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3765 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3767 break 2
3769 done
3770 done
3771 IFS=$as_save_IFS
3775 STRIP=$ac_cv_prog_STRIP
3776 if test -n "$STRIP"; then
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3778 $as_echo "$STRIP" >&6; }
3779 else
3780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3781 $as_echo "no" >&6; }
3786 if test -z "$ac_cv_prog_STRIP"; then
3787 ac_ct_STRIP=$STRIP
3788 # Extract the first word of "strip", so it can be a program name with args.
3789 set dummy strip; ac_word=$2
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791 $as_echo_n "checking for $ac_word... " >&6; }
3792 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3793 $as_echo_n "(cached) " >&6
3794 else
3795 if test -n "$ac_ct_STRIP"; then
3796 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3797 else
3798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799 for as_dir in $PATH
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
3803 for ac_exec_ext in '' $ac_executable_extensions; do
3804 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3805 ac_cv_prog_ac_ct_STRIP="strip"
3806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3807 break 2
3809 done
3810 done
3811 IFS=$as_save_IFS
3815 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3816 if test -n "$ac_ct_STRIP"; then
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3818 $as_echo "$ac_ct_STRIP" >&6; }
3819 else
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821 $as_echo "no" >&6; }
3824 if test "x$ac_ct_STRIP" = x; then
3825 STRIP=":"
3826 else
3827 case $cross_compiling:$ac_tool_warned in
3828 yes:)
3829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3830 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3831 ac_tool_warned=yes ;;
3832 esac
3833 STRIP=$ac_ct_STRIP
3835 else
3836 STRIP="$ac_cv_prog_STRIP"
3840 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3843 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3844 if test -z "$MKDIR_P"; then
3845 if test "${ac_cv_path_mkdir+set}" = set; then :
3846 $as_echo_n "(cached) " >&6
3847 else
3848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3849 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3851 IFS=$as_save_IFS
3852 test -z "$as_dir" && as_dir=.
3853 for ac_prog in mkdir gmkdir; do
3854 for ac_exec_ext in '' $ac_executable_extensions; do
3855 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3856 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3857 'mkdir (GNU coreutils) '* | \
3858 'mkdir (coreutils) '* | \
3859 'mkdir (fileutils) '4.1*)
3860 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3861 break 3;;
3862 esac
3863 done
3864 done
3865 done
3866 IFS=$as_save_IFS
3870 test -d ./--version && rmdir ./--version
3871 if test "${ac_cv_path_mkdir+set}" = set; then
3872 MKDIR_P="$ac_cv_path_mkdir -p"
3873 else
3874 # As a last resort, use the slow shell script. Don't cache a
3875 # value for MKDIR_P within a source directory, because that will
3876 # break other packages using the cache if that directory is
3877 # removed, or if the value is a relative name.
3878 MKDIR_P="$ac_install_sh -d"
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3882 $as_echo "$MKDIR_P" >&6; }
3884 mkdir_p="$MKDIR_P"
3885 case $mkdir_p in
3886 [\\/$]* | ?:[\\/]*) ;;
3887 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3888 esac
3890 for ac_prog in gawk mawk nawk awk
3892 # Extract the first word of "$ac_prog", so it can be a program name with args.
3893 set dummy $ac_prog; ac_word=$2
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3895 $as_echo_n "checking for $ac_word... " >&6; }
3896 if test "${ac_cv_prog_AWK+set}" = set; then :
3897 $as_echo_n "(cached) " >&6
3898 else
3899 if test -n "$AWK"; then
3900 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3901 else
3902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3903 for as_dir in $PATH
3905 IFS=$as_save_IFS
3906 test -z "$as_dir" && as_dir=.
3907 for ac_exec_ext in '' $ac_executable_extensions; do
3908 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3909 ac_cv_prog_AWK="$ac_prog"
3910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3911 break 2
3913 done
3914 done
3915 IFS=$as_save_IFS
3919 AWK=$ac_cv_prog_AWK
3920 if test -n "$AWK"; then
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3922 $as_echo "$AWK" >&6; }
3923 else
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3925 $as_echo "no" >&6; }
3929 test -n "$AWK" && break
3930 done
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3933 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3934 set x ${MAKE-make}
3935 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3936 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3937 $as_echo_n "(cached) " >&6
3938 else
3939 cat >conftest.make <<\_ACEOF
3940 SHELL = /bin/sh
3941 all:
3942 @echo '@@@%%%=$(MAKE)=@@@%%%'
3943 _ACEOF
3944 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3945 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3946 *@@@%%%=?*=@@@%%%*)
3947 eval ac_cv_prog_make_${ac_make}_set=yes;;
3949 eval ac_cv_prog_make_${ac_make}_set=no;;
3950 esac
3951 rm -f conftest.make
3953 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3955 $as_echo "yes" >&6; }
3956 SET_MAKE=
3957 else
3958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3959 $as_echo "no" >&6; }
3960 SET_MAKE="MAKE=${MAKE-make}"
3963 rm -rf .tst 2>/dev/null
3964 mkdir .tst 2>/dev/null
3965 if test -d .tst; then
3966 am__leading_dot=.
3967 else
3968 am__leading_dot=_
3970 rmdir .tst 2>/dev/null
3972 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3973 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3974 # is not polluted with repeated "-I."
3975 am__isrc=' -I$(srcdir)'
3976 # test to see if srcdir already configured
3977 if test -f $srcdir/config.status; then
3978 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3982 # test whether we have cygpath
3983 if test -z "$CYGPATH_W"; then
3984 if (cygpath --version) >/dev/null 2>/dev/null; then
3985 CYGPATH_W='cygpath -w'
3986 else
3987 CYGPATH_W=echo
3992 # Define the identity of the package.
3993 PACKAGE='emacs'
3994 VERSION='24.3.50'
3997 cat >>confdefs.h <<_ACEOF
3998 #define PACKAGE "$PACKAGE"
3999 _ACEOF
4002 cat >>confdefs.h <<_ACEOF
4003 #define VERSION "$VERSION"
4004 _ACEOF
4006 # Some tools Automake needs.
4008 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4011 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4014 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4017 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4020 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4022 # We need awk for the "check" target. The system "awk" is bad on
4023 # some platforms.
4024 # Always define AMTAR for backward compatibility.
4026 AMTAR=${AMTAR-"${am_missing_run}tar"}
4028 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
4038 temp_srcdir=`cd "$srcdir"; pwd`
4040 for var in "`pwd`" "$temp_srcdir"; do
4042 case "$var" in
4043 *[^\ -~]*) as_fn_error "Emacs cannot be built in a directory whose name contains non-ASCII characters: $var" "$LINENO" 5 ;;
4044 esac
4046 done
4048 lispdir='${datadir}/emacs/${version}/lisp'
4049 leimdir='${datadir}/emacs/${version}/leim'
4050 standardlisppath='${lispdir}:${leimdir}'
4051 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
4052 '${datadir}/emacs/site-lisp'
4053 lisppath='${locallisppath}:${standardlisppath}'
4054 etcdir='${datadir}/emacs/${version}/etc'
4055 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
4056 etcdocdir='${datadir}/emacs/${version}/etc'
4057 gamedir='${localstatedir}/games/emacs'
4060 # Check whether --with-all was given.
4061 if test "${with_all+set}" = set; then :
4062 withval=$with_all; with_features=$withval
4063 else
4064 with_features=yes
4071 # Check whether --with-pop was given.
4072 if test "${with_pop+set}" = set; then :
4073 withval=$with_pop;
4074 else
4075 with_pop=$with_features
4078 if test "$with_pop" = yes; then
4079 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4084 # Check whether --with-kerberos was given.
4085 if test "${with_kerberos+set}" = set; then :
4086 withval=$with_kerberos;
4087 else
4088 with_kerberos=no
4091 if test "$with_kerberos" != no; then
4092 $as_echo "#define KERBEROS 1" >>confdefs.h
4097 # Check whether --with-kerberos5 was given.
4098 if test "${with_kerberos5+set}" = set; then :
4099 withval=$with_kerberos5;
4100 else
4101 with_kerberos5=no
4104 if test "${with_kerberos5}" != no; then
4105 if test "${with_kerberos}" = no; then
4106 with_kerberos=yes
4107 $as_echo "#define KERBEROS 1" >>confdefs.h
4111 $as_echo "#define KERBEROS5 1" >>confdefs.h
4116 # Check whether --with-hesiod was given.
4117 if test "${with_hesiod+set}" = set; then :
4118 withval=$with_hesiod;
4119 else
4120 with_hesiod=no
4123 if test "$with_hesiod" != no; then
4125 $as_echo "#define HESIOD 1" >>confdefs.h
4130 # Check whether --with-mmdf was given.
4131 if test "${with_mmdf+set}" = set; then :
4132 withval=$with_mmdf;
4133 else
4134 with_mmdf=no
4137 if test "$with_mmdf" != no; then
4139 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4144 # Check whether --with-mail-unlink was given.
4145 if test "${with_mail_unlink+set}" = set; then :
4146 withval=$with_mail_unlink;
4147 else
4148 with_mail_unlink=no
4151 if test "$with_mail_unlink" != no; then
4153 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4158 # Check whether --with-mailhost was given.
4159 if test "${with_mailhost+set}" = set; then :
4160 withval=$with_mailhost;
4161 cat >>confdefs.h <<_ACEOF
4162 #define MAILHOST "$withval"
4163 _ACEOF
4169 # Check whether --with-sound was given.
4170 if test "${with_sound+set}" = set; then :
4171 withval=$with_sound; case "${withval}" in
4172 yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
4173 *) as_fn_error "\`--with-sound=$withval' is invalid;
4174 this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
4176 esac
4177 with_sound=$val
4179 else
4180 with_sound=$with_features
4185 # Check whether --with-x-toolkit was given.
4186 if test "${with_x_toolkit+set}" = set; then :
4187 withval=$with_x_toolkit; case "${withval}" in
4188 y | ye | yes ) val=gtk ;;
4189 n | no ) val=no ;;
4190 l | lu | luc | luci | lucid ) val=lucid ;;
4191 a | at | ath | athe | athen | athena ) val=athena ;;
4192 m | mo | mot | moti | motif ) val=motif ;;
4193 g | gt | gtk ) val=gtk ;;
4194 gtk2 ) val=gtk2 ;;
4195 gtk3 ) val=gtk3 ;;
4197 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4198 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4199 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4200 \`athena' and \`lucid' are synonyms." "$LINENO" 5
4202 esac
4203 with_x_toolkit=$val
4209 # Check whether --with-wide-int was given.
4210 if test "${with_wide_int+set}" = set; then :
4211 withval=$with_wide_int;
4212 else
4213 with_wide_int=no
4216 if test "$with_wide_int" = yes; then
4218 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4223 # Check whether --with-xpm was given.
4224 if test "${with_xpm+set}" = set; then :
4225 withval=$with_xpm;
4226 else
4227 with_xpm=$with_features
4231 # Check whether --with-jpeg was given.
4232 if test "${with_jpeg+set}" = set; then :
4233 withval=$with_jpeg;
4234 else
4235 with_jpeg=$with_features
4239 # Check whether --with-tiff was given.
4240 if test "${with_tiff+set}" = set; then :
4241 withval=$with_tiff;
4242 else
4243 with_tiff=$with_features
4247 # Check whether --with-gif was given.
4248 if test "${with_gif+set}" = set; then :
4249 withval=$with_gif;
4250 else
4251 with_gif=$with_features
4255 # Check whether --with-png was given.
4256 if test "${with_png+set}" = set; then :
4257 withval=$with_png;
4258 else
4259 with_png=$with_features
4263 # Check whether --with-rsvg was given.
4264 if test "${with_rsvg+set}" = set; then :
4265 withval=$with_rsvg;
4266 else
4267 with_rsvg=$with_features
4271 # Check whether --with-xml2 was given.
4272 if test "${with_xml2+set}" = set; then :
4273 withval=$with_xml2;
4274 else
4275 with_xml2=$with_features
4279 # Check whether --with-imagemagick was given.
4280 if test "${with_imagemagick+set}" = set; then :
4281 withval=$with_imagemagick;
4282 else
4283 with_imagemagick=$with_features
4288 # Check whether --with-xft was given.
4289 if test "${with_xft+set}" = set; then :
4290 withval=$with_xft;
4291 else
4292 with_xft=$with_features
4296 # Check whether --with-libotf was given.
4297 if test "${with_libotf+set}" = set; then :
4298 withval=$with_libotf;
4299 else
4300 with_libotf=$with_features
4304 # Check whether --with-m17n-flt was given.
4305 if test "${with_m17n_flt+set}" = set; then :
4306 withval=$with_m17n_flt;
4307 else
4308 with_m17n_flt=$with_features
4313 # Check whether --with-toolkit-scroll-bars was given.
4314 if test "${with_toolkit_scroll_bars+set}" = set; then :
4315 withval=$with_toolkit_scroll_bars;
4316 else
4317 with_toolkit_scroll_bars=$with_features
4321 # Check whether --with-xaw3d was given.
4322 if test "${with_xaw3d+set}" = set; then :
4323 withval=$with_xaw3d;
4324 else
4325 with_xaw3d=$with_features
4329 # Check whether --with-xim was given.
4330 if test "${with_xim+set}" = set; then :
4331 withval=$with_xim;
4332 else
4333 with_xim=$with_features
4337 # Check whether --with-ns was given.
4338 if test "${with_ns+set}" = set; then :
4339 withval=$with_ns;
4340 else
4341 with_ns=no
4345 # Check whether --with-w32 was given.
4346 if test "${with_w32+set}" = set; then :
4347 withval=$with_w32;
4348 else
4349 with_w32=no
4354 # Check whether --with-gpm was given.
4355 if test "${with_gpm+set}" = set; then :
4356 withval=$with_gpm;
4357 else
4358 with_gpm=$with_features
4362 # Check whether --with-dbus was given.
4363 if test "${with_dbus+set}" = set; then :
4364 withval=$with_dbus;
4365 else
4366 with_dbus=$with_features
4370 # Check whether --with-gconf was given.
4371 if test "${with_gconf+set}" = set; then :
4372 withval=$with_gconf;
4373 else
4374 with_gconf=$with_features
4378 # Check whether --with-gsettings was given.
4379 if test "${with_gsettings+set}" = set; then :
4380 withval=$with_gsettings;
4381 else
4382 with_gsettings=$with_features
4386 # Check whether --with-selinux was given.
4387 if test "${with_selinux+set}" = set; then :
4388 withval=$with_selinux;
4389 else
4390 with_selinux=$with_features
4394 # Check whether --with-gnutls was given.
4395 if test "${with_gnutls+set}" = set; then :
4396 withval=$with_gnutls;
4397 else
4398 with_gnutls=$with_features
4402 # Check whether --with-zlib was given.
4403 if test "${with_zlib+set}" = set; then :
4404 withval=$with_zlib;
4405 else
4406 with_zlib=$with_features
4411 # Check whether --with-file-notification was given.
4412 if test "${with_file_notification+set}" = set; then :
4413 withval=$with_file_notification; case "${withval}" in
4414 y | ye | yes ) val=yes ;;
4415 n | no ) val=no ;;
4416 g | gf | gfi | gfil | gfile ) val=gfile ;;
4417 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4418 w | w3 | w32 ) val=w32 ;;
4419 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4420 this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
4421 \`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep,
4422 otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5
4424 esac
4425 with_file_notification=$val
4427 else
4428 with_file_notification=$with_features
4432 ## For the times when you want to build Emacs but don't have
4433 ## a suitable makeinfo, and can live without the manuals.
4435 # Check whether --with-makeinfo was given.
4436 if test "${with_makeinfo+set}" = set; then :
4437 withval=$with_makeinfo;
4438 else
4439 with_makeinfo=$with_features
4443 ## Makefile.in needs the cache file name.
4446 ## This is an option because I do not know if all info/man support
4447 ## compressed files, nor how to test if they do so.
4449 # Check whether --with-compress-install was given.
4450 if test "${with_compress_install+set}" = set; then :
4451 withval=$with_compress_install;
4452 else
4453 with_compress_install=$with_features
4458 # Check whether --with-pkg-config-prog was given.
4459 if test "${with_pkg_config_prog+set}" = set; then :
4460 withval=$with_pkg_config_prog;
4463 if test "X${with_pkg_config_prog}" != X; then
4464 if test "${with_pkg_config_prog}" != yes; then
4465 PKG_CONFIG="${with_pkg_config_prog}"
4470 # Check whether --with-gameuser was given.
4471 if test "${with_gameuser+set}" = set; then :
4472 withval=$with_gameuser;
4475 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4476 && gameuser="${with_gameuser}"
4477 test "X$gameuser" = X && gameuser=games
4480 # Check whether --with-gnustep-conf was given.
4481 if test "${with_gnustep_conf+set}" = set; then :
4482 withval=$with_gnustep_conf;
4485 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4486 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4487 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4488 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4490 # Check whether --enable-ns-self-contained was given.
4491 if test "${enable_ns_self_contained+set}" = set; then :
4492 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4493 else
4494 EN_NS_SELF_CONTAINED=yes
4498 # Check whether --enable-locallisppath was given.
4499 if test "${enable_locallisppath+set}" = set; then :
4500 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4501 locallisppath=
4502 elif test "${enableval}" != "yes"; then
4503 locallisppath=${enableval}
4508 # Check whether --enable-checking was given.
4509 if test "${enable_checking+set}" = set; then :
4510 enableval=$enable_checking; ac_checking_flags="${enableval}"
4513 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4514 for check in $ac_checking_flags
4516 case $check in
4517 # these set all the flags to specific states
4518 yes) ac_enable_checking=1 ;;
4519 no) ac_enable_checking= ;
4520 ac_gc_check_stringbytes= ;
4521 ac_gc_check_string_overrun= ;
4522 ac_gc_check_string_free_list= ;
4523 ac_xmalloc_overrun= ;
4524 ac_gc_check_cons_list= ;
4525 ac_glyphs_debug= ;;
4526 all) ac_enable_checking=1 ;
4527 ac_gc_check_stringbytes=1 ;
4528 ac_gc_check_string_overrun=1 ;
4529 ac_gc_check_string_free_list=1 ;
4530 ac_xmalloc_overrun=1 ;
4531 ac_gc_check_cons_list=1 ;
4532 ac_glyphs_debug=1 ;;
4533 # these enable particular checks
4534 stringbytes) ac_gc_check_stringbytes=1 ;;
4535 stringoverrun) ac_gc_check_string_overrun=1 ;;
4536 stringfreelist) ac_gc_check_string_free_list=1 ;;
4537 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4538 conslist) ac_gc_check_cons_list=1 ;;
4539 glyphs) ac_glyphs_debug=1 ;;
4540 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4541 esac
4542 done
4543 IFS="$ac_save_IFS"
4545 if test x$ac_enable_checking != x ; then
4547 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4550 if test x$ac_gc_check_stringbytes != x ; then
4552 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4555 if test x$ac_gc_check_string_overrun != x ; then
4557 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4560 if test x$ac_gc_check_string_free_list != x ; then
4562 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4565 if test x$ac_xmalloc_overrun != x ; then
4567 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4570 if test x$ac_gc_check_cons_list != x ; then
4572 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4575 if test x$ac_glyphs_debug != x ; then
4577 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4581 # Check whether --enable-check-lisp-object-type was given.
4582 if test "${enable_check_lisp_object_type+set}" = set; then :
4583 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4585 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4592 # Check whether --enable-profiling was given.
4593 if test "${enable_profiling+set}" = set; then :
4594 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4597 if test x$ac_enable_profiling != x ; then
4598 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4599 else
4600 PROFILING_CFLAGS=
4604 # Check whether --enable-autodepend was given.
4605 if test "${enable_autodepend+set}" = set; then :
4606 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4607 else
4608 ac_enable_autodepend=yes
4612 # Check whether --enable-gtk-deprecation-warnings was given.
4613 if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4614 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4618 #### When building with MinGW inside the MSYS tree, 'pwd' produces
4619 #### directories relative to the root of the MSYS tree,
4620 #### e.g. '/home/user/foo' instead of '/d/MSYS/home/user/foo'. When
4621 #### such a value of srcdir is written to the top-level Makefile, it
4622 #### gets propagated to src/epaths.h, and that causes temacs to fail,
4623 #### because, being a MinGW program that knows nothing of MSYS root
4624 #### substitution, it cannot find the data directory. "pwd -W"
4625 #### produces Windows-style 'd:/foo/bar' absolute directory names, so
4626 #### we use it here to countermand that lossage.
4627 test "$MSYSTEM" = "MINGW32" && abs_srcdir=`(cd "$abs_srcdir"; pwd -W | sed -e 's,^\([A-Za-z]\):,/\1,')`
4629 ### Canonicalize the configuration name.
4631 # Make sure we can run config.sub.
4632 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4633 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4636 $as_echo_n "checking build system type... " >&6; }
4637 if test "${ac_cv_build+set}" = set; then :
4638 $as_echo_n "(cached) " >&6
4639 else
4640 ac_build_alias=$build_alias
4641 test "x$ac_build_alias" = x &&
4642 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4643 test "x$ac_build_alias" = x &&
4644 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4645 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4646 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4650 $as_echo "$ac_cv_build" >&6; }
4651 case $ac_cv_build in
4652 *-*-*) ;;
4653 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4654 esac
4655 build=$ac_cv_build
4656 ac_save_IFS=$IFS; IFS='-'
4657 set x $ac_cv_build
4658 shift
4659 build_cpu=$1
4660 build_vendor=$2
4661 shift; shift
4662 # Remember, the first character of IFS is used to create $*,
4663 # except with old shells:
4664 build_os=$*
4665 IFS=$ac_save_IFS
4666 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4670 $as_echo_n "checking host system type... " >&6; }
4671 if test "${ac_cv_host+set}" = set; then :
4672 $as_echo_n "(cached) " >&6
4673 else
4674 if test "x$host_alias" = x; then
4675 ac_cv_host=$ac_cv_build
4676 else
4677 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4678 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4683 $as_echo "$ac_cv_host" >&6; }
4684 case $ac_cv_host in
4685 *-*-*) ;;
4686 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4687 esac
4688 host=$ac_cv_host
4689 ac_save_IFS=$IFS; IFS='-'
4690 set x $ac_cv_host
4691 shift
4692 host_cpu=$1
4693 host_vendor=$2
4694 shift; shift
4695 # Remember, the first character of IFS is used to create $*,
4696 # except with old shells:
4697 host_os=$*
4698 IFS=$ac_save_IFS
4699 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4702 canonical=$host
4703 configuration=${host_alias-${build_alias-$host}}
4707 ### If you add support for a new configuration, add code to this
4708 ### switch statement to recognize your configuration name and select
4709 ### the appropriate operating system file.
4711 ### You would hope that you could choose an s/*.h
4712 ### file based on the operating system portion. However, it turns out
4713 ### that each s/*.h file is pretty manufacturer-specific.
4714 ### So we basically have to have a special case for each
4715 ### configuration name.
4717 ### As far as handling version numbers on operating systems is
4718 ### concerned, make sure things will fail in a fixable way. If
4719 ### /etc/MACHINES doesn't say anything about version numbers, be
4720 ### prepared to handle anything reasonably. If version numbers
4721 ### matter, be sure /etc/MACHINES says something about it.
4723 opsys='' unported=no
4724 case "${canonical}" in
4726 ## GNU/Linux and similar ports
4727 *-*-linux* )
4728 opsys=gnu-linux
4731 ## FreeBSD ports
4732 *-*-freebsd* )
4733 opsys=freebsd
4736 ## DragonFly ports
4737 *-*-dragonfly* )
4738 opsys=dragonfly
4741 ## FreeBSD kernel + glibc based userland
4742 *-*-kfreebsd*gnu* )
4743 opsys=gnu-kfreebsd
4746 ## NetBSD ports
4747 *-*-netbsd* )
4748 opsys=netbsd
4751 ## OpenBSD ports
4752 *-*-openbsd* )
4753 opsys=openbsd
4756 ## Apple Darwin / Mac OS X
4757 *-apple-darwin* )
4758 case "${canonical}" in
4759 i[3456]86-* ) ;;
4760 powerpc-* ) ;;
4761 x86_64-* ) ;;
4762 * ) unported=yes ;;
4763 esac
4764 opsys=darwin
4765 ## Use fink packages if available.
4766 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4767 ## if test -d /sw/include && test -d /sw/lib; then
4768 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4769 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4770 ## fi
4773 ## Cygwin ports
4774 *-*-cygwin )
4775 opsys=cygwin
4778 ## HP 9000 series 700 and 800, running HP/UX
4779 hppa*-hp-hpux10.2* )
4780 opsys=hpux10-20
4782 hppa*-hp-hpux1[1-9]* )
4783 opsys=hpux11
4784 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4787 ## IBM machines
4788 rs6000-ibm-aix4.[23]* )
4789 opsys=aix4-2
4791 powerpc-ibm-aix4.[23]* )
4792 opsys=aix4-2
4794 rs6000-ibm-aix[56]* )
4795 opsys=aix4-2
4797 powerpc-ibm-aix[56]* )
4798 opsys=aix4-2
4801 ## Silicon Graphics machines
4802 ## Iris 4D
4803 mips-sgi-irix6.5 )
4804 opsys=irix6-5
4805 # Without defining _LANGUAGE_C, things get masked out in the headers
4806 # so that, for instance, grepping for `free' in stdlib.h fails and
4807 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4808 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4811 ## Suns
4812 *-sun-solaris* \
4813 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4814 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4815 case "${canonical}" in
4816 i[3456]86-*-* ) ;;
4817 amd64-*-*|x86_64-*-*) ;;
4818 sparc* ) ;;
4819 * ) unported=yes ;;
4820 esac
4821 case "${canonical}" in
4822 *-sunos5.6* | *-solaris2.6* )
4823 opsys=sol2-6
4824 RANLIB="ar -ts"
4826 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4827 opsys=sol2-6
4828 emacs_check_sunpro_c=yes
4830 *-sunos5* | *-solaris* )
4831 opsys=sol2-10
4832 emacs_check_sunpro_c=yes
4834 esac
4835 ## Watch out for a compiler that we know will not work.
4836 case "${canonical}" in
4837 *-solaris* | *-sunos5* )
4838 if [ "x$CC" = x/usr/ucb/cc ]; then
4839 ## /usr/ucb/cc doesn't work;
4840 ## we should find some other compiler that does work.
4841 unset CC
4844 *) ;;
4845 esac
4848 ## Intel 386 machines where we don't care about the manufacturer.
4849 i[3456]86-*-* )
4850 case "${canonical}" in
4851 *-darwin* ) opsys=darwin ;;
4852 *-mingw32 )
4853 opsys=mingw32
4854 # MinGW overrides and adds some system headers in nt/inc.
4855 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4857 *-sysv4.2uw* ) opsys=unixware ;;
4858 *-sysv5uw* ) opsys=unixware ;;
4859 *-sysv5OpenUNIX* ) opsys=unixware ;;
4860 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4861 esac
4865 unported=yes
4867 esac
4869 ### If the code above didn't choose an operating system, just choose
4870 ### an operating system based on the configuration name. You really
4871 ### only want to use this when you have no idea what the right
4872 ### operating system is; if you know what operating systems a machine
4873 ### runs, it's cleaner to make it explicit in the case statement
4874 ### above.
4875 if test x"${opsys}" = x; then
4876 case "${canonical}" in
4877 *-gnu* ) opsys=gnu ;;
4879 unported=yes
4881 esac
4886 if test $unported = yes; then
4887 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4888 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4892 #### Choose a compiler.
4894 ac_ext=c
4895 ac_cpp='$CPP $CPPFLAGS'
4896 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4897 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4898 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4899 if test -n "$ac_tool_prefix"; then
4900 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4901 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4903 $as_echo_n "checking for $ac_word... " >&6; }
4904 if test "${ac_cv_prog_CC+set}" = set; then :
4905 $as_echo_n "(cached) " >&6
4906 else
4907 if test -n "$CC"; then
4908 ac_cv_prog_CC="$CC" # Let the user override the test.
4909 else
4910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4911 for as_dir in $PATH
4913 IFS=$as_save_IFS
4914 test -z "$as_dir" && as_dir=.
4915 for ac_exec_ext in '' $ac_executable_extensions; do
4916 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4917 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4919 break 2
4921 done
4922 done
4923 IFS=$as_save_IFS
4927 CC=$ac_cv_prog_CC
4928 if test -n "$CC"; then
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4930 $as_echo "$CC" >&6; }
4931 else
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4933 $as_echo "no" >&6; }
4938 if test -z "$ac_cv_prog_CC"; then
4939 ac_ct_CC=$CC
4940 # Extract the first word of "gcc", so it can be a program name with args.
4941 set dummy gcc; ac_word=$2
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943 $as_echo_n "checking for $ac_word... " >&6; }
4944 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4945 $as_echo_n "(cached) " >&6
4946 else
4947 if test -n "$ac_ct_CC"; then
4948 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4949 else
4950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951 for as_dir in $PATH
4953 IFS=$as_save_IFS
4954 test -z "$as_dir" && as_dir=.
4955 for ac_exec_ext in '' $ac_executable_extensions; do
4956 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4957 ac_cv_prog_ac_ct_CC="gcc"
4958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4959 break 2
4961 done
4962 done
4963 IFS=$as_save_IFS
4967 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4968 if test -n "$ac_ct_CC"; then
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4970 $as_echo "$ac_ct_CC" >&6; }
4971 else
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4973 $as_echo "no" >&6; }
4976 if test "x$ac_ct_CC" = x; then
4977 CC=""
4978 else
4979 case $cross_compiling:$ac_tool_warned in
4980 yes:)
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4982 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4983 ac_tool_warned=yes ;;
4984 esac
4985 CC=$ac_ct_CC
4987 else
4988 CC="$ac_cv_prog_CC"
4991 if test -z "$CC"; then
4992 if test -n "$ac_tool_prefix"; then
4993 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4994 set dummy ${ac_tool_prefix}cc; ac_word=$2
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996 $as_echo_n "checking for $ac_word... " >&6; }
4997 if test "${ac_cv_prog_CC+set}" = set; then :
4998 $as_echo_n "(cached) " >&6
4999 else
5000 if test -n "$CC"; then
5001 ac_cv_prog_CC="$CC" # Let the user override the test.
5002 else
5003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004 for as_dir in $PATH
5006 IFS=$as_save_IFS
5007 test -z "$as_dir" && as_dir=.
5008 for ac_exec_ext in '' $ac_executable_extensions; do
5009 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5010 ac_cv_prog_CC="${ac_tool_prefix}cc"
5011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012 break 2
5014 done
5015 done
5016 IFS=$as_save_IFS
5020 CC=$ac_cv_prog_CC
5021 if test -n "$CC"; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5023 $as_echo "$CC" >&6; }
5024 else
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026 $as_echo "no" >&6; }
5032 if test -z "$CC"; then
5033 # Extract the first word of "cc", so it can be a program name with args.
5034 set dummy cc; ac_word=$2
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5036 $as_echo_n "checking for $ac_word... " >&6; }
5037 if test "${ac_cv_prog_CC+set}" = set; then :
5038 $as_echo_n "(cached) " >&6
5039 else
5040 if test -n "$CC"; then
5041 ac_cv_prog_CC="$CC" # Let the user override the test.
5042 else
5043 ac_prog_rejected=no
5044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045 for as_dir in $PATH
5047 IFS=$as_save_IFS
5048 test -z "$as_dir" && as_dir=.
5049 for ac_exec_ext in '' $ac_executable_extensions; do
5050 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5051 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5052 ac_prog_rejected=yes
5053 continue
5055 ac_cv_prog_CC="cc"
5056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057 break 2
5059 done
5060 done
5061 IFS=$as_save_IFS
5063 if test $ac_prog_rejected = yes; then
5064 # We found a bogon in the path, so make sure we never use it.
5065 set dummy $ac_cv_prog_CC
5066 shift
5067 if test $# != 0; then
5068 # We chose a different compiler from the bogus one.
5069 # However, it has the same basename, so the bogon will be chosen
5070 # first if we set CC to just the basename; use the full file name.
5071 shift
5072 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5077 CC=$ac_cv_prog_CC
5078 if test -n "$CC"; then
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5080 $as_echo "$CC" >&6; }
5081 else
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083 $as_echo "no" >&6; }
5088 if test -z "$CC"; then
5089 if test -n "$ac_tool_prefix"; then
5090 for ac_prog in cl.exe
5092 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5093 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5095 $as_echo_n "checking for $ac_word... " >&6; }
5096 if test "${ac_cv_prog_CC+set}" = set; then :
5097 $as_echo_n "(cached) " >&6
5098 else
5099 if test -n "$CC"; then
5100 ac_cv_prog_CC="$CC" # Let the user override the test.
5101 else
5102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5103 for as_dir in $PATH
5105 IFS=$as_save_IFS
5106 test -z "$as_dir" && as_dir=.
5107 for ac_exec_ext in '' $ac_executable_extensions; do
5108 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5109 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5111 break 2
5113 done
5114 done
5115 IFS=$as_save_IFS
5119 CC=$ac_cv_prog_CC
5120 if test -n "$CC"; then
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5122 $as_echo "$CC" >&6; }
5123 else
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125 $as_echo "no" >&6; }
5129 test -n "$CC" && break
5130 done
5132 if test -z "$CC"; then
5133 ac_ct_CC=$CC
5134 for ac_prog in cl.exe
5136 # Extract the first word of "$ac_prog", so it can be a program name with args.
5137 set dummy $ac_prog; ac_word=$2
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5139 $as_echo_n "checking for $ac_word... " >&6; }
5140 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5141 $as_echo_n "(cached) " >&6
5142 else
5143 if test -n "$ac_ct_CC"; then
5144 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5145 else
5146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147 for as_dir in $PATH
5149 IFS=$as_save_IFS
5150 test -z "$as_dir" && as_dir=.
5151 for ac_exec_ext in '' $ac_executable_extensions; do
5152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5153 ac_cv_prog_ac_ct_CC="$ac_prog"
5154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5155 break 2
5157 done
5158 done
5159 IFS=$as_save_IFS
5163 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5164 if test -n "$ac_ct_CC"; then
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5166 $as_echo "$ac_ct_CC" >&6; }
5167 else
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5169 $as_echo "no" >&6; }
5173 test -n "$ac_ct_CC" && break
5174 done
5176 if test "x$ac_ct_CC" = x; then
5177 CC=""
5178 else
5179 case $cross_compiling:$ac_tool_warned in
5180 yes:)
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5182 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5183 ac_tool_warned=yes ;;
5184 esac
5185 CC=$ac_ct_CC
5192 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5194 as_fn_error "no acceptable C compiler found in \$PATH
5195 See \`config.log' for more details." "$LINENO" 5; }
5197 # Provide some information about the compiler.
5198 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5199 set X $ac_compile
5200 ac_compiler=$2
5201 for ac_option in --version -v -V -qversion; do
5202 { { ac_try="$ac_compiler $ac_option >&5"
5203 case "(($ac_try" in
5204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5205 *) ac_try_echo=$ac_try;;
5206 esac
5207 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5208 $as_echo "$ac_try_echo"; } >&5
5209 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5210 ac_status=$?
5211 if test -s conftest.err; then
5212 sed '10a\
5213 ... rest of stderr output deleted ...
5214 10q' conftest.err >conftest.er1
5215 cat conftest.er1 >&5
5217 rm -f conftest.er1 conftest.err
5218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5219 test $ac_status = 0; }
5220 done
5222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5223 /* end confdefs.h. */
5226 main ()
5230 return 0;
5232 _ACEOF
5233 ac_clean_files_save=$ac_clean_files
5234 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5235 # Try to create an executable without -o first, disregard a.out.
5236 # It will help us diagnose broken compilers, and finding out an intuition
5237 # of exeext.
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5239 $as_echo_n "checking whether the C compiler works... " >&6; }
5240 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5242 # The possible output files:
5243 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5245 ac_rmfiles=
5246 for ac_file in $ac_files
5248 case $ac_file in
5249 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5250 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5251 esac
5252 done
5253 rm -f $ac_rmfiles
5255 if { { ac_try="$ac_link_default"
5256 case "(($ac_try" in
5257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5258 *) ac_try_echo=$ac_try;;
5259 esac
5260 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5261 $as_echo "$ac_try_echo"; } >&5
5262 (eval "$ac_link_default") 2>&5
5263 ac_status=$?
5264 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5265 test $ac_status = 0; }; then :
5266 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5267 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5268 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5269 # so that the user can short-circuit this test for compilers unknown to
5270 # Autoconf.
5271 for ac_file in $ac_files ''
5273 test -f "$ac_file" || continue
5274 case $ac_file in
5275 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5277 [ab].out )
5278 # We found the default executable, but exeext='' is most
5279 # certainly right.
5280 break;;
5281 *.* )
5282 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5283 then :; else
5284 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5286 # We set ac_cv_exeext here because the later test for it is not
5287 # safe: cross compilers may not add the suffix if given an `-o'
5288 # argument, so we may need to know it at that point already.
5289 # Even if this section looks crufty: it has the advantage of
5290 # actually working.
5291 break;;
5293 break;;
5294 esac
5295 done
5296 test "$ac_cv_exeext" = no && ac_cv_exeext=
5298 else
5299 ac_file=''
5301 if test -z "$ac_file"; then :
5302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5303 $as_echo "no" >&6; }
5304 $as_echo "$as_me: failed program was:" >&5
5305 sed 's/^/| /' conftest.$ac_ext >&5
5307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5308 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5309 { as_fn_set_status 77
5310 as_fn_error "C compiler cannot create executables
5311 See \`config.log' for more details." "$LINENO" 5; }; }
5312 else
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5314 $as_echo "yes" >&6; }
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5317 $as_echo_n "checking for C compiler default output file name... " >&6; }
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5319 $as_echo "$ac_file" >&6; }
5320 ac_exeext=$ac_cv_exeext
5322 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5323 ac_clean_files=$ac_clean_files_save
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5325 $as_echo_n "checking for suffix of executables... " >&6; }
5326 if { { ac_try="$ac_link"
5327 case "(($ac_try" in
5328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5329 *) ac_try_echo=$ac_try;;
5330 esac
5331 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5332 $as_echo "$ac_try_echo"; } >&5
5333 (eval "$ac_link") 2>&5
5334 ac_status=$?
5335 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5336 test $ac_status = 0; }; then :
5337 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5338 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5339 # work properly (i.e., refer to `conftest.exe'), while it won't with
5340 # `rm'.
5341 for ac_file in conftest.exe conftest conftest.*; do
5342 test -f "$ac_file" || continue
5343 case $ac_file in
5344 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5345 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5346 break;;
5347 * ) break;;
5348 esac
5349 done
5350 else
5351 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5352 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5353 as_fn_error "cannot compute suffix of executables: cannot compile and link
5354 See \`config.log' for more details." "$LINENO" 5; }
5356 rm -f conftest conftest$ac_cv_exeext
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5358 $as_echo "$ac_cv_exeext" >&6; }
5360 rm -f conftest.$ac_ext
5361 EXEEXT=$ac_cv_exeext
5362 ac_exeext=$EXEEXT
5363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5364 /* end confdefs.h. */
5365 #include <stdio.h>
5367 main ()
5369 FILE *f = fopen ("conftest.out", "w");
5370 return ferror (f) || fclose (f) != 0;
5373 return 0;
5375 _ACEOF
5376 ac_clean_files="$ac_clean_files conftest.out"
5377 # Check that the compiler produces executables we can run. If not, either
5378 # the compiler is broken, or we cross compile.
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5380 $as_echo_n "checking whether we are cross compiling... " >&6; }
5381 if test "$cross_compiling" != yes; then
5382 { { ac_try="$ac_link"
5383 case "(($ac_try" in
5384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5385 *) ac_try_echo=$ac_try;;
5386 esac
5387 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5388 $as_echo "$ac_try_echo"; } >&5
5389 (eval "$ac_link") 2>&5
5390 ac_status=$?
5391 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5392 test $ac_status = 0; }
5393 if { ac_try='./conftest$ac_cv_exeext'
5394 { { case "(($ac_try" in
5395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5396 *) ac_try_echo=$ac_try;;
5397 esac
5398 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5399 $as_echo "$ac_try_echo"; } >&5
5400 (eval "$ac_try") 2>&5
5401 ac_status=$?
5402 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5403 test $ac_status = 0; }; }; then
5404 cross_compiling=no
5405 else
5406 if test "$cross_compiling" = maybe; then
5407 cross_compiling=yes
5408 else
5409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5410 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5411 as_fn_error "cannot run C compiled programs.
5412 If you meant to cross compile, use \`--host'.
5413 See \`config.log' for more details." "$LINENO" 5; }
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5418 $as_echo "$cross_compiling" >&6; }
5420 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5421 ac_clean_files=$ac_clean_files_save
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5423 $as_echo_n "checking for suffix of object files... " >&6; }
5424 if test "${ac_cv_objext+set}" = set; then :
5425 $as_echo_n "(cached) " >&6
5426 else
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428 /* end confdefs.h. */
5431 main ()
5435 return 0;
5437 _ACEOF
5438 rm -f conftest.o conftest.obj
5439 if { { ac_try="$ac_compile"
5440 case "(($ac_try" in
5441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5442 *) ac_try_echo=$ac_try;;
5443 esac
5444 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5445 $as_echo "$ac_try_echo"; } >&5
5446 (eval "$ac_compile") 2>&5
5447 ac_status=$?
5448 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5449 test $ac_status = 0; }; then :
5450 for ac_file in conftest.o conftest.obj conftest.*; do
5451 test -f "$ac_file" || continue;
5452 case $ac_file in
5453 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5454 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5455 break;;
5456 esac
5457 done
5458 else
5459 $as_echo "$as_me: failed program was:" >&5
5460 sed 's/^/| /' conftest.$ac_ext >&5
5462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5463 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5464 as_fn_error "cannot compute suffix of object files: cannot compile
5465 See \`config.log' for more details." "$LINENO" 5; }
5467 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5470 $as_echo "$ac_cv_objext" >&6; }
5471 OBJEXT=$ac_cv_objext
5472 ac_objext=$OBJEXT
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5474 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5475 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5476 $as_echo_n "(cached) " >&6
5477 else
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479 /* end confdefs.h. */
5482 main ()
5484 #ifndef __GNUC__
5485 choke me
5486 #endif
5489 return 0;
5491 _ACEOF
5492 if ac_fn_c_try_compile "$LINENO"; then :
5493 ac_compiler_gnu=yes
5494 else
5495 ac_compiler_gnu=no
5497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5498 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5502 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5503 if test $ac_compiler_gnu = yes; then
5504 GCC=yes
5505 else
5506 GCC=
5508 ac_test_CFLAGS=${CFLAGS+set}
5509 ac_save_CFLAGS=$CFLAGS
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5511 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5512 if test "${ac_cv_prog_cc_g+set}" = set; then :
5513 $as_echo_n "(cached) " >&6
5514 else
5515 ac_save_c_werror_flag=$ac_c_werror_flag
5516 ac_c_werror_flag=yes
5517 ac_cv_prog_cc_g=no
5518 CFLAGS="-g"
5519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5520 /* end confdefs.h. */
5523 main ()
5527 return 0;
5529 _ACEOF
5530 if ac_fn_c_try_compile "$LINENO"; then :
5531 ac_cv_prog_cc_g=yes
5532 else
5533 CFLAGS=""
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535 /* end confdefs.h. */
5538 main ()
5542 return 0;
5544 _ACEOF
5545 if ac_fn_c_try_compile "$LINENO"; then :
5547 else
5548 ac_c_werror_flag=$ac_save_c_werror_flag
5549 CFLAGS="-g"
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551 /* end confdefs.h. */
5554 main ()
5558 return 0;
5560 _ACEOF
5561 if ac_fn_c_try_compile "$LINENO"; then :
5562 ac_cv_prog_cc_g=yes
5564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5569 ac_c_werror_flag=$ac_save_c_werror_flag
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5572 $as_echo "$ac_cv_prog_cc_g" >&6; }
5573 if test "$ac_test_CFLAGS" = set; then
5574 CFLAGS=$ac_save_CFLAGS
5575 elif test $ac_cv_prog_cc_g = yes; then
5576 if test "$GCC" = yes; then
5577 CFLAGS="-g -O2"
5578 else
5579 CFLAGS="-g"
5581 else
5582 if test "$GCC" = yes; then
5583 CFLAGS="-O2"
5584 else
5585 CFLAGS=
5588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5589 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5590 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5591 $as_echo_n "(cached) " >&6
5592 else
5593 ac_cv_prog_cc_c89=no
5594 ac_save_CC=$CC
5595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596 /* end confdefs.h. */
5597 #include <stdarg.h>
5598 #include <stdio.h>
5599 #include <sys/types.h>
5600 #include <sys/stat.h>
5601 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5602 struct buf { int x; };
5603 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5604 static char *e (p, i)
5605 char **p;
5606 int i;
5608 return p[i];
5610 static char *f (char * (*g) (char **, int), char **p, ...)
5612 char *s;
5613 va_list v;
5614 va_start (v,p);
5615 s = g (p, va_arg (v,int));
5616 va_end (v);
5617 return s;
5620 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5621 function prototypes and stuff, but not '\xHH' hex character constants.
5622 These don't provoke an error unfortunately, instead are silently treated
5623 as 'x'. The following induces an error, until -std is added to get
5624 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5625 array size at least. It's necessary to write '\x00'==0 to get something
5626 that's true only with -std. */
5627 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5629 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5630 inside strings and character constants. */
5631 #define FOO(x) 'x'
5632 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5634 int test (int i, double x);
5635 struct s1 {int (*f) (int a);};
5636 struct s2 {int (*f) (double a);};
5637 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5638 int argc;
5639 char **argv;
5641 main ()
5643 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5645 return 0;
5647 _ACEOF
5648 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5649 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5651 CC="$ac_save_CC $ac_arg"
5652 if ac_fn_c_try_compile "$LINENO"; then :
5653 ac_cv_prog_cc_c89=$ac_arg
5655 rm -f core conftest.err conftest.$ac_objext
5656 test "x$ac_cv_prog_cc_c89" != "xno" && break
5657 done
5658 rm -f conftest.$ac_ext
5659 CC=$ac_save_CC
5662 # AC_CACHE_VAL
5663 case "x$ac_cv_prog_cc_c89" in
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5666 $as_echo "none needed" >&6; } ;;
5667 xno)
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5669 $as_echo "unsupported" >&6; } ;;
5671 CC="$CC $ac_cv_prog_cc_c89"
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5673 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5674 esac
5675 if test "x$ac_cv_prog_cc_c89" != xno; then :
5679 ac_ext=c
5680 ac_cpp='$CPP $CPPFLAGS'
5681 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5682 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5683 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5684 DEPDIR="${am__leading_dot}deps"
5686 ac_config_commands="$ac_config_commands depfiles"
5689 am_make=${MAKE-make}
5690 cat > confinc << 'END'
5691 am__doit:
5692 @echo this is the am__doit target
5693 .PHONY: am__doit
5695 # If we don't find an include directive, just comment out the code.
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5697 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5698 am__include="#"
5699 am__quote=
5700 _am_result=none
5701 # First try GNU make style include.
5702 echo "include confinc" > confmf
5703 # Ignore all kinds of additional output from `make'.
5704 case `$am_make -s -f confmf 2> /dev/null` in #(
5705 *the\ am__doit\ target*)
5706 am__include=include
5707 am__quote=
5708 _am_result=GNU
5710 esac
5711 # Now try BSD make style include.
5712 if test "$am__include" = "#"; then
5713 echo '.include "confinc"' > confmf
5714 case `$am_make -s -f confmf 2> /dev/null` in #(
5715 *the\ am__doit\ target*)
5716 am__include=.include
5717 am__quote="\""
5718 _am_result=BSD
5720 esac
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5725 $as_echo "$_am_result" >&6; }
5726 rm -f confinc confmf
5728 # Check whether --enable-dependency-tracking was given.
5729 if test "${enable_dependency_tracking+set}" = set; then :
5730 enableval=$enable_dependency_tracking;
5733 if test "x$enable_dependency_tracking" != xno; then
5734 am_depcomp="$ac_aux_dir/depcomp"
5735 AMDEPBACKSLASH='\'
5737 if test "x$enable_dependency_tracking" != xno; then
5738 AMDEP_TRUE=
5739 AMDEP_FALSE='#'
5740 else
5741 AMDEP_TRUE='#'
5742 AMDEP_FALSE=
5747 depcc="$CC" am_compiler_list=
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5750 $as_echo_n "checking dependency style of $depcc... " >&6; }
5751 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5752 $as_echo_n "(cached) " >&6
5753 else
5754 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5755 # We make a subdir and do the tests there. Otherwise we can end up
5756 # making bogus files that we don't know about and never remove. For
5757 # instance it was reported that on HP-UX the gcc test will end up
5758 # making a dummy file named `D' -- because `-MD' means `put the output
5759 # in D'.
5760 mkdir conftest.dir
5761 # Copy depcomp to subdir because otherwise we won't find it if we're
5762 # using a relative directory.
5763 cp "$am_depcomp" conftest.dir
5764 cd conftest.dir
5765 # We will build objects and dependencies in a subdirectory because
5766 # it helps to detect inapplicable dependency modes. For instance
5767 # both Tru64's cc and ICC support -MD to output dependencies as a
5768 # side effect of compilation, but ICC will put the dependencies in
5769 # the current directory while Tru64 will put them in the object
5770 # directory.
5771 mkdir sub
5773 am_cv_CC_dependencies_compiler_type=none
5774 if test "$am_compiler_list" = ""; then
5775 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5777 am__universal=false
5778 case " $depcc " in #(
5779 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5780 esac
5782 for depmode in $am_compiler_list; do
5783 # Setup a source with many dependencies, because some compilers
5784 # like to wrap large dependency lists on column 80 (with \), and
5785 # we should not choose a depcomp mode which is confused by this.
5787 # We need to recreate these files for each test, as the compiler may
5788 # overwrite some of them when testing with obscure command lines.
5789 # This happens at least with the AIX C compiler.
5790 : > sub/conftest.c
5791 for i in 1 2 3 4 5 6; do
5792 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5793 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5794 # Solaris 8's {/usr,}/bin/sh.
5795 touch sub/conftst$i.h
5796 done
5797 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5799 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5800 # mode. It turns out that the SunPro C++ compiler does not properly
5801 # handle `-M -o', and we need to detect this. Also, some Intel
5802 # versions had trouble with output in subdirs
5803 am__obj=sub/conftest.${OBJEXT-o}
5804 am__minus_obj="-o $am__obj"
5805 case $depmode in
5806 gcc)
5807 # This depmode causes a compiler race in universal mode.
5808 test "$am__universal" = false || continue
5810 nosideeffect)
5811 # after this tag, mechanisms are not by side-effect, so they'll
5812 # only be used when explicitly requested
5813 if test "x$enable_dependency_tracking" = xyes; then
5814 continue
5815 else
5816 break
5819 msvisualcpp | msvcmsys)
5820 # This compiler won't grok `-c -o', but also, the minuso test has
5821 # not run yet. These depmodes are late enough in the game, and
5822 # so weak that their functioning should not be impacted.
5823 am__obj=conftest.${OBJEXT-o}
5824 am__minus_obj=
5826 none) break ;;
5827 esac
5828 if depmode=$depmode \
5829 source=sub/conftest.c object=$am__obj \
5830 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5831 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5832 >/dev/null 2>conftest.err &&
5833 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5834 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5835 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5836 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5837 # icc doesn't choke on unknown options, it will just issue warnings
5838 # or remarks (even with -Werror). So we grep stderr for any message
5839 # that says an option was ignored or not supported.
5840 # When given -MP, icc 7.0 and 7.1 complain thusly:
5841 # icc: Command line warning: ignoring option '-M'; no argument required
5842 # The diagnosis changed in icc 8.0:
5843 # icc: Command line remark: option '-MP' not supported
5844 if (grep 'ignoring option' conftest.err ||
5845 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5846 am_cv_CC_dependencies_compiler_type=$depmode
5847 break
5850 done
5852 cd ..
5853 rm -rf conftest.dir
5854 else
5855 am_cv_CC_dependencies_compiler_type=none
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5860 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5861 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5864 test "x$enable_dependency_tracking" != xno \
5865 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5866 am__fastdepCC_TRUE=
5867 am__fastdepCC_FALSE='#'
5868 else
5869 am__fastdepCC_TRUE='#'
5870 am__fastdepCC_FALSE=
5874 if test "x$CC" != xcc; then
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5876 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5877 else
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5879 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5881 set dummy $CC; ac_cc=`$as_echo "$2" |
5882 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5883 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5884 $as_echo_n "(cached) " >&6
5885 else
5886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5887 /* end confdefs.h. */
5890 main ()
5894 return 0;
5896 _ACEOF
5897 # Make sure it works both with $CC and with simple cc.
5898 # We do the test twice because some compilers refuse to overwrite an
5899 # existing .o file with -o, though they will create one.
5900 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5901 rm -f conftest2.*
5902 if { { case "(($ac_try" in
5903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5904 *) ac_try_echo=$ac_try;;
5905 esac
5906 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5907 $as_echo "$ac_try_echo"; } >&5
5908 (eval "$ac_try") 2>&5
5909 ac_status=$?
5910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5911 test $ac_status = 0; } &&
5912 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5914 *) ac_try_echo=$ac_try;;
5915 esac
5916 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5917 $as_echo "$ac_try_echo"; } >&5
5918 (eval "$ac_try") 2>&5
5919 ac_status=$?
5920 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5921 test $ac_status = 0; };
5922 then
5923 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5924 if test "x$CC" != xcc; then
5925 # Test first that cc exists at all.
5926 if { ac_try='cc -c conftest.$ac_ext >&5'
5927 { { case "(($ac_try" in
5928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5929 *) ac_try_echo=$ac_try;;
5930 esac
5931 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5932 $as_echo "$ac_try_echo"; } >&5
5933 (eval "$ac_try") 2>&5
5934 ac_status=$?
5935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5936 test $ac_status = 0; }; }; then
5937 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5938 rm -f conftest2.*
5939 if { { case "(($ac_try" in
5940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5941 *) ac_try_echo=$ac_try;;
5942 esac
5943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5944 $as_echo "$ac_try_echo"; } >&5
5945 (eval "$ac_try") 2>&5
5946 ac_status=$?
5947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5948 test $ac_status = 0; } &&
5949 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5951 *) ac_try_echo=$ac_try;;
5952 esac
5953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5954 $as_echo "$ac_try_echo"; } >&5
5955 (eval "$ac_try") 2>&5
5956 ac_status=$?
5957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5958 test $ac_status = 0; };
5959 then
5960 # cc works too.
5962 else
5963 # cc exists but doesn't like -o.
5964 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5968 else
5969 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5971 rm -f core conftest*
5974 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5976 $as_echo "yes" >&6; }
5977 else
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979 $as_echo "no" >&6; }
5981 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5985 # FIXME: we rely on the cache variable name because
5986 # there is no other way.
5987 set dummy $CC
5988 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5989 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5990 if test "$am_t" != yes; then
5991 # Losing compiler, so override with the script.
5992 # FIXME: It is wrong to rewrite CC.
5993 # But if we don't then we get into trouble of one sort or another.
5994 # A longer-term fix would be to have automake use am__CC in this case,
5995 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5996 CC="$am_aux_dir/compile $CC"
6001 if test x$GCC = xyes; then
6002 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
6003 else
6004 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6007 if test "x$opsys" = "xmingw32"; then
6008 BUILDING_FOR_WINDOWSNT_TRUE=
6009 BUILDING_FOR_WINDOWSNT_FALSE='#'
6010 else
6011 BUILDING_FOR_WINDOWSNT_TRUE='#'
6012 BUILDING_FOR_WINDOWSNT_FALSE=
6016 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
6017 # as we don't use them.
6019 # Avoid gnulib's threadlib module, as we do threads our own way.
6022 # Initialize gnulib right after choosing the compiler.
6024 ac_ext=c
6025 ac_cpp='$CPP $CPPFLAGS'
6026 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6027 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6030 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6031 # On Suns, sometimes $CPP names a directory.
6032 if test -n "$CPP" && test -d "$CPP"; then
6033 CPP=
6035 if test -z "$CPP"; then
6036 if test "${ac_cv_prog_CPP+set}" = set; then :
6037 $as_echo_n "(cached) " >&6
6038 else
6039 # Double quotes because CPP needs to be expanded
6040 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6042 ac_preproc_ok=false
6043 for ac_c_preproc_warn_flag in '' yes
6045 # Use a header file that comes with gcc, so configuring glibc
6046 # with a fresh cross-compiler works.
6047 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6048 # <limits.h> exists even on freestanding compilers.
6049 # On the NeXT, cc -E runs the code through the compiler's parser,
6050 # not just through cpp. "Syntax error" is here to catch this case.
6051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6052 /* end confdefs.h. */
6053 #ifdef __STDC__
6054 # include <limits.h>
6055 #else
6056 # include <assert.h>
6057 #endif
6058 Syntax error
6059 _ACEOF
6060 if ac_fn_c_try_cpp "$LINENO"; then :
6062 else
6063 # Broken: fails on valid input.
6064 continue
6066 rm -f conftest.err conftest.$ac_ext
6068 # OK, works on sane cases. Now check whether nonexistent headers
6069 # can be detected and how.
6070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6071 /* end confdefs.h. */
6072 #include <ac_nonexistent.h>
6073 _ACEOF
6074 if ac_fn_c_try_cpp "$LINENO"; then :
6075 # Broken: success on invalid input.
6076 continue
6077 else
6078 # Passes both tests.
6079 ac_preproc_ok=:
6080 break
6082 rm -f conftest.err conftest.$ac_ext
6084 done
6085 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6086 rm -f conftest.err conftest.$ac_ext
6087 if $ac_preproc_ok; then :
6088 break
6091 done
6092 ac_cv_prog_CPP=$CPP
6095 CPP=$ac_cv_prog_CPP
6096 else
6097 ac_cv_prog_CPP=$CPP
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6100 $as_echo "$CPP" >&6; }
6101 ac_preproc_ok=false
6102 for ac_c_preproc_warn_flag in '' yes
6104 # Use a header file that comes with gcc, so configuring glibc
6105 # with a fresh cross-compiler works.
6106 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6107 # <limits.h> exists even on freestanding compilers.
6108 # On the NeXT, cc -E runs the code through the compiler's parser,
6109 # not just through cpp. "Syntax error" is here to catch this case.
6110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6111 /* end confdefs.h. */
6112 #ifdef __STDC__
6113 # include <limits.h>
6114 #else
6115 # include <assert.h>
6116 #endif
6117 Syntax error
6118 _ACEOF
6119 if ac_fn_c_try_cpp "$LINENO"; then :
6121 else
6122 # Broken: fails on valid input.
6123 continue
6125 rm -f conftest.err conftest.$ac_ext
6127 # OK, works on sane cases. Now check whether nonexistent headers
6128 # can be detected and how.
6129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6130 /* end confdefs.h. */
6131 #include <ac_nonexistent.h>
6132 _ACEOF
6133 if ac_fn_c_try_cpp "$LINENO"; then :
6134 # Broken: success on invalid input.
6135 continue
6136 else
6137 # Passes both tests.
6138 ac_preproc_ok=:
6139 break
6141 rm -f conftest.err conftest.$ac_ext
6143 done
6144 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6145 rm -f conftest.err conftest.$ac_ext
6146 if $ac_preproc_ok; then :
6148 else
6149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6150 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6151 as_fn_error "C preprocessor \"$CPP\" fails sanity check
6152 See \`config.log' for more details." "$LINENO" 5; }
6155 ac_ext=c
6156 ac_cpp='$CPP $CPPFLAGS'
6157 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6158 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6159 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6163 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6164 if test "${ac_cv_path_GREP+set}" = set; then :
6165 $as_echo_n "(cached) " >&6
6166 else
6167 if test -z "$GREP"; then
6168 ac_path_GREP_found=false
6169 # Loop through the user's path and test for each of PROGNAME-LIST
6170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6173 IFS=$as_save_IFS
6174 test -z "$as_dir" && as_dir=.
6175 for ac_prog in grep ggrep; do
6176 for ac_exec_ext in '' $ac_executable_extensions; do
6177 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6178 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6179 # Check for GNU ac_path_GREP and select it if it is found.
6180 # Check for GNU $ac_path_GREP
6181 case `"$ac_path_GREP" --version 2>&1` in
6182 *GNU*)
6183 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6185 ac_count=0
6186 $as_echo_n 0123456789 >"conftest.in"
6187 while :
6189 cat "conftest.in" "conftest.in" >"conftest.tmp"
6190 mv "conftest.tmp" "conftest.in"
6191 cp "conftest.in" "conftest.nl"
6192 $as_echo 'GREP' >> "conftest.nl"
6193 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6194 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6195 as_fn_arith $ac_count + 1 && ac_count=$as_val
6196 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6197 # Best one so far, save it but keep looking for a better one
6198 ac_cv_path_GREP="$ac_path_GREP"
6199 ac_path_GREP_max=$ac_count
6201 # 10*(2^10) chars as input seems more than enough
6202 test $ac_count -gt 10 && break
6203 done
6204 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6205 esac
6207 $ac_path_GREP_found && break 3
6208 done
6209 done
6210 done
6211 IFS=$as_save_IFS
6212 if test -z "$ac_cv_path_GREP"; then
6213 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6215 else
6216 ac_cv_path_GREP=$GREP
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6221 $as_echo "$ac_cv_path_GREP" >&6; }
6222 GREP="$ac_cv_path_GREP"
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6226 $as_echo_n "checking for egrep... " >&6; }
6227 if test "${ac_cv_path_EGREP+set}" = set; then :
6228 $as_echo_n "(cached) " >&6
6229 else
6230 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6231 then ac_cv_path_EGREP="$GREP -E"
6232 else
6233 if test -z "$EGREP"; then
6234 ac_path_EGREP_found=false
6235 # Loop through the user's path and test for each of PROGNAME-LIST
6236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6239 IFS=$as_save_IFS
6240 test -z "$as_dir" && as_dir=.
6241 for ac_prog in egrep; do
6242 for ac_exec_ext in '' $ac_executable_extensions; do
6243 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6244 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6245 # Check for GNU ac_path_EGREP and select it if it is found.
6246 # Check for GNU $ac_path_EGREP
6247 case `"$ac_path_EGREP" --version 2>&1` in
6248 *GNU*)
6249 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6251 ac_count=0
6252 $as_echo_n 0123456789 >"conftest.in"
6253 while :
6255 cat "conftest.in" "conftest.in" >"conftest.tmp"
6256 mv "conftest.tmp" "conftest.in"
6257 cp "conftest.in" "conftest.nl"
6258 $as_echo 'EGREP' >> "conftest.nl"
6259 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6260 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6261 as_fn_arith $ac_count + 1 && ac_count=$as_val
6262 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6263 # Best one so far, save it but keep looking for a better one
6264 ac_cv_path_EGREP="$ac_path_EGREP"
6265 ac_path_EGREP_max=$ac_count
6267 # 10*(2^10) chars as input seems more than enough
6268 test $ac_count -gt 10 && break
6269 done
6270 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6271 esac
6273 $ac_path_EGREP_found && break 3
6274 done
6275 done
6276 done
6277 IFS=$as_save_IFS
6278 if test -z "$ac_cv_path_EGREP"; then
6279 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6281 else
6282 ac_cv_path_EGREP=$EGREP
6287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6288 $as_echo "$ac_cv_path_EGREP" >&6; }
6289 EGREP="$ac_cv_path_EGREP"
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6295 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6296 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6297 $as_echo_n "(cached) " >&6
6298 else
6300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6301 /* end confdefs.h. */
6303 #ifdef __ACK__
6304 Amsterdam
6305 #endif
6307 _ACEOF
6308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6309 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6310 gl_cv_c_amsterdam_compiler=yes
6311 else
6312 gl_cv_c_amsterdam_compiler=no
6314 rm -f conftest*
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6319 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6320 if test -z "$AR"; then
6321 if test $gl_cv_c_amsterdam_compiler = yes; then
6322 AR='cc -c.a'
6323 if test -z "$ARFLAGS"; then
6324 ARFLAGS='-o'
6326 else
6327 if test -n "$ac_tool_prefix"; then
6328 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6329 set dummy ${ac_tool_prefix}ar; ac_word=$2
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6331 $as_echo_n "checking for $ac_word... " >&6; }
6332 if test "${ac_cv_prog_AR+set}" = set; then :
6333 $as_echo_n "(cached) " >&6
6334 else
6335 if test -n "$AR"; then
6336 ac_cv_prog_AR="$AR" # Let the user override the test.
6337 else
6338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339 for as_dir in $PATH
6341 IFS=$as_save_IFS
6342 test -z "$as_dir" && as_dir=.
6343 for ac_exec_ext in '' $ac_executable_extensions; do
6344 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6345 ac_cv_prog_AR="${ac_tool_prefix}ar"
6346 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6347 break 2
6349 done
6350 done
6351 IFS=$as_save_IFS
6355 AR=$ac_cv_prog_AR
6356 if test -n "$AR"; then
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6358 $as_echo "$AR" >&6; }
6359 else
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6361 $as_echo "no" >&6; }
6366 if test -z "$ac_cv_prog_AR"; then
6367 ac_ct_AR=$AR
6368 # Extract the first word of "ar", so it can be a program name with args.
6369 set dummy ar; ac_word=$2
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6371 $as_echo_n "checking for $ac_word... " >&6; }
6372 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6373 $as_echo_n "(cached) " >&6
6374 else
6375 if test -n "$ac_ct_AR"; then
6376 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6377 else
6378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6379 for as_dir in $PATH
6381 IFS=$as_save_IFS
6382 test -z "$as_dir" && as_dir=.
6383 for ac_exec_ext in '' $ac_executable_extensions; do
6384 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6385 ac_cv_prog_ac_ct_AR="ar"
6386 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6387 break 2
6389 done
6390 done
6391 IFS=$as_save_IFS
6395 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6396 if test -n "$ac_ct_AR"; then
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6398 $as_echo "$ac_ct_AR" >&6; }
6399 else
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6401 $as_echo "no" >&6; }
6404 if test "x$ac_ct_AR" = x; then
6405 AR="ar"
6406 else
6407 case $cross_compiling:$ac_tool_warned in
6408 yes:)
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6410 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6411 ac_tool_warned=yes ;;
6412 esac
6413 AR=$ac_ct_AR
6415 else
6416 AR="$ac_cv_prog_AR"
6419 if test -z "$ARFLAGS"; then
6420 ARFLAGS='cru'
6423 else
6424 if test -z "$ARFLAGS"; then
6425 ARFLAGS='cru'
6430 if test -z "$RANLIB"; then
6431 if test $gl_cv_c_amsterdam_compiler = yes; then
6432 RANLIB=':'
6433 else
6434 if test -n "$ac_tool_prefix"; then
6435 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6436 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6438 $as_echo_n "checking for $ac_word... " >&6; }
6439 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6440 $as_echo_n "(cached) " >&6
6441 else
6442 if test -n "$RANLIB"; then
6443 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6444 else
6445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6446 for as_dir in $PATH
6448 IFS=$as_save_IFS
6449 test -z "$as_dir" && as_dir=.
6450 for ac_exec_ext in '' $ac_executable_extensions; do
6451 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6452 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6454 break 2
6456 done
6457 done
6458 IFS=$as_save_IFS
6462 RANLIB=$ac_cv_prog_RANLIB
6463 if test -n "$RANLIB"; then
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6465 $as_echo "$RANLIB" >&6; }
6466 else
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468 $as_echo "no" >&6; }
6473 if test -z "$ac_cv_prog_RANLIB"; then
6474 ac_ct_RANLIB=$RANLIB
6475 # Extract the first word of "ranlib", so it can be a program name with args.
6476 set dummy ranlib; ac_word=$2
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478 $as_echo_n "checking for $ac_word... " >&6; }
6479 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6480 $as_echo_n "(cached) " >&6
6481 else
6482 if test -n "$ac_ct_RANLIB"; then
6483 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6484 else
6485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486 for as_dir in $PATH
6488 IFS=$as_save_IFS
6489 test -z "$as_dir" && as_dir=.
6490 for ac_exec_ext in '' $ac_executable_extensions; do
6491 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6492 ac_cv_prog_ac_ct_RANLIB="ranlib"
6493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494 break 2
6496 done
6497 done
6498 IFS=$as_save_IFS
6502 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6503 if test -n "$ac_ct_RANLIB"; then
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6505 $as_echo "$ac_ct_RANLIB" >&6; }
6506 else
6507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508 $as_echo "no" >&6; }
6511 if test "x$ac_ct_RANLIB" = x; then
6512 RANLIB=":"
6513 else
6514 case $cross_compiling:$ac_tool_warned in
6515 yes:)
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6517 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6518 ac_tool_warned=yes ;;
6519 esac
6520 RANLIB=$ac_ct_RANLIB
6522 else
6523 RANLIB="$ac_cv_prog_RANLIB"
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6531 $as_echo_n "checking for ANSI C header files... " >&6; }
6532 if test "${ac_cv_header_stdc+set}" = set; then :
6533 $as_echo_n "(cached) " >&6
6534 else
6535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6536 /* end confdefs.h. */
6537 #include <stdlib.h>
6538 #include <stdarg.h>
6539 #include <string.h>
6540 #include <float.h>
6543 main ()
6547 return 0;
6549 _ACEOF
6550 if ac_fn_c_try_compile "$LINENO"; then :
6551 ac_cv_header_stdc=yes
6552 else
6553 ac_cv_header_stdc=no
6555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6557 if test $ac_cv_header_stdc = yes; then
6558 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6560 /* end confdefs.h. */
6561 #include <string.h>
6563 _ACEOF
6564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6565 $EGREP "memchr" >/dev/null 2>&1; then :
6567 else
6568 ac_cv_header_stdc=no
6570 rm -f conftest*
6574 if test $ac_cv_header_stdc = yes; then
6575 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6577 /* end confdefs.h. */
6578 #include <stdlib.h>
6580 _ACEOF
6581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6582 $EGREP "free" >/dev/null 2>&1; then :
6584 else
6585 ac_cv_header_stdc=no
6587 rm -f conftest*
6591 if test $ac_cv_header_stdc = yes; then
6592 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6593 if test "$cross_compiling" = yes; then :
6595 else
6596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6597 /* end confdefs.h. */
6598 #include <ctype.h>
6599 #include <stdlib.h>
6600 #if ((' ' & 0x0FF) == 0x020)
6601 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6602 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6603 #else
6604 # define ISLOWER(c) \
6605 (('a' <= (c) && (c) <= 'i') \
6606 || ('j' <= (c) && (c) <= 'r') \
6607 || ('s' <= (c) && (c) <= 'z'))
6608 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6609 #endif
6611 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6613 main ()
6615 int i;
6616 for (i = 0; i < 256; i++)
6617 if (XOR (islower (i), ISLOWER (i))
6618 || toupper (i) != TOUPPER (i))
6619 return 2;
6620 return 0;
6622 _ACEOF
6623 if ac_fn_c_try_run "$LINENO"; then :
6625 else
6626 ac_cv_header_stdc=no
6628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6629 conftest.$ac_objext conftest.beam conftest.$ac_ext
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6635 $as_echo "$ac_cv_header_stdc" >&6; }
6636 if test $ac_cv_header_stdc = yes; then
6638 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6642 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6643 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6644 inttypes.h stdint.h unistd.h
6645 do :
6646 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6647 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6649 eval as_val=\$$as_ac_Header
6650 if test "x$as_val" = x""yes; then :
6651 cat >>confdefs.h <<_ACEOF
6652 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6653 _ACEOF
6657 done
6661 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6662 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6663 MINIX=yes
6664 else
6665 MINIX=
6669 if test "$MINIX" = yes; then
6671 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6674 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6677 $as_echo "#define _MINIX 1" >>confdefs.h
6680 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6686 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6687 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6688 $as_echo_n "(cached) " >&6
6689 else
6690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6691 /* end confdefs.h. */
6693 # define __EXTENSIONS__ 1
6694 $ac_includes_default
6696 main ()
6700 return 0;
6702 _ACEOF
6703 if ac_fn_c_try_compile "$LINENO"; then :
6704 ac_cv_safe_to_define___extensions__=yes
6705 else
6706 ac_cv_safe_to_define___extensions__=no
6708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6711 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6712 test $ac_cv_safe_to_define___extensions__ = yes &&
6713 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6715 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6717 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6719 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6721 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6723 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6726 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6727 if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6728 $as_echo_n "(cached) " >&6
6729 else
6730 ac_cv_should_define__xopen_source=no
6731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6732 /* end confdefs.h. */
6734 #include <wchar.h>
6735 mbstate_t x;
6737 main ()
6741 return 0;
6743 _ACEOF
6744 if ac_fn_c_try_compile "$LINENO"; then :
6746 else
6747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6748 /* end confdefs.h. */
6750 #define _XOPEN_SOURCE 500
6751 #include <wchar.h>
6752 mbstate_t x;
6754 main ()
6758 return 0;
6760 _ACEOF
6761 if ac_fn_c_try_compile "$LINENO"; then :
6762 ac_cv_should_define__xopen_source=yes
6764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6769 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6770 test $ac_cv_should_define__xopen_source = yes &&
6771 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6780 # Check whether --enable-largefile was given.
6781 if test "${enable_largefile+set}" = set; then :
6782 enableval=$enable_largefile;
6785 if test "$enable_largefile" != no; then
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6788 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6789 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6790 $as_echo_n "(cached) " >&6
6791 else
6792 ac_cv_sys_largefile_CC=no
6793 if test "$GCC" != yes; then
6794 ac_save_CC=$CC
6795 while :; do
6796 # IRIX 6.2 and later do not support large files by default,
6797 # so use the C compiler's -n32 option if that helps.
6798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6799 /* end confdefs.h. */
6800 #include <sys/types.h>
6801 /* Check that off_t can represent 2**63 - 1 correctly.
6802 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6803 since some C++ compilers masquerading as C compilers
6804 incorrectly reject 9223372036854775807. */
6805 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6806 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6807 && LARGE_OFF_T % 2147483647 == 1)
6808 ? 1 : -1];
6810 main ()
6814 return 0;
6816 _ACEOF
6817 if ac_fn_c_try_compile "$LINENO"; then :
6818 break
6820 rm -f core conftest.err conftest.$ac_objext
6821 CC="$CC -n32"
6822 if ac_fn_c_try_compile "$LINENO"; then :
6823 ac_cv_sys_largefile_CC=' -n32'; break
6825 rm -f core conftest.err conftest.$ac_objext
6826 break
6827 done
6828 CC=$ac_save_CC
6829 rm -f conftest.$ac_ext
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6833 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6834 if test "$ac_cv_sys_largefile_CC" != no; then
6835 CC=$CC$ac_cv_sys_largefile_CC
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6839 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6840 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6841 $as_echo_n "(cached) " >&6
6842 else
6843 while :; do
6844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6845 /* end confdefs.h. */
6846 #include <sys/types.h>
6847 /* Check that off_t can represent 2**63 - 1 correctly.
6848 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6849 since some C++ compilers masquerading as C compilers
6850 incorrectly reject 9223372036854775807. */
6851 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6852 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6853 && LARGE_OFF_T % 2147483647 == 1)
6854 ? 1 : -1];
6856 main ()
6860 return 0;
6862 _ACEOF
6863 if ac_fn_c_try_compile "$LINENO"; then :
6864 ac_cv_sys_file_offset_bits=no; break
6866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6868 /* end confdefs.h. */
6869 #define _FILE_OFFSET_BITS 64
6870 #include <sys/types.h>
6871 /* Check that off_t can represent 2**63 - 1 correctly.
6872 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6873 since some C++ compilers masquerading as C compilers
6874 incorrectly reject 9223372036854775807. */
6875 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6876 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6877 && LARGE_OFF_T % 2147483647 == 1)
6878 ? 1 : -1];
6880 main ()
6884 return 0;
6886 _ACEOF
6887 if ac_fn_c_try_compile "$LINENO"; then :
6888 ac_cv_sys_file_offset_bits=64; break
6890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6891 ac_cv_sys_file_offset_bits=unknown
6892 break
6893 done
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6896 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6897 case $ac_cv_sys_file_offset_bits in #(
6898 no | unknown) ;;
6900 cat >>confdefs.h <<_ACEOF
6901 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6902 _ACEOF
6904 esac
6905 rm -rf conftest*
6906 if test $ac_cv_sys_file_offset_bits = unknown; then
6907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6908 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6909 if test "${ac_cv_sys_large_files+set}" = set; then :
6910 $as_echo_n "(cached) " >&6
6911 else
6912 while :; do
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914 /* end confdefs.h. */
6915 #include <sys/types.h>
6916 /* Check that off_t can represent 2**63 - 1 correctly.
6917 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6918 since some C++ compilers masquerading as C compilers
6919 incorrectly reject 9223372036854775807. */
6920 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6921 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6922 && LARGE_OFF_T % 2147483647 == 1)
6923 ? 1 : -1];
6925 main ()
6929 return 0;
6931 _ACEOF
6932 if ac_fn_c_try_compile "$LINENO"; then :
6933 ac_cv_sys_large_files=no; break
6935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937 /* end confdefs.h. */
6938 #define _LARGE_FILES 1
6939 #include <sys/types.h>
6940 /* Check that off_t can represent 2**63 - 1 correctly.
6941 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6942 since some C++ compilers masquerading as C compilers
6943 incorrectly reject 9223372036854775807. */
6944 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6945 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6946 && LARGE_OFF_T % 2147483647 == 1)
6947 ? 1 : -1];
6949 main ()
6953 return 0;
6955 _ACEOF
6956 if ac_fn_c_try_compile "$LINENO"; then :
6957 ac_cv_sys_large_files=1; break
6959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6960 ac_cv_sys_large_files=unknown
6961 break
6962 done
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6965 $as_echo "$ac_cv_sys_large_files" >&6; }
6966 case $ac_cv_sys_large_files in #(
6967 no | unknown) ;;
6969 cat >>confdefs.h <<_ACEOF
6970 #define _LARGE_FILES $ac_cv_sys_large_files
6971 _ACEOF
6973 esac
6974 rm -rf conftest*
6978 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6982 case $ac_cv_prog_cc_stdc in #(
6983 no) :
6984 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6985 *) :
6986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6987 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6988 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6989 $as_echo_n "(cached) " >&6
6990 else
6991 ac_cv_prog_cc_c99=no
6992 ac_save_CC=$CC
6993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6994 /* end confdefs.h. */
6995 #include <stdarg.h>
6996 #include <stdbool.h>
6997 #include <stdlib.h>
6998 #include <wchar.h>
6999 #include <stdio.h>
7001 // Check varargs macros. These examples are taken from C99 6.10.3.5.
7002 #define debug(...) fprintf (stderr, __VA_ARGS__)
7003 #define showlist(...) puts (#__VA_ARGS__)
7004 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
7005 static void
7006 test_varargs_macros (void)
7008 int x = 1234;
7009 int y = 5678;
7010 debug ("Flag");
7011 debug ("X = %d\n", x);
7012 showlist (The first, second, and third items.);
7013 report (x>y, "x is %d but y is %d", x, y);
7016 // Check long long types.
7017 #define BIG64 18446744073709551615ull
7018 #define BIG32 4294967295ul
7019 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
7020 #if !BIG_OK
7021 your preprocessor is broken;
7022 #endif
7023 #if BIG_OK
7024 #else
7025 your preprocessor is broken;
7026 #endif
7027 static long long int bignum = -9223372036854775807LL;
7028 static unsigned long long int ubignum = BIG64;
7030 struct incomplete_array
7032 int datasize;
7033 double data[];
7036 struct named_init {
7037 int number;
7038 const wchar_t *name;
7039 double average;
7042 typedef const char *ccp;
7044 static inline int
7045 test_restrict (ccp restrict text)
7047 // See if C++-style comments work.
7048 // Iterate through items via the restricted pointer.
7049 // Also check for declarations in for loops.
7050 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7051 continue;
7052 return 0;
7055 // Check varargs and va_copy.
7056 static void
7057 test_varargs (const char *format, ...)
7059 va_list args;
7060 va_start (args, format);
7061 va_list args_copy;
7062 va_copy (args_copy, args);
7064 const char *str;
7065 int number;
7066 float fnumber;
7068 while (*format)
7070 switch (*format++)
7072 case 's': // string
7073 str = va_arg (args_copy, const char *);
7074 break;
7075 case 'd': // int
7076 number = va_arg (args_copy, int);
7077 break;
7078 case 'f': // float
7079 fnumber = va_arg (args_copy, double);
7080 break;
7081 default:
7082 break;
7085 va_end (args_copy);
7086 va_end (args);
7090 main ()
7093 // Check bool.
7094 _Bool success = false;
7096 // Check restrict.
7097 if (test_restrict ("String literal") == 0)
7098 success = true;
7099 char *restrict newvar = "Another string";
7101 // Check varargs.
7102 test_varargs ("s, d' f .", "string", 65, 34.234);
7103 test_varargs_macros ();
7105 // Check flexible array members.
7106 struct incomplete_array *ia =
7107 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7108 ia->datasize = 10;
7109 for (int i = 0; i < ia->datasize; ++i)
7110 ia->data[i] = i * 1.234;
7112 // Check named initializers.
7113 struct named_init ni = {
7114 .number = 34,
7115 .name = L"Test wide string",
7116 .average = 543.34343,
7119 ni.number = 58;
7121 int dynamic_array[ni.number];
7122 dynamic_array[ni.number - 1] = 543;
7124 // work around unused variable warnings
7125 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7126 || dynamic_array[ni.number - 1] != 543);
7129 return 0;
7131 _ACEOF
7132 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7134 CC="$ac_save_CC $ac_arg"
7135 if ac_fn_c_try_compile "$LINENO"; then :
7136 ac_cv_prog_cc_c99=$ac_arg
7138 rm -f core conftest.err conftest.$ac_objext
7139 test "x$ac_cv_prog_cc_c99" != "xno" && break
7140 done
7141 rm -f conftest.$ac_ext
7142 CC=$ac_save_CC
7145 # AC_CACHE_VAL
7146 case "x$ac_cv_prog_cc_c99" in
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7149 $as_echo "none needed" >&6; } ;;
7150 xno)
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7152 $as_echo "unsupported" >&6; } ;;
7154 CC="$CC $ac_cv_prog_cc_c99"
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7156 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7157 esac
7158 if test "x$ac_cv_prog_cc_c99" != xno; then :
7159 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7160 else
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7162 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7163 if test "${ac_cv_prog_cc_c89+set}" = set; then :
7164 $as_echo_n "(cached) " >&6
7165 else
7166 ac_cv_prog_cc_c89=no
7167 ac_save_CC=$CC
7168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7169 /* end confdefs.h. */
7170 #include <stdarg.h>
7171 #include <stdio.h>
7172 #include <sys/types.h>
7173 #include <sys/stat.h>
7174 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7175 struct buf { int x; };
7176 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7177 static char *e (p, i)
7178 char **p;
7179 int i;
7181 return p[i];
7183 static char *f (char * (*g) (char **, int), char **p, ...)
7185 char *s;
7186 va_list v;
7187 va_start (v,p);
7188 s = g (p, va_arg (v,int));
7189 va_end (v);
7190 return s;
7193 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7194 function prototypes and stuff, but not '\xHH' hex character constants.
7195 These don't provoke an error unfortunately, instead are silently treated
7196 as 'x'. The following induces an error, until -std is added to get
7197 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7198 array size at least. It's necessary to write '\x00'==0 to get something
7199 that's true only with -std. */
7200 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7202 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7203 inside strings and character constants. */
7204 #define FOO(x) 'x'
7205 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7207 int test (int i, double x);
7208 struct s1 {int (*f) (int a);};
7209 struct s2 {int (*f) (double a);};
7210 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7211 int argc;
7212 char **argv;
7214 main ()
7216 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7218 return 0;
7220 _ACEOF
7221 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7222 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7224 CC="$ac_save_CC $ac_arg"
7225 if ac_fn_c_try_compile "$LINENO"; then :
7226 ac_cv_prog_cc_c89=$ac_arg
7228 rm -f core conftest.err conftest.$ac_objext
7229 test "x$ac_cv_prog_cc_c89" != "xno" && break
7230 done
7231 rm -f conftest.$ac_ext
7232 CC=$ac_save_CC
7235 # AC_CACHE_VAL
7236 case "x$ac_cv_prog_cc_c89" in
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7239 $as_echo "none needed" >&6; } ;;
7240 xno)
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7242 $as_echo "unsupported" >&6; } ;;
7244 CC="$CC $ac_cv_prog_cc_c89"
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7246 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7247 esac
7248 if test "x$ac_cv_prog_cc_c89" != xno; then :
7249 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7250 else
7251 ac_cv_prog_cc_stdc=no
7256 esac
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7258 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
7259 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
7260 $as_echo_n "(cached) " >&6
7263 case $ac_cv_prog_cc_stdc in #(
7264 no) :
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7266 $as_echo "unsupported" >&6; } ;; #(
7267 '') :
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7269 $as_echo "none needed" >&6; } ;; #(
7270 *) :
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7272 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7273 esac
7277 # Code from module alloca-opt:
7278 # Code from module allocator:
7279 # Code from module at-internal:
7280 # Code from module binary-io:
7281 # Code from module byteswap:
7282 # Code from module c-ctype:
7283 # Code from module c-strcase:
7284 # Code from module careadlinkat:
7285 # Code from module clock-time:
7286 # Code from module close-stream:
7287 # Code from module count-one-bits:
7288 # Code from module count-trailing-zeros:
7289 # Code from module crypto/md5:
7290 # Code from module crypto/sha1:
7291 # Code from module crypto/sha256:
7292 # Code from module crypto/sha512:
7293 # Code from module dirent:
7294 # Code from module dosname:
7295 # Code from module dtoastr:
7296 # Code from module dtotimespec:
7297 # Code from module dup2:
7298 # Code from module environ:
7299 # Code from module errno:
7300 # Code from module euidaccess:
7301 # Code from module execinfo:
7302 # Code from module extensions:
7304 # Code from module extern-inline:
7305 # Code from module faccessat:
7306 # Code from module fcntl:
7307 # Code from module fcntl-h:
7308 # Code from module fdatasync:
7309 # Code from module fdopendir:
7310 # Code from module filemode:
7311 # Code from module fpending:
7312 # Code from module fstatat:
7313 # Code from module fsync:
7314 # Code from module getdtablesize:
7315 # Code from module getgroups:
7316 # Code from module getloadavg:
7317 # Code from module getopt-gnu:
7318 # Code from module getopt-posix:
7319 # Code from module gettext-h:
7320 # Code from module gettime:
7321 # Code from module gettimeofday:
7322 # Code from module group-member:
7323 # Code from module include_next:
7324 # Code from module intprops:
7325 # Code from module inttypes-incomplete:
7326 # Code from module largefile:
7328 # Code from module lstat:
7329 # Code from module manywarnings:
7330 # Code from module memrchr:
7331 # Code from module mkostemp:
7332 # Code from module mktime:
7333 # Code from module multiarch:
7334 # Code from module nocrash:
7335 # Code from module openat-h:
7336 # Code from module pathmax:
7337 # Code from module pipe2:
7338 # Code from module pselect:
7339 # Code from module pthread_sigmask:
7340 # Code from module putenv:
7341 # Code from module qacl:
7342 # Code from module readlink:
7343 # Code from module readlinkat:
7344 # Code from module root-uid:
7345 # Code from module secure_getenv:
7346 # Code from module sig2str:
7347 # Code from module signal-h:
7348 # Code from module snippet/_Noreturn:
7349 # Code from module snippet/arg-nonnull:
7350 # Code from module snippet/c++defs:
7351 # Code from module snippet/warn-on-use:
7352 # Code from module socklen:
7353 # Code from module ssize_t:
7354 # Code from module stat:
7355 # Code from module stat-time:
7356 # Code from module stdalign:
7357 # Code from module stdarg:
7361 # Code from module stdbool:
7362 # Code from module stddef:
7363 # Code from module stdint:
7364 # Code from module stdio:
7365 # Code from module stdlib:
7366 # Code from module strftime:
7367 # Code from module string:
7368 # Code from module strtoimax:
7369 # Code from module strtoll:
7370 # Code from module strtoull:
7371 # Code from module strtoumax:
7372 # Code from module symlink:
7373 # Code from module sys_select:
7374 # Code from module sys_stat:
7375 # Code from module sys_time:
7376 # Code from module tempname:
7377 # Code from module time:
7378 # Code from module time_r:
7379 # Code from module timer-time:
7380 # Code from module timespec:
7381 # Code from module timespec-add:
7382 # Code from module timespec-sub:
7383 # Code from module u64:
7384 # Code from module unistd:
7385 # Code from module unsetenv:
7386 # Code from module utimens:
7387 # Code from module verify:
7388 # Code from module warnings:
7389 # Code from module xalloc-oversized:
7392 if test "$ac_test_CFLAGS" != set; then
7393 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7394 # if -g3 works and the user does not specify CFLAGS.
7395 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7396 case $CFLAGS in
7397 '-g')
7398 emacs_g3_CFLAGS='-g3';;
7399 '-g -O2')
7400 emacs_g3_CFLAGS='-g3 -O2';;
7402 emacs_g3_CFLAGS='';;
7403 esac
7404 if test -n "$emacs_g3_CFLAGS"; then
7405 emacs_save_CFLAGS=$CFLAGS
7406 CFLAGS=$emacs_g3_CFLAGS
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7408 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7409 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7410 $as_echo_n "(cached) " >&6
7411 else
7412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7413 /* end confdefs.h. */
7416 main ()
7420 return 0;
7422 _ACEOF
7423 if ac_fn_c_try_link "$LINENO"; then :
7424 emacs_cv_prog_cc_g3=yes
7425 else
7426 emacs_cv_prog_cc_g3=no
7428 rm -f core conftest.err conftest.$ac_objext \
7429 conftest$ac_exeext conftest.$ac_ext
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7432 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7433 if test $emacs_cv_prog_cc_g3 != yes; then
7434 CFLAGS=$emacs_save_CFLAGS
7436 if test $opsys = mingw32; then
7437 CFLAGS="$CFLAGS -gdwarf-2"
7441 case $CFLAGS in
7442 *-O*) ;;
7444 # No optimization flag was inferred for this non-GCC compiler.
7445 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7446 emacs_save_CFLAGS=$CFLAGS
7447 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7448 CFLAGS=${CFLAGS}-O
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7450 $as_echo_n "checking whether $CC accepts -O... " >&6; }
7451 if test "${emacs_cv_prog_cc_o+set}" = set; then :
7452 $as_echo_n "(cached) " >&6
7453 else
7454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7455 /* end confdefs.h. */
7458 main ()
7462 return 0;
7464 _ACEOF
7465 if ac_fn_c_try_link "$LINENO"; then :
7466 emacs_cv_prog_cc_o=yes
7467 else
7468 emacs_cv_prog_cc_o=no
7470 rm -f core conftest.err conftest.$ac_objext \
7471 conftest$ac_exeext conftest.$ac_ext
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7474 $as_echo "$emacs_cv_prog_cc_o" >&6; }
7475 if test $emacs_cv_prog_cc_o != yes; then
7476 CFLAGS=$emacs_save_CFLAGS
7477 fi ;;
7478 esac
7481 # Check whether --enable-gcc-warnings was given.
7482 if test "${enable_gcc_warnings+set}" = set; then :
7483 enableval=$enable_gcc_warnings; case $enableval in
7484 yes|no) ;;
7485 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7486 esac
7487 gl_gcc_warnings=$enableval
7488 else
7489 gl_gcc_warnings=no
7494 # Check whether --enable-link-time-optimization was given.
7495 if test "${enable_link_time_optimization+set}" = set; then :
7496 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7498 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7499 ac_lto_supported=no
7500 if test x$GCC = xyes; then
7501 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7502 if test x$CPUS != x; then
7503 LTO="-flto=$CPUS"
7504 else
7505 LTO="-flto"
7507 old_CFLAGS=$CFLAGS
7508 CFLAGS="$CFLAGS $LTO"
7509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7510 /* end confdefs.h. */
7513 main ()
7517 return 0;
7519 _ACEOF
7520 if ac_fn_c_try_compile "$LINENO"; then :
7521 ac_lto_supported=yes
7522 else
7523 ac_lto_supported=no
7525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7526 CFLAGS="$old_CFLAGS"
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7529 $as_echo "$ac_lto_supported" >&6; }
7530 if test "$ac_lto_supported" = "yes"; then
7531 CFLAGS="$CFLAGS $LTO"
7537 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7538 # ------------------------------------------------
7539 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7540 # Otherwise, run RUN-IF-NOT-FOUND.
7543 # clang is unduly picky about some things.
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7545 $as_echo_n "checking whether the compiler is clang... " >&6; }
7546 if test "${emacs_cv_clang+set}" = set; then :
7547 $as_echo_n "(cached) " >&6
7548 else
7549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7550 /* end confdefs.h. */
7552 #ifndef __clang__
7553 #error "not clang"
7554 #endif
7557 main ()
7561 return 0;
7563 _ACEOF
7564 if ac_fn_c_try_compile "$LINENO"; then :
7565 emacs_cv_clang=yes
7566 else
7567 emacs_cv_clang=no
7569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7572 $as_echo "$emacs_cv_clang" >&6; }
7574 # When compiling with GCC, prefer -isystem to -I when including system
7575 # include files, to avoid generating useless diagnostics for the files.
7576 if test "$gl_gcc_warnings" != yes; then
7577 isystem='-I'
7578 if test "$emacs_cv_clang" = yes
7579 then
7580 # Turn off some warnings if supported.
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7582 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7583 if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7584 $as_echo_n "(cached) " >&6
7585 else
7587 gl_save_compiler_FLAGS="$CFLAGS"
7588 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7590 /* end confdefs.h. */
7593 main ()
7597 return 0;
7599 _ACEOF
7600 if ac_fn_c_try_link "$LINENO"; then :
7601 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7602 else
7603 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7605 rm -f core conftest.err conftest.$ac_objext \
7606 conftest$ac_exeext conftest.$ac_ext
7607 CFLAGS="$gl_save_compiler_FLAGS"
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7611 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7612 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7613 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7614 else
7615 gl_unknown_warnings_are_errors=
7619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7620 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7621 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7622 $as_echo_n "(cached) " >&6
7623 else
7625 gl_save_compiler_FLAGS="$CFLAGS"
7626 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
7627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7628 /* end confdefs.h. */
7631 main ()
7635 return 0;
7637 _ACEOF
7638 if ac_fn_c_try_link "$LINENO"; then :
7639 gl_cv_warn_c__Wno_switch=yes
7640 else
7641 gl_cv_warn_c__Wno_switch=no
7643 rm -f core conftest.err conftest.$ac_objext \
7644 conftest$ac_exeext conftest.$ac_ext
7645 CFLAGS="$gl_save_compiler_FLAGS"
7648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7649 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7650 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7651 as_fn_append WARN_CFLAGS " -Wno-switch"
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
7657 $as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
7658 if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
7659 $as_echo_n "(cached) " >&6
7660 else
7662 gl_save_compiler_FLAGS="$CFLAGS"
7663 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
7664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7665 /* end confdefs.h. */
7668 main ()
7672 return 0;
7674 _ACEOF
7675 if ac_fn_c_try_link "$LINENO"; then :
7676 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
7677 else
7678 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
7680 rm -f core conftest.err conftest.$ac_objext \
7681 conftest$ac_exeext conftest.$ac_ext
7682 CFLAGS="$gl_save_compiler_FLAGS"
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
7686 $as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
7687 if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
7688 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
7694 $as_echo_n "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
7695 if test "${gl_cv_warn_c__Wno_pointer_sign+set}" = set; then :
7696 $as_echo_n "(cached) " >&6
7697 else
7699 gl_save_compiler_FLAGS="$CFLAGS"
7700 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
7701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7702 /* end confdefs.h. */
7705 main ()
7709 return 0;
7711 _ACEOF
7712 if ac_fn_c_try_link "$LINENO"; then :
7713 gl_cv_warn_c__Wno_pointer_sign=yes
7714 else
7715 gl_cv_warn_c__Wno_pointer_sign=no
7717 rm -f core conftest.err conftest.$ac_objext \
7718 conftest$ac_exeext conftest.$ac_ext
7719 CFLAGS="$gl_save_compiler_FLAGS"
7722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
7723 $as_echo "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
7724 if test "x$gl_cv_warn_c__Wno_pointer_sign" = x""yes; then :
7725 as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
7730 else
7731 isystem='-isystem '
7733 # This, $nw, is the list of warnings we disable.
7736 case $with_x_toolkit in
7737 lucid | athena | motif)
7738 # Old toolkits mishandle 'const'.
7739 nw="$nw -Wwrite-strings"
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7744 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7745 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7746 $as_echo_n "(cached) " >&6
7747 else
7749 gl_save_compiler_FLAGS="$CFLAGS"
7750 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7752 /* end confdefs.h. */
7755 main ()
7759 return 0;
7761 _ACEOF
7762 if ac_fn_c_try_link "$LINENO"; then :
7763 gl_cv_warn_c__Werror=yes
7764 else
7765 gl_cv_warn_c__Werror=no
7767 rm -f core conftest.err conftest.$ac_objext \
7768 conftest$ac_exeext conftest.$ac_ext
7769 CFLAGS="$gl_save_compiler_FLAGS"
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7773 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7774 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7775 as_fn_append WERROR_CFLAGS " -Werror"
7780 esac
7783 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7784 nw="$nw -Woverlength-strings" # Not a problem these days
7785 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7786 nw="$nw -Wformat-nonliteral" # we do this a lot
7787 nw="$nw -Wvla" # warnings in gettext.h
7788 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7789 nw="$nw -Wswitch-default" # Too many warnings for now
7790 nw="$nw -Winline" # OK to ignore 'inline'
7791 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7792 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7793 # signed overflow has undefined behavior
7794 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7795 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7796 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
7798 # Emacs doesn't care about shadowing; see
7799 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7800 nw="$nw -Wshadow"
7802 # Emacs's use of alloca inhibits protecting the stack.
7803 nw="$nw -Wstack-protector"
7805 # The following line should be removable at some point.
7806 nw="$nw -Wsuggest-attribute=pure"
7808 # This part is merely for shortening the command line,
7809 # since -Wno-FOO needs to be added below regardless.
7810 nw="$nw -Wmissing-field-initializers"
7811 nw="$nw -Wswitch"
7812 nw="$nw -Wtype-limits"
7813 nw="$nw -Wunused-parameter"
7815 if test $emacs_cv_clang = yes; then
7816 nw="$nw -Wcast-align"
7821 if test -n "$GCC"; then
7823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7824 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7825 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7826 $as_echo_n "(cached) " >&6
7827 else
7829 gl_save_CFLAGS="$CFLAGS"
7830 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7832 /* end confdefs.h. */
7835 main ()
7839 return 0;
7841 _ACEOF
7842 if ac_fn_c_try_compile "$LINENO"; then :
7843 gl_cv_cc_nomfi_supported=yes
7844 else
7845 gl_cv_cc_nomfi_supported=no
7847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7848 CFLAGS="$gl_save_CFLAGS"
7851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7852 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7854 if test "$gl_cv_cc_nomfi_supported" = yes; then
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7856 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7857 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7858 $as_echo_n "(cached) " >&6
7859 else
7861 gl_save_CFLAGS="$CFLAGS"
7862 CFLAGS="$CFLAGS -W -Werror"
7863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7864 /* end confdefs.h. */
7865 void f (void)
7867 typedef struct { int a; int b; } s_t;
7868 s_t s1 = { 0, };
7872 main ()
7876 return 0;
7878 _ACEOF
7879 if ac_fn_c_try_compile "$LINENO"; then :
7880 gl_cv_cc_nomfi_needed=no
7881 else
7882 gl_cv_cc_nomfi_needed=yes
7884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7885 CFLAGS="$gl_save_CFLAGS"
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7890 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7894 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7895 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7896 $as_echo_n "(cached) " >&6
7897 else
7899 gl_save_CFLAGS="$CFLAGS"
7900 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7902 /* end confdefs.h. */
7905 main ()
7909 return 0;
7911 _ACEOF
7912 if ac_fn_c_try_compile "$LINENO"; then :
7913 gl_cv_cc_uninitialized_supported=yes
7914 else
7915 gl_cv_cc_uninitialized_supported=no
7917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7918 CFLAGS="$gl_save_CFLAGS"
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7922 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7926 # List all gcc warning categories.
7927 gl_manywarn_set=
7928 for gl_manywarn_item in \
7929 -W \
7930 -Wabi \
7931 -Waddress \
7932 -Waggressive-loop-optimizations \
7933 -Wall \
7934 -Warray-bounds \
7935 -Wattributes \
7936 -Wbad-function-cast \
7937 -Wbuiltin-macro-redefined \
7938 -Wcast-align \
7939 -Wchar-subscripts \
7940 -Wclobbered \
7941 -Wcomment \
7942 -Wcomments \
7943 -Wcoverage-mismatch \
7944 -Wcpp \
7945 -Wdeprecated \
7946 -Wdeprecated-declarations \
7947 -Wdisabled-optimization \
7948 -Wdiv-by-zero \
7949 -Wdouble-promotion \
7950 -Wempty-body \
7951 -Wendif-labels \
7952 -Wenum-compare \
7953 -Wextra \
7954 -Wformat-contains-nul \
7955 -Wformat-extra-args \
7956 -Wformat-nonliteral \
7957 -Wformat-security \
7958 -Wformat-y2k \
7959 -Wformat-zero-length \
7960 -Wfree-nonheap-object \
7961 -Wignored-qualifiers \
7962 -Wimplicit \
7963 -Wimplicit-function-declaration \
7964 -Wimplicit-int \
7965 -Winit-self \
7966 -Winline \
7967 -Wint-to-pointer-cast \
7968 -Winvalid-memory-model \
7969 -Winvalid-pch \
7970 -Wjump-misses-init \
7971 -Wlogical-op \
7972 -Wmain \
7973 -Wmaybe-uninitialized \
7974 -Wmissing-braces \
7975 -Wmissing-declarations \
7976 -Wmissing-field-initializers \
7977 -Wmissing-include-dirs \
7978 -Wmissing-parameter-type \
7979 -Wmissing-prototypes \
7980 -Wmudflap \
7981 -Wmultichar \
7982 -Wnarrowing \
7983 -Wnested-externs \
7984 -Wnonnull \
7985 -Wnormalized=nfc \
7986 -Wold-style-declaration \
7987 -Wold-style-definition \
7988 -Woverflow \
7989 -Woverlength-strings \
7990 -Woverride-init \
7991 -Wpacked \
7992 -Wpacked-bitfield-compat \
7993 -Wparentheses \
7994 -Wpointer-arith \
7995 -Wpointer-sign \
7996 -Wpointer-to-int-cast \
7997 -Wpragmas \
7998 -Wreturn-local-addr \
7999 -Wreturn-type \
8000 -Wsequence-point \
8001 -Wshadow \
8002 -Wsizeof-pointer-memaccess \
8003 -Wstack-protector \
8004 -Wstrict-aliasing \
8005 -Wstrict-overflow \
8006 -Wstrict-prototypes \
8007 -Wsuggest-attribute=const \
8008 -Wsuggest-attribute=format \
8009 -Wsuggest-attribute=noreturn \
8010 -Wsuggest-attribute=pure \
8011 -Wswitch \
8012 -Wswitch-default \
8013 -Wsync-nand \
8014 -Wsystem-headers \
8015 -Wtrampolines \
8016 -Wtrigraphs \
8017 -Wtype-limits \
8018 -Wuninitialized \
8019 -Wunknown-pragmas \
8020 -Wunsafe-loop-optimizations \
8021 -Wunused \
8022 -Wunused-but-set-parameter \
8023 -Wunused-but-set-variable \
8024 -Wunused-function \
8025 -Wunused-label \
8026 -Wunused-local-typedefs \
8027 -Wunused-macros \
8028 -Wunused-parameter \
8029 -Wunused-result \
8030 -Wunused-value \
8031 -Wunused-variable \
8032 -Wvarargs \
8033 -Wvariadic-macros \
8034 -Wvector-operation-performance \
8035 -Wvla \
8036 -Wvolatile-register-var \
8037 -Wwrite-strings \
8038 -fdiagnostics-show-option \
8039 -funit-at-a-time \
8041 ; do
8042 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
8043 done
8045 # Disable specific options as needed.
8046 if test "$gl_cv_cc_nomfi_needed" = yes; then
8047 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
8050 if test "$gl_cv_cc_uninitialized_supported" = no; then
8051 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
8054 ws=$gl_manywarn_set
8057 gl_warn_set=
8058 set x $ws; shift
8059 for gl_warn_item
8061 case " $nw " in
8062 *" $gl_warn_item "*)
8065 gl_warn_set="$gl_warn_set $gl_warn_item"
8067 esac
8068 done
8069 ws=$gl_warn_set
8071 for w in $ws; do
8073 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
8074 gl_positive="$w"
8075 case $gl_positive in
8076 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
8077 esac
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
8079 $as_echo_n "checking whether C compiler handles $w... " >&6; }
8080 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
8081 $as_echo_n "(cached) " >&6
8082 else
8084 gl_save_compiler_FLAGS="$CFLAGS"
8085 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
8086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8087 /* end confdefs.h. */
8090 main ()
8094 return 0;
8096 _ACEOF
8097 if ac_fn_c_try_link "$LINENO"; then :
8098 eval "$as_gl_Warn=yes"
8099 else
8100 eval "$as_gl_Warn=no"
8102 rm -f core conftest.err conftest.$ac_objext \
8103 conftest$ac_exeext conftest.$ac_ext
8104 CFLAGS="$gl_save_compiler_FLAGS"
8107 eval ac_res=\$$as_gl_Warn
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8109 $as_echo "$ac_res" >&6; }
8110 eval as_val=\$$as_gl_Warn
8111 if test "x$as_val" = x""yes; then :
8112 as_fn_append WARN_CFLAGS " $w"
8116 done
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
8119 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
8120 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
8121 $as_echo_n "(cached) " >&6
8122 else
8124 gl_save_compiler_FLAGS="$CFLAGS"
8125 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
8126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8127 /* end confdefs.h. */
8130 main ()
8134 return 0;
8136 _ACEOF
8137 if ac_fn_c_try_link "$LINENO"; then :
8138 gl_cv_warn_c__Wno_missing_field_initializers=yes
8139 else
8140 gl_cv_warn_c__Wno_missing_field_initializers=no
8142 rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext conftest.$ac_ext
8144 CFLAGS="$gl_save_compiler_FLAGS"
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
8148 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
8149 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
8150 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
8153 # We need this one
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
8156 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
8157 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
8158 $as_echo_n "(cached) " >&6
8159 else
8161 gl_save_compiler_FLAGS="$CFLAGS"
8162 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
8163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8164 /* end confdefs.h. */
8167 main ()
8171 return 0;
8173 _ACEOF
8174 if ac_fn_c_try_link "$LINENO"; then :
8175 gl_cv_warn_c__Wno_sign_compare=yes
8176 else
8177 gl_cv_warn_c__Wno_sign_compare=no
8179 rm -f core conftest.err conftest.$ac_objext \
8180 conftest$ac_exeext conftest.$ac_ext
8181 CFLAGS="$gl_save_compiler_FLAGS"
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
8185 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
8186 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
8187 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
8190 # Too many warnings for now
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
8193 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8194 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8195 $as_echo_n "(cached) " >&6
8196 else
8198 gl_save_compiler_FLAGS="$CFLAGS"
8199 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
8200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8201 /* end confdefs.h. */
8204 main ()
8208 return 0;
8210 _ACEOF
8211 if ac_fn_c_try_link "$LINENO"; then :
8212 gl_cv_warn_c__Wno_type_limits=yes
8213 else
8214 gl_cv_warn_c__Wno_type_limits=no
8216 rm -f core conftest.err conftest.$ac_objext \
8217 conftest$ac_exeext conftest.$ac_ext
8218 CFLAGS="$gl_save_compiler_FLAGS"
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8222 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8223 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8224 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8227 # Too many warnings for now
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
8230 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8231 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8232 $as_echo_n "(cached) " >&6
8233 else
8235 gl_save_compiler_FLAGS="$CFLAGS"
8236 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
8237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238 /* end confdefs.h. */
8241 main ()
8245 return 0;
8247 _ACEOF
8248 if ac_fn_c_try_link "$LINENO"; then :
8249 gl_cv_warn_c__Wno_switch=yes
8250 else
8251 gl_cv_warn_c__Wno_switch=no
8253 rm -f core conftest.err conftest.$ac_objext \
8254 conftest$ac_exeext conftest.$ac_ext
8255 CFLAGS="$gl_save_compiler_FLAGS"
8258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8259 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8260 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8261 as_fn_append WARN_CFLAGS " -Wno-switch"
8264 # Too many warnings for now
8266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
8267 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8268 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8269 $as_echo_n "(cached) " >&6
8270 else
8272 gl_save_compiler_FLAGS="$CFLAGS"
8273 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
8274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8275 /* end confdefs.h. */
8278 main ()
8282 return 0;
8284 _ACEOF
8285 if ac_fn_c_try_link "$LINENO"; then :
8286 gl_cv_warn_c__Wno_unused_parameter=yes
8287 else
8288 gl_cv_warn_c__Wno_unused_parameter=no
8290 rm -f core conftest.err conftest.$ac_objext \
8291 conftest$ac_exeext conftest.$ac_ext
8292 CFLAGS="$gl_save_compiler_FLAGS"
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8296 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8297 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8298 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8301 # Too many warnings for now
8303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
8304 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8305 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8306 $as_echo_n "(cached) " >&6
8307 else
8309 gl_save_compiler_FLAGS="$CFLAGS"
8310 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
8311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8312 /* end confdefs.h. */
8315 main ()
8319 return 0;
8321 _ACEOF
8322 if ac_fn_c_try_link "$LINENO"; then :
8323 gl_cv_warn_c__Wno_format_nonliteral=yes
8324 else
8325 gl_cv_warn_c__Wno_format_nonliteral=no
8327 rm -f core conftest.err conftest.$ac_objext \
8328 conftest$ac_exeext conftest.$ac_ext
8329 CFLAGS="$gl_save_compiler_FLAGS"
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8333 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8334 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8335 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8340 # In spite of excluding -Wlogical-op above, it is enabled, as of
8341 # gcc 4.5.0 20090517.
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
8344 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8345 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8346 $as_echo_n "(cached) " >&6
8347 else
8349 gl_save_compiler_FLAGS="$CFLAGS"
8350 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
8351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8352 /* end confdefs.h. */
8355 main ()
8359 return 0;
8361 _ACEOF
8362 if ac_fn_c_try_link "$LINENO"; then :
8363 gl_cv_warn_c__Wno_logical_op=yes
8364 else
8365 gl_cv_warn_c__Wno_logical_op=no
8367 rm -f core conftest.err conftest.$ac_objext \
8368 conftest$ac_exeext conftest.$ac_ext
8369 CFLAGS="$gl_save_compiler_FLAGS"
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8373 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8374 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8375 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8380 # More things that clang is unduly picky about.
8381 if test $emacs_cv_clang = yes; then
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8384 $as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8385 if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8386 $as_echo_n "(cached) " >&6
8387 else
8389 gl_save_compiler_FLAGS="$CFLAGS"
8390 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
8391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8392 /* end confdefs.h. */
8395 main ()
8399 return 0;
8401 _ACEOF
8402 if ac_fn_c_try_link "$LINENO"; then :
8403 gl_cv_warn_c__Wno_format_extra_args=yes
8404 else
8405 gl_cv_warn_c__Wno_format_extra_args=no
8407 rm -f core conftest.err conftest.$ac_objext \
8408 conftest$ac_exeext conftest.$ac_ext
8409 CFLAGS="$gl_save_compiler_FLAGS"
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8413 $as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8414 if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8415 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8421 $as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8422 if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8423 $as_echo_n "(cached) " >&6
8424 else
8426 gl_save_compiler_FLAGS="$CFLAGS"
8427 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
8428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8429 /* end confdefs.h. */
8432 main ()
8436 return 0;
8438 _ACEOF
8439 if ac_fn_c_try_link "$LINENO"; then :
8440 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8441 else
8442 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8444 rm -f core conftest.err conftest.$ac_objext \
8445 conftest$ac_exeext conftest.$ac_ext
8446 CFLAGS="$gl_save_compiler_FLAGS"
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8450 $as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8451 if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8452 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8458 $as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8459 if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8460 $as_echo_n "(cached) " >&6
8461 else
8463 gl_save_compiler_FLAGS="$CFLAGS"
8464 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-command-line-argument"
8465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8466 /* end confdefs.h. */
8469 main ()
8473 return 0;
8475 _ACEOF
8476 if ac_fn_c_try_link "$LINENO"; then :
8477 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8478 else
8479 gl_cv_warn_c__Wno_unused_command_line_argument=no
8481 rm -f core conftest.err conftest.$ac_objext \
8482 conftest$ac_exeext conftest.$ac_ext
8483 CFLAGS="$gl_save_compiler_FLAGS"
8486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8487 $as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8488 if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8489 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8495 $as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8496 if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8497 $as_echo_n "(cached) " >&6
8498 else
8500 gl_save_compiler_FLAGS="$CFLAGS"
8501 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-value"
8502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8503 /* end confdefs.h. */
8506 main ()
8510 return 0;
8512 _ACEOF
8513 if ac_fn_c_try_link "$LINENO"; then :
8514 gl_cv_warn_c__Wno_unused_value=yes
8515 else
8516 gl_cv_warn_c__Wno_unused_value=no
8518 rm -f core conftest.err conftest.$ac_objext \
8519 conftest$ac_exeext conftest.$ac_ext
8520 CFLAGS="$gl_save_compiler_FLAGS"
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8524 $as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8525 if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8526 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8533 $as_echo "#define lint 1" >>confdefs.h
8537 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8540 # We use a slightly smaller set of warning options for lib/.
8541 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8543 nw="$nw -Wunused-macros"
8546 gl_warn_set=
8547 set x $WARN_CFLAGS; shift
8548 for gl_warn_item
8550 case " $nw " in
8551 *" $gl_warn_item "*)
8554 gl_warn_set="$gl_warn_set $gl_warn_item"
8556 esac
8557 done
8558 GNULIB_WARN_CFLAGS=$gl_warn_set
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8569 $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8570 rm -f conf$$ conf$$.file
8572 LN_S_FILEONLY='cp -p'
8574 if (echo >conf$$.file) 2>/dev/null; then
8575 if ln -s conf$$.file conf$$ 2>/dev/null; then
8576 LN_S_FILEONLY='ln -s'
8577 elif ln conf$$.file conf$$ 2>/dev/null; then
8578 LN_S_FILEONLY=ln
8582 rm -f conf$$ conf$$.file
8584 if test "$LN_S_FILEONLY" = "ln -s"; then
8585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8586 $as_echo "yes" >&6; }
8587 else
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8589 $as_echo "no, using $LN_S_FILEONLY" >&6; }
8595 if test "$opsys" = "mingw32"; then
8596 LN_S="ln"
8599 # Extract the first word of "install-info", so it can be a program name with args.
8600 set dummy install-info; ac_word=$2
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8602 $as_echo_n "checking for $ac_word... " >&6; }
8603 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
8604 $as_echo_n "(cached) " >&6
8605 else
8606 case $INSTALL_INFO in
8607 [\\/]* | ?:[\\/]*)
8608 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8612 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
8614 IFS=$as_save_IFS
8615 test -z "$as_dir" && as_dir=.
8616 for ac_exec_ext in '' $ac_executable_extensions; do
8617 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8618 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8619 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8620 break 2
8622 done
8623 done
8624 IFS=$as_save_IFS
8626 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8628 esac
8630 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8631 if test -n "$INSTALL_INFO"; then
8632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8633 $as_echo "$INSTALL_INFO" >&6; }
8634 else
8635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8636 $as_echo "no" >&6; }
8640 # Extract the first word of "gzip", so it can be a program name with args.
8641 set dummy gzip; ac_word=$2
8642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8643 $as_echo_n "checking for $ac_word... " >&6; }
8644 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
8645 $as_echo_n "(cached) " >&6
8646 else
8647 case $GZIP_PROG in
8648 [\\/]* | ?:[\\/]*)
8649 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8653 for as_dir in $PATH
8655 IFS=$as_save_IFS
8656 test -z "$as_dir" && as_dir=.
8657 for ac_exec_ext in '' $ac_executable_extensions; do
8658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8659 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8661 break 2
8663 done
8664 done
8665 IFS=$as_save_IFS
8668 esac
8670 GZIP_PROG=$ac_cv_path_GZIP_PROG
8671 if test -n "$GZIP_PROG"; then
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8673 $as_echo "$GZIP_PROG" >&6; }
8674 else
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8676 $as_echo "no" >&6; }
8681 test $with_compress_install != yes && test -n "$GZIP_PROG" && \
8682 GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
8684 if test $opsys = gnu-linux; then
8685 # Extract the first word of "paxctl", so it can be a program name with args.
8686 set dummy paxctl; ac_word=$2
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8688 $as_echo_n "checking for $ac_word... " >&6; }
8689 if test "${ac_cv_path_PAXCTL+set}" = set; then :
8690 $as_echo_n "(cached) " >&6
8691 else
8692 case $PAXCTL in
8693 [\\/]* | ?:[\\/]*)
8694 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8698 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8700 IFS=$as_save_IFS
8701 test -z "$as_dir" && as_dir=.
8702 for ac_exec_ext in '' $ac_executable_extensions; do
8703 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8704 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8706 break 2
8708 done
8709 done
8710 IFS=$as_save_IFS
8713 esac
8715 PAXCTL=$ac_cv_path_PAXCTL
8716 if test -n "$PAXCTL"; then
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8718 $as_echo "$PAXCTL" >&6; }
8719 else
8720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721 $as_echo "no" >&6; }
8725 if test "X$PAXCTL" != X; then
8726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8727 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8729 /* end confdefs.h. */
8732 main ()
8736 return 0;
8738 _ACEOF
8739 if ac_fn_c_try_link "$LINENO"; then :
8740 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8741 $as_echo "yes" >&6; }
8742 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8743 $as_echo "no" >&6; }; PAXCTL=""; fi
8745 rm -f core conftest.err conftest.$ac_objext \
8746 conftest$ac_exeext conftest.$ac_ext
8750 ## Need makeinfo >= 4.7 (?) to build the manuals.
8751 # Extract the first word of "makeinfo", so it can be a program name with args.
8752 set dummy makeinfo; ac_word=$2
8753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8754 $as_echo_n "checking for $ac_word... " >&6; }
8755 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8756 $as_echo_n "(cached) " >&6
8757 else
8758 case $MAKEINFO in
8759 [\\/]* | ?:[\\/]*)
8760 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8764 for as_dir in $PATH
8766 IFS=$as_save_IFS
8767 test -z "$as_dir" && as_dir=.
8768 for ac_exec_ext in '' $ac_executable_extensions; do
8769 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8770 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8772 break 2
8774 done
8775 done
8776 IFS=$as_save_IFS
8778 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8780 esac
8782 MAKEINFO=$ac_cv_path_MAKEINFO
8783 if test -n "$MAKEINFO"; then
8784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8785 $as_echo "$MAKEINFO" >&6; }
8786 else
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788 $as_echo "no" >&6; }
8792 if test "$MAKEINFO" != "no"; then
8793 case `
8794 $MAKEINFO --version 2> /dev/null |
8795 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8796 ` in
8797 '') MAKEINFO=no;;
8798 esac
8801 ## Makeinfo is unusual. For a released Emacs, the manuals are
8802 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8803 ## therefore in the category of "special tools" not normally required, which
8804 ## configure does not have to check for (eg autoconf itself).
8805 ## In a Bazaar checkout on the other hand, the manuals are not included.
8806 ## So makeinfo is a requirement to build from Bazaar, and configure
8807 ## should test for it as it does for any other build requirement.
8808 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8809 ## with pre-built manuals, from a Bazaar checkout.
8810 HAVE_MAKEINFO=yes
8812 if test "$MAKEINFO" = "no"; then
8813 MAKEINFO=makeinfo
8814 if test "x${with_makeinfo}" = "xno"; then
8815 HAVE_MAKEINFO=no
8816 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
8817 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8818 source tree does not seem to have pre-built manuals in the \`info' directory.
8819 Either install a suitable version of makeinfo, or re-run configure
8820 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8825 INFO_EXT=.info
8826 INFO_OPTS=--no-split
8830 if test $opsys = mingw32; then
8831 DOCMISC_W32=efaq-w32
8832 else
8833 DOCMISC_W32=
8838 if test x$GCC = xyes; then
8839 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8840 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8841 else
8842 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8843 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8847 late_LDFLAGS="$LDFLAGS"
8848 if test x$GCC = xyes; then
8849 LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
8850 else
8851 LDFLAGS_NOCOMBRELOC="-znocombreloc"
8854 LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8857 $as_echo_n "checking for -znocombreloc... " >&6; }
8858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8859 /* end confdefs.h. */
8862 main ()
8866 return 0;
8868 _ACEOF
8869 if ac_fn_c_try_link "$LINENO"; then :
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8871 $as_echo "yes" >&6; }
8872 else
8873 LDFLAGS_NOCOMBRELOC=
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8875 $as_echo "no" >&6; }
8877 rm -f core conftest.err conftest.$ac_objext \
8878 conftest$ac_exeext conftest.$ac_ext
8880 LDFLAGS="$late_LDFLAGS"
8882 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8883 case "$opsys" in
8884 your-opsys-here) CANNOT_DUMP=yes ;;
8885 esac
8887 test "$CANNOT_DUMP" = "yes" && \
8889 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8895 UNEXEC_OBJ=unexelf.o
8896 case "$opsys" in
8897 # MSDOS uses unexcoff.o
8898 aix4-2)
8899 UNEXEC_OBJ=unexaix.o
8901 cygwin)
8902 UNEXEC_OBJ=unexcw.o
8904 darwin)
8905 UNEXEC_OBJ=unexmacosx.o
8907 hpux10-20 | hpux11)
8908 UNEXEC_OBJ=unexhp9k800.o
8910 mingw32)
8911 UNEXEC_OBJ=unexw32.o
8913 sol2-10)
8914 # Use the Solaris dldump() function, called from unexsol.c, to dump
8915 # emacs, instead of the generic ELF dump code found in unexelf.c.
8916 # The resulting binary has a complete symbol table, and is better
8917 # for debugging and other observability tools (debuggers, pstack, etc).
8919 # If you encounter a problem using dldump(), please consider sending
8920 # a message to the OpenSolaris tools-linking mailing list:
8921 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8923 # It is likely that dldump() works with older Solaris too, but this has
8924 # not been tested, so for now this change is for Solaris 10 or newer.
8925 UNEXEC_OBJ=unexsol.o
8927 esac
8929 LD_SWITCH_SYSTEM=
8930 case "$opsys" in
8931 freebsd|dragonfly)
8932 ## Let `ld' find image libs and similar things in /usr/local/lib.
8933 ## The system compiler, GCC, has apparently been modified to not
8934 ## look there, contrary to what a stock GCC would do.
8935 ### It's not our place to do this. See bug#10313#17.
8936 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8940 gnu-linux)
8941 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8942 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8945 netbsd)
8946 ### It's not our place to do this. See bug#10313#17.
8947 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8951 openbsd)
8952 ## Han Boetes <han@boetes.org> says this is necessary,
8953 ## otherwise Emacs dumps core on elf systems.
8954 LD_SWITCH_SYSTEM="-Z"
8956 esac
8959 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8961 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8962 ## which has not been defined yet. When this was handled with cpp,
8963 ## it was expanded to null when configure sourced the s/*.h file.
8964 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8965 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8966 ## (or somesuch), but because it is supposed to go at the _front_
8967 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8968 ## Compare with the gnu-linux case below, which added to the end
8969 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8970 ## LD_SWITCH_SYSTEM_TEMACS.
8971 case "$opsys" in
8972 netbsd|openbsd)
8973 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8974 esac
8977 C_SWITCH_MACHINE=
8978 case $canonical in
8979 alpha*)
8980 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8981 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8985 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8986 ## With ELF, make sure that all common symbols get allocated to in the
8987 ## data section. Otherwise, the dump of temacs may miss variables in
8988 ## the shared library that have been initialized. For example, with
8989 ## GNU libc, __malloc_initialized would normally be resolved to the
8990 ## shared library's .bss section, which is fatal.
8991 if test "x$GCC" = "xyes"; then
8992 C_SWITCH_MACHINE="-fno-common"
8993 else
8994 as_fn_error "Non-GCC compilers are not supported." "$LINENO" 5
8996 else
8997 as_fn_error "Non-ELF systems are not supported since Emacs 24.1." "$LINENO" 5
9000 esac
9005 C_SWITCH_SYSTEM=
9006 ## Some programs in src produce warnings saying certain subprograms
9007 ## are too complex and need a MAXMEM value greater than 2000 for
9008 ## additional optimization. --nils@exp-math.uni-essen.de
9009 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
9010 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
9011 test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
9012 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
9013 ## It is redundant in glibc2, since we define _GNU_SOURCE.
9017 LIBS_SYSTEM=
9018 case "$opsys" in
9019 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
9020 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
9022 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
9024 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
9026 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
9028 ## Motif needs -lgen.
9029 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
9030 esac
9034 ### Make sure subsequent tests use flags consistent with the build flags.
9036 if test x"${OVERRIDE_CPPFLAGS}" != x; then
9037 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
9038 else
9039 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
9042 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
9044 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
9048 LIB_MATH=-lm
9049 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
9051 case $opsys in
9052 cygwin )
9053 LIB_MATH=
9055 darwin )
9056 ## Adding -lm confuses the dynamic linker, so omit it.
9057 LIB_MATH=
9059 freebsd | dragonfly )
9060 SYSTEM_TYPE=berkeley-unix
9062 gnu-linux | gnu-kfreebsd )
9064 hpux10-20 | hpux11 )
9066 mingw32 )
9067 LIB_MATH=
9068 SYSTEM_TYPE=windows-nt
9070 netbsd | openbsd )
9071 SYSTEM_TYPE=berkeley-unix
9074 sol2* | unixware )
9075 SYSTEM_TYPE=usg-unix-v
9078 esac
9082 cat >>confdefs.h <<_ACEOF
9083 #define SYSTEM_TYPE "$SYSTEM_TYPE"
9084 _ACEOF
9088 pre_PKG_CONFIG_CFLAGS=$CFLAGS
9089 pre_PKG_CONFIG_LIBS=$LIBS
9091 # Extract the first word of "pkg-config", so it can be a program name with args.
9092 set dummy pkg-config; ac_word=$2
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9094 $as_echo_n "checking for $ac_word... " >&6; }
9095 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9096 $as_echo_n "(cached) " >&6
9097 else
9098 case $PKG_CONFIG in
9099 [\\/]* | ?:[\\/]*)
9100 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9104 for as_dir in $PATH
9106 IFS=$as_save_IFS
9107 test -z "$as_dir" && as_dir=.
9108 for ac_exec_ext in '' $ac_executable_extensions; do
9109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9110 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9112 break 2
9114 done
9115 done
9116 IFS=$as_save_IFS
9118 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9120 esac
9122 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9123 if test -n "$PKG_CONFIG"; then
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9125 $as_echo "$PKG_CONFIG" >&6; }
9126 else
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9128 $as_echo "no" >&6; }
9135 HAVE_SOUND=no
9136 if test "${with_sound}" != "no"; then
9137 # Sound support for GNU/Linux, the free BSDs, and MinGW.
9138 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
9139 do :
9140 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9141 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9142 #ifdef __MINGW32__
9143 #define WIN32_LEAN_AND_MEAN
9144 #include <windows.h>
9145 #endif
9148 eval as_val=\$$as_ac_Header
9149 if test "x$as_val" = x""yes; then :
9150 cat >>confdefs.h <<_ACEOF
9151 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9152 _ACEOF
9153 have_sound_header=yes
9156 done
9158 test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
9159 as_fn_error "OSS sound support requested but not found." "$LINENO" 5
9161 if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
9162 # Emulation library used on NetBSD.
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
9164 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9165 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
9166 $as_echo_n "(cached) " >&6
9167 else
9168 ac_check_lib_save_LIBS=$LIBS
9169 LIBS="-lossaudio $LIBS"
9170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9171 /* end confdefs.h. */
9173 /* Override any GCC internal prototype to avoid an error.
9174 Use char because int might match the return type of a GCC
9175 builtin and then its argument prototype would still apply. */
9176 #ifdef __cplusplus
9177 extern "C"
9178 #endif
9179 char _oss_ioctl ();
9181 main ()
9183 return _oss_ioctl ();
9185 return 0;
9187 _ACEOF
9188 if ac_fn_c_try_link "$LINENO"; then :
9189 ac_cv_lib_ossaudio__oss_ioctl=yes
9190 else
9191 ac_cv_lib_ossaudio__oss_ioctl=no
9193 rm -f core conftest.err conftest.$ac_objext \
9194 conftest$ac_exeext conftest.$ac_ext
9195 LIBS=$ac_check_lib_save_LIBS
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9198 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9199 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9200 LIBSOUND=-lossaudio
9201 else
9202 LIBSOUND=
9205 test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
9206 as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
9210 if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
9211 ALSA_REQUIRED=1.0.0
9212 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
9214 succeeded=no
9216 if test "$PKG_CONFIG" = "no" ; then
9217 HAVE_ALSA=no
9218 else
9219 PKG_CONFIG_MIN_VERSION=0.9.0
9220 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9222 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
9224 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9225 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9226 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
9227 edit_cflags="
9228 s,///*,/,g
9229 s/^/ /
9230 s/ -I/ $isystem/g
9231 s/^ //
9233 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9234 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9236 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9237 succeeded=yes
9238 else
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9240 $as_echo "no" >&6; }
9241 ALSA_CFLAGS=""
9242 ALSA_LIBS=""
9243 ## If we have a custom action on failure, don't print errors, but
9244 ## do set a variable so people can do so. Do it in a subshell
9245 ## to capture any diagnostics in invoking pkg-config.
9246 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
9252 else
9253 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9254 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9258 if test $succeeded = yes; then
9259 HAVE_ALSA=yes
9260 else
9261 HAVE_ALSA=no
9264 if test $HAVE_ALSA = yes; then
9265 SAVE_CFLAGS="$CFLAGS"
9266 SAVE_LIBS="$LIBS"
9267 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9268 LIBS="$ALSA_LIBS $LIBS"
9269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9270 /* end confdefs.h. */
9271 #include <asoundlib.h>
9273 main ()
9275 snd_lib_error_set_handler (0);
9277 return 0;
9279 _ACEOF
9280 if ac_fn_c_try_compile "$LINENO"; then :
9281 emacs_alsa_normal=yes
9282 else
9283 emacs_alsa_normal=no
9285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9286 if test "$emacs_alsa_normal" != yes; then
9287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9288 /* end confdefs.h. */
9289 #include <alsa/asoundlib.h>
9291 main ()
9293 snd_lib_error_set_handler (0);
9295 return 0;
9297 _ACEOF
9298 if ac_fn_c_try_compile "$LINENO"; then :
9299 emacs_alsa_subdir=yes
9300 else
9301 emacs_alsa_subdir=no
9303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9304 if test "$emacs_alsa_subdir" != yes; then
9305 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9307 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
9310 CFLAGS="$SAVE_CFLAGS"
9311 LIBS="$SAVE_LIBS"
9312 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9313 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
9315 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
9317 elif test "${with_sound}" = "alsa"; then
9318 as_fn_error "ALSA sound support requested but not found." "$LINENO" 5
9321 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
9322 case "$opsys" in
9323 gnu-linux|freebsd|netbsd|mingw32)
9325 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
9327 HAVE_SOUND=yes
9329 esac
9338 for ac_header in $ac_header_list
9339 do :
9340 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9341 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9343 eval as_val=\$$as_ac_Header
9344 if test "x$as_val" = x""yes; then :
9345 cat >>confdefs.h <<_ACEOF
9346 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9347 _ACEOF
9351 done
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9372 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9374 /* end confdefs.h. */
9375 #include <sys/personality.h>
9377 main ()
9379 personality (PER_LINUX32)
9381 return 0;
9383 _ACEOF
9384 if ac_fn_c_try_compile "$LINENO"; then :
9385 emacs_cv_personality_linux32=yes
9386 else
9387 emacs_cv_personality_linux32=no
9389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9391 $as_echo "$emacs_cv_personality_linux32" >&6; }
9393 if test $emacs_cv_personality_linux32 = yes; then
9395 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9399 for ac_header in term.h
9400 do :
9401 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9402 if test "x$ac_cv_header_term_h" = x""yes; then :
9403 cat >>confdefs.h <<_ACEOF
9404 #define HAVE_TERM_H 1
9405 _ACEOF
9409 done
9411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9412 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9413 if test "${ac_cv_header_time+set}" = set; then :
9414 $as_echo_n "(cached) " >&6
9415 else
9416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9417 /* end confdefs.h. */
9418 #include <sys/types.h>
9419 #include <sys/time.h>
9420 #include <time.h>
9423 main ()
9425 if ((struct tm *) 0)
9426 return 0;
9428 return 0;
9430 _ACEOF
9431 if ac_fn_c_try_compile "$LINENO"; then :
9432 ac_cv_header_time=yes
9433 else
9434 ac_cv_header_time=no
9436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9439 $as_echo "$ac_cv_header_time" >&6; }
9440 if test $ac_cv_header_time = yes; then
9442 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9446 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9449 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9450 ac_have_decl=1
9451 else
9452 ac_have_decl=0
9455 cat >>confdefs.h <<_ACEOF
9456 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
9457 _ACEOF
9459 if test $ac_cv_have_decl_sys_siglist != yes; then
9460 # For Tru64, at least:
9461 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9464 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9465 ac_have_decl=1
9466 else
9467 ac_have_decl=0
9470 cat >>confdefs.h <<_ACEOF
9471 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9472 _ACEOF
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9476 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9477 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9478 $as_echo_n "(cached) " >&6
9479 else
9480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9481 /* end confdefs.h. */
9482 #include <sys/types.h>
9483 #include <sys/wait.h>
9484 #ifndef WEXITSTATUS
9485 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9486 #endif
9487 #ifndef WIFEXITED
9488 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9489 #endif
9492 main ()
9494 int s;
9495 wait (&s);
9496 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9498 return 0;
9500 _ACEOF
9501 if ac_fn_c_try_compile "$LINENO"; then :
9502 ac_cv_header_sys_wait_h=yes
9503 else
9504 ac_cv_header_sys_wait_h=no
9506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9509 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
9510 if test $ac_cv_header_sys_wait_h = yes; then
9512 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9520 for ac_header in net/if.h
9521 do :
9522 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9523 #if HAVE_SYS_SOCKET_H
9524 #include <sys/socket.h>
9525 #endif
9527 if test "x$ac_cv_header_net_if_h" = x""yes; then :
9528 cat >>confdefs.h <<_ACEOF
9529 #define HAVE_NET_IF_H 1
9530 _ACEOF
9534 done
9536 for ac_header in ifaddrs.h
9537 do :
9538 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9539 #if HAVE_SYS_SOCKET_H
9540 #include <sys/socket.h>
9541 #endif
9543 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9544 cat >>confdefs.h <<_ACEOF
9545 #define HAVE_IFADDRS_H 1
9546 _ACEOF
9550 done
9552 for ac_header in net/if_dl.h
9553 do :
9554 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9555 #if HAVE_SYS_SOCKET_H
9556 #include <sys/socket.h>
9557 #endif
9559 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
9560 cat >>confdefs.h <<_ACEOF
9561 #define HAVE_NET_IF_DL_H 1
9562 _ACEOF
9566 done
9569 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9570 #if HAVE_SYS_SOCKET_H
9571 #include <sys/socket.h>
9572 #endif
9573 #if HAVE_NET_IF_H
9574 #include <net/if.h>
9575 #endif
9577 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
9579 cat >>confdefs.h <<_ACEOF
9580 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9581 _ACEOF
9585 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9586 #if HAVE_SYS_SOCKET_H
9587 #include <sys/socket.h>
9588 #endif
9589 #if HAVE_NET_IF_H
9590 #include <net/if.h>
9591 #endif
9593 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9595 cat >>confdefs.h <<_ACEOF
9596 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9597 _ACEOF
9601 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9602 #if HAVE_SYS_SOCKET_H
9603 #include <sys/socket.h>
9604 #endif
9605 #if HAVE_NET_IF_H
9606 #include <net/if.h>
9607 #endif
9609 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9611 cat >>confdefs.h <<_ACEOF
9612 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9613 _ACEOF
9617 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9618 #if HAVE_SYS_SOCKET_H
9619 #include <sys/socket.h>
9620 #endif
9621 #if HAVE_NET_IF_H
9622 #include <net/if.h>
9623 #endif
9625 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9627 cat >>confdefs.h <<_ACEOF
9628 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9629 _ACEOF
9633 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9634 #if HAVE_SYS_SOCKET_H
9635 #include <sys/socket.h>
9636 #endif
9637 #if HAVE_NET_IF_H
9638 #include <net/if.h>
9639 #endif
9641 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9643 cat >>confdefs.h <<_ACEOF
9644 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9645 _ACEOF
9649 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9650 #if HAVE_SYS_SOCKET_H
9651 #include <sys/socket.h>
9652 #endif
9653 #if HAVE_NET_IF_H
9654 #include <net/if.h>
9655 #endif
9657 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9659 cat >>confdefs.h <<_ACEOF
9660 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9661 _ACEOF
9669 DEPFLAGS=
9670 MKDEPDIR=":"
9671 deps_frag=deps.mk
9672 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9674 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9675 HAVE_GNU_MAKE=no
9676 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9677 if test "x$testval" != x; then
9678 HAVE_GNU_MAKE=yes
9679 else
9680 ac_enable_autodepend=no
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9683 $as_echo "$HAVE_GNU_MAKE" >&6; }
9684 if test $HAVE_GNU_MAKE = yes; then
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9686 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9687 SAVE_CFLAGS="$CFLAGS"
9688 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9690 /* end confdefs.h. */
9693 main ()
9697 return 0;
9699 _ACEOF
9700 if ac_fn_c_try_compile "$LINENO"; then :
9702 else
9703 ac_enable_autodepend=no
9705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9706 CFLAGS="$SAVE_CFLAGS"
9707 test -f deps.d || ac_enable_autodepend=no
9708 rm -rf deps.d
9709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9710 $as_echo "$ac_enable_autodepend" >&6; }
9712 if test $ac_enable_autodepend = yes; then
9713 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9714 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9715 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9716 deps_frag=autodeps.mk
9719 deps_frag=$srcdir/src/$deps_frag
9725 lisp_frag=$srcdir/src/lisp.mk
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9730 $as_echo_n "checking for long file names... " >&6; }
9731 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9732 $as_echo_n "(cached) " >&6
9733 else
9734 ac_cv_sys_long_file_names=yes
9735 # Test for long file names in all the places we know might matter:
9736 # . the current directory, where building will happen
9737 # $prefix/lib where we will be installing things
9738 # $exec_prefix/lib likewise
9739 # $TMPDIR if set, where it might want to write temporary files
9740 # /tmp where it might want to write temporary files
9741 # /var/tmp likewise
9742 # /usr/tmp likewise
9743 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9744 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9745 # in the usual case where exec_prefix is '${prefix}'.
9746 case $ac_dir in #(
9747 . | /* | ?:[\\/]*) ;; #(
9748 *) continue;;
9749 esac
9750 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9751 ac_xdir=$ac_dir/cf$$
9752 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9753 ac_tf1=$ac_xdir/conftest9012345
9754 ac_tf2=$ac_xdir/conftest9012346
9755 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9756 ac_cv_sys_long_file_names=no
9757 rm -f -r "$ac_xdir" 2>/dev/null
9758 test $ac_cv_sys_long_file_names = no && break
9759 done
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9762 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9763 if test $ac_cv_sys_long_file_names = yes; then
9765 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9770 #### Choose a window system.
9772 ## We leave window_system equal to none if
9773 ## we end up building without one. Any new window system should
9774 ## set window_system to an appropriate value and add objects to
9775 ## window-system-specific substs.
9777 window_system=none
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9779 $as_echo_n "checking for X... " >&6; }
9782 # Check whether --with-x was given.
9783 if test "${with_x+set}" = set; then :
9784 withval=$with_x;
9787 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9788 if test "x$with_x" = xno; then
9789 # The user explicitly disabled X.
9790 have_x=disabled
9791 else
9792 case $x_includes,$x_libraries in #(
9793 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9794 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9795 $as_echo_n "(cached) " >&6
9796 else
9797 # One or both of the vars are not set, and there is no cached value.
9798 ac_x_includes=no ac_x_libraries=no
9799 rm -f -r conftest.dir
9800 if mkdir conftest.dir; then
9801 cd conftest.dir
9802 cat >Imakefile <<'_ACEOF'
9803 incroot:
9804 @echo incroot='${INCROOT}'
9805 usrlibdir:
9806 @echo usrlibdir='${USRLIBDIR}'
9807 libdir:
9808 @echo libdir='${LIBDIR}'
9809 _ACEOF
9810 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9811 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9812 for ac_var in incroot usrlibdir libdir; do
9813 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9814 done
9815 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9816 for ac_extension in a so sl dylib la dll; do
9817 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9818 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9819 ac_im_usrlibdir=$ac_im_libdir; break
9821 done
9822 # Screen out bogus values from the imake configuration. They are
9823 # bogus both because they are the default anyway, and because
9824 # using them would break gcc on systems where it needs fixed includes.
9825 case $ac_im_incroot in
9826 /usr/include) ac_x_includes= ;;
9827 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9828 esac
9829 case $ac_im_usrlibdir in
9830 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9831 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9832 esac
9834 cd ..
9835 rm -f -r conftest.dir
9838 # Standard set of common directories for X headers.
9839 # Check X11 before X11Rn because it is often a symlink to the current release.
9840 ac_x_header_dirs='
9841 /usr/X11/include
9842 /usr/X11R7/include
9843 /usr/X11R6/include
9844 /usr/X11R5/include
9845 /usr/X11R4/include
9847 /usr/include/X11
9848 /usr/include/X11R7
9849 /usr/include/X11R6
9850 /usr/include/X11R5
9851 /usr/include/X11R4
9853 /usr/local/X11/include
9854 /usr/local/X11R7/include
9855 /usr/local/X11R6/include
9856 /usr/local/X11R5/include
9857 /usr/local/X11R4/include
9859 /usr/local/include/X11
9860 /usr/local/include/X11R7
9861 /usr/local/include/X11R6
9862 /usr/local/include/X11R5
9863 /usr/local/include/X11R4
9865 /usr/X386/include
9866 /usr/x386/include
9867 /usr/XFree86/include/X11
9869 /usr/include
9870 /usr/local/include
9871 /usr/unsupported/include
9872 /usr/athena/include
9873 /usr/local/x11r5/include
9874 /usr/lpp/Xamples/include
9876 /usr/openwin/include
9877 /usr/openwin/share/include'
9879 if test "$ac_x_includes" = no; then
9880 # Guess where to find include files, by looking for Xlib.h.
9881 # First, try using that file with no special directory specified.
9882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9883 /* end confdefs.h. */
9884 #include <X11/Xlib.h>
9885 _ACEOF
9886 if ac_fn_c_try_cpp "$LINENO"; then :
9887 # We can compile using X headers with no special include directory.
9888 ac_x_includes=
9889 else
9890 for ac_dir in $ac_x_header_dirs; do
9891 if test -r "$ac_dir/X11/Xlib.h"; then
9892 ac_x_includes=$ac_dir
9893 break
9895 done
9897 rm -f conftest.err conftest.$ac_ext
9898 fi # $ac_x_includes = no
9900 if test "$ac_x_libraries" = no; then
9901 # Check for the libraries.
9902 # See if we find them without any special options.
9903 # Don't add to $LIBS permanently.
9904 ac_save_LIBS=$LIBS
9905 LIBS="-lX11 $LIBS"
9906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9907 /* end confdefs.h. */
9908 #include <X11/Xlib.h>
9910 main ()
9912 XrmInitialize ()
9914 return 0;
9916 _ACEOF
9917 if ac_fn_c_try_link "$LINENO"; then :
9918 LIBS=$ac_save_LIBS
9919 # We can link X programs with no special library path.
9920 ac_x_libraries=
9921 else
9922 LIBS=$ac_save_LIBS
9923 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9925 # Don't even attempt the hair of trying to link an X program!
9926 for ac_extension in a so sl dylib la dll; do
9927 if test -r "$ac_dir/libX11.$ac_extension"; then
9928 ac_x_libraries=$ac_dir
9929 break 2
9931 done
9932 done
9934 rm -f core conftest.err conftest.$ac_objext \
9935 conftest$ac_exeext conftest.$ac_ext
9936 fi # $ac_x_libraries = no
9938 case $ac_x_includes,$ac_x_libraries in #(
9939 no,* | *,no | *\'*)
9940 # Didn't find X, or a directory has "'" in its name.
9941 ac_cv_have_x="have_x=no";; #(
9943 # Record where we found X for the cache.
9944 ac_cv_have_x="have_x=yes\
9945 ac_x_includes='$ac_x_includes'\
9946 ac_x_libraries='$ac_x_libraries'"
9947 esac
9949 ;; #(
9950 *) have_x=yes;;
9951 esac
9952 eval "$ac_cv_have_x"
9953 fi # $with_x != no
9955 if test "$have_x" != yes; then
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9957 $as_echo "$have_x" >&6; }
9958 no_x=yes
9959 else
9960 # If each of the values was on the command line, it overrides each guess.
9961 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9962 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9963 # Update the cache value to reflect the command line values.
9964 ac_cv_have_x="have_x=yes\
9965 ac_x_includes='$x_includes'\
9966 ac_x_libraries='$x_libraries'"
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9968 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9971 if test "$no_x" != yes; then
9972 window_system=x11
9975 LD_SWITCH_X_SITE_RPATH=
9976 if test "${x_libraries}" != NONE; then
9977 if test -n "${x_libraries}"; then
9978 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9979 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9981 x_default_search_path=""
9982 x_search_path=${x_libraries}
9983 if test -z "${x_search_path}"; then
9984 x_search_path=/usr/lib
9986 for x_library in `echo ${x_search_path}: | \
9987 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9988 x_search_path="\
9989 ${x_library}/X11/%L/%T/%N%C%S:\
9990 ${x_library}/X11/%l/%T/%N%C%S:\
9991 ${x_library}/X11/%T/%N%C%S:\
9992 ${x_library}/X11/%L/%T/%N%S:\
9993 ${x_library}/X11/%l/%T/%N%S:\
9994 ${x_library}/X11/%T/%N%S"
9995 if test x"${x_default_search_path}" = x; then
9996 x_default_search_path=${x_search_path}
9997 else
9998 x_default_search_path="${x_search_path}:${x_default_search_path}"
10000 done
10004 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
10005 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
10008 if test x"${x_includes}" = x; then
10009 bitmapdir=/usr/include/X11/bitmaps
10010 else
10011 # accumulate include directories that have X11 bitmap subdirectories
10012 bmd_acc="dummyval"
10013 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
10014 if test -d "${bmd}/X11/bitmaps"; then
10015 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
10017 if test -d "${bmd}/bitmaps"; then
10018 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
10020 done
10021 if test ${bmd_acc} != "dummyval"; then
10022 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
10026 HAVE_NS=no
10027 NS_IMPL_COCOA=no
10028 NS_IMPL_GNUSTEP=no
10029 tmp_CPPFLAGS="$CPPFLAGS"
10030 tmp_CFLAGS="$CFLAGS"
10031 CPPFLAGS="$CPPFLAGS -x objective-c"
10032 CFLAGS="$CFLAGS -x objective-c"
10033 GNU_OBJC_CFLAGS=
10034 LIBS_GNUSTEP=
10035 if test "${with_ns}" != no; then
10036 if test "${opsys}" = darwin; then
10037 NS_IMPL_COCOA=yes
10038 ns_appdir=`pwd`/nextstep/Emacs.app
10039 ns_appbindir=${ns_appdir}/Contents/MacOS
10040 ns_appresdir=${ns_appdir}/Contents/Resources
10041 ns_appsrc=Cocoa/Emacs.base
10042 elif test -f $GNUSTEP_CONFIG_FILE; then
10043 NS_IMPL_GNUSTEP=yes
10044 ns_appdir=`pwd`/nextstep/Emacs.app
10045 ns_appbindir=${ns_appdir}
10046 ns_appresdir=${ns_appdir}/Resources
10047 ns_appsrc=GNUstep/Emacs.base
10048 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
10049 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
10050 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
10051 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
10052 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
10053 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
10054 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
10055 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
10056 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
10057 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
10058 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
10059 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
10060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
10061 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
10062 if test "${emacs_cv_objc_exceptions+set}" = set; then :
10063 $as_echo_n "(cached) " >&6
10064 else
10065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10066 /* end confdefs.h. */
10067 #include <GNUstepBase/GSConfig.h>
10069 main ()
10071 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
10073 #else
10074 fail;
10075 #endif
10077 return 0;
10079 _ACEOF
10080 if ac_fn_c_try_compile "$LINENO"; then :
10081 emacs_cv_objc_exceptions=yes
10082 else
10083 emacs_cv_objc_exceptions=no
10085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
10088 $as_echo "$emacs_cv_objc_exceptions" >&6; }
10089 if test $emacs_cv_objc_exceptions = yes; then
10091 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
10093 GNU_OBJC_CFLAGS="-fobjc-exceptions"
10097 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
10099 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
10100 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
10101 HAVE_NS=yes
10102 else
10103 as_fn_error "\`--with-ns' was specified, but the include
10104 files are missing or cannot be compiled." "$LINENO" 5
10109 macfont_file=""
10110 if test "${NS_IMPL_COCOA}" = "yes"; then
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.4 or newer" >&5
10112 $as_echo_n "checking for OSX 10.4 or newer... " >&6; }
10113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10114 /* end confdefs.h. */
10115 #include <AppKit/AppKit.h>
10117 main ()
10120 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10121 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
10122 ; /* OK */
10123 #else
10124 #error "OSX 10.4 or newer required"
10125 #endif
10126 #endif
10129 return 0;
10131 _ACEOF
10132 if ac_fn_c_try_compile "$LINENO"; then :
10133 ns_osx_have_104=yes
10134 else
10135 ns_osx_have_104=no
10137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_104" >&5
10139 $as_echo "$ns_osx_have_104" >&6; }
10141 if test $ns_osx_have_104 = no; then
10142 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 or newer" >&5
10145 $as_echo_n "checking for OSX 10.5 or newer... " >&6; }
10146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10147 /* end confdefs.h. */
10148 #include <AppKit/AppKit.h>
10150 main ()
10153 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10154 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
10155 ; /* OK */
10156 #else
10157 #error "OSX 10.5 not found"
10158 #endif
10159 #endif
10162 return 0;
10164 _ACEOF
10165 if ac_fn_c_try_compile "$LINENO"; then :
10166 ns_osx_have_105=yes
10167 else
10168 ns_osx_have_105=no
10170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_105" >&5
10172 $as_echo "$ns_osx_have_105" >&6; }
10173 if test $ns_osx_have_105 = yes; then
10174 macfont_file="macfont.o"
10177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10178 /* end confdefs.h. */
10179 #include <Foundation/NSObjCRuntime.h>
10181 main ()
10183 NSInteger i;
10185 return 0;
10187 _ACEOF
10188 if ac_fn_c_try_compile "$LINENO"; then :
10189 ns_have_nsinteger=yes
10190 else
10191 ns_have_nsinteger=no
10193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10194 if test $ns_have_nsinteger = yes; then
10196 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
10203 INSTALL_ARCH_INDEP_EXTRA=install-etc
10204 ns_self_contained=no
10205 NS_OBJ=
10206 NS_OBJC_OBJ=
10207 if test "${HAVE_NS}" = yes; then
10208 if test "$with_toolkit_scroll_bars" = "no"; then
10209 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10212 window_system=nextstep
10213 # set up packaging dirs
10214 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10215 ns_self_contained=yes
10216 prefix=${ns_appresdir}
10217 exec_prefix=${ns_appbindir}
10218 libexecdir="\${ns_appbindir}/libexec"
10219 archlibdir="\${ns_appbindir}/libexec"
10220 etcdocdir="\${ns_appresdir}/etc"
10221 etcdir="\${ns_appresdir}/etc"
10222 infodir="\${ns_appresdir}/info"
10223 mandir="\${ns_appresdir}/man"
10224 lispdir="\${ns_appresdir}/lisp"
10225 leimdir="\${ns_appresdir}/leim"
10226 INSTALL_ARCH_INDEP_EXTRA=
10229 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
10231 CFLAGS="$tmp_CFLAGS"
10232 CPPFLAGS="$tmp_CPPFLAGS"
10238 HAVE_W32=no
10239 W32_OBJ=
10240 W32_LIBS=
10241 EMACSRES=
10242 CLIENTRES=
10243 CLIENTW=
10244 W32_RES_LINK=
10245 EMACS_MANIFEST=
10246 UPDATE_MANIFEST=
10247 if test "${with_w32}" != no; then
10248 case "${opsys}" in
10249 cygwin)
10250 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
10251 if test "x$ac_cv_header_windows_h" = x""yes; then :
10252 HAVE_W32=yes
10253 else
10254 as_fn_error "\`--with-w32' was specified, but windows.h
10255 cannot be found." "$LINENO" 5
10260 mingw32)
10261 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10264 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10266 esac
10269 if test "${opsys}" = "mingw32"; then
10270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10271 $as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10273 /* end confdefs.h. */
10275 #include <windows.h>
10276 #include <usp10.h>
10278 main ()
10280 PIMAGE_NT_HEADERS pHeader;
10281 PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
10283 return 0;
10285 _ACEOF
10286 if ac_fn_c_try_compile "$LINENO"; then :
10287 emacs_cv_w32api=yes
10288 HAVE_W32=yes
10289 else
10290 emacs_cv_w32api=no
10292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10294 $as_echo "$emacs_cv_w32api" >&6; }
10295 if test "${emacs_cv_w32api}" = "no"; then
10296 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10300 FIRSTFILE_OBJ=
10301 NTDIR=
10302 LIBS_ECLIENT=
10303 LIB_WSOCK32=
10304 NTLIB=
10305 CM_OBJ="cm.o"
10306 XARGS_LIMIT=
10307 if test "${HAVE_W32}" = "yes"; then
10309 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10311 if test -n "$ac_tool_prefix"; then
10312 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10313 set dummy ${ac_tool_prefix}windres; ac_word=$2
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10315 $as_echo_n "checking for $ac_word... " >&6; }
10316 if test "${ac_cv_prog_WINDRES+set}" = set; then :
10317 $as_echo_n "(cached) " >&6
10318 else
10319 if test -n "$WINDRES"; then
10320 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10321 else
10322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10323 for as_dir in $PATH
10325 IFS=$as_save_IFS
10326 test -z "$as_dir" && as_dir=.
10327 for ac_exec_ext in '' $ac_executable_extensions; do
10328 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10329 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10331 break 2
10333 done
10334 done
10335 IFS=$as_save_IFS
10339 WINDRES=$ac_cv_prog_WINDRES
10340 if test -n "$WINDRES"; then
10341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10342 $as_echo "$WINDRES" >&6; }
10343 else
10344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345 $as_echo "no" >&6; }
10350 if test -z "$ac_cv_prog_WINDRES"; then
10351 ac_ct_WINDRES=$WINDRES
10352 # Extract the first word of "windres", so it can be a program name with args.
10353 set dummy windres; ac_word=$2
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355 $as_echo_n "checking for $ac_word... " >&6; }
10356 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10357 $as_echo_n "(cached) " >&6
10358 else
10359 if test -n "$ac_ct_WINDRES"; then
10360 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10361 else
10362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363 for as_dir in $PATH
10365 IFS=$as_save_IFS
10366 test -z "$as_dir" && as_dir=.
10367 for ac_exec_ext in '' $ac_executable_extensions; do
10368 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10369 ac_cv_prog_ac_ct_WINDRES="windres"
10370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371 break 2
10373 done
10374 done
10375 IFS=$as_save_IFS
10379 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10380 if test -n "$ac_ct_WINDRES"; then
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10382 $as_echo "$ac_ct_WINDRES" >&6; }
10383 else
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385 $as_echo "no" >&6; }
10388 if test "x$ac_ct_WINDRES" = x; then
10389 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10390 else
10391 case $cross_compiling:$ac_tool_warned in
10392 yes:)
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10394 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10395 ac_tool_warned=yes ;;
10396 esac
10397 WINDRES=$ac_ct_WINDRES
10399 else
10400 WINDRES="$ac_cv_prog_WINDRES"
10403 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10404 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
10405 EMACSRES="emacs.res"
10406 case "$canonical" in
10407 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10408 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10409 esac
10410 UPDATE_MANIFEST=update-game-score.exe.manifest
10411 if test "${opsys}" = "cygwin"; then
10412 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10413 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10414 # Tell the linker that emacs.res is an object (which we compile from
10415 # the rc file), not a linker script.
10416 W32_RES_LINK="-Wl,emacs.res"
10417 else
10418 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
10419 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10420 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10421 W32_RES_LINK="\$(EMACSRES)"
10422 CLIENTRES="emacsclient.res"
10423 CLIENTW="emacsclientw\$(EXEEXT)"
10424 FIRSTFILE_OBJ=firstfile.o
10425 NTDIR=nt
10426 CM_OBJ=
10427 LIBS_ECLIENT="-lcomctl32"
10428 LIB_WSOCK32="-lwsock32"
10429 NTLIB="ntlib.$ac_objext"
10430 XARGS_LIMIT="-s 10000"
10449 if test "${HAVE_W32}" = "yes"; then
10450 window_system=w32
10451 with_xft=no
10454 ## $window_system is now set to the window system we will
10455 ## ultimately use.
10457 if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
10458 # Too many warnings for now.
10460 nw="$nw -Wsuggest-attribute=const"
10461 nw="$nw -Wsuggest-attribute=noreturn"
10463 gl_warn_set=
10464 set x $WARN_CFLAGS; shift
10465 for gl_warn_item
10467 case " $nw " in
10468 *" $gl_warn_item "*)
10471 gl_warn_set="$gl_warn_set $gl_warn_item"
10473 esac
10474 done
10475 WARN_CFLAGS=$gl_warn_set
10479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5
10480 $as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; }
10481 if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then :
10482 $as_echo_n "(cached) " >&6
10483 else
10485 gl_save_compiler_FLAGS="$CFLAGS"
10486 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable"
10487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10488 /* end confdefs.h. */
10491 main ()
10495 return 0;
10497 _ACEOF
10498 if ac_fn_c_try_link "$LINENO"; then :
10499 gl_cv_warn_c__Wno_unused_variable=yes
10500 else
10501 gl_cv_warn_c__Wno_unused_variable=no
10503 rm -f core conftest.err conftest.$ac_objext \
10504 conftest$ac_exeext conftest.$ac_ext
10505 CFLAGS="$gl_save_compiler_FLAGS"
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5
10509 $as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; }
10510 if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then :
10511 as_fn_append WARN_CFLAGS " -Wno-unused-variable"
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5
10517 $as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; }
10518 if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then :
10519 $as_echo_n "(cached) " >&6
10520 else
10522 gl_save_compiler_FLAGS="$CFLAGS"
10523 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable"
10524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10525 /* end confdefs.h. */
10528 main ()
10532 return 0;
10534 _ACEOF
10535 if ac_fn_c_try_link "$LINENO"; then :
10536 gl_cv_warn_c__Wno_unused_but_set_variable=yes
10537 else
10538 gl_cv_warn_c__Wno_unused_but_set_variable=no
10540 rm -f core conftest.err conftest.$ac_objext \
10541 conftest$ac_exeext conftest.$ac_ext
10542 CFLAGS="$gl_save_compiler_FLAGS"
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5
10546 $as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; }
10547 if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then :
10548 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable"
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5
10554 $as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; }
10555 if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then :
10556 $as_echo_n "(cached) " >&6
10557 else
10559 gl_save_compiler_FLAGS="$CFLAGS"
10560 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter"
10561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10562 /* end confdefs.h. */
10565 main ()
10569 return 0;
10571 _ACEOF
10572 if ac_fn_c_try_link "$LINENO"; then :
10573 gl_cv_warn_c__Wno_unused_but_set_parameter=yes
10574 else
10575 gl_cv_warn_c__Wno_unused_but_set_parameter=no
10577 rm -f core conftest.err conftest.$ac_objext \
10578 conftest$ac_exeext conftest.$ac_ext
10579 CFLAGS="$gl_save_compiler_FLAGS"
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5
10583 $as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; }
10584 if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then :
10585 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter"
10591 term_header=
10592 HAVE_X_WINDOWS=no
10593 HAVE_X11=no
10594 USE_X_TOOLKIT=none
10596 case "${window_system}" in
10597 x11 )
10598 HAVE_X_WINDOWS=yes
10599 HAVE_X11=yes
10600 term_header=xterm.h
10601 case "${with_x_toolkit}" in
10602 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10603 motif ) USE_X_TOOLKIT=MOTIF ;;
10604 gtk ) with_gtk=yes
10605 term_header=gtkutil.h
10606 USE_X_TOOLKIT=none ;;
10607 gtk2 ) with_gtk2=yes
10608 term_header=gtkutil.h
10609 USE_X_TOOLKIT=none ;;
10610 gtk3 ) with_gtk3=yes
10611 term_header=gtkutil.h
10612 USE_X_TOOLKIT=none ;;
10613 no ) USE_X_TOOLKIT=none ;;
10614 * ) USE_X_TOOLKIT=maybe ;;
10615 esac
10617 nextstep )
10618 term_header=nsterm.h
10620 w32 )
10621 term_header=w32term.h
10623 esac
10625 if test "$window_system" = none && test "X$with_x" != "Xno"; then
10626 # Extract the first word of "X", so it can be a program name with args.
10627 set dummy X; ac_word=$2
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629 $as_echo_n "checking for $ac_word... " >&6; }
10630 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10631 $as_echo_n "(cached) " >&6
10632 else
10633 if test -n "$HAVE_XSERVER"; then
10634 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10635 else
10636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637 for as_dir in $PATH
10639 IFS=$as_save_IFS
10640 test -z "$as_dir" && as_dir=.
10641 for ac_exec_ext in '' $ac_executable_extensions; do
10642 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10643 ac_cv_prog_HAVE_XSERVER="true"
10644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645 break 2
10647 done
10648 done
10649 IFS=$as_save_IFS
10651 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10654 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10655 if test -n "$HAVE_XSERVER"; then
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10657 $as_echo "$HAVE_XSERVER" >&6; }
10658 else
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660 $as_echo "no" >&6; }
10664 if test "$HAVE_XSERVER" = true ||
10665 test -n "$DISPLAY" ||
10666 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10667 as_fn_error "You seem to be running X, but no X development libraries
10668 were found. You should install the relevant development files for X
10669 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10670 sure you have development files for image handling, i.e.
10671 tiff, gif, jpeg, png and xpm.
10672 If you are sure you want Emacs compiled without X window support, pass
10673 --without-x
10674 to configure." "$LINENO" 5
10678 ### We always support menus.
10679 HAVE_MENUS=yes
10681 # Does the opsystem file prohibit the use of the GNU malloc?
10682 # Assume not, until told otherwise.
10683 GNU_MALLOC=yes
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10686 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10687 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
10688 $as_echo_n "(cached) " >&6
10689 else
10690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10691 /* end confdefs.h. */
10692 #include <malloc.h>
10693 static void hook (void) {}
10695 main ()
10697 malloc_set_state (malloc_get_state ());
10698 __after_morecore_hook = hook;
10699 __malloc_initialize_hook = hook;
10701 return 0;
10703 _ACEOF
10704 if ac_fn_c_try_link "$LINENO"; then :
10705 emacs_cv_var_doug_lea_malloc=yes
10706 else
10707 emacs_cv_var_doug_lea_malloc=no
10709 rm -f core conftest.err conftest.$ac_objext \
10710 conftest$ac_exeext conftest.$ac_ext
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10713 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10714 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10717 system_malloc=no
10718 case "$opsys" in
10719 ## darwin ld insists on the use of malloc routines in the System framework.
10720 darwin|sol2-10) system_malloc=yes ;;
10721 esac
10723 if test "${system_malloc}" = "yes"; then
10725 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10727 GNU_MALLOC=no
10728 GNU_MALLOC_reason="
10729 (The GNU allocators don't work with this system configuration.)"
10730 GMALLOC_OBJ=
10731 VMLIMIT_OBJ=
10732 else
10733 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10734 VMLIMIT_OBJ=vm-limit.o
10736 for ac_header in sys/vlimit.h
10737 do :
10738 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10739 if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10740 cat >>confdefs.h <<_ACEOF
10741 #define HAVE_SYS_VLIMIT_H 1
10742 _ACEOF
10746 done
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10749 $as_echo_n "checking for data_start... " >&6; }
10750 if test "${emacs_cv_data_start+set}" = set; then :
10751 $as_echo_n "(cached) " >&6
10752 else
10753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754 /* end confdefs.h. */
10755 extern char data_start[]; char ch;
10757 main ()
10759 return data_start < &ch;
10761 return 0;
10763 _ACEOF
10764 if ac_fn_c_try_link "$LINENO"; then :
10765 emacs_cv_data_start=yes
10766 else
10767 emacs_cv_data_start=no
10769 rm -f core conftest.err conftest.$ac_objext \
10770 conftest$ac_exeext conftest.$ac_ext
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10773 $as_echo "$emacs_cv_data_start" >&6; }
10774 if test $emacs_cv_data_start = yes; then
10776 $as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10783 if test "$doug_lea_malloc" = "yes" ; then
10784 if test "$GNU_MALLOC" = yes ; then
10785 GNU_MALLOC_reason="
10786 (Using Doug Lea's new malloc from the GNU C Library.)"
10789 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10792 ## Use mmap directly for allocating larger buffers.
10793 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10794 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10795 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10796 case "$opsys" in
10797 gnu*) REL_ALLOC=no ;;
10798 esac
10801 if test x"${REL_ALLOC}" = x; then
10802 REL_ALLOC=${GNU_MALLOC}
10805 use_mmap_for_buffers=no
10806 case "$opsys" in
10807 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10808 esac
10817 for ac_func in getpagesize
10818 do :
10819 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10820 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10821 cat >>confdefs.h <<_ACEOF
10822 #define HAVE_GETPAGESIZE 1
10823 _ACEOF
10826 done
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10829 $as_echo_n "checking for working mmap... " >&6; }
10830 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10831 $as_echo_n "(cached) " >&6
10832 else
10833 if test "$cross_compiling" = yes; then :
10834 ac_cv_func_mmap_fixed_mapped=no
10835 else
10836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10837 /* end confdefs.h. */
10838 $ac_includes_default
10839 /* malloc might have been renamed as rpl_malloc. */
10840 #undef malloc
10842 /* Thanks to Mike Haertel and Jim Avera for this test.
10843 Here is a matrix of mmap possibilities:
10844 mmap private not fixed
10845 mmap private fixed at somewhere currently unmapped
10846 mmap private fixed at somewhere already mapped
10847 mmap shared not fixed
10848 mmap shared fixed at somewhere currently unmapped
10849 mmap shared fixed at somewhere already mapped
10850 For private mappings, we should verify that changes cannot be read()
10851 back from the file, nor mmap's back from the file at a different
10852 address. (There have been systems where private was not correctly
10853 implemented like the infamous i386 svr4.0, and systems where the
10854 VM page cache was not coherent with the file system buffer cache
10855 like early versions of FreeBSD and possibly contemporary NetBSD.)
10856 For shared mappings, we should conversely verify that changes get
10857 propagated back to all the places they're supposed to be.
10859 Grep wants private fixed already mapped.
10860 The main things grep needs to know about mmap are:
10861 * does it exist and is it safe to write into the mmap'd area
10862 * how to use it (BSD variants) */
10864 #include <fcntl.h>
10865 #include <sys/mman.h>
10867 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10868 char *malloc ();
10869 #endif
10871 /* This mess was copied from the GNU getpagesize.h. */
10872 #ifndef HAVE_GETPAGESIZE
10873 # ifdef _SC_PAGESIZE
10874 # define getpagesize() sysconf(_SC_PAGESIZE)
10875 # else /* no _SC_PAGESIZE */
10876 # ifdef HAVE_SYS_PARAM_H
10877 # include <sys/param.h>
10878 # ifdef EXEC_PAGESIZE
10879 # define getpagesize() EXEC_PAGESIZE
10880 # else /* no EXEC_PAGESIZE */
10881 # ifdef NBPG
10882 # define getpagesize() NBPG * CLSIZE
10883 # ifndef CLSIZE
10884 # define CLSIZE 1
10885 # endif /* no CLSIZE */
10886 # else /* no NBPG */
10887 # ifdef NBPC
10888 # define getpagesize() NBPC
10889 # else /* no NBPC */
10890 # ifdef PAGESIZE
10891 # define getpagesize() PAGESIZE
10892 # endif /* PAGESIZE */
10893 # endif /* no NBPC */
10894 # endif /* no NBPG */
10895 # endif /* no EXEC_PAGESIZE */
10896 # else /* no HAVE_SYS_PARAM_H */
10897 # define getpagesize() 8192 /* punt totally */
10898 # endif /* no HAVE_SYS_PARAM_H */
10899 # endif /* no _SC_PAGESIZE */
10901 #endif /* no HAVE_GETPAGESIZE */
10904 main ()
10906 char *data, *data2, *data3;
10907 const char *cdata2;
10908 int i, pagesize;
10909 int fd, fd2;
10911 pagesize = getpagesize ();
10913 /* First, make a file with some known garbage in it. */
10914 data = (char *) malloc (pagesize);
10915 if (!data)
10916 return 1;
10917 for (i = 0; i < pagesize; ++i)
10918 *(data + i) = rand ();
10919 umask (0);
10920 fd = creat ("conftest.mmap", 0600);
10921 if (fd < 0)
10922 return 2;
10923 if (write (fd, data, pagesize) != pagesize)
10924 return 3;
10925 close (fd);
10927 /* Next, check that the tail of a page is zero-filled. File must have
10928 non-zero length, otherwise we risk SIGBUS for entire page. */
10929 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10930 if (fd2 < 0)
10931 return 4;
10932 cdata2 = "";
10933 if (write (fd2, cdata2, 1) != 1)
10934 return 5;
10935 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10936 if (data2 == MAP_FAILED)
10937 return 6;
10938 for (i = 0; i < pagesize; ++i)
10939 if (*(data2 + i))
10940 return 7;
10941 close (fd2);
10942 if (munmap (data2, pagesize))
10943 return 8;
10945 /* Next, try to mmap the file at a fixed address which already has
10946 something else allocated at it. If we can, also make sure that
10947 we see the same garbage. */
10948 fd = open ("conftest.mmap", O_RDWR);
10949 if (fd < 0)
10950 return 9;
10951 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10952 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10953 return 10;
10954 for (i = 0; i < pagesize; ++i)
10955 if (*(data + i) != *(data2 + i))
10956 return 11;
10958 /* Finally, make sure that changes to the mapped area do not
10959 percolate back to the file as seen by read(). (This is a bug on
10960 some variants of i386 svr4.0.) */
10961 for (i = 0; i < pagesize; ++i)
10962 *(data2 + i) = *(data2 + i) + 1;
10963 data3 = (char *) malloc (pagesize);
10964 if (!data3)
10965 return 12;
10966 if (read (fd, data3, pagesize) != pagesize)
10967 return 13;
10968 for (i = 0; i < pagesize; ++i)
10969 if (*(data + i) != *(data3 + i))
10970 return 14;
10971 close (fd);
10972 return 0;
10974 _ACEOF
10975 if ac_fn_c_try_run "$LINENO"; then :
10976 ac_cv_func_mmap_fixed_mapped=yes
10977 else
10978 ac_cv_func_mmap_fixed_mapped=no
10980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10981 conftest.$ac_objext conftest.beam conftest.$ac_ext
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10986 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10987 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10989 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10992 rm -f conftest.mmap conftest.txt
10994 if test $use_mmap_for_buffers = yes; then
10996 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10998 REL_ALLOC=no
11001 LIBS="$LIBS_SYSTEM $LIBS"
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
11004 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
11005 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
11006 $as_echo_n "(cached) " >&6
11007 else
11008 ac_check_lib_save_LIBS=$LIBS
11009 LIBS="-ldnet $LIBS"
11010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11011 /* end confdefs.h. */
11013 /* Override any GCC internal prototype to avoid an error.
11014 Use char because int might match the return type of a GCC
11015 builtin and then its argument prototype would still apply. */
11016 #ifdef __cplusplus
11017 extern "C"
11018 #endif
11019 char dnet_ntoa ();
11021 main ()
11023 return dnet_ntoa ();
11025 return 0;
11027 _ACEOF
11028 if ac_fn_c_try_link "$LINENO"; then :
11029 ac_cv_lib_dnet_dnet_ntoa=yes
11030 else
11031 ac_cv_lib_dnet_dnet_ntoa=no
11033 rm -f core conftest.err conftest.$ac_objext \
11034 conftest$ac_exeext conftest.$ac_ext
11035 LIBS=$ac_check_lib_save_LIBS
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11038 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
11039 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
11040 cat >>confdefs.h <<_ACEOF
11041 #define HAVE_LIBDNET 1
11042 _ACEOF
11044 LIBS="-ldnet $LIBS"
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
11050 $as_echo_n "checking for main in -lXbsd... " >&6; }
11051 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
11052 $as_echo_n "(cached) " >&6
11053 else
11054 ac_check_lib_save_LIBS=$LIBS
11055 LIBS="-lXbsd $LIBS"
11056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11057 /* end confdefs.h. */
11061 main ()
11063 return main ();
11065 return 0;
11067 _ACEOF
11068 if ac_fn_c_try_link "$LINENO"; then :
11069 ac_cv_lib_Xbsd_main=yes
11070 else
11071 ac_cv_lib_Xbsd_main=no
11073 rm -f core conftest.err conftest.$ac_objext \
11074 conftest$ac_exeext conftest.$ac_ext
11075 LIBS=$ac_check_lib_save_LIBS
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
11078 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
11079 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
11080 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
11084 LIB_PTHREAD=
11088 if test "$ac_cv_header_pthread_h"; then
11089 if test "$GMALLOC_OBJ" = gmalloc.o; then
11090 emacs_pthread_function=pthread_atfork
11091 else
11092 emacs_pthread_function=pthread_self
11094 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
11095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
11096 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
11097 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
11098 $as_echo_n "(cached) " >&6
11099 else
11100 ac_check_lib_save_LIBS=$LIBS
11101 LIBS="-lpthread $LIBS"
11102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11103 /* end confdefs.h. */
11105 /* Override any GCC internal prototype to avoid an error.
11106 Use char because int might match the return type of a GCC
11107 builtin and then its argument prototype would still apply. */
11108 #ifdef __cplusplus
11109 extern "C"
11110 #endif
11111 char $emacs_pthread_function ();
11113 main ()
11115 return $emacs_pthread_function ();
11117 return 0;
11119 _ACEOF
11120 if ac_fn_c_try_link "$LINENO"; then :
11121 eval "$as_ac_Lib=yes"
11122 else
11123 eval "$as_ac_Lib=no"
11125 rm -f core conftest.err conftest.$ac_objext \
11126 conftest$ac_exeext conftest.$ac_ext
11127 LIBS=$ac_check_lib_save_LIBS
11129 eval ac_res=\$$as_ac_Lib
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11131 $as_echo "$ac_res" >&6; }
11132 eval as_val=\$$as_ac_Lib
11133 if test "x$as_val" = x""yes; then :
11134 HAVE_PTHREAD=yes
11138 if test "$HAVE_PTHREAD" = yes; then
11139 case "${canonical}" in
11140 *-hpux*) ;;
11141 *) LIB_PTHREAD="-lpthread"
11142 LIBS="$LIB_PTHREAD $LIBS" ;;
11143 esac
11145 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
11151 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
11152 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
11153 $as_echo_n "(cached) " >&6
11154 else
11155 ac_check_lib_save_LIBS=$LIBS
11156 LIBS="-lpthreads $LIBS"
11157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11158 /* end confdefs.h. */
11160 /* Override any GCC internal prototype to avoid an error.
11161 Use char because int might match the return type of a GCC
11162 builtin and then its argument prototype would still apply. */
11163 #ifdef __cplusplus
11164 extern "C"
11165 #endif
11166 char cma_open ();
11168 main ()
11170 return cma_open ();
11172 return 0;
11174 _ACEOF
11175 if ac_fn_c_try_link "$LINENO"; then :
11176 ac_cv_lib_pthreads_cma_open=yes
11177 else
11178 ac_cv_lib_pthreads_cma_open=no
11180 rm -f core conftest.err conftest.$ac_objext \
11181 conftest$ac_exeext conftest.$ac_ext
11182 LIBS=$ac_check_lib_save_LIBS
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
11185 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
11186 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
11187 cat >>confdefs.h <<_ACEOF
11188 #define HAVE_LIBPTHREADS 1
11189 _ACEOF
11191 LIBS="-lpthreads $LIBS"
11196 ## Note: when using cpp in s/aix4.2.h, this definition depended on
11197 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
11198 ## the system file was sourced. Hence the value of LIBS_SYSTEM
11199 ## added to LIBS in configure would never contain the pthreads part,
11200 ## but the value used in Makefiles might. FIXME?
11202 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
11203 ## be harmless on older versions of X where it happens to exist.
11204 test "$opsys" = "aix4-2" && \
11205 test $ac_cv_lib_pthreads_cma_open = yes && \
11206 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
11209 case ${host_os} in
11210 aix*)
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11212 $as_echo_n "checking for -bbigtoc option... " >&6; }
11213 if test "${gdb_cv_bigtoc+set}" = set; then :
11214 $as_echo_n "(cached) " >&6
11215 else
11217 case $GCC in
11218 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11219 *) gdb_cv_bigtoc=-bbigtoc ;;
11220 esac
11222 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
11223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11224 /* end confdefs.h. */
11227 main ()
11229 int i;
11231 return 0;
11233 _ACEOF
11234 if ac_fn_c_try_link "$LINENO"; then :
11236 else
11237 gdb_cv_bigtoc=
11239 rm -f core conftest.err conftest.$ac_objext \
11240 conftest$ac_exeext conftest.$ac_ext
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11244 $as_echo "$gdb_cv_bigtoc" >&6; }
11246 esac
11248 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
11249 # used for the tests that follow. We set them back to REAL_CFLAGS and
11250 # REAL_CPPFLAGS later on.
11252 REAL_CFLAGS="$CFLAGS"
11253 REAL_CPPFLAGS="$CPPFLAGS"
11255 if test "${HAVE_X11}" = "yes"; then
11256 DEFS="$C_SWITCH_X_SITE $DEFS"
11257 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
11258 LIBS="-lX11 $LIBS"
11259 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
11260 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
11262 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
11263 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
11264 # but it's more convenient here to set LD_RUN_PATH since this
11265 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
11266 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
11267 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
11268 export LD_RUN_PATH
11271 if test "${opsys}" = "gnu-linux"; then
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
11273 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
11274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11275 /* end confdefs.h. */
11278 main ()
11280 XOpenDisplay ("foo");
11282 return 0;
11284 _ACEOF
11285 if ac_fn_c_try_link "$LINENO"; then :
11286 xgnu_linux_first_failure=no
11287 else
11288 xgnu_linux_first_failure=yes
11290 rm -f core conftest.err conftest.$ac_objext \
11291 conftest$ac_exeext conftest.$ac_ext
11292 if test "${xgnu_linux_first_failure}" = "yes"; then
11293 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
11294 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
11295 OLD_CPPFLAGS="$CPPFLAGS"
11296 OLD_LIBS="$LIBS"
11297 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11298 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11299 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11300 LIBS="$LIBS -b i486-linuxaout"
11301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11302 /* end confdefs.h. */
11305 main ()
11307 XOpenDisplay ("foo");
11309 return 0;
11311 _ACEOF
11312 if ac_fn_c_try_link "$LINENO"; then :
11313 xgnu_linux_second_failure=no
11314 else
11315 xgnu_linux_second_failure=yes
11317 rm -f core conftest.err conftest.$ac_objext \
11318 conftest$ac_exeext conftest.$ac_ext
11319 if test "${xgnu_linux_second_failure}" = "yes"; then
11320 # If we get the same failure with -b, there is no use adding -b.
11321 # So take it out. This plays safe.
11322 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11323 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11324 CPPFLAGS="$OLD_CPPFLAGS"
11325 LIBS="$OLD_LIBS"
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327 $as_echo "no" >&6; }
11328 else
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11330 $as_echo "yes" >&6; }
11332 else
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334 $as_echo "no" >&6; }
11338 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11339 # header files included from there.
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11341 $as_echo_n "checking for Xkb... " >&6; }
11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11343 /* end confdefs.h. */
11344 #include <X11/Xlib.h>
11345 #include <X11/XKBlib.h>
11347 main ()
11349 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
11351 return 0;
11353 _ACEOF
11354 if ac_fn_c_try_link "$LINENO"; then :
11355 emacs_xkb=yes
11356 else
11357 emacs_xkb=no
11359 rm -f core conftest.err conftest.$ac_objext \
11360 conftest$ac_exeext conftest.$ac_ext
11361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11362 $as_echo "$emacs_xkb" >&6; }
11363 if test $emacs_xkb = yes; then
11365 $as_echo "#define HAVE_XKB 1" >>confdefs.h
11369 for ac_func in XrmSetDatabase XScreenResourceString \
11370 XScreenNumberOfScreen
11371 do :
11372 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11373 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11374 eval as_val=\$$as_ac_var
11375 if test "x$as_val" = x""yes; then :
11376 cat >>confdefs.h <<_ACEOF
11377 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11378 _ACEOF
11381 done
11385 if test "${window_system}" = "x11"; then
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11387 $as_echo_n "checking X11 version 6... " >&6; }
11388 if test "${emacs_cv_x11_version_6+set}" = set; then :
11389 $as_echo_n "(cached) " >&6
11390 else
11391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11392 /* end confdefs.h. */
11393 #include <X11/Xlib.h>
11395 main ()
11397 #if XlibSpecificationRelease < 6
11398 fail;
11399 #endif
11402 return 0;
11404 _ACEOF
11405 if ac_fn_c_try_link "$LINENO"; then :
11406 emacs_cv_x11_version_6=yes
11407 else
11408 emacs_cv_x11_version_6=no
11410 rm -f core conftest.err conftest.$ac_objext \
11411 conftest$ac_exeext conftest.$ac_ext
11414 if test $emacs_cv_x11_version_6 = yes; then
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11416 $as_echo "6 or newer" >&6; }
11418 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
11421 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
11423 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11424 ## XIM support.
11425 case "$opsys" in
11426 sol2-*) : ;;
11428 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
11431 esac
11432 else
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11434 $as_echo "before 6" >&6; }
11439 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11440 HAVE_RSVG=no
11441 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
11442 if test "${with_rsvg}" != "no"; then
11443 RSVG_REQUIRED=2.11.0
11444 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11447 succeeded=no
11449 if test "$PKG_CONFIG" = "no" ; then
11451 else
11452 PKG_CONFIG_MIN_VERSION=0.9.0
11453 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11455 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
11457 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11458 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11459 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
11460 edit_cflags="
11461 s,///*,/,g
11462 s/^/ /
11463 s/ -I/ $isystem/g
11464 s/^ //
11466 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11467 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11469 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11470 succeeded=yes
11471 else
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11473 $as_echo "no" >&6; }
11474 RSVG_CFLAGS=""
11475 RSVG_LIBS=""
11476 ## If we have a custom action on failure, don't print errors, but
11477 ## do set a variable so people can do so. Do it in a subshell
11478 ## to capture any diagnostics in invoking pkg-config.
11479 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
11485 else
11486 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11487 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11491 if test $succeeded = yes; then
11492 HAVE_RSVG=yes
11493 else
11500 if test $HAVE_RSVG = yes; then
11502 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
11504 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11505 LIBS="$RSVG_LIBS $LIBS"
11510 HAVE_IMAGEMAGICK=no
11511 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
11512 if test "${with_imagemagick}" != "no"; then
11513 ## 6.2.8 is the earliest version known to work, but earlier versions
11514 ## might work - let us know if you find one.
11515 ## 6.0.7 does not work. See bug#7955.
11516 ## 6.8.2 makes Emacs crash; see Bug#13867.
11517 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
11519 succeeded=no
11521 if test "$PKG_CONFIG" = "no" ; then
11523 else
11524 PKG_CONFIG_MIN_VERSION=0.9.0
11525 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11527 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
11529 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11530 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11531 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
11532 edit_cflags="
11533 s,///*,/,g
11534 s/^/ /
11535 s/ -I/ $isystem/g
11536 s/^ //
11538 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11539 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11541 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11542 succeeded=yes
11543 else
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545 $as_echo "no" >&6; }
11546 IMAGEMAGICK_CFLAGS=""
11547 IMAGEMAGICK_LIBS=""
11548 ## If we have a custom action on failure, don't print errors, but
11549 ## do set a variable so people can do so. Do it in a subshell
11550 ## to capture any diagnostics in invoking pkg-config.
11551 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
11557 else
11558 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11559 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11563 if test $succeeded = yes; then
11564 HAVE_IMAGEMAGICK=yes
11565 else
11572 if test $HAVE_IMAGEMAGICK = yes; then
11574 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
11576 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11577 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11578 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11579 do :
11580 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11581 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11582 eval as_val=\$$as_ac_var
11583 if test "x$as_val" = x""yes; then :
11584 cat >>confdefs.h <<_ACEOF
11585 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11586 _ACEOF
11589 done
11596 HAVE_GTK=no
11597 GTK_OBJ=
11598 gtk_term_header=$term_header
11599 check_gtk2=no
11600 gtk3_pkg_errors=
11601 if test "${opsys}" != "mingw32"; then
11602 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11603 GLIB_REQUIRED=2.28
11604 GTK_REQUIRED=3.0
11605 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11608 succeeded=no
11610 if test "$PKG_CONFIG" = "no" ; then
11611 pkg_check_gtk=no
11612 else
11613 PKG_CONFIG_MIN_VERSION=0.9.0
11614 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11616 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11618 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11619 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11620 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11621 edit_cflags="
11622 s,///*,/,g
11623 s/^/ /
11624 s/ -I/ $isystem/g
11625 s/^ //
11627 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11628 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11630 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11631 succeeded=yes
11632 else
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11634 $as_echo "no" >&6; }
11635 GTK_CFLAGS=""
11636 GTK_LIBS=""
11637 ## If we have a custom action on failure, don't print errors, but
11638 ## do set a variable so people can do so. Do it in a subshell
11639 ## to capture any diagnostics in invoking pkg-config.
11640 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11646 else
11647 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11648 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11652 if test $succeeded = yes; then
11653 pkg_check_gtk=yes
11654 else
11655 pkg_check_gtk=no
11658 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11659 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11661 if test "$pkg_check_gtk" = "yes"; then
11663 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
11665 GTK_OBJ=emacsgtkfixed.o
11666 gtk_term_header=gtkutil.h
11667 USE_GTK_TOOLKIT="GTK3"
11668 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11669 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
11670 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
11672 else
11673 check_gtk2=yes
11674 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11678 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11679 GLIB_REQUIRED=2.10
11680 GTK_REQUIRED=2.10
11681 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11684 succeeded=no
11686 if test "$PKG_CONFIG" = "no" ; then
11687 pkg_check_gtk=no
11688 else
11689 PKG_CONFIG_MIN_VERSION=0.9.0
11690 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11692 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11694 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11695 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11696 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11697 edit_cflags="
11698 s,///*,/,g
11699 s/^/ /
11700 s/ -I/ $isystem/g
11701 s/^ //
11703 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11704 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11706 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11707 succeeded=yes
11708 else
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710 $as_echo "no" >&6; }
11711 GTK_CFLAGS=""
11712 GTK_LIBS=""
11713 ## If we have a custom action on failure, don't print errors, but
11714 ## do set a variable so people can do so. Do it in a subshell
11715 ## to capture any diagnostics in invoking pkg-config.
11716 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11722 else
11723 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11724 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11728 if test $succeeded = yes; then
11729 pkg_check_gtk=yes
11730 else
11731 pkg_check_gtk=no
11734 if test "$pkg_check_gtk" = "no" &&
11735 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11736 then
11737 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11739 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
11743 if test x"$pkg_check_gtk" = xyes; then
11747 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11748 CFLAGS="$CFLAGS $GTK_CFLAGS"
11749 LIBS="$GTK_LIBS $LIBS"
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
11751 $as_echo_n "checking whether GTK compiles... " >&6; }
11752 GTK_COMPILES=no
11753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11754 /* end confdefs.h. */
11755 /* Check the Gtk and Glib APIs. */
11756 #include <gtk/gtk.h>
11757 #include <glib-object.h>
11758 static void
11759 callback (GObject *go, GParamSpec *spec, gpointer user_data)
11763 main ()
11766 GtkSettings *gs = 0;
11767 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
11768 strict C prohibits this. Use gtk_main_iteration to test that the
11769 libraries are there. */
11770 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
11771 0, 0, 0, G_CALLBACK (callback), 0))
11772 gtk_main_iteration ();
11775 return 0;
11777 _ACEOF
11778 if ac_fn_c_try_link "$LINENO"; then :
11779 GTK_COMPILES=yes
11781 rm -f core conftest.err conftest.$ac_objext \
11782 conftest$ac_exeext conftest.$ac_ext
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5
11784 $as_echo "$GTK_COMPILES" >&6; }
11785 if test "${GTK_COMPILES}" != "yes"; then
11786 GTK_OBJ=
11787 if test "$USE_X_TOOLKIT" != "maybe"; then
11788 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11790 else
11791 HAVE_GTK=yes
11793 $as_echo "#define USE_GTK 1" >>confdefs.h
11795 GTK_OBJ="gtkutil.o $GTK_OBJ"
11796 term_header=$gtk_term_header
11797 USE_X_TOOLKIT=none
11798 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
11800 else
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11802 closing open displays. This is no problem if you just use
11803 one display, but if you use more than one and close one of them
11804 Emacs may crash." >&5
11805 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11806 closing open displays. This is no problem if you just use
11807 one display, but if you use more than one and close one of them
11808 Emacs may crash." >&2;}
11809 sleep 3
11817 if test "${HAVE_GTK}" = "yes"; then
11819 if test "$with_toolkit_scroll_bars" != no; then
11820 with_toolkit_scroll_bars=yes
11823 HAVE_GTK_FILE_SELECTION=no
11824 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11825 #include <gtk/gtk.h>
11827 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11828 HAVE_GTK_FILE_SELECTION=yes
11829 else
11830 HAVE_GTK_FILE_SELECTION=no
11833 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11834 for ac_func in gtk_file_selection_new
11835 do :
11836 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11837 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11838 cat >>confdefs.h <<_ACEOF
11839 #define HAVE_GTK_FILE_SELECTION_NEW 1
11840 _ACEOF
11843 done
11847 HAVE_GTK_HANDLE_BOX=no
11848 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11849 #include <gtk/gtk.h>
11851 if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11852 HAVE_GTK_HANDLE_BOX=yes
11853 else
11854 HAVE_GTK_HANDLE_BOX=no
11857 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11858 for ac_func in gtk_handle_box_new
11859 do :
11860 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11861 if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11862 cat >>confdefs.h <<_ACEOF
11863 #define HAVE_GTK_HANDLE_BOX_NEW 1
11864 _ACEOF
11867 done
11871 HAVE_GTK_TEAROFF_MENU_ITEM=no
11872 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11873 #include <gtk/gtk.h>
11875 if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11876 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11877 else
11878 HAVE_GTK_TEAROFF_MENU_ITEM=no
11881 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11882 for ac_func in gtk_tearoff_menu_item_new
11883 do :
11884 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11885 if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11886 cat >>confdefs.h <<_ACEOF
11887 #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11888 _ACEOF
11891 done
11895 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11896 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11897 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11898 gtk_orientable_set_orientation \
11899 gtk_window_set_has_resize_grip
11900 do :
11901 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11902 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11903 eval as_val=\$$as_ac_var
11904 if test "x$as_val" = x""yes; then :
11905 cat >>confdefs.h <<_ACEOF
11906 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11907 _ACEOF
11910 done
11913 term_header=gtkutil.h
11916 HAVE_DBUS=no
11917 DBUS_OBJ=
11918 if test "${with_dbus}" = "yes"; then
11920 succeeded=no
11922 if test "$PKG_CONFIG" = "no" ; then
11923 HAVE_DBUS=no
11924 else
11925 PKG_CONFIG_MIN_VERSION=0.9.0
11926 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11928 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11930 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11931 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11932 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
11933 edit_cflags="
11934 s,///*,/,g
11935 s/^/ /
11936 s/ -I/ $isystem/g
11937 s/^ //
11939 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11940 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11942 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11943 succeeded=yes
11944 else
11945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11946 $as_echo "no" >&6; }
11947 DBUS_CFLAGS=""
11948 DBUS_LIBS=""
11949 ## If we have a custom action on failure, don't print errors, but
11950 ## do set a variable so people can do so. Do it in a subshell
11951 ## to capture any diagnostics in invoking pkg-config.
11952 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
11958 else
11959 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11960 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11964 if test $succeeded = yes; then
11965 HAVE_DBUS=yes
11966 else
11967 HAVE_DBUS=no
11970 if test "$HAVE_DBUS" = yes; then
11971 LIBS="$LIBS $DBUS_LIBS"
11973 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11975 for ac_func in dbus_watch_get_unix_fd \
11976 dbus_type_is_valid \
11977 dbus_validate_bus_name \
11978 dbus_validate_path \
11979 dbus_validate_interface \
11980 dbus_validate_member
11981 do :
11982 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11983 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11984 eval as_val=\$$as_ac_var
11985 if test "x$as_val" = x""yes; then :
11986 cat >>confdefs.h <<_ACEOF
11987 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11988 _ACEOF
11991 done
11993 DBUS_OBJ=dbusbind.o
11998 HAVE_GSETTINGS=no
11999 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
12001 succeeded=no
12003 if test "$PKG_CONFIG" = "no" ; then
12004 HAVE_GSETTINGS=no
12005 else
12006 PKG_CONFIG_MIN_VERSION=0.9.0
12007 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
12009 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
12011 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
12012 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
12013 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
12014 edit_cflags="
12015 s,///*,/,g
12016 s/^/ /
12017 s/ -I/ $isystem/g
12018 s/^ //
12020 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
12021 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
12023 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
12024 succeeded=yes
12025 else
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12027 $as_echo "no" >&6; }
12028 GSETTINGS_CFLAGS=""
12029 GSETTINGS_LIBS=""
12030 ## If we have a custom action on failure, don't print errors, but
12031 ## do set a variable so people can do so. Do it in a subshell
12032 ## to capture any diagnostics in invoking pkg-config.
12033 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
12039 else
12040 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12041 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12045 if test $succeeded = yes; then
12046 HAVE_GSETTINGS=yes
12047 else
12048 HAVE_GSETTINGS=no
12051 if test "$HAVE_GSETTINGS" = "yes"; then
12053 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
12055 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
12056 SETTINGS_LIBS="$GSETTINGS_LIBS"
12060 HAVE_GCONF=no
12061 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
12063 succeeded=no
12065 if test "$PKG_CONFIG" = "no" ; then
12066 HAVE_GCONF=no
12067 else
12068 PKG_CONFIG_MIN_VERSION=0.9.0
12069 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
12071 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
12073 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
12074 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
12075 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
12076 edit_cflags="
12077 s,///*,/,g
12078 s/^/ /
12079 s/ -I/ $isystem/g
12080 s/^ //
12082 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
12083 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
12085 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
12086 succeeded=yes
12087 else
12088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12089 $as_echo "no" >&6; }
12090 GCONF_CFLAGS=""
12091 GCONF_LIBS=""
12092 ## If we have a custom action on failure, don't print errors, but
12093 ## do set a variable so people can do so. Do it in a subshell
12094 ## to capture any diagnostics in invoking pkg-config.
12095 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
12101 else
12102 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12103 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12107 if test $succeeded = yes; then
12108 HAVE_GCONF=yes
12109 else
12110 HAVE_GCONF=no
12113 if test "$HAVE_GCONF" = yes; then
12115 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
12117 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
12118 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
12122 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
12124 succeeded=no
12126 if test "$PKG_CONFIG" = "no" ; then
12127 HAVE_GOBJECT=no
12128 else
12129 PKG_CONFIG_MIN_VERSION=0.9.0
12130 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
12132 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
12134 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
12135 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
12136 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
12137 edit_cflags="
12138 s,///*,/,g
12139 s/^/ /
12140 s/ -I/ $isystem/g
12141 s/^ //
12143 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
12144 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
12145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
12146 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
12147 succeeded=yes
12148 else
12149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150 $as_echo "no" >&6; }
12151 GOBJECT_CFLAGS=""
12152 GOBJECT_LIBS=""
12153 ## If we have a custom action on failure, don't print errors, but
12154 ## do set a variable so people can do so. Do it in a subshell
12155 ## to capture any diagnostics in invoking pkg-config.
12156 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
12162 else
12163 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12164 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12168 if test $succeeded = yes; then
12169 HAVE_GOBJECT=yes
12170 else
12171 HAVE_GOBJECT=no
12174 if test "$HAVE_GOBJECT" = "yes"; then
12175 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
12176 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
12178 SAVE_CFLAGS="$CFLAGS"
12179 SAVE_LIBS="$LIBS"
12180 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
12181 LIBS="$SETTINGS_LIBS $LIBS"
12182 CFLAGS="$SAVE_CFLAGS"
12183 LIBS="$SAVE_LIBS"
12189 HAVE_LIBSELINUX=no
12190 LIBSELINUX_LIBS=
12191 if test "${with_selinux}" = "yes"; then
12192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
12193 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
12194 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
12195 $as_echo_n "(cached) " >&6
12196 else
12197 ac_check_lib_save_LIBS=$LIBS
12198 LIBS="-lselinux $LIBS"
12199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12200 /* end confdefs.h. */
12202 /* Override any GCC internal prototype to avoid an error.
12203 Use char because int might match the return type of a GCC
12204 builtin and then its argument prototype would still apply. */
12205 #ifdef __cplusplus
12206 extern "C"
12207 #endif
12208 char lgetfilecon ();
12210 main ()
12212 return lgetfilecon ();
12214 return 0;
12216 _ACEOF
12217 if ac_fn_c_try_link "$LINENO"; then :
12218 ac_cv_lib_selinux_lgetfilecon=yes
12219 else
12220 ac_cv_lib_selinux_lgetfilecon=no
12222 rm -f core conftest.err conftest.$ac_objext \
12223 conftest$ac_exeext conftest.$ac_ext
12224 LIBS=$ac_check_lib_save_LIBS
12226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
12227 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
12228 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
12229 HAVE_LIBSELINUX=yes
12230 else
12231 HAVE_LIBSELINUX=no
12234 if test "$HAVE_LIBSELINUX" = yes; then
12236 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
12238 LIBSELINUX_LIBS=-lselinux
12243 HAVE_GNUTLS=no
12244 HAVE_GNUTLS3=no
12245 if test "${with_gnutls}" = "yes" ; then
12247 succeeded=no
12249 if test "$PKG_CONFIG" = "no" ; then
12250 HAVE_GNUTLS3=no
12251 else
12252 PKG_CONFIG_MIN_VERSION=0.9.0
12253 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 3.0.0" >&5
12255 $as_echo_n "checking for gnutls >= 3.0.0... " >&6; }
12257 if "$PKG_CONFIG" --exists "gnutls >= 3.0.0" 2>&5 &&
12258 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 3.0.0" 2>&5` &&
12259 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 3.0.0" 2>&5`; then
12260 edit_cflags="
12261 s,///*,/,g
12262 s/^/ /
12263 s/ -I/ $isystem/g
12264 s/^ //
12266 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
12267 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
12268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
12269 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
12270 succeeded=yes
12271 else
12272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12273 $as_echo "no" >&6; }
12274 LIBGNUTLS_CFLAGS=""
12275 LIBGNUTLS_LIBS=""
12276 ## If we have a custom action on failure, don't print errors, but
12277 ## do set a variable so people can do so. Do it in a subshell
12278 ## to capture any diagnostics in invoking pkg-config.
12279 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 3.0.0") 2>&1`
12285 else
12286 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12287 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12291 if test $succeeded = yes; then
12292 HAVE_GNUTLS3=yes
12293 else
12294 HAVE_GNUTLS3=no
12297 if test "${HAVE_GNUTLS3}" = "yes"; then
12299 $as_echo "#define HAVE_GNUTLS3 1" >>confdefs.h
12301 HAVE_GNUTLS="yes"
12302 else
12304 succeeded=no
12306 if test "$PKG_CONFIG" = "no" ; then
12307 HAVE_GNUTLS=no
12308 else
12309 PKG_CONFIG_MIN_VERSION=0.9.0
12310 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
12312 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
12314 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
12315 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
12316 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
12317 edit_cflags="
12318 s,///*,/,g
12319 s/^/ /
12320 s/ -I/ $isystem/g
12321 s/^ //
12323 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
12324 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
12325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
12326 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
12327 succeeded=yes
12328 else
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12330 $as_echo "no" >&6; }
12331 LIBGNUTLS_CFLAGS=""
12332 LIBGNUTLS_LIBS=""
12333 ## If we have a custom action on failure, don't print errors, but
12334 ## do set a variable so people can do so. Do it in a subshell
12335 ## to capture any diagnostics in invoking pkg-config.
12336 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
12342 else
12343 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12344 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12348 if test $succeeded = yes; then
12349 HAVE_GNUTLS=yes
12350 else
12351 HAVE_GNUTLS=no
12355 if test "${HAVE_GNUTLS}" = "yes"; then
12357 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
12361 # Windows loads GnuTLS dynamically
12362 if test "${opsys}" = "mingw32"; then
12363 LIBGNUTLS_LIBS=
12364 else
12365 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
12366 LIBS="$LIBGNUTLS_LIBS $LIBS"
12373 NOTIFY_OBJ=
12374 NOTIFY_SUMMARY=no
12376 if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
12377 with_file_notification=no
12380 case $with_file_notification,$opsys in
12381 w32,* | yes,mingw32)
12382 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12383 if test "x$ac_cv_header_windows_h" = x""yes; then :
12388 if test "$ac_cv_header_windows_h" = yes ; then
12390 $as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12392 NOTIFY_OBJ=w32notify.o
12393 NOTIFY_SUMMARY="yes (w32)"
12394 fi ;;
12395 esac
12397 case $with_file_notification,$NOTIFY_OBJ in
12398 gfile, | yes,)
12400 succeeded=no
12402 if test "$PKG_CONFIG" = "no" ; then
12403 HAVE_GFILENOTIFY=no
12404 else
12405 PKG_CONFIG_MIN_VERSION=0.9.0
12406 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12408 $as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12410 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12411 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12412 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12413 edit_cflags="
12414 s,///*,/,g
12415 s/^/ /
12416 s/ -I/ $isystem/g
12417 s/^ //
12419 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12420 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12422 $as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12423 succeeded=yes
12424 else
12425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12426 $as_echo "no" >&6; }
12427 GFILENOTIFY_CFLAGS=""
12428 GFILENOTIFY_LIBS=""
12429 ## If we have a custom action on failure, don't print errors, but
12430 ## do set a variable so people can do so. Do it in a subshell
12431 ## to capture any diagnostics in invoking pkg-config.
12432 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12438 else
12439 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12440 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12444 if test $succeeded = yes; then
12445 HAVE_GFILENOTIFY=yes
12446 else
12447 HAVE_GFILENOTIFY=no
12450 if test "$HAVE_GFILENOTIFY" = "yes"; then
12452 $as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12454 NOTIFY_OBJ=gfilenotify.o
12455 NOTIFY_SUMMARY="yes -lgio (gfile)"
12456 fi ;;
12457 esac
12459 case $with_file_notification,$NOTIFY_OBJ in
12460 inotify, | yes,)
12461 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
12462 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
12467 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12468 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
12469 if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12473 if test "$ac_cv_func_inotify_init1" = yes; then
12475 $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12477 NOTIFY_OBJ=inotify.o
12478 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12480 fi ;;
12481 esac
12483 case $with_file_notification,$NOTIFY_OBJ in
12484 yes,* | no,* | *,?*) ;;
12485 *) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
12486 esac
12488 if test -n "$NOTIFY_OBJ"; then
12490 $as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
12497 HAVE_XAW3D=no
12498 LUCID_LIBW=
12499 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12500 if test "$with_xaw3d" != no; then
12501 if test "${emacs_cv_xaw3d+set}" = set; then :
12502 $as_echo_n "(cached) " >&6
12503 else
12504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12505 /* end confdefs.h. */
12507 #include <X11/Intrinsic.h>
12508 #include <X11/Xaw3d/Simple.h>
12510 main ()
12514 return 0;
12516 _ACEOF
12517 if ac_fn_c_try_link "$LINENO"; then :
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12519 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12520 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12521 $as_echo_n "(cached) " >&6
12522 else
12523 ac_check_lib_save_LIBS=$LIBS
12524 LIBS="-lXaw3d $LIBS"
12525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526 /* end confdefs.h. */
12528 /* Override any GCC internal prototype to avoid an error.
12529 Use char because int might match the return type of a GCC
12530 builtin and then its argument prototype would still apply. */
12531 #ifdef __cplusplus
12532 extern "C"
12533 #endif
12534 char XawScrollbarSetThumb ();
12536 main ()
12538 return XawScrollbarSetThumb ();
12540 return 0;
12542 _ACEOF
12543 if ac_fn_c_try_link "$LINENO"; then :
12544 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
12545 else
12546 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
12548 rm -f core conftest.err conftest.$ac_objext \
12549 conftest$ac_exeext conftest.$ac_ext
12550 LIBS=$ac_check_lib_save_LIBS
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12553 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12554 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12555 emacs_cv_xaw3d=yes
12556 else
12557 emacs_cv_xaw3d=no
12560 else
12561 emacs_cv_xaw3d=no
12563 rm -f core conftest.err conftest.$ac_objext \
12564 conftest$ac_exeext conftest.$ac_ext
12567 else
12568 emacs_cv_xaw3d=no
12570 if test $emacs_cv_xaw3d = yes; then
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12572 $as_echo_n "checking for xaw3d... " >&6; }
12573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12574 $as_echo "yes; using Lucid toolkit" >&6; }
12575 USE_X_TOOLKIT=LUCID
12576 HAVE_XAW3D=yes
12577 LUCID_LIBW=-lXaw3d
12579 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
12581 else
12582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12583 $as_echo_n "checking for xaw3d... " >&6; }
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12585 $as_echo "no" >&6; }
12586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12587 $as_echo_n "checking for libXaw... " >&6; }
12588 if test "${emacs_cv_xaw+set}" = set; then :
12589 $as_echo_n "(cached) " >&6
12590 else
12591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12592 /* end confdefs.h. */
12594 #include <X11/Intrinsic.h>
12595 #include <X11/Xaw/Simple.h>
12597 main ()
12601 return 0;
12603 _ACEOF
12604 if ac_fn_c_try_link "$LINENO"; then :
12605 emacs_cv_xaw=yes
12606 else
12607 emacs_cv_xaw=no
12609 rm -f core conftest.err conftest.$ac_objext \
12610 conftest$ac_exeext conftest.$ac_ext
12613 if test $emacs_cv_xaw = yes; then
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12615 $as_echo "yes; using Lucid toolkit" >&6; }
12616 USE_X_TOOLKIT=LUCID
12617 LUCID_LIBW=-lXaw
12618 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12619 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
12620 else
12621 as_fn_error "No X toolkit could be found.
12622 If you are sure you want Emacs compiled without an X toolkit, pass
12623 --with-x-toolkit=no
12624 to configure. Otherwise, install the development libraries for the toolkit
12625 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
12630 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12632 LIBXTR6=
12633 if test "${USE_X_TOOLKIT}" != "none"; then
12634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12635 $as_echo_n "checking X11 toolkit version... " >&6; }
12636 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
12637 $as_echo_n "(cached) " >&6
12638 else
12639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12640 /* end confdefs.h. */
12641 #include <X11/Intrinsic.h>
12643 main ()
12645 #if XtSpecificationRelease < 6
12646 fail;
12647 #endif
12650 return 0;
12652 _ACEOF
12653 if ac_fn_c_try_link "$LINENO"; then :
12654 emacs_cv_x11_toolkit_version_6=yes
12655 else
12656 emacs_cv_x11_toolkit_version_6=no
12658 rm -f core conftest.err conftest.$ac_objext \
12659 conftest$ac_exeext conftest.$ac_ext
12662 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12663 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12665 $as_echo "6 or newer" >&6; }
12667 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
12669 LIBXTR6="-lSM -lICE"
12670 case "$opsys" in
12671 ## Use libw.a along with X11R6 Xt.
12672 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12673 esac
12674 else
12675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12676 $as_echo "before 6" >&6; }
12679 OLDLIBS="$LIBS"
12680 if test x$HAVE_X11XTR6 = xyes; then
12681 LIBS="-lXt -lSM -lICE $LIBS"
12682 else
12683 LIBS="-lXt $LIBS"
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12686 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12687 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12688 $as_echo_n "(cached) " >&6
12689 else
12690 ac_check_lib_save_LIBS=$LIBS
12691 LIBS="-lXmu $LIBS"
12692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693 /* end confdefs.h. */
12695 /* Override any GCC internal prototype to avoid an error.
12696 Use char because int might match the return type of a GCC
12697 builtin and then its argument prototype would still apply. */
12698 #ifdef __cplusplus
12699 extern "C"
12700 #endif
12701 char XmuConvertStandardSelection ();
12703 main ()
12705 return XmuConvertStandardSelection ();
12707 return 0;
12709 _ACEOF
12710 if ac_fn_c_try_link "$LINENO"; then :
12711 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12712 else
12713 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
12715 rm -f core conftest.err conftest.$ac_objext \
12716 conftest$ac_exeext conftest.$ac_ext
12717 LIBS=$ac_check_lib_save_LIBS
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12720 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12721 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12722 cat >>confdefs.h <<_ACEOF
12723 #define HAVE_LIBXMU 1
12724 _ACEOF
12726 LIBS="-lXmu $LIBS"
12730 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12734 LIBXMU=-lXmu
12735 case $opsys in
12736 ## These systems don't supply Xmu.
12737 hpux* | aix4-2 )
12738 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12740 mingw32 )
12741 LIBXMU=
12743 esac
12746 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12747 if test "${HAVE_X11}" = "yes"; then
12748 if test "${USE_X_TOOLKIT}" != "none"; then
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12750 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12751 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
12752 $as_echo_n "(cached) " >&6
12753 else
12754 ac_check_lib_save_LIBS=$LIBS
12755 LIBS="-lXext $LIBS"
12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12757 /* end confdefs.h. */
12759 /* Override any GCC internal prototype to avoid an error.
12760 Use char because int might match the return type of a GCC
12761 builtin and then its argument prototype would still apply. */
12762 #ifdef __cplusplus
12763 extern "C"
12764 #endif
12765 char XShapeQueryExtension ();
12767 main ()
12769 return XShapeQueryExtension ();
12771 return 0;
12773 _ACEOF
12774 if ac_fn_c_try_link "$LINENO"; then :
12775 ac_cv_lib_Xext_XShapeQueryExtension=yes
12776 else
12777 ac_cv_lib_Xext_XShapeQueryExtension=no
12779 rm -f core conftest.err conftest.$ac_objext \
12780 conftest$ac_exeext conftest.$ac_ext
12781 LIBS=$ac_check_lib_save_LIBS
12783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12784 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12785 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12786 cat >>confdefs.h <<_ACEOF
12787 #define HAVE_LIBXEXT 1
12788 _ACEOF
12790 LIBS="-lXext $LIBS"
12797 LIBXP=
12798 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12799 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12800 if test -d /usr/include/openmotif; then
12801 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12802 emacs_cv_openmotif=yes
12803 case "$canonical" in
12804 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12805 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12808 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12809 esac
12810 else
12811 emacs_cv_openmotif=no
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12814 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
12815 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
12816 $as_echo_n "(cached) " >&6
12817 else
12818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12819 /* end confdefs.h. */
12820 #include <Xm/Xm.h>
12822 main ()
12824 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12825 int x = 5;
12826 #else
12827 Motif version prior to 2.1.
12828 #endif
12830 return 0;
12832 _ACEOF
12833 if ac_fn_c_try_compile "$LINENO"; then :
12834 emacs_cv_motif_version_2_1=yes
12835 else
12836 emacs_cv_motif_version_2_1=no
12838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12841 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
12842 if test $emacs_cv_motif_version_2_1 = yes; then
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12844 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12845 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12846 $as_echo_n "(cached) " >&6
12847 else
12848 ac_check_lib_save_LIBS=$LIBS
12849 LIBS="-lXp $LIBS"
12850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851 /* end confdefs.h. */
12853 /* Override any GCC internal prototype to avoid an error.
12854 Use char because int might match the return type of a GCC
12855 builtin and then its argument prototype would still apply. */
12856 #ifdef __cplusplus
12857 extern "C"
12858 #endif
12859 char XpCreateContext ();
12861 main ()
12863 return XpCreateContext ();
12865 return 0;
12867 _ACEOF
12868 if ac_fn_c_try_link "$LINENO"; then :
12869 ac_cv_lib_Xp_XpCreateContext=yes
12870 else
12871 ac_cv_lib_Xp_XpCreateContext=no
12873 rm -f core conftest.err conftest.$ac_objext \
12874 conftest$ac_exeext conftest.$ac_ext
12875 LIBS=$ac_check_lib_save_LIBS
12877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12878 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12879 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12880 LIBXP=-lXp
12883 if test x$emacs_cv_openmotif = xyes; then
12884 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12886 else
12887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12888 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
12889 if test "${emacs_cv_lesstif+set}" = set; then :
12890 $as_echo_n "(cached) " >&6
12891 else
12892 # We put this in CFLAGS temporarily to precede other -I options
12893 # that might be in CFLAGS temporarily.
12894 # We put this in CPPFLAGS where it precedes the other -I options.
12895 OLD_CPPFLAGS=$CPPFLAGS
12896 OLD_CFLAGS=$CFLAGS
12897 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12898 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12900 /* end confdefs.h. */
12901 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12903 main ()
12905 int x = 5;
12907 return 0;
12909 _ACEOF
12910 if ac_fn_c_try_compile "$LINENO"; then :
12911 emacs_cv_lesstif=yes
12912 else
12913 emacs_cv_lesstif=no
12915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12918 $as_echo "$emacs_cv_lesstif" >&6; }
12919 if test $emacs_cv_lesstif = yes; then
12920 # Make sure this -I option remains in CPPFLAGS after it is set
12921 # back to REAL_CPPFLAGS.
12922 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12923 # have those other -I options anyway. Ultimately, having this
12924 # directory ultimately in CPPFLAGS will be enough.
12925 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12926 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12927 else
12928 CFLAGS=$OLD_CFLAGS
12929 CPPFLAGS=$OLD_CPPFLAGS
12932 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12933 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12935 else
12936 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12943 USE_TOOLKIT_SCROLL_BARS=no
12944 if test "${with_toolkit_scroll_bars}" != "no"; then
12945 if test "${USE_X_TOOLKIT}" != "none"; then
12946 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12947 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12949 HAVE_XAW3D=no
12950 USE_TOOLKIT_SCROLL_BARS=yes
12951 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12952 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12954 USE_TOOLKIT_SCROLL_BARS=yes
12956 elif test "${HAVE_GTK}" = "yes"; then
12957 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12959 USE_TOOLKIT_SCROLL_BARS=yes
12960 elif test "${HAVE_NS}" = "yes"; then
12961 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12963 USE_TOOLKIT_SCROLL_BARS=yes
12964 elif test "${HAVE_W32}" = "yes"; then
12965 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12967 USE_TOOLKIT_SCROLL_BARS=yes
12971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12972 /* end confdefs.h. */
12974 #include <X11/Xlib.h>
12975 #include <X11/Xresource.h>
12977 main ()
12979 XIMProc callback;
12981 return 0;
12983 _ACEOF
12984 if ac_fn_c_try_compile "$LINENO"; then :
12985 HAVE_XIM=yes
12987 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12989 else
12990 HAVE_XIM=no
12992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12995 if test "${with_xim}" != "no"; then
12997 $as_echo "#define USE_XIM 1" >>confdefs.h
13002 if test "${HAVE_XIM}" != "no"; then
13003 late_CFLAGS=$CFLAGS
13004 if test "$GCC" = yes; then
13005 CFLAGS="$CFLAGS --pedantic-errors"
13007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13008 /* end confdefs.h. */
13010 #include <X11/Xlib.h>
13011 #include <X11/Xresource.h>
13013 main ()
13015 Display *display;
13016 XrmDatabase db;
13017 char *res_name;
13018 char *res_class;
13019 XIMProc callback;
13020 XPointer *client_data;
13021 #ifndef __GNUC__
13022 /* If we're not using GCC, it's probably not XFree86, and this is
13023 probably right, but we can't use something like --pedantic-errors. */
13024 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
13025 char*, XIMProc, XPointer*);
13026 #endif
13027 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
13028 client_data);
13030 return 0;
13032 _ACEOF
13033 if ac_fn_c_try_compile "$LINENO"; then :
13034 emacs_cv_arg6_star=yes
13036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13037 if test "$emacs_cv_arg6_star" = yes; then
13038 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
13040 else
13041 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
13044 CFLAGS=$late_CFLAGS
13047 ### Start of font-backend (under any platform) section.
13048 # (nothing here yet -- this is a placeholder)
13049 ### End of font-backend (under any platform) section.
13051 ### Start of font-backend (under X11) section.
13052 if test "${HAVE_X11}" = "yes"; then
13054 succeeded=no
13056 if test "$PKG_CONFIG" = "no" ; then
13057 HAVE_FC=no
13058 else
13059 PKG_CONFIG_MIN_VERSION=0.9.0
13060 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
13062 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
13064 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
13065 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
13066 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
13067 edit_cflags="
13068 s,///*,/,g
13069 s/^/ /
13070 s/ -I/ $isystem/g
13071 s/^ //
13073 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
13074 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
13075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
13076 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
13077 succeeded=yes
13078 else
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13080 $as_echo "no" >&6; }
13081 FONTCONFIG_CFLAGS=""
13082 FONTCONFIG_LIBS=""
13083 ## If we have a custom action on failure, don't print errors, but
13084 ## do set a variable so people can do so. Do it in a subshell
13085 ## to capture any diagnostics in invoking pkg-config.
13086 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
13092 else
13093 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13094 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13098 if test $succeeded = yes; then
13099 HAVE_FC=yes
13100 else
13101 HAVE_FC=no
13105 ## Use -lXft if available, unless `--with-xft=no'.
13106 HAVE_XFT=maybe
13107 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
13108 with_xft="no";
13110 if test "x${with_xft}" != "xno"; then
13113 succeeded=no
13115 if test "$PKG_CONFIG" = "no" ; then
13116 HAVE_XFT=no
13117 else
13118 PKG_CONFIG_MIN_VERSION=0.9.0
13119 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
13121 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
13123 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
13124 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
13125 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
13126 edit_cflags="
13127 s,///*,/,g
13128 s/^/ /
13129 s/ -I/ $isystem/g
13130 s/^ //
13132 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
13133 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
13134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
13135 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
13136 succeeded=yes
13137 else
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13139 $as_echo "no" >&6; }
13140 XFT_CFLAGS=""
13141 XFT_LIBS=""
13142 ## If we have a custom action on failure, don't print errors, but
13143 ## do set a variable so people can do so. Do it in a subshell
13144 ## to capture any diagnostics in invoking pkg-config.
13145 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
13151 else
13152 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13153 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13157 if test $succeeded = yes; then
13159 else
13160 HAVE_XFT=no
13163 ## Because xftfont.c uses XRenderQueryExtension, we also
13164 ## need to link to -lXrender.
13165 HAVE_XRENDER=no
13166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
13167 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
13168 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
13169 $as_echo_n "(cached) " >&6
13170 else
13171 ac_check_lib_save_LIBS=$LIBS
13172 LIBS="-lXrender $LIBS"
13173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13174 /* end confdefs.h. */
13176 /* Override any GCC internal prototype to avoid an error.
13177 Use char because int might match the return type of a GCC
13178 builtin and then its argument prototype would still apply. */
13179 #ifdef __cplusplus
13180 extern "C"
13181 #endif
13182 char XRenderQueryExtension ();
13184 main ()
13186 return XRenderQueryExtension ();
13188 return 0;
13190 _ACEOF
13191 if ac_fn_c_try_link "$LINENO"; then :
13192 ac_cv_lib_Xrender_XRenderQueryExtension=yes
13193 else
13194 ac_cv_lib_Xrender_XRenderQueryExtension=no
13196 rm -f core conftest.err conftest.$ac_objext \
13197 conftest$ac_exeext conftest.$ac_ext
13198 LIBS=$ac_check_lib_save_LIBS
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
13201 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
13202 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
13203 HAVE_XRENDER=yes
13206 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
13207 OLD_CPPFLAGS="$CPPFLAGS"
13208 OLD_CFLAGS="$CFLAGS"
13209 OLD_LIBS="$LIBS"
13210 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
13211 CFLAGS="$CFLAGS $XFT_CFLAGS"
13212 XFT_LIBS="-lXrender $XFT_LIBS"
13213 LIBS="$XFT_LIBS $LIBS"
13214 ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
13216 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
13218 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
13219 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
13220 $as_echo_n "(cached) " >&6
13221 else
13222 ac_check_lib_save_LIBS=$LIBS
13223 LIBS="-lXft $XFT_LIBS $LIBS"
13224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13225 /* end confdefs.h. */
13227 /* Override any GCC internal prototype to avoid an error.
13228 Use char because int might match the return type of a GCC
13229 builtin and then its argument prototype would still apply. */
13230 #ifdef __cplusplus
13231 extern "C"
13232 #endif
13233 char XftFontOpen ();
13235 main ()
13237 return XftFontOpen ();
13239 return 0;
13241 _ACEOF
13242 if ac_fn_c_try_link "$LINENO"; then :
13243 ac_cv_lib_Xft_XftFontOpen=yes
13244 else
13245 ac_cv_lib_Xft_XftFontOpen=no
13247 rm -f core conftest.err conftest.$ac_objext \
13248 conftest$ac_exeext conftest.$ac_ext
13249 LIBS=$ac_check_lib_save_LIBS
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
13252 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
13253 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
13254 HAVE_XFT=yes
13261 if test "${HAVE_XFT}" = "yes"; then
13263 $as_echo "#define HAVE_XFT 1" >>confdefs.h
13266 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
13267 else
13268 CPPFLAGS="$OLD_CPPFLAGS"
13269 CFLAGS="$OLD_CFLAGS"
13270 LIBS="$OLD_LIBS"
13271 fi # "${HAVE_XFT}" = "yes"
13272 fi # "$HAVE_XFT" != no
13273 fi # "x${with_xft}" != "xno"
13275 ## We used to allow building with FreeType and without Xft.
13276 ## However, the ftx font backend driver is not in good shape.
13277 if test "$HAVE_XFT" != "yes"; then
13278 HAVE_XFT=no
13279 HAVE_FREETYPE=no
13280 else
13282 succeeded=no
13284 if test "$PKG_CONFIG" = "no" ; then
13285 HAVE_FREETYPE=no
13286 else
13287 PKG_CONFIG_MIN_VERSION=0.9.0
13288 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
13290 $as_echo_n "checking for freetype2... " >&6; }
13292 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
13293 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
13294 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
13295 edit_cflags="
13296 s,///*,/,g
13297 s/^/ /
13298 s/ -I/ $isystem/g
13299 s/^ //
13301 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
13302 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
13304 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
13305 succeeded=yes
13306 else
13307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13308 $as_echo "no" >&6; }
13309 FREETYPE_CFLAGS=""
13310 FREETYPE_LIBS=""
13311 ## If we have a custom action on failure, don't print errors, but
13312 ## do set a variable so people can do so. Do it in a subshell
13313 ## to capture any diagnostics in invoking pkg-config.
13314 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
13320 else
13321 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13322 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13326 if test $succeeded = yes; then
13327 HAVE_FREETYPE=yes
13328 else
13329 HAVE_FREETYPE=no
13333 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
13336 HAVE_LIBOTF=no
13337 if test "${HAVE_FREETYPE}" = "yes"; then
13339 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
13341 if test "${with_libotf}" != "no"; then
13343 succeeded=no
13345 if test "$PKG_CONFIG" = "no" ; then
13346 HAVE_LIBOTF=no
13347 else
13348 PKG_CONFIG_MIN_VERSION=0.9.0
13349 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
13351 $as_echo_n "checking for libotf... " >&6; }
13353 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
13354 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
13355 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
13356 edit_cflags="
13357 s,///*,/,g
13358 s/^/ /
13359 s/ -I/ $isystem/g
13360 s/^ //
13362 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
13363 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
13365 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
13366 succeeded=yes
13367 else
13368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13369 $as_echo "no" >&6; }
13370 LIBOTF_CFLAGS=""
13371 LIBOTF_LIBS=""
13372 ## If we have a custom action on failure, don't print errors, but
13373 ## do set a variable so people can do so. Do it in a subshell
13374 ## to capture any diagnostics in invoking pkg-config.
13375 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
13381 else
13382 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13383 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13387 if test $succeeded = yes; then
13388 HAVE_LIBOTF=yes
13389 else
13390 HAVE_LIBOTF=no
13393 if test "$HAVE_LIBOTF" = "yes"; then
13395 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13398 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13399 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
13400 $as_echo_n "(cached) " >&6
13401 else
13402 ac_check_lib_save_LIBS=$LIBS
13403 LIBS="-lotf $LIBS"
13404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13405 /* end confdefs.h. */
13407 /* Override any GCC internal prototype to avoid an error.
13408 Use char because int might match the return type of a GCC
13409 builtin and then its argument prototype would still apply. */
13410 #ifdef __cplusplus
13411 extern "C"
13412 #endif
13413 char OTF_get_variation_glyphs ();
13415 main ()
13417 return OTF_get_variation_glyphs ();
13419 return 0;
13421 _ACEOF
13422 if ac_fn_c_try_link "$LINENO"; then :
13423 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
13424 else
13425 ac_cv_lib_otf_OTF_get_variation_glyphs=no
13427 rm -f core conftest.err conftest.$ac_objext \
13428 conftest$ac_exeext conftest.$ac_ext
13429 LIBS=$ac_check_lib_save_LIBS
13431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13432 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13433 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13434 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13435 else
13436 HAVE_OTF_GET_VARIATION_GLYPHS=no
13439 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13441 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13448 HAVE_M17N_FLT=no
13449 if test "${HAVE_LIBOTF}" = yes; then
13450 if test "${with_m17n_flt}" != "no"; then
13452 succeeded=no
13454 if test "$PKG_CONFIG" = "no" ; then
13455 HAVE_M17N_FLT=no
13456 else
13457 PKG_CONFIG_MIN_VERSION=0.9.0
13458 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13460 $as_echo_n "checking for m17n-flt... " >&6; }
13462 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13463 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13464 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
13465 edit_cflags="
13466 s,///*,/,g
13467 s/^/ /
13468 s/ -I/ $isystem/g
13469 s/^ //
13471 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13472 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13474 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13475 succeeded=yes
13476 else
13477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13478 $as_echo "no" >&6; }
13479 M17N_FLT_CFLAGS=""
13480 M17N_FLT_LIBS=""
13481 ## If we have a custom action on failure, don't print errors, but
13482 ## do set a variable so people can do so. Do it in a subshell
13483 ## to capture any diagnostics in invoking pkg-config.
13484 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
13490 else
13491 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13492 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13496 if test $succeeded = yes; then
13497 HAVE_M17N_FLT=yes
13498 else
13499 HAVE_M17N_FLT=no
13502 if test "$HAVE_M17N_FLT" = "yes"; then
13504 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13509 else
13510 HAVE_XFT=no
13511 HAVE_FREETYPE=no
13512 HAVE_LIBOTF=no
13513 HAVE_M17N_FLT=no
13516 ### End of font-backend (under X11) section.
13527 ### Use -lXpm if available, unless `--with-xpm=no'.
13528 ### mingw32 doesn't use -lXpm, since it loads the library dynamically.
13529 HAVE_XPM=no
13530 LIBXPM=
13531 if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
13532 if test "${with_xpm}" != "no"; then
13533 SAVE_CPPFLAGS="$CPPFLAGS"
13534 SAVE_LDFLAGS="$LDFLAGS"
13535 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13536 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13537 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13538 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13540 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13541 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13542 $as_echo_n "(cached) " >&6
13543 else
13544 ac_check_lib_save_LIBS=$LIBS
13545 LIBS="-lXpm $LIBS"
13546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13547 /* end confdefs.h. */
13549 /* Override any GCC internal prototype to avoid an error.
13550 Use char because int might match the return type of a GCC
13551 builtin and then its argument prototype would still apply. */
13552 #ifdef __cplusplus
13553 extern "C"
13554 #endif
13555 char XpmReadFileToImage ();
13557 main ()
13559 return XpmReadFileToImage ();
13561 return 0;
13563 _ACEOF
13564 if ac_fn_c_try_link "$LINENO"; then :
13565 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13566 else
13567 ac_cv_lib_Xpm_XpmReadFileToImage=no
13569 rm -f core conftest.err conftest.$ac_objext \
13570 conftest$ac_exeext conftest.$ac_ext
13571 LIBS=$ac_check_lib_save_LIBS
13573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13574 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13575 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13576 HAVE_XPM=yes
13582 if test "${HAVE_XPM}" = "yes"; then
13583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13584 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13586 /* end confdefs.h. */
13587 #include "X11/xpm.h"
13588 #ifndef XpmReturnAllocPixels
13589 no_return_alloc_pixels
13590 #endif
13592 _ACEOF
13593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13594 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13595 HAVE_XPM=no
13596 else
13597 HAVE_XPM=yes
13599 rm -f conftest*
13602 if test "${HAVE_XPM}" = "yes"; then
13603 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13605 $as_echo "yes" >&6; }
13606 else
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13608 $as_echo "no" >&6; }
13609 CPPFLAGS="$SAVE_CPPFLAGS"
13610 LDFLAGS="$SAVE_LDFLAGS"
13615 if test "${HAVE_XPM}" = "yes"; then
13617 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13619 LIBXPM=-lXpm
13623 if test "${HAVE_X11}" = "yes"; then
13624 if test "${with_xpm}" != "no"; then
13625 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13626 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13628 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13629 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
13630 $as_echo_n "(cached) " >&6
13631 else
13632 ac_check_lib_save_LIBS=$LIBS
13633 LIBS="-lXpm -lX11 $LIBS"
13634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13635 /* end confdefs.h. */
13637 /* Override any GCC internal prototype to avoid an error.
13638 Use char because int might match the return type of a GCC
13639 builtin and then its argument prototype would still apply. */
13640 #ifdef __cplusplus
13641 extern "C"
13642 #endif
13643 char XpmReadFileToPixmap ();
13645 main ()
13647 return XpmReadFileToPixmap ();
13649 return 0;
13651 _ACEOF
13652 if ac_fn_c_try_link "$LINENO"; then :
13653 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
13654 else
13655 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
13657 rm -f core conftest.err conftest.$ac_objext \
13658 conftest$ac_exeext conftest.$ac_ext
13659 LIBS=$ac_check_lib_save_LIBS
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13662 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13663 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13664 HAVE_XPM=yes
13670 if test "${HAVE_XPM}" = "yes"; then
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13672 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674 /* end confdefs.h. */
13675 #include "X11/xpm.h"
13676 #ifndef XpmReturnAllocPixels
13677 no_return_alloc_pixels
13678 #endif
13680 _ACEOF
13681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13682 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13683 HAVE_XPM=no
13684 else
13685 HAVE_XPM=yes
13687 rm -f conftest*
13690 if test "${HAVE_XPM}" = "yes"; then
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13692 $as_echo "yes" >&6; }
13693 else
13694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13695 $as_echo "no" >&6; }
13700 if test "${HAVE_XPM}" = "yes"; then
13702 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13704 LIBXPM=-lXpm
13708 ### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13709 ### slightly different requirements wrt image libraries (it doesn't
13710 ### use -lXpm because it loads the xpm shared library dynamically at
13711 ### run time).
13712 if test "${opsys}" = "mingw32"; then
13713 if test "${with_xpm}" != "no"; then
13714 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13715 #define FOR_MSW 1
13717 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13718 HAVE_XPM=yes
13719 else
13720 HAVE_XPM=no
13726 if test "${HAVE_XPM}" = "yes"; then
13728 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13735 ### Use -ljpeg if available, unless `--with-jpeg=no'.
13736 ### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
13737 HAVE_JPEG=no
13738 LIBJPEG=
13739 if test "${opsys}" = "mingw32"; then
13740 if test "${with_jpeg}" != "no"; then
13741 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13742 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13743 HAVE_JPEG=yes
13744 else
13745 HAVE_JPEG=no
13750 if test "${HAVE_JPEG}" = "yes"; then
13751 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13754 /* end confdefs.h. */
13755 #include <jpeglib.h>
13756 version=JPEG_LIB_VERSION
13758 _ACEOF
13759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13760 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13761 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13763 else
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13765 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13766 HAVE_JPEG=no
13768 rm -f conftest*
13771 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13772 if test "${with_jpeg}" != "no"; then
13773 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13774 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13776 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13777 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
13778 $as_echo_n "(cached) " >&6
13779 else
13780 ac_check_lib_save_LIBS=$LIBS
13781 LIBS="-ljpeg $LIBS"
13782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13783 /* end confdefs.h. */
13785 /* Override any GCC internal prototype to avoid an error.
13786 Use char because int might match the return type of a GCC
13787 builtin and then its argument prototype would still apply. */
13788 #ifdef __cplusplus
13789 extern "C"
13790 #endif
13791 char jpeg_destroy_compress ();
13793 main ()
13795 return jpeg_destroy_compress ();
13797 return 0;
13799 _ACEOF
13800 if ac_fn_c_try_link "$LINENO"; then :
13801 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
13802 else
13803 ac_cv_lib_jpeg_jpeg_destroy_compress=no
13805 rm -f core conftest.err conftest.$ac_objext \
13806 conftest$ac_exeext conftest.$ac_ext
13807 LIBS=$ac_check_lib_save_LIBS
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13810 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13811 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13812 HAVE_JPEG=yes
13820 if test "${HAVE_JPEG}" = "yes"; then
13821 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13824 /* end confdefs.h. */
13825 #include <jpeglib.h>
13826 version=JPEG_LIB_VERSION
13828 _ACEOF
13829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13830 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13831 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13833 else
13834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13835 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13836 HAVE_JPEG=no
13838 rm -f conftest*
13841 if test "${HAVE_JPEG}" = "yes"; then
13842 LIBJPEG=-ljpeg
13847 ### Use -lpng if available, unless `--with-png=no'.
13848 ### mingw32 doesn't use -lpng, since it loads the library dynamically.
13849 HAVE_PNG=no
13850 LIBPNG=
13851 if test "${opsys}" = "mingw32"; then
13852 if test "${with_png}" != "no"; then
13853 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13854 if test "x$ac_cv_header_png_h" = x""yes; then :
13855 HAVE_PNG=yes
13856 else
13857 HAVE_PNG=no
13862 if test "${HAVE_PNG}" = "yes"; then
13864 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13867 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13868 # include <libpng/png.h>
13869 #else
13870 # include <png.h>
13871 #endif
13874 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13876 else
13878 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13883 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13884 if test "${with_png}" != "no"; then
13885 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13886 # in /usr/include/libpng.
13887 for ac_header in png.h libpng/png.h
13888 do :
13889 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13890 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13891 eval as_val=\$$as_ac_Header
13892 if test "x$as_val" = x""yes; then :
13893 cat >>confdefs.h <<_ACEOF
13894 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13895 _ACEOF
13896 break
13899 done
13901 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13903 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13904 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13905 $as_echo_n "(cached) " >&6
13906 else
13907 ac_check_lib_save_LIBS=$LIBS
13908 LIBS="-lpng -lz -lm $LIBS"
13909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13910 /* end confdefs.h. */
13912 /* Override any GCC internal prototype to avoid an error.
13913 Use char because int might match the return type of a GCC
13914 builtin and then its argument prototype would still apply. */
13915 #ifdef __cplusplus
13916 extern "C"
13917 #endif
13918 char png_get_channels ();
13920 main ()
13922 return png_get_channels ();
13924 return 0;
13926 _ACEOF
13927 if ac_fn_c_try_link "$LINENO"; then :
13928 ac_cv_lib_png_png_get_channels=yes
13929 else
13930 ac_cv_lib_png_png_get_channels=no
13932 rm -f core conftest.err conftest.$ac_objext \
13933 conftest$ac_exeext conftest.$ac_ext
13934 LIBS=$ac_check_lib_save_LIBS
13936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13937 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13938 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13939 HAVE_PNG=yes
13945 if test "${HAVE_PNG}" = "yes"; then
13947 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13949 LIBPNG="-lpng -lz -lm"
13951 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13952 # include <libpng/png.h>
13953 #else
13954 # include <png.h>
13955 #endif
13958 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13960 else
13962 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13970 HAVE_ZLIB=no
13971 LIBZ=
13972 if test "${with_zlib}" != "no"; then
13973 OLIBS=$LIBS
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
13975 $as_echo_n "checking for library containing inflateEnd... " >&6; }
13976 if test "${ac_cv_search_inflateEnd+set}" = set; then :
13977 $as_echo_n "(cached) " >&6
13978 else
13979 ac_func_search_save_LIBS=$LIBS
13980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13981 /* end confdefs.h. */
13983 /* Override any GCC internal prototype to avoid an error.
13984 Use char because int might match the return type of a GCC
13985 builtin and then its argument prototype would still apply. */
13986 #ifdef __cplusplus
13987 extern "C"
13988 #endif
13989 char inflateEnd ();
13991 main ()
13993 return inflateEnd ();
13995 return 0;
13997 _ACEOF
13998 for ac_lib in '' z; do
13999 if test -z "$ac_lib"; then
14000 ac_res="none required"
14001 else
14002 ac_res=-l$ac_lib
14003 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14005 if ac_fn_c_try_link "$LINENO"; then :
14006 ac_cv_search_inflateEnd=$ac_res
14008 rm -f core conftest.err conftest.$ac_objext \
14009 conftest$ac_exeext
14010 if test "${ac_cv_search_inflateEnd+set}" = set; then :
14011 break
14013 done
14014 if test "${ac_cv_search_inflateEnd+set}" = set; then :
14016 else
14017 ac_cv_search_inflateEnd=no
14019 rm conftest.$ac_ext
14020 LIBS=$ac_func_search_save_LIBS
14022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
14023 $as_echo "$ac_cv_search_inflateEnd" >&6; }
14024 ac_res=$ac_cv_search_inflateEnd
14025 if test "$ac_res" != no; then :
14026 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14027 HAVE_ZLIB=yes
14030 LIBS=$OLIBS
14031 case $ac_cv_search_inflateEnd in
14032 -*) LIBZ=$ac_cv_search_inflateEnd ;;
14033 esac
14035 if test "${HAVE_ZLIB}" = "yes"; then
14037 $as_echo "#define HAVE_ZLIB 1" >>confdefs.h
14039 ### mingw32 doesn't use -lz, since it loads the library dynamically.
14040 if test "${opsys}" = "mingw32"; then
14041 LIBZ=
14047 ### Use -ltiff if available, unless `--with-tiff=no'.
14048 ### mingw32 doesn't use -ltiff, since it loads the library dynamically.
14049 HAVE_TIFF=no
14050 LIBTIFF=
14051 if test "${opsys}" = "mingw32"; then
14052 if test "${with_tiff}" != "no"; then
14053 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
14054 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
14055 HAVE_TIFF=yes
14056 else
14057 HAVE_TIFF=no
14062 if test "${HAVE_TIFF}" = "yes"; then
14064 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
14067 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
14068 if test "${with_tiff}" != "no"; then
14069 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
14070 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
14071 tifflibs="-lz -lm"
14072 # At least one tiff package requires the jpeg library.
14073 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
14075 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
14076 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
14077 $as_echo_n "(cached) " >&6
14078 else
14079 ac_check_lib_save_LIBS=$LIBS
14080 LIBS="-ltiff $tifflibs $LIBS"
14081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14082 /* end confdefs.h. */
14084 /* Override any GCC internal prototype to avoid an error.
14085 Use char because int might match the return type of a GCC
14086 builtin and then its argument prototype would still apply. */
14087 #ifdef __cplusplus
14088 extern "C"
14089 #endif
14090 char TIFFGetVersion ();
14092 main ()
14094 return TIFFGetVersion ();
14096 return 0;
14098 _ACEOF
14099 if ac_fn_c_try_link "$LINENO"; then :
14100 ac_cv_lib_tiff_TIFFGetVersion=yes
14101 else
14102 ac_cv_lib_tiff_TIFFGetVersion=no
14104 rm -f core conftest.err conftest.$ac_objext \
14105 conftest$ac_exeext conftest.$ac_ext
14106 LIBS=$ac_check_lib_save_LIBS
14108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14109 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
14110 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
14111 HAVE_TIFF=yes
14119 if test "${HAVE_TIFF}" = "yes"; then
14121 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
14123 LIBTIFF=-ltiff
14128 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
14129 ### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
14130 HAVE_GIF=no
14131 LIBGIF=
14132 if test "${opsys}" = "mingw32"; then
14133 if test "${with_gif}" != "no"; then
14134 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14135 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14136 HAVE_GIF=yes
14137 else
14138 HAVE_GIF=no
14143 if test "${HAVE_GIF}" = "yes"; then
14145 $as_echo "#define HAVE_GIF 1" >>confdefs.h
14148 elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
14149 || test "${HAVE_W32}" = "yes"; then
14150 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14151 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14152 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14153 # Earlier versions can crash Emacs, but version 5.0 removes EGifPutExtensionLast.
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GifMakeMapObject in -lgif" >&5
14155 $as_echo_n "checking for GifMakeMapObject in -lgif... " >&6; }
14156 if test "${ac_cv_lib_gif_GifMakeMapObject+set}" = set; then :
14157 $as_echo_n "(cached) " >&6
14158 else
14159 ac_check_lib_save_LIBS=$LIBS
14160 LIBS="-lgif $LIBS"
14161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162 /* end confdefs.h. */
14164 /* Override any GCC internal prototype to avoid an error.
14165 Use char because int might match the return type of a GCC
14166 builtin and then its argument prototype would still apply. */
14167 #ifdef __cplusplus
14168 extern "C"
14169 #endif
14170 char GifMakeMapObject ();
14172 main ()
14174 return GifMakeMapObject ();
14176 return 0;
14178 _ACEOF
14179 if ac_fn_c_try_link "$LINENO"; then :
14180 ac_cv_lib_gif_GifMakeMapObject=yes
14181 else
14182 ac_cv_lib_gif_GifMakeMapObject=no
14184 rm -f core conftest.err conftest.$ac_objext \
14185 conftest$ac_exeext conftest.$ac_ext
14186 LIBS=$ac_check_lib_save_LIBS
14188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_GifMakeMapObject" >&5
14189 $as_echo "$ac_cv_lib_gif_GifMakeMapObject" >&6; }
14190 if test "x$ac_cv_lib_gif_GifMakeMapObject" = x""yes; then :
14191 HAVE_GIF=yes
14192 else
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
14194 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
14195 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
14196 $as_echo_n "(cached) " >&6
14197 else
14198 ac_check_lib_save_LIBS=$LIBS
14199 LIBS="-lgif $LIBS"
14200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14201 /* end confdefs.h. */
14203 /* Override any GCC internal prototype to avoid an error.
14204 Use char because int might match the return type of a GCC
14205 builtin and then its argument prototype would still apply. */
14206 #ifdef __cplusplus
14207 extern "C"
14208 #endif
14209 char EGifPutExtensionLast ();
14211 main ()
14213 return EGifPutExtensionLast ();
14215 return 0;
14217 _ACEOF
14218 if ac_fn_c_try_link "$LINENO"; then :
14219 ac_cv_lib_gif_EGifPutExtensionLast=yes
14220 else
14221 ac_cv_lib_gif_EGifPutExtensionLast=no
14223 rm -f core conftest.err conftest.$ac_objext \
14224 conftest$ac_exeext conftest.$ac_ext
14225 LIBS=$ac_check_lib_save_LIBS
14227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14228 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14229 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
14230 HAVE_GIF=yes
14231 else
14232 HAVE_GIF=maybe
14241 if test "$HAVE_GIF" = yes; then
14242 LIBGIF=-lgif
14243 elif test "$HAVE_GIF" = maybe; then
14244 # If gif_lib.h but no libgif, try libungif.
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
14246 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
14247 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
14248 $as_echo_n "(cached) " >&6
14249 else
14250 ac_check_lib_save_LIBS=$LIBS
14251 LIBS="-lungif $LIBS"
14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14253 /* end confdefs.h. */
14255 /* Override any GCC internal prototype to avoid an error.
14256 Use char because int might match the return type of a GCC
14257 builtin and then its argument prototype would still apply. */
14258 #ifdef __cplusplus
14259 extern "C"
14260 #endif
14261 char EGifPutExtensionLast ();
14263 main ()
14265 return EGifPutExtensionLast ();
14267 return 0;
14269 _ACEOF
14270 if ac_fn_c_try_link "$LINENO"; then :
14271 ac_cv_lib_ungif_EGifPutExtensionLast=yes
14272 else
14273 ac_cv_lib_ungif_EGifPutExtensionLast=no
14275 rm -f core conftest.err conftest.$ac_objext \
14276 conftest$ac_exeext conftest.$ac_ext
14277 LIBS=$ac_check_lib_save_LIBS
14279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14280 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14281 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
14282 HAVE_GIF=yes
14283 else
14284 HAVE_GIF=no
14287 test "$HAVE_GIF" = yes && LIBGIF=-lungif
14290 if test "${HAVE_GIF}" = "yes"; then
14292 $as_echo "#define HAVE_GIF 1" >>confdefs.h
14298 if test "${HAVE_X11}" = "yes"; then
14299 MISSING=""
14300 WITH_NO=""
14301 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14302 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14303 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14304 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14305 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14306 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14307 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14308 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14309 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14310 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14312 if test "X${MISSING}" != X; then
14313 as_fn_error "The following required libraries were not found:
14314 $MISSING
14315 Maybe some development libraries/packages are missing?
14316 If you don't want to link with them give
14317 $WITH_NO
14318 as options to configure" "$LINENO" 5
14322 ### Use -lgpm if available, unless `--with-gpm=no'.
14323 HAVE_GPM=no
14324 LIBGPM=
14325 if test "${with_gpm}" != "no"; then
14326 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
14327 if test "x$ac_cv_header_gpm_h" = x""yes; then :
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
14329 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
14330 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
14331 $as_echo_n "(cached) " >&6
14332 else
14333 ac_check_lib_save_LIBS=$LIBS
14334 LIBS="-lgpm $LIBS"
14335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14336 /* end confdefs.h. */
14338 /* Override any GCC internal prototype to avoid an error.
14339 Use char because int might match the return type of a GCC
14340 builtin and then its argument prototype would still apply. */
14341 #ifdef __cplusplus
14342 extern "C"
14343 #endif
14344 char Gpm_Open ();
14346 main ()
14348 return Gpm_Open ();
14350 return 0;
14352 _ACEOF
14353 if ac_fn_c_try_link "$LINENO"; then :
14354 ac_cv_lib_gpm_Gpm_Open=yes
14355 else
14356 ac_cv_lib_gpm_Gpm_Open=no
14358 rm -f core conftest.err conftest.$ac_objext \
14359 conftest$ac_exeext conftest.$ac_ext
14360 LIBS=$ac_check_lib_save_LIBS
14362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14363 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
14364 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
14365 HAVE_GPM=yes
14372 if test "${HAVE_GPM}" = "yes"; then
14374 $as_echo "#define HAVE_GPM 1" >>confdefs.h
14376 LIBGPM=-lgpm
14385 GNUSTEP_CFLAGS=
14386 ### Use NeXTstep API to implement GUI.
14387 if test "${HAVE_NS}" = "yes"; then
14389 $as_echo "#define HAVE_NS 1" >>confdefs.h
14391 if test "${NS_IMPL_COCOA}" = "yes"; then
14393 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
14396 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
14398 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
14400 # See also .m.o rule in Makefile.in */
14401 # FIXME: are all these flags really needed? Document here why. */
14402 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
14403 ## Extra CFLAGS applied to src/*.m files.
14404 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"
14406 OTHER_FILES=ns-app
14409 ### Use session management (-lSM -lICE) if available
14410 HAVE_X_SM=no
14411 LIBXSM=
14412 if test "${HAVE_X11}" = "yes"; then
14413 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
14414 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
14416 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
14417 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
14418 $as_echo_n "(cached) " >&6
14419 else
14420 ac_check_lib_save_LIBS=$LIBS
14421 LIBS="-lSM -lICE $LIBS"
14422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14423 /* end confdefs.h. */
14425 /* Override any GCC internal prototype to avoid an error.
14426 Use char because int might match the return type of a GCC
14427 builtin and then its argument prototype would still apply. */
14428 #ifdef __cplusplus
14429 extern "C"
14430 #endif
14431 char SmcOpenConnection ();
14433 main ()
14435 return SmcOpenConnection ();
14437 return 0;
14439 _ACEOF
14440 if ac_fn_c_try_link "$LINENO"; then :
14441 ac_cv_lib_SM_SmcOpenConnection=yes
14442 else
14443 ac_cv_lib_SM_SmcOpenConnection=no
14445 rm -f core conftest.err conftest.$ac_objext \
14446 conftest$ac_exeext conftest.$ac_ext
14447 LIBS=$ac_check_lib_save_LIBS
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14450 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
14451 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
14452 HAVE_X_SM=yes
14459 if test "${HAVE_X_SM}" = "yes"; then
14461 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
14463 LIBXSM="-lSM -lICE"
14464 case "$LIBS" in
14465 *-lSM*) ;;
14466 *) LIBS="$LIBXSM $LIBS" ;;
14467 esac
14472 ### Use XRandr (-lXrandr) if available
14473 HAVE_XRANDR=no
14474 if test "${HAVE_X11}" = "yes"; then
14475 XRANDR_REQUIRED=1.2.2
14476 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
14478 succeeded=no
14480 if test "$PKG_CONFIG" = "no" ; then
14481 HAVE_XRANDR=no
14482 else
14483 PKG_CONFIG_MIN_VERSION=0.9.0
14484 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
14486 $as_echo_n "checking for $XRANDR_MODULES... " >&6; }
14488 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
14489 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
14490 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14491 edit_cflags="
14492 s,///*,/,g
14493 s/^/ /
14494 s/ -I/ $isystem/g
14495 s/^ //
14497 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14498 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14500 $as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14501 succeeded=yes
14502 else
14503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14504 $as_echo "no" >&6; }
14505 XRANDR_CFLAGS=""
14506 XRANDR_LIBS=""
14507 ## If we have a custom action on failure, don't print errors, but
14508 ## do set a variable so people can do so. Do it in a subshell
14509 ## to capture any diagnostics in invoking pkg-config.
14510 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14516 else
14517 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14518 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14522 if test $succeeded = yes; then
14523 HAVE_XRANDR=yes
14524 else
14525 HAVE_XRANDR=no
14528 if test $HAVE_XRANDR = no; then
14529 # Test old way in case pkg-config doesn't have it (older machines).
14530 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14531 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14533 $as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14534 if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
14535 $as_echo_n "(cached) " >&6
14536 else
14537 ac_check_lib_save_LIBS=$LIBS
14538 LIBS="-lXrandr $LIBS"
14539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540 /* end confdefs.h. */
14542 /* Override any GCC internal prototype to avoid an error.
14543 Use char because int might match the return type of a GCC
14544 builtin and then its argument prototype would still apply. */
14545 #ifdef __cplusplus
14546 extern "C"
14547 #endif
14548 char XRRGetScreenResources ();
14550 main ()
14552 return XRRGetScreenResources ();
14554 return 0;
14556 _ACEOF
14557 if ac_fn_c_try_link "$LINENO"; then :
14558 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
14559 else
14560 ac_cv_lib_Xrandr_XRRGetScreenResources=no
14562 rm -f core conftest.err conftest.$ac_objext \
14563 conftest$ac_exeext conftest.$ac_ext
14564 LIBS=$ac_check_lib_save_LIBS
14566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14567 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14568 if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
14569 HAVE_XRANDR=yes
14575 if test $HAVE_XRANDR = yes; then
14576 XRANDR_LIBS=-lXrandr
14580 if test $HAVE_XRANDR = yes; then
14581 SAVE_CFLAGS="$CFLAGS"
14582 SAVE_LIBS="$LIBS"
14583 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14584 LIBS="$XRANDR_LIBS $LIBS"
14585 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14586 do :
14587 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14588 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14589 eval as_val=\$$as_ac_var
14590 if test "x$as_val" = x""yes; then :
14591 cat >>confdefs.h <<_ACEOF
14592 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14593 _ACEOF
14596 done
14598 CFLAGS="$SAVE_CFLAGS"
14599 LIBS="$SAVE_LIBS"
14602 $as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14607 ### Use Xinerama (-lXinerama) if available
14608 HAVE_XINERAMA=no
14609 if test "${HAVE_X11}" = "yes"; then
14610 XINERAMA_REQUIRED=1.0.2
14611 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14613 succeeded=no
14615 if test "$PKG_CONFIG" = "no" ; then
14616 HAVE_XINERAMA=no
14617 else
14618 PKG_CONFIG_MIN_VERSION=0.9.0
14619 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14621 $as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14623 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14624 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14625 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14626 edit_cflags="
14627 s,///*,/,g
14628 s/^/ /
14629 s/ -I/ $isystem/g
14630 s/^ //
14632 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14633 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14635 $as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14636 succeeded=yes
14637 else
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14639 $as_echo "no" >&6; }
14640 XINERAMA_CFLAGS=""
14641 XINERAMA_LIBS=""
14642 ## If we have a custom action on failure, don't print errors, but
14643 ## do set a variable so people can do so. Do it in a subshell
14644 ## to capture any diagnostics in invoking pkg-config.
14645 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14651 else
14652 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14653 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14657 if test $succeeded = yes; then
14658 HAVE_XINERAMA=yes
14659 else
14660 HAVE_XINERAMA=no
14663 if test $HAVE_XINERAMA = no; then
14664 # Test old way in case pkg-config doesn't have it (older machines).
14665 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14666 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14668 $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14669 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14670 $as_echo_n "(cached) " >&6
14671 else
14672 ac_check_lib_save_LIBS=$LIBS
14673 LIBS="-lXinerama $LIBS"
14674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14675 /* end confdefs.h. */
14677 /* Override any GCC internal prototype to avoid an error.
14678 Use char because int might match the return type of a GCC
14679 builtin and then its argument prototype would still apply. */
14680 #ifdef __cplusplus
14681 extern "C"
14682 #endif
14683 char XineramaQueryExtension ();
14685 main ()
14687 return XineramaQueryExtension ();
14689 return 0;
14691 _ACEOF
14692 if ac_fn_c_try_link "$LINENO"; then :
14693 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14694 else
14695 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14697 rm -f core conftest.err conftest.$ac_objext \
14698 conftest$ac_exeext conftest.$ac_ext
14699 LIBS=$ac_check_lib_save_LIBS
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14702 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14703 if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14704 HAVE_XINERAMA=yes
14710 if test $HAVE_XINERAMA = yes; then
14711 XINERAMA_LIBS=-lXinerama
14715 if test $HAVE_XINERAMA = yes; then
14717 $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14723 ### Use libxml (-lxml2) if available
14724 ### mingw32 doesn't use -lxml2, since it loads the library dynamically.
14725 HAVE_LIBXML2=no
14726 if test "${with_xml2}" != "no"; then
14727 ### I'm not sure what the version number should be, so I just guessed.
14729 succeeded=no
14731 if test "$PKG_CONFIG" = "no" ; then
14732 HAVE_LIBXML2=no
14733 else
14734 PKG_CONFIG_MIN_VERSION=0.9.0
14735 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14737 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
14739 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14740 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14741 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
14742 edit_cflags="
14743 s,///*,/,g
14744 s/^/ /
14745 s/ -I/ $isystem/g
14746 s/^ //
14748 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14749 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14751 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14752 succeeded=yes
14753 else
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14755 $as_echo "no" >&6; }
14756 LIBXML2_CFLAGS=""
14757 LIBXML2_LIBS=""
14758 ## If we have a custom action on failure, don't print errors, but
14759 ## do set a variable so people can do so. Do it in a subshell
14760 ## to capture any diagnostics in invoking pkg-config.
14761 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
14767 else
14768 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14769 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14773 if test $succeeded = yes; then
14774 HAVE_LIBXML2=yes
14775 else
14776 HAVE_LIBXML2=no
14779 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14780 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14781 SAVE_CPPFLAGS="$CPPFLAGS"
14782 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14783 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14784 if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14785 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14787 if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14788 HAVE_LIBXML2=yes
14794 CPPFLAGS="$SAVE_CPPFLAGS"
14795 if test "${HAVE_LIBXML2}" = "yes"; then
14796 LIBXML2_LIBS="-lxml2"
14797 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14800 if test "${HAVE_LIBXML2}" = "yes"; then
14801 if test "${opsys}" != "mingw32"; then
14802 LIBS="$LIBXML2_LIBS $LIBS"
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
14804 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14805 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
14806 $as_echo_n "(cached) " >&6
14807 else
14808 ac_check_lib_save_LIBS=$LIBS
14809 LIBS="-lxml2 $LIBS"
14810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14811 /* end confdefs.h. */
14813 /* Override any GCC internal prototype to avoid an error.
14814 Use char because int might match the return type of a GCC
14815 builtin and then its argument prototype would still apply. */
14816 #ifdef __cplusplus
14817 extern "C"
14818 #endif
14819 char htmlReadMemory ();
14821 main ()
14823 return htmlReadMemory ();
14825 return 0;
14827 _ACEOF
14828 if ac_fn_c_try_link "$LINENO"; then :
14829 ac_cv_lib_xml2_htmlReadMemory=yes
14830 else
14831 ac_cv_lib_xml2_htmlReadMemory=no
14833 rm -f core conftest.err conftest.$ac_objext \
14834 conftest$ac_exeext conftest.$ac_ext
14835 LIBS=$ac_check_lib_save_LIBS
14837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14838 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14839 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14840 HAVE_LIBXML2=yes
14841 else
14842 HAVE_LIBXML2=no
14845 else
14846 LIBXML2_LIBS=""
14848 if test "${HAVE_LIBXML2}" = "yes"; then
14850 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
14852 else
14853 LIBXML2_LIBS=""
14854 LIBXML2_CFLAGS=""
14861 # If netdb.h doesn't declare h_errno, we must declare it by hand.
14862 # On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14863 if test "${opsys}" = "mingw32"; then
14864 emacs_cv_netdb_declares_h_errno=yes
14866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14867 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
14868 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14869 $as_echo_n "(cached) " >&6
14870 else
14871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14872 /* end confdefs.h. */
14873 #include <netdb.h>
14875 main ()
14877 return h_errno;
14879 return 0;
14881 _ACEOF
14882 if ac_fn_c_try_link "$LINENO"; then :
14883 emacs_cv_netdb_declares_h_errno=yes
14884 else
14885 emacs_cv_netdb_declares_h_errno=no
14887 rm -f core conftest.err conftest.$ac_objext \
14888 conftest$ac_exeext conftest.$ac_ext
14890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14891 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14892 if test $emacs_cv_netdb_declares_h_errno = yes; then
14894 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
14898 # sqrt and other floating-point functions such as fmod and frexp
14899 # are found in -lm on most systems, but mingw32 doesn't use -lm.
14900 if test "${opsys}" != "mingw32"; then
14901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
14902 $as_echo_n "checking for sqrt in -lm... " >&6; }
14903 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14904 $as_echo_n "(cached) " >&6
14905 else
14906 ac_check_lib_save_LIBS=$LIBS
14907 LIBS="-lm $LIBS"
14908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14909 /* end confdefs.h. */
14911 /* Override any GCC internal prototype to avoid an error.
14912 Use char because int might match the return type of a GCC
14913 builtin and then its argument prototype would still apply. */
14914 #ifdef __cplusplus
14915 extern "C"
14916 #endif
14917 char sqrt ();
14919 main ()
14921 return sqrt ();
14923 return 0;
14925 _ACEOF
14926 if ac_fn_c_try_link "$LINENO"; then :
14927 ac_cv_lib_m_sqrt=yes
14928 else
14929 ac_cv_lib_m_sqrt=no
14931 rm -f core conftest.err conftest.$ac_objext \
14932 conftest$ac_exeext conftest.$ac_ext
14933 LIBS=$ac_check_lib_save_LIBS
14935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14936 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
14937 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14938 cat >>confdefs.h <<_ACEOF
14939 #define HAVE_LIBM 1
14940 _ACEOF
14942 LIBS="-lm $LIBS"
14948 # Check for mail-locking functions in a "mail" library. Probably this should
14949 # have the same check as for liblockfile below.
14950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14951 $as_echo_n "checking for maillock in -lmail... " >&6; }
14952 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
14953 $as_echo_n "(cached) " >&6
14954 else
14955 ac_check_lib_save_LIBS=$LIBS
14956 LIBS="-lmail $LIBS"
14957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958 /* end confdefs.h. */
14960 /* Override any GCC internal prototype to avoid an error.
14961 Use char because int might match the return type of a GCC
14962 builtin and then its argument prototype would still apply. */
14963 #ifdef __cplusplus
14964 extern "C"
14965 #endif
14966 char maillock ();
14968 main ()
14970 return maillock ();
14972 return 0;
14974 _ACEOF
14975 if ac_fn_c_try_link "$LINENO"; then :
14976 ac_cv_lib_mail_maillock=yes
14977 else
14978 ac_cv_lib_mail_maillock=no
14980 rm -f core conftest.err conftest.$ac_objext \
14981 conftest$ac_exeext conftest.$ac_ext
14982 LIBS=$ac_check_lib_save_LIBS
14984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14985 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
14986 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14987 have_mail=yes
14988 else
14989 have_mail=no
14992 if test $have_mail = yes; then
14993 LIBS_MAIL=-lmail
14994 LIBS="$LIBS_MAIL $LIBS"
14996 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
14998 else
14999 LIBS_MAIL=
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
15002 $as_echo_n "checking for maillock in -llockfile... " >&6; }
15003 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
15004 $as_echo_n "(cached) " >&6
15005 else
15006 ac_check_lib_save_LIBS=$LIBS
15007 LIBS="-llockfile $LIBS"
15008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009 /* end confdefs.h. */
15011 /* Override any GCC internal prototype to avoid an error.
15012 Use char because int might match the return type of a GCC
15013 builtin and then its argument prototype would still apply. */
15014 #ifdef __cplusplus
15015 extern "C"
15016 #endif
15017 char maillock ();
15019 main ()
15021 return maillock ();
15023 return 0;
15025 _ACEOF
15026 if ac_fn_c_try_link "$LINENO"; then :
15027 ac_cv_lib_lockfile_maillock=yes
15028 else
15029 ac_cv_lib_lockfile_maillock=no
15031 rm -f core conftest.err conftest.$ac_objext \
15032 conftest$ac_exeext conftest.$ac_ext
15033 LIBS=$ac_check_lib_save_LIBS
15035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
15036 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
15037 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
15038 have_lockfile=yes
15039 else
15040 have_lockfile=no
15043 if test $have_lockfile = yes; then
15044 LIBS_MAIL=-llockfile
15045 LIBS="$LIBS_MAIL $LIBS"
15047 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
15049 else
15050 # If we have the shared liblockfile, assume we must use it for mail
15051 # locking (e.g. Debian). If we couldn't link against liblockfile
15052 # (no liblockfile.a installed), ensure that we don't need to.
15053 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15054 set dummy liblockfile.so; ac_word=$2
15055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15056 $as_echo_n "checking for $ac_word... " >&6; }
15057 if test "${ac_cv_prog_liblockfile+set}" = set; then :
15058 $as_echo_n "(cached) " >&6
15059 else
15060 if test -n "$liblockfile"; then
15061 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15062 else
15063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15064 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15065 for as_dir in $as_dummy
15067 IFS=$as_save_IFS
15068 test -z "$as_dir" && as_dir=.
15069 for ac_exec_ext in '' $ac_executable_extensions; do
15070 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15071 ac_cv_prog_liblockfile="yes"
15072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15073 break 2
15075 done
15076 done
15077 IFS=$as_save_IFS
15079 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
15082 liblockfile=$ac_cv_prog_liblockfile
15083 if test -n "$liblockfile"; then
15084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
15085 $as_echo "$liblockfile" >&6; }
15086 else
15087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15088 $as_echo "no" >&6; }
15092 if test $ac_cv_prog_liblockfile = yes; then
15093 as_fn_error "Shared liblockfile found but can't link against it.
15094 This probably means that movemail could lose mail.
15095 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
15103 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
15104 ## interlock access to the mail spool. The alternative is a lock file named
15105 ## /usr/spool/mail/$USER.lock.
15106 mail_lock=no
15107 case "$opsys" in
15108 aix4-2) mail_lock="lockf" ;;
15110 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
15112 ## On GNU/Linux systems, both methods are used by various mail programs.
15113 ## I assume most people are using newer mailers that have heard of flock.
15114 ## Change this if you need to.
15115 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
15116 ## configure gets the right answers, and that means *NOT* using flock.
15117 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
15118 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
15119 ## Debian maintainer hasn't provided a clean fix for Emacs.
15120 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
15121 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
15122 ## correct logic. -- fx
15123 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
15124 ## liblockfile is a Free Software replacement for libmail, used on
15125 ## Debian systems and elsewhere. -rfr.
15126 gnu-*)
15127 mail_lock="flock"
15128 if test $have_mail = yes || test $have_lockfile = yes; then
15129 test $ac_cv_header_maillock_h = yes && mail_lock=no
15133 mingw32)
15134 mail_lock="none-needed" ;;
15135 esac
15137 BLESSMAIL_TARGET=
15138 case "$mail_lock" in
15139 flock)
15140 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
15143 lockf)
15144 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
15147 none-needed) ;;
15149 *) BLESSMAIL_TARGET="need-blessmail" ;;
15150 esac
15154 for ac_func in accept4 gethostname \
15155 getrusage get_current_dir_name \
15156 lrand48 \
15157 select getpagesize setlocale \
15158 getrlimit setrlimit shutdown getaddrinfo \
15159 strsignal setitimer \
15160 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
15161 gai_strerror getline getdelim sync \
15162 difftime posix_memalign \
15163 getpwent endpwent getgrent endgrent \
15164 touchlock \
15165 cfmakeraw cfsetspeed copysign __executable_start log2
15166 do :
15167 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15168 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15169 eval as_val=\$$as_ac_var
15170 if test "x$as_val" = x""yes; then :
15171 cat >>confdefs.h <<_ACEOF
15172 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15173 _ACEOF
15176 done
15179 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
15180 ## has a broken `rint' in some library versions including math library
15181 ## version number A.09.05.
15182 ## You can fix the math library by installing patch number PHSS_4630.
15183 ## But we can fix it more reliably for Emacs by just not using rint.
15184 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
15185 case $opsys in
15186 hpux*) : ;;
15187 *) for ac_func in random rint
15188 do :
15189 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15190 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15191 eval as_val=\$$as_ac_var
15192 if test "x$as_val" = x""yes; then :
15193 cat >>confdefs.h <<_ACEOF
15194 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15195 _ACEOF
15198 done
15200 esac
15202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
15203 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
15204 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
15205 $as_echo_n "(cached) " >&6
15206 else
15207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15208 /* end confdefs.h. */
15211 main ()
15213 __builtin_unwind_init ();
15215 return 0;
15217 _ACEOF
15218 if ac_fn_c_try_link "$LINENO"; then :
15219 emacs_cv_func___builtin_unwind_init=yes
15220 else
15221 emacs_cv_func___builtin_unwind_init=no
15223 rm -f core conftest.err conftest.$ac_objext \
15224 conftest$ac_exeext conftest.$ac_ext
15226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
15227 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
15228 if test $emacs_cv_func___builtin_unwind_init = yes; then
15230 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
15238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15239 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15240 if test "${ac_cv_sys_largefile_source+set}" = set; then :
15241 $as_echo_n "(cached) " >&6
15242 else
15243 while :; do
15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15245 /* end confdefs.h. */
15246 #include <sys/types.h> /* for off_t */
15247 #include <stdio.h>
15249 main ()
15251 int (*fp) (FILE *, off_t, int) = fseeko;
15252 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15254 return 0;
15256 _ACEOF
15257 if ac_fn_c_try_link "$LINENO"; then :
15258 ac_cv_sys_largefile_source=no; break
15260 rm -f core conftest.err conftest.$ac_objext \
15261 conftest$ac_exeext conftest.$ac_ext
15262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15263 /* end confdefs.h. */
15264 #define _LARGEFILE_SOURCE 1
15265 #include <sys/types.h> /* for off_t */
15266 #include <stdio.h>
15268 main ()
15270 int (*fp) (FILE *, off_t, int) = fseeko;
15271 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15273 return 0;
15275 _ACEOF
15276 if ac_fn_c_try_link "$LINENO"; then :
15277 ac_cv_sys_largefile_source=1; break
15279 rm -f core conftest.err conftest.$ac_objext \
15280 conftest$ac_exeext conftest.$ac_ext
15281 ac_cv_sys_largefile_source=unknown
15282 break
15283 done
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15286 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15287 case $ac_cv_sys_largefile_source in #(
15288 no | unknown) ;;
15290 cat >>confdefs.h <<_ACEOF
15291 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15292 _ACEOF
15294 esac
15295 rm -rf conftest*
15297 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15298 # in glibc 2.1.3, but that breaks too many other things.
15299 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15300 if test $ac_cv_sys_largefile_source != unknown; then
15302 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15307 # UNIX98 PTYs.
15308 for ac_func in grantpt
15309 do :
15310 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
15311 if test "x$ac_cv_func_grantpt" = x""yes; then :
15312 cat >>confdefs.h <<_ACEOF
15313 #define HAVE_GRANTPT 1
15314 _ACEOF
15317 done
15320 # PTY-related GNU extensions.
15321 for ac_func in getpt posix_openpt
15322 do :
15323 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15324 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15325 eval as_val=\$$as_ac_var
15326 if test "x$as_val" = x""yes; then :
15327 cat >>confdefs.h <<_ACEOF
15328 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15329 _ACEOF
15332 done
15335 # Check this now, so that we will NOT find the above functions in ncurses.
15336 # That is because we have not set up to link ncurses in lib-src.
15337 # It's better to believe a function is not available
15338 # than to expect to find it in ncurses.
15339 # Also we need tputs and friends to be able to build at all.
15340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
15341 $as_echo_n "checking for library containing tputs... " >&6; }
15342 # Run a test program that contains a call to tputs, a call that is
15343 # never executed. This tests whether a pre-'main' dynamic linker
15344 # works with the library. It's too much trouble to actually call
15345 # tputs in the test program, due to portability hassles. When
15346 # cross-compiling, assume the test program will run if it links.
15348 if test "${opsys}" = "mingw32"; then
15349 msg='none required'
15350 else
15351 # Maybe curses should be tried earlier?
15352 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
15353 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
15354 OLIBS=$LIBS
15355 if test -z "$tputs_library"; then
15356 LIBS_TERMCAP=
15357 msg='none required'
15358 else
15359 LIBS_TERMCAP=-l$tputs_library
15360 msg=$LIBS_TERMCAP
15361 LIBS="$LIBS_TERMCAP $LIBS"
15363 if test "$cross_compiling" = yes; then :
15364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365 /* end confdefs.h. */
15367 extern void tputs (const char *, int, int (*)(int));
15368 int main (int argc, char **argv)
15370 if (argc == 10000)
15371 tputs (argv[0], 0, 0);
15372 return 0;
15375 _ACEOF
15376 if ac_fn_c_try_link "$LINENO"; then :
15378 else
15379 msg=no
15381 rm -f core conftest.err conftest.$ac_objext \
15382 conftest$ac_exeext conftest.$ac_ext
15383 else
15384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15385 /* end confdefs.h. */
15387 extern void tputs (const char *, int, int (*)(int));
15388 int main (int argc, char **argv)
15390 if (argc == 10000)
15391 tputs (argv[0], 0, 0);
15392 return 0;
15395 _ACEOF
15396 if ac_fn_c_try_run "$LINENO"; then :
15398 else
15399 msg=no
15401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15402 conftest.$ac_objext conftest.beam conftest.$ac_ext
15405 LIBS=$OLIBS
15406 if test "X$msg" != Xno; then
15407 break
15409 done
15411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
15412 $as_echo "$msg" >&6; }
15413 if test "X$msg" = Xno; then
15414 as_fn_error "The required function \`tputs' was not found in any library.
15415 The following libraries were tried (in order):
15416 libtinfo, libncurses, libterminfo, libtermcap, libcurses
15417 Please try installing whichever of these libraries is most appropriate
15418 for your system, together with its header files.
15419 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
15422 ## Use termcap instead of terminfo?
15423 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
15424 TERMINFO=yes
15425 ## FIXME? In the cases below where we unconditionally set
15426 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
15427 ## if that was found above to have tputs.
15428 ## Should we use the gnu* logic everywhere?
15429 case "$opsys" in
15430 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
15431 ## The ncurses library has been moved out of the System framework in
15432 ## Mac OS X 10.2. So if configure detects it, set the command-line
15433 ## option to use it.
15434 darwin) LIBS_TERMCAP="-lncurses" ;;
15436 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
15438 freebsd)
15439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
15440 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
15441 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
15442 $as_echo_n "(cached) " >&6
15443 else
15444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15445 /* end confdefs.h. */
15446 #include <osreldate.h>
15448 main ()
15450 #if __FreeBSD_version < 400000
15451 fail;
15452 #endif
15455 return 0;
15457 _ACEOF
15458 if ac_fn_c_try_link "$LINENO"; then :
15459 emacs_cv_freebsd_terminfo=yes
15460 else
15461 emacs_cv_freebsd_terminfo=no
15463 rm -f core conftest.err conftest.$ac_objext \
15464 conftest$ac_exeext conftest.$ac_ext
15468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
15469 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
15471 if test $emacs_cv_freebsd_terminfo = yes; then
15472 LIBS_TERMCAP="-lncurses"
15473 else
15474 TERMINFO=no
15475 LIBS_TERMCAP="-ltermcap"
15479 mingw32)
15480 TERMINFO=no
15481 LIBS_TERMCAP=
15484 netbsd)
15485 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
15486 TERMINFO=no
15487 LIBS_TERMCAP="-ltermcap"
15491 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
15493 ## hpux: Make sure we get select from libc rather than from libcurses
15494 ## because libcurses on HPUX 10.10 has a broken version of select.
15495 ## We used to use -lc -lcurses, but this may be cleaner.
15496 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15497 # set that way, now it uses the default). Isn't this a contradiction?
15498 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15500 esac
15502 TERMCAP_OBJ=tparam.o
15503 if test $TERMINFO = yes; then
15505 $as_echo "#define TERMINFO 1" >>confdefs.h
15507 TERMCAP_OBJ=terminfo.o
15509 if test "X$LIBS_TERMCAP" = "X-lncurses"; then
15511 $as_echo "#define USE_NCURSES 1" >>confdefs.h
15518 # Do we have res_init, for detecting changes in /etc/resolv.conf?
15519 # On Darwin, res_init appears not to be useful: see bug#562 and
15520 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15521 resolv=no
15523 if test $opsys != darwin; then
15525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15526 /* end confdefs.h. */
15527 #include <netinet/in.h>
15528 #include <arpa/nameser.h>
15529 #include <resolv.h>
15531 main ()
15533 return res_init();
15535 return 0;
15537 _ACEOF
15538 if ac_fn_c_try_link "$LINENO"; then :
15539 have_res_init=yes
15540 else
15541 have_res_init=no
15543 rm -f core conftest.err conftest.$ac_objext \
15544 conftest$ac_exeext conftest.$ac_ext
15545 if test "$have_res_init" = no; then
15546 OLIBS="$LIBS"
15547 LIBS="$LIBS -lresolv"
15548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15549 $as_echo_n "checking for res_init with -lresolv... " >&6; }
15550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15551 /* end confdefs.h. */
15552 #include <netinet/in.h>
15553 #include <arpa/nameser.h>
15554 #include <resolv.h>
15556 main ()
15558 return res_init();
15560 return 0;
15562 _ACEOF
15563 if ac_fn_c_try_link "$LINENO"; then :
15564 have_res_init=yes
15565 else
15566 have_res_init=no
15568 rm -f core conftest.err conftest.$ac_objext \
15569 conftest$ac_exeext conftest.$ac_ext
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15571 $as_echo "$have_res_init" >&6; }
15572 if test "$have_res_init" = yes ; then
15573 resolv=yes
15575 LIBS="$OLIBS"
15578 if test "$have_res_init" = yes; then
15580 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
15584 # Do we need the Hesiod library to provide the support routines?
15585 LIBHESIOD=
15586 if test "$with_hesiod" != no ; then
15587 # Don't set $LIBS here -- see comments above. FIXME which comments?
15588 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15589 if test "x$ac_cv_func_res_send" = x""yes; then :
15591 else
15592 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15593 if test "x$ac_cv_func___res_send" = x""yes; then :
15595 else
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15597 $as_echo_n "checking for res_send in -lresolv... " >&6; }
15598 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
15599 $as_echo_n "(cached) " >&6
15600 else
15601 ac_check_lib_save_LIBS=$LIBS
15602 LIBS="-lresolv $LIBS"
15603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15604 /* end confdefs.h. */
15606 /* Override any GCC internal prototype to avoid an error.
15607 Use char because int might match the return type of a GCC
15608 builtin and then its argument prototype would still apply. */
15609 #ifdef __cplusplus
15610 extern "C"
15611 #endif
15612 char res_send ();
15614 main ()
15616 return res_send ();
15618 return 0;
15620 _ACEOF
15621 if ac_fn_c_try_link "$LINENO"; then :
15622 ac_cv_lib_resolv_res_send=yes
15623 else
15624 ac_cv_lib_resolv_res_send=no
15626 rm -f core conftest.err conftest.$ac_objext \
15627 conftest$ac_exeext conftest.$ac_ext
15628 LIBS=$ac_check_lib_save_LIBS
15630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15631 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15632 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15633 resolv=yes
15634 else
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15636 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
15637 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
15638 $as_echo_n "(cached) " >&6
15639 else
15640 ac_check_lib_save_LIBS=$LIBS
15641 LIBS="-lresolv $LIBS"
15642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15643 /* end confdefs.h. */
15645 /* Override any GCC internal prototype to avoid an error.
15646 Use char because int might match the return type of a GCC
15647 builtin and then its argument prototype would still apply. */
15648 #ifdef __cplusplus
15649 extern "C"
15650 #endif
15651 char __res_send ();
15653 main ()
15655 return __res_send ();
15657 return 0;
15659 _ACEOF
15660 if ac_fn_c_try_link "$LINENO"; then :
15661 ac_cv_lib_resolv___res_send=yes
15662 else
15663 ac_cv_lib_resolv___res_send=no
15665 rm -f core conftest.err conftest.$ac_objext \
15666 conftest$ac_exeext conftest.$ac_ext
15667 LIBS=$ac_check_lib_save_LIBS
15669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15670 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15671 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15672 resolv=yes
15681 if test "$resolv" = yes ; then
15682 RESOLVLIB=-lresolv
15683 else
15684 RESOLVLIB=
15686 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15687 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15689 else
15690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15691 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15692 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15693 $as_echo_n "(cached) " >&6
15694 else
15695 ac_check_lib_save_LIBS=$LIBS
15696 LIBS="-lhesiod $RESOLVLIB $LIBS"
15697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15698 /* end confdefs.h. */
15700 /* Override any GCC internal prototype to avoid an error.
15701 Use char because int might match the return type of a GCC
15702 builtin and then its argument prototype would still apply. */
15703 #ifdef __cplusplus
15704 extern "C"
15705 #endif
15706 char hes_getmailhost ();
15708 main ()
15710 return hes_getmailhost ();
15712 return 0;
15714 _ACEOF
15715 if ac_fn_c_try_link "$LINENO"; then :
15716 ac_cv_lib_hesiod_hes_getmailhost=yes
15717 else
15718 ac_cv_lib_hesiod_hes_getmailhost=no
15720 rm -f core conftest.err conftest.$ac_objext \
15721 conftest$ac_exeext conftest.$ac_ext
15722 LIBS=$ac_check_lib_save_LIBS
15724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15725 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15726 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15727 hesiod=yes
15728 else
15735 if test x"$hesiod" = xyes; then
15736 LIBHESIOD=-lhesiod
15741 # Do we need libresolv (due to res_init or Hesiod)?
15742 if test "$resolv" = yes && test $opsys != darwin; then
15743 LIBRESOLV=-lresolv
15744 else
15745 LIBRESOLV=
15749 # These tell us which Kerberos-related libraries to use.
15750 COM_ERRLIB=
15751 CRYPTOLIB=
15752 KRB5LIB=
15753 DESLIB=
15754 KRB4LIB=
15756 if test "${with_kerberos}" != no; then
15757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15758 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
15759 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15760 $as_echo_n "(cached) " >&6
15761 else
15762 ac_check_lib_save_LIBS=$LIBS
15763 LIBS="-lcom_err $LIBS"
15764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15765 /* end confdefs.h. */
15767 /* Override any GCC internal prototype to avoid an error.
15768 Use char because int might match the return type of a GCC
15769 builtin and then its argument prototype would still apply. */
15770 #ifdef __cplusplus
15771 extern "C"
15772 #endif
15773 char com_err ();
15775 main ()
15777 return com_err ();
15779 return 0;
15781 _ACEOF
15782 if ac_fn_c_try_link "$LINENO"; then :
15783 ac_cv_lib_com_err_com_err=yes
15784 else
15785 ac_cv_lib_com_err_com_err=no
15787 rm -f core conftest.err conftest.$ac_objext \
15788 conftest$ac_exeext conftest.$ac_ext
15789 LIBS=$ac_check_lib_save_LIBS
15791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15792 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15793 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15794 have_com_err=yes
15795 else
15796 have_com_err=no
15799 if test $have_com_err = yes; then
15800 COM_ERRLIB=-lcom_err
15801 LIBS="$COM_ERRLIB $LIBS"
15803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15804 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15805 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15806 $as_echo_n "(cached) " >&6
15807 else
15808 ac_check_lib_save_LIBS=$LIBS
15809 LIBS="-lcrypto $LIBS"
15810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15811 /* end confdefs.h. */
15813 /* Override any GCC internal prototype to avoid an error.
15814 Use char because int might match the return type of a GCC
15815 builtin and then its argument prototype would still apply. */
15816 #ifdef __cplusplus
15817 extern "C"
15818 #endif
15819 char mit_des_cbc_encrypt ();
15821 main ()
15823 return mit_des_cbc_encrypt ();
15825 return 0;
15827 _ACEOF
15828 if ac_fn_c_try_link "$LINENO"; then :
15829 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15830 else
15831 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15833 rm -f core conftest.err conftest.$ac_objext \
15834 conftest$ac_exeext conftest.$ac_ext
15835 LIBS=$ac_check_lib_save_LIBS
15837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15838 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15839 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15840 have_crypto=yes
15841 else
15842 have_crypto=no
15845 if test $have_crypto = yes; then
15846 CRYPTOLIB=-lcrypto
15847 LIBS="$CRYPTOLIB $LIBS"
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15850 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15851 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15852 $as_echo_n "(cached) " >&6
15853 else
15854 ac_check_lib_save_LIBS=$LIBS
15855 LIBS="-lk5crypto $LIBS"
15856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15857 /* end confdefs.h. */
15859 /* Override any GCC internal prototype to avoid an error.
15860 Use char because int might match the return type of a GCC
15861 builtin and then its argument prototype would still apply. */
15862 #ifdef __cplusplus
15863 extern "C"
15864 #endif
15865 char mit_des_cbc_encrypt ();
15867 main ()
15869 return mit_des_cbc_encrypt ();
15871 return 0;
15873 _ACEOF
15874 if ac_fn_c_try_link "$LINENO"; then :
15875 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15876 else
15877 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15879 rm -f core conftest.err conftest.$ac_objext \
15880 conftest$ac_exeext conftest.$ac_ext
15881 LIBS=$ac_check_lib_save_LIBS
15883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15884 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15885 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15886 have_k5crypto=yes
15887 else
15888 have_k5crypto=no
15891 if test $have_k5crypto = yes; then
15892 CRYPTOLIB=-lk5crypto
15893 LIBS="$CRYPTOLIB $LIBS"
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15896 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15897 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15898 $as_echo_n "(cached) " >&6
15899 else
15900 ac_check_lib_save_LIBS=$LIBS
15901 LIBS="-lkrb5 $LIBS"
15902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15903 /* end confdefs.h. */
15905 /* Override any GCC internal prototype to avoid an error.
15906 Use char because int might match the return type of a GCC
15907 builtin and then its argument prototype would still apply. */
15908 #ifdef __cplusplus
15909 extern "C"
15910 #endif
15911 char krb5_init_context ();
15913 main ()
15915 return krb5_init_context ();
15917 return 0;
15919 _ACEOF
15920 if ac_fn_c_try_link "$LINENO"; then :
15921 ac_cv_lib_krb5_krb5_init_context=yes
15922 else
15923 ac_cv_lib_krb5_krb5_init_context=no
15925 rm -f core conftest.err conftest.$ac_objext \
15926 conftest$ac_exeext conftest.$ac_ext
15927 LIBS=$ac_check_lib_save_LIBS
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15930 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15931 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15932 have_krb5=yes
15933 else
15934 have_krb5=no
15937 if test $have_krb5=yes; then
15938 KRB5LIB=-lkrb5
15939 LIBS="$KRB5LIB $LIBS"
15941 if test "${with_kerberos5}" = no; then
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15943 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15944 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
15945 $as_echo_n "(cached) " >&6
15946 else
15947 ac_check_lib_save_LIBS=$LIBS
15948 LIBS="-ldes425 $LIBS"
15949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15950 /* end confdefs.h. */
15952 /* Override any GCC internal prototype to avoid an error.
15953 Use char because int might match the return type of a GCC
15954 builtin and then its argument prototype would still apply. */
15955 #ifdef __cplusplus
15956 extern "C"
15957 #endif
15958 char des_cbc_encrypt ();
15960 main ()
15962 return des_cbc_encrypt ();
15964 return 0;
15966 _ACEOF
15967 if ac_fn_c_try_link "$LINENO"; then :
15968 ac_cv_lib_des425_des_cbc_encrypt=yes
15969 else
15970 ac_cv_lib_des425_des_cbc_encrypt=no
15972 rm -f core conftest.err conftest.$ac_objext \
15973 conftest$ac_exeext conftest.$ac_ext
15974 LIBS=$ac_check_lib_save_LIBS
15976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15977 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15978 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15979 have_des425=yes
15980 else
15981 have_des425=no
15984 if test $have_des425 = yes; then
15985 DESLIB=-ldes425
15986 LIBS="$DESLIB $LIBS"
15987 else
15988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15989 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15990 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15991 $as_echo_n "(cached) " >&6
15992 else
15993 ac_check_lib_save_LIBS=$LIBS
15994 LIBS="-ldes $LIBS"
15995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15996 /* end confdefs.h. */
15998 /* Override any GCC internal prototype to avoid an error.
15999 Use char because int might match the return type of a GCC
16000 builtin and then its argument prototype would still apply. */
16001 #ifdef __cplusplus
16002 extern "C"
16003 #endif
16004 char des_cbc_encrypt ();
16006 main ()
16008 return des_cbc_encrypt ();
16010 return 0;
16012 _ACEOF
16013 if ac_fn_c_try_link "$LINENO"; then :
16014 ac_cv_lib_des_des_cbc_encrypt=yes
16015 else
16016 ac_cv_lib_des_des_cbc_encrypt=no
16018 rm -f core conftest.err conftest.$ac_objext \
16019 conftest$ac_exeext conftest.$ac_ext
16020 LIBS=$ac_check_lib_save_LIBS
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
16023 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
16024 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
16025 have_des=yes
16026 else
16027 have_des=no
16030 if test $have_des = yes; then
16031 DESLIB=-ldes
16032 LIBS="$DESLIB $LIBS"
16035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
16036 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
16037 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
16038 $as_echo_n "(cached) " >&6
16039 else
16040 ac_check_lib_save_LIBS=$LIBS
16041 LIBS="-lkrb4 $LIBS"
16042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16043 /* end confdefs.h. */
16045 /* Override any GCC internal prototype to avoid an error.
16046 Use char because int might match the return type of a GCC
16047 builtin and then its argument prototype would still apply. */
16048 #ifdef __cplusplus
16049 extern "C"
16050 #endif
16051 char krb_get_cred ();
16053 main ()
16055 return krb_get_cred ();
16057 return 0;
16059 _ACEOF
16060 if ac_fn_c_try_link "$LINENO"; then :
16061 ac_cv_lib_krb4_krb_get_cred=yes
16062 else
16063 ac_cv_lib_krb4_krb_get_cred=no
16065 rm -f core conftest.err conftest.$ac_objext \
16066 conftest$ac_exeext conftest.$ac_ext
16067 LIBS=$ac_check_lib_save_LIBS
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
16070 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
16071 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
16072 have_krb4=yes
16073 else
16074 have_krb4=no
16077 if test $have_krb4 = yes; then
16078 KRB4LIB=-lkrb4
16079 LIBS="$KRB4LIB $LIBS"
16080 else
16081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
16082 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
16083 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
16084 $as_echo_n "(cached) " >&6
16085 else
16086 ac_check_lib_save_LIBS=$LIBS
16087 LIBS="-lkrb $LIBS"
16088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16089 /* end confdefs.h. */
16091 /* Override any GCC internal prototype to avoid an error.
16092 Use char because int might match the return type of a GCC
16093 builtin and then its argument prototype would still apply. */
16094 #ifdef __cplusplus
16095 extern "C"
16096 #endif
16097 char krb_get_cred ();
16099 main ()
16101 return krb_get_cred ();
16103 return 0;
16105 _ACEOF
16106 if ac_fn_c_try_link "$LINENO"; then :
16107 ac_cv_lib_krb_krb_get_cred=yes
16108 else
16109 ac_cv_lib_krb_krb_get_cred=no
16111 rm -f core conftest.err conftest.$ac_objext \
16112 conftest$ac_exeext conftest.$ac_ext
16113 LIBS=$ac_check_lib_save_LIBS
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
16116 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
16117 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
16118 have_krb=yes
16119 else
16120 have_krb=no
16123 if test $have_krb = yes; then
16124 KRB4LIB=-lkrb
16125 LIBS="$KRB4LIB $LIBS"
16130 if test "${with_kerberos5}" != no; then
16131 for ac_header in krb5.h
16132 do :
16133 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
16134 if test "x$ac_cv_header_krb5_h" = x""yes; then :
16135 cat >>confdefs.h <<_ACEOF
16136 #define HAVE_KRB5_H 1
16137 _ACEOF
16138 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
16140 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
16142 cat >>confdefs.h <<_ACEOF
16143 #define HAVE_KRB5_ERROR_TEXT 1
16144 _ACEOF
16148 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
16150 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
16152 cat >>confdefs.h <<_ACEOF
16153 #define HAVE_KRB5_ERROR_E_TEXT 1
16154 _ACEOF
16161 done
16163 else
16164 for ac_header in krb.h
16165 do :
16166 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
16167 if test "x$ac_cv_header_krb_h" = x""yes; then :
16168 cat >>confdefs.h <<_ACEOF
16169 #define HAVE_KRB_H 1
16170 _ACEOF
16172 else
16173 for ac_header in kerberosIV/krb.h
16174 do :
16175 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
16176 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
16177 cat >>confdefs.h <<_ACEOF
16178 #define HAVE_KERBEROSIV_KRB_H 1
16179 _ACEOF
16181 else
16182 for ac_header in kerberos/krb.h
16183 do :
16184 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
16185 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
16186 cat >>confdefs.h <<_ACEOF
16187 #define HAVE_KERBEROS_KRB_H 1
16188 _ACEOF
16192 done
16196 done
16200 done
16203 for ac_header in com_err.h
16204 do :
16205 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
16206 if test "x$ac_cv_header_com_err_h" = x""yes; then :
16207 cat >>confdefs.h <<_ACEOF
16208 #define HAVE_COM_ERR_H 1
16209 _ACEOF
16213 done
16223 for ac_header in valgrind/valgrind.h
16224 do :
16225 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
16226 if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
16227 cat >>confdefs.h <<_ACEOF
16228 #define HAVE_VALGRIND_VALGRIND_H 1
16229 _ACEOF
16233 done
16239 for ac_func in $ac_func_list
16240 do :
16241 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16242 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16243 eval as_val=\$$as_ac_var
16244 if test "x$as_val" = x""yes; then :
16245 cat >>confdefs.h <<_ACEOF
16246 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16247 _ACEOF
16250 done
16255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
16256 $as_echo_n "checking whether localtime caches TZ... " >&6; }
16257 if test "${emacs_cv_localtime_cache+set}" = set; then :
16258 $as_echo_n "(cached) " >&6
16259 else
16260 if test x$ac_cv_func_tzset = xyes; then
16261 if test "$cross_compiling" = yes; then :
16262 # If we have tzset, assume the worst when cross-compiling.
16263 emacs_cv_localtime_cache=yes
16264 else
16265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16266 /* end confdefs.h. */
16267 #include <time.h>
16268 char TZ_GMT0[] = "TZ=GMT0";
16269 char TZ_PST8[] = "TZ=PST8";
16270 main()
16272 time_t now = time ((time_t *) 0);
16273 int hour_GMT0, hour_unset;
16274 if (putenv (TZ_GMT0) != 0)
16275 exit (1);
16276 hour_GMT0 = localtime (&now)->tm_hour;
16277 unsetenv("TZ");
16278 hour_unset = localtime (&now)->tm_hour;
16279 if (putenv (TZ_PST8) != 0)
16280 exit (1);
16281 if (localtime (&now)->tm_hour == hour_GMT0)
16282 exit (1);
16283 unsetenv("TZ");
16284 if (localtime (&now)->tm_hour != hour_unset)
16285 exit (1);
16286 exit (0);
16288 _ACEOF
16289 if ac_fn_c_try_run "$LINENO"; then :
16290 emacs_cv_localtime_cache=no
16291 else
16292 emacs_cv_localtime_cache=yes
16294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16295 conftest.$ac_objext conftest.beam conftest.$ac_ext
16298 else
16299 # If we lack tzset, report that localtime does not cache TZ,
16300 # since we can't invalidate the cache if we don't have tzset.
16301 emacs_cv_localtime_cache=no
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
16305 $as_echo "$emacs_cv_localtime_cache" >&6; }
16306 if test $emacs_cv_localtime_cache = yes; then
16308 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
16312 ok_so_far=yes
16313 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
16314 if test "x$ac_cv_func_socket" = x""yes; then :
16316 else
16317 ok_so_far=no
16320 if test $ok_so_far = yes; then
16321 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
16322 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
16324 else
16325 ok_so_far=no
16330 if test $ok_so_far = yes; then
16331 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
16332 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
16334 else
16335 ok_so_far=no
16340 if test $ok_so_far = yes; then
16342 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
16346 case $canonical in
16347 *-solaris2.4 | *-solaris2.4.*)
16348 : ${ac_cv_func_vfork_works=no};;
16349 esac
16351 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
16352 if test "x$ac_cv_type_pid_t" = x""yes; then :
16354 else
16356 cat >>confdefs.h <<_ACEOF
16357 #define pid_t int
16358 _ACEOF
16362 for ac_header in vfork.h
16363 do :
16364 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
16365 if test "x$ac_cv_header_vfork_h" = x""yes; then :
16366 cat >>confdefs.h <<_ACEOF
16367 #define HAVE_VFORK_H 1
16368 _ACEOF
16372 done
16374 for ac_func in fork vfork
16375 do :
16376 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16377 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16378 eval as_val=\$$as_ac_var
16379 if test "x$as_val" = x""yes; then :
16380 cat >>confdefs.h <<_ACEOF
16381 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16382 _ACEOF
16385 done
16387 if test "x$ac_cv_func_fork" = xyes; then
16388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16389 $as_echo_n "checking for working fork... " >&6; }
16390 if test "${ac_cv_func_fork_works+set}" = set; then :
16391 $as_echo_n "(cached) " >&6
16392 else
16393 if test "$cross_compiling" = yes; then :
16394 ac_cv_func_fork_works=cross
16395 else
16396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16397 /* end confdefs.h. */
16398 $ac_includes_default
16400 main ()
16403 /* By Ruediger Kuhlmann. */
16404 return fork () < 0;
16407 return 0;
16409 _ACEOF
16410 if ac_fn_c_try_run "$LINENO"; then :
16411 ac_cv_func_fork_works=yes
16412 else
16413 ac_cv_func_fork_works=no
16415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16416 conftest.$ac_objext conftest.beam conftest.$ac_ext
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16421 $as_echo "$ac_cv_func_fork_works" >&6; }
16423 else
16424 ac_cv_func_fork_works=$ac_cv_func_fork
16426 if test "x$ac_cv_func_fork_works" = xcross; then
16427 case $host in
16428 *-*-amigaos* | *-*-msdosdjgpp*)
16429 # Override, as these systems have only a dummy fork() stub
16430 ac_cv_func_fork_works=no
16433 ac_cv_func_fork_works=yes
16435 esac
16436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16437 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16439 ac_cv_func_vfork_works=$ac_cv_func_vfork
16440 if test "x$ac_cv_func_vfork" = xyes; then
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16442 $as_echo_n "checking for working vfork... " >&6; }
16443 if test "${ac_cv_func_vfork_works+set}" = set; then :
16444 $as_echo_n "(cached) " >&6
16445 else
16446 if test "$cross_compiling" = yes; then :
16447 ac_cv_func_vfork_works=cross
16448 else
16449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450 /* end confdefs.h. */
16451 /* Thanks to Paul Eggert for this test. */
16452 $ac_includes_default
16453 #include <sys/wait.h>
16454 #ifdef HAVE_VFORK_H
16455 # include <vfork.h>
16456 #endif
16457 /* On some sparc systems, changes by the child to local and incoming
16458 argument registers are propagated back to the parent. The compiler
16459 is told about this with #include <vfork.h>, but some compilers
16460 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
16461 static variable whose address is put into a register that is
16462 clobbered by the vfork. */
16463 static void
16464 #ifdef __cplusplus
16465 sparc_address_test (int arg)
16466 # else
16467 sparc_address_test (arg) int arg;
16468 #endif
16470 static pid_t child;
16471 if (!child) {
16472 child = vfork ();
16473 if (child < 0) {
16474 perror ("vfork");
16475 _exit(2);
16477 if (!child) {
16478 arg = getpid();
16479 write(-1, "", 0);
16480 _exit (arg);
16486 main ()
16488 pid_t parent = getpid ();
16489 pid_t child;
16491 sparc_address_test (0);
16493 child = vfork ();
16495 if (child == 0) {
16496 /* Here is another test for sparc vfork register problems. This
16497 test uses lots of local variables, at least as many local
16498 variables as main has allocated so far including compiler
16499 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
16500 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
16501 reuse the register of parent for one of the local variables,
16502 since it will think that parent can't possibly be used any more
16503 in this routine. Assigning to the local variable will thus
16504 munge parent in the parent process. */
16505 pid_t
16506 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16507 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16508 /* Convince the compiler that p..p7 are live; otherwise, it might
16509 use the same hardware register for all 8 local variables. */
16510 if (p != p1 || p != p2 || p != p3 || p != p4
16511 || p != p5 || p != p6 || p != p7)
16512 _exit(1);
16514 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16515 from child file descriptors. If the child closes a descriptor
16516 before it execs or exits, this munges the parent's descriptor
16517 as well. Test for this by closing stdout in the child. */
16518 _exit(close(fileno(stdout)) != 0);
16519 } else {
16520 int status;
16521 struct stat st;
16523 while (wait(&status) != child)
16525 return (
16526 /* Was there some problem with vforking? */
16527 child < 0
16529 /* Did the child fail? (This shouldn't happen.) */
16530 || status
16532 /* Did the vfork/compiler bug occur? */
16533 || parent != getpid()
16535 /* Did the file descriptor bug occur? */
16536 || fstat(fileno(stdout), &st) != 0
16540 _ACEOF
16541 if ac_fn_c_try_run "$LINENO"; then :
16542 ac_cv_func_vfork_works=yes
16543 else
16544 ac_cv_func_vfork_works=no
16546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16547 conftest.$ac_objext conftest.beam conftest.$ac_ext
16551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16552 $as_echo "$ac_cv_func_vfork_works" >&6; }
16555 if test "x$ac_cv_func_fork_works" = xcross; then
16556 ac_cv_func_vfork_works=$ac_cv_func_vfork
16557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16558 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16561 if test "x$ac_cv_func_vfork_works" = xyes; then
16563 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
16565 else
16567 $as_echo "#define vfork fork" >>confdefs.h
16570 if test "x$ac_cv_func_fork_works" = xyes; then
16572 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
16577 for ac_func in snprintf
16578 do :
16579 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16580 if test "x$ac_cv_func_snprintf" = x""yes; then :
16581 cat >>confdefs.h <<_ACEOF
16582 #define HAVE_SNPRINTF 1
16583 _ACEOF
16586 done
16589 XGSELOBJ=
16590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16591 $as_echo_n "checking whether GLib is linked in... " >&6; }
16592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16593 /* end confdefs.h. */
16594 #include <glib.h>
16597 main ()
16599 g_print ("Hello world");
16601 return 0;
16603 _ACEOF
16604 if ac_fn_c_try_link "$LINENO"; then :
16605 links_glib=yes
16606 else
16607 links_glib=no
16609 rm -f core conftest.err conftest.$ac_objext \
16610 conftest$ac_exeext conftest.$ac_ext
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16612 $as_echo "$links_glib" >&6; }
16613 if test "${links_glib}" = "yes"; then
16615 $as_echo "#define HAVE_GLIB 1" >>confdefs.h
16617 if test "$HAVE_NS" = no;then
16618 XGSELOBJ=xgselect.o
16623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16624 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16625 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16626 $as_echo_n "(cached) " >&6
16627 else
16628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16629 /* end confdefs.h. */
16630 #include <langinfo.h>
16632 main ()
16634 char* cs = nl_langinfo(CODESET);
16636 return 0;
16638 _ACEOF
16639 if ac_fn_c_try_link "$LINENO"; then :
16640 emacs_cv_langinfo_codeset=yes
16641 else
16642 emacs_cv_langinfo_codeset=no
16644 rm -f core conftest.err conftest.$ac_objext \
16645 conftest$ac_exeext conftest.$ac_ext
16648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16649 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
16650 if test $emacs_cv_langinfo_codeset = yes; then
16652 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16657 $as_echo_n "checking for mbstate_t... " >&6; }
16658 if test "${ac_cv_type_mbstate_t+set}" = set; then :
16659 $as_echo_n "(cached) " >&6
16660 else
16661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16662 /* end confdefs.h. */
16663 $ac_includes_default
16664 # include <wchar.h>
16666 main ()
16668 mbstate_t x; return sizeof x;
16670 return 0;
16672 _ACEOF
16673 if ac_fn_c_try_compile "$LINENO"; then :
16674 ac_cv_type_mbstate_t=yes
16675 else
16676 ac_cv_type_mbstate_t=no
16678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16681 $as_echo "$ac_cv_type_mbstate_t" >&6; }
16682 if test $ac_cv_type_mbstate_t = yes; then
16684 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
16686 else
16688 $as_echo "#define mbstate_t int" >>confdefs.h
16692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16693 $as_echo_n "checking for C restricted array declarations... " >&6; }
16694 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16695 $as_echo_n "(cached) " >&6
16696 else
16697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16698 /* end confdefs.h. */
16699 void fred (int x[__restrict]);
16701 main ()
16705 return 0;
16707 _ACEOF
16708 if ac_fn_c_try_compile "$LINENO"; then :
16709 emacs_cv_c_restrict_arr=yes
16710 else
16711 emacs_cv_c_restrict_arr=no
16713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16716 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
16717 if test "$emacs_cv_c_restrict_arr" = yes; then
16719 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
16724 if test "${opsys}" != "mingw32"; then
16726 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16731 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
16734 ## Note: PTYs are broken on darwin <6. Use at your own risk.
16735 if test "${opsys}" != "mingw32"; then
16737 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
16742 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
16748 if test "${opsys}" = "mingw32"; then
16749 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16751 else
16752 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16757 if test "${opsys}" = "mingw32"; then
16758 $as_echo "#define SEPCHAR ';'" >>confdefs.h
16760 else
16761 $as_echo "#define SEPCHAR ':'" >>confdefs.h
16766 $as_echo "#define subprocesses 1" >>confdefs.h
16770 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16775 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16778 if test "${opsys}" = "mingw32"; then
16780 $as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
16784 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16788 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16790 else
16792 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16796 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16800 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16806 case $opsys in
16807 aix4-2)
16808 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16809 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16814 hpux*)
16815 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16818 esac
16821 case $opsys in
16822 irix6-5 | sol2* | unixware )
16824 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
16827 esac
16829 emacs_broken_SIGIO=no
16831 case $opsys in
16832 hpux* | irix6-5 | openbsd | sol2* | unixware )
16833 emacs_broken_SIGIO=yes
16836 aix4-2)
16838 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
16842 freebsd)
16844 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
16847 esac
16849 case $opsys in
16850 gnu-* | sol2-10 )
16852 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
16855 esac
16857 case $opsys in
16858 darwin | dragonfly | freebsd | netbsd | openbsd )
16860 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
16863 esac
16865 case $opsys in
16866 netbsd | openbsd) sound_device="/dev/audio" ;;
16867 *) sound_device="/dev/dsp" ;;
16868 esac
16871 cat >>confdefs.h <<_ACEOF
16872 #define DEFAULT_SOUND_DEVICE "$sound_device"
16873 _ACEOF
16877 case $opsys in
16878 darwin | gnu-linux | gnu-kfreebsd )
16880 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
16883 esac
16886 case $opsys in
16887 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
16889 $as_echo "#define NARROWPROTO 1" >>confdefs.h
16892 esac
16901 case $opsys in
16902 aix4-2 )
16903 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
16905 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
16907 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
16911 cygwin )
16912 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16914 $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
16916 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16918 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16922 darwin )
16923 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16925 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16927 $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
16929 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16931 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16935 gnu | openbsd )
16936 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16940 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
16941 if test "x$ac_cv_func_grantpt" = xyes; then
16943 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
16945 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16947 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16949 if test "x$ac_cv_func_posix_openpt" = xyes; then
16950 $as_echo "#define PTY_OPEN do { fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | O_NOCTTY); } while (0)" >>confdefs.h
16952 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16954 elif test "x$ac_cv_func_getpt" = xyes; then
16955 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
16957 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16959 else
16960 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16963 else
16964 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16969 hpux*)
16970 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16972 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
16974 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
16978 irix6-5 )
16979 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
16981 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
16983 $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
16985 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16987 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16991 sol2* )
16992 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16996 unixware )
16997 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
17000 esac
17003 case $opsys in
17004 sol2* | unixware )
17005 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
17007 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
17010 $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
17013 esac
17018 case $opsys in
17019 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
17020 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
17024 gnu-linux | gnu-kfreebsd )
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
17027 $as_echo_n "checking for signals via characters... " >&6; }
17028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17029 /* end confdefs.h. */
17031 #include <linux/version.h>
17032 #if LINUX_VERSION_CODE < 0x20400
17033 # error "Linux version too old"
17034 #endif
17037 main ()
17041 return 0;
17043 _ACEOF
17044 if ac_fn_c_try_cpp "$LINENO"; then :
17045 emacs_signals_via_chars=yes
17046 else
17047 emacs_signals_via_chars=no
17049 rm -f conftest.err conftest.$ac_ext
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
17052 $as_echo "$emacs_signals_via_chars" >&6; }
17053 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
17056 esac
17061 case $opsys in
17062 aix*)
17063 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
17066 hpux*)
17067 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
17070 irix6-5)
17071 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
17074 esac
17079 case $opsys in
17080 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
17083 gnu | dragonfly | freebsd | netbsd | openbsd )
17085 $as_echo "#define TABDLY OXTABS" >>confdefs.h
17087 $as_echo "#define TAB3 OXTABS" >>confdefs.h
17091 gnu-linux | gnu-kfreebsd )
17092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17093 /* end confdefs.h. */
17095 #ifndef __ia64__
17096 # error "not ia64"
17097 #endif
17100 main ()
17104 return 0;
17106 _ACEOF
17107 if ac_fn_c_try_cpp "$LINENO"; then :
17109 $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
17112 rm -f conftest.err conftest.$ac_ext
17115 hpux*)
17117 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
17120 esac
17126 case $opsys in
17127 gnu-linux | gnu-kfreebsd )
17128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17129 /* end confdefs.h. */
17131 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
17132 || defined __alpha__ || defined __mips__ || defined __s390__ \
17133 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
17134 || defined __ia64__ || defined __sh__
17135 /* ok */
17136 #else
17137 # error "setjmp not known to work on this arch"
17138 #endif
17141 main ()
17145 return 0;
17147 _ACEOF
17148 if ac_fn_c_try_cpp "$LINENO"; then :
17149 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
17152 rm -f conftest.err conftest.$ac_ext
17154 esac
17157 if test x$GCC = xyes; then
17158 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
17160 else
17161 case $opsys in
17162 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
17163 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
17166 esac
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
17169 $as_echo_n "checking for _setjmp... " >&6; }
17170 if test "${emacs_cv_func__setjmp+set}" = set; then :
17171 $as_echo_n "(cached) " >&6
17172 else
17173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17174 /* end confdefs.h. */
17175 #include <setjmp.h>
17176 #ifdef __MINGW32__
17177 # define _longjmp longjmp
17178 #endif
17181 main ()
17183 jmp_buf j;
17184 if (! _setjmp (j))
17185 _longjmp (j, 1);
17187 return 0;
17189 _ACEOF
17190 if ac_fn_c_try_link "$LINENO"; then :
17191 emacs_cv_func__setjmp=yes
17192 else
17193 emacs_cv_func__setjmp=no
17195 rm -f core conftest.err conftest.$ac_objext \
17196 conftest$ac_exeext conftest.$ac_ext
17198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
17199 $as_echo "$emacs_cv_func__setjmp" >&6; }
17200 if test $emacs_cv_func__setjmp = yes; then
17202 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
17204 else
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
17206 $as_echo_n "checking for sigsetjmp... " >&6; }
17207 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
17208 $as_echo_n "(cached) " >&6
17209 else
17210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17211 /* end confdefs.h. */
17212 #include <setjmp.h>
17215 main ()
17217 sigjmp_buf j;
17218 if (! sigsetjmp (j, 1))
17219 siglongjmp (j, 1);
17221 return 0;
17223 _ACEOF
17224 if ac_fn_c_try_link "$LINENO"; then :
17225 emacs_cv_func_sigsetjmp=yes
17226 else
17227 emacs_cv_func_sigsetjmp=no
17229 rm -f core conftest.err conftest.$ac_objext \
17230 conftest$ac_exeext conftest.$ac_ext
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
17233 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
17234 if test $emacs_cv_func_sigsetjmp = yes; then
17236 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
17241 case $opsys in
17242 sol2* | unixware )
17244 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
17247 esac
17250 case $opsys in
17251 hpux* | sol2* )
17253 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
17256 esac
17264 case $opsys in
17265 aix4-2)
17266 $as_echo "#define USG /**/" >>confdefs.h
17268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17269 /* end confdefs.h. */
17271 #ifndef _AIX
17272 # error "_AIX not defined"
17273 #endif
17276 main ()
17280 return 0;
17282 _ACEOF
17283 if ac_fn_c_try_cpp "$LINENO"; then :
17285 else
17287 $as_echo "#define _AIX /**/" >>confdefs.h
17290 rm -f conftest.err conftest.$ac_ext
17293 cygwin)
17295 $as_echo "#define CYGWIN 1" >>confdefs.h
17299 darwin)
17301 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
17305 gnu-linux | gnu-kfreebsd )
17306 $as_echo "#define USG /**/" >>confdefs.h
17309 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
17313 hpux*)
17314 $as_echo "#define USG /**/" >>confdefs.h
17317 $as_echo "#define HPUX /**/" >>confdefs.h
17321 irix6-5)
17322 $as_echo "#define USG /**/" >>confdefs.h
17324 $as_echo "#define USG5_4 /**/" >>confdefs.h
17327 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
17331 mingw32)
17332 $as_echo "#define DOS_NT /**/" >>confdefs.h
17335 $as_echo "#define WINDOWSNT 1" >>confdefs.h
17337 if test "x$ac_enable_checking" != "x" ; then
17339 $as_echo "#define EMACSDEBUG 1" >>confdefs.h
17344 sol2*)
17345 $as_echo "#define USG /**/" >>confdefs.h
17347 $as_echo "#define USG5_4 /**/" >>confdefs.h
17350 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
17354 unixware)
17355 $as_echo "#define USG /**/" >>confdefs.h
17357 $as_echo "#define USG5_4 /**/" >>confdefs.h
17360 esac
17362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
17363 $as_echo_n "checking for usable FIONREAD... " >&6; }
17364 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
17365 $as_echo_n "(cached) " >&6
17366 else
17367 case $opsys in
17368 aix4-2)
17369 emacs_cv_usable_FIONREAD=no
17372 mingw32)
17373 emacs_cv_usable_FIONREAD=yes
17377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17378 /* end confdefs.h. */
17379 #include <sys/types.h>
17380 #include <sys/ioctl.h>
17381 #ifdef USG5_4
17382 # include <sys/filio.h>
17383 #endif
17386 main ()
17388 int foo = ioctl (0, FIONREAD, &foo);
17390 return 0;
17392 _ACEOF
17393 if ac_fn_c_try_compile "$LINENO"; then :
17394 emacs_cv_usable_FIONREAD=yes
17395 else
17396 emacs_cv_usable_FIONREAD=no
17398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17400 esac
17402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
17403 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
17404 if test $emacs_cv_usable_FIONREAD = yes; then
17406 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
17409 if test $emacs_broken_SIGIO = no; then
17410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
17411 $as_echo_n "checking for usable SIGIO... " >&6; }
17412 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
17413 $as_echo_n "(cached) " >&6
17414 else
17415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17416 /* end confdefs.h. */
17417 #include <fcntl.h>
17418 #include <signal.h>
17421 main ()
17423 int foo = SIGIO | F_SETFL | FASYNC;
17425 return 0;
17427 _ACEOF
17428 if ac_fn_c_try_compile "$LINENO"; then :
17429 emacs_cv_usable_SIGIO=yes
17430 else
17431 emacs_cv_usable_SIGIO=no
17433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
17436 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
17437 if test $emacs_cv_usable_SIGIO = yes; then
17439 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
17446 case $opsys in
17447 cygwin)
17449 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
17453 hpux11)
17455 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
17459 irix6-5)
17461 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
17465 sol2-10)
17467 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
17470 esac
17472 # Set up the CFLAGS for real compilation, so we can substitute it.
17473 CFLAGS="$REAL_CFLAGS"
17474 CPPFLAGS="$REAL_CPPFLAGS"
17476 ## Hack to detect a buggy GCC version.
17477 if test "x$GCC" = xyes \
17478 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
17479 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
17480 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
17481 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
17484 version=$PACKAGE_VERSION
17486 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
17488 cat >>confdefs.h <<_ACEOF
17489 #define COPYRIGHT "$copyright"
17490 _ACEOF
17494 ### Specify what sort of things we'll be editing into Makefile and config.h.
17495 ### Use configuration here uncanonicalized to avoid exceeding size limits.
17498 ## Unused?
17521 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17522 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17523 ## end of LIBX_BASE, but nothing ever set it.
17528 ## Used in lwlib/Makefile.in.
17537 if test -n "${term_header}"; then
17539 cat >>confdefs.h <<_ACEOF
17540 #define TERM_HEADER "${term_header}"
17541 _ACEOF
17546 cat >>confdefs.h <<_ACEOF
17547 #define EMACS_CONFIGURATION "${canonical}"
17548 _ACEOF
17551 cat >>confdefs.h <<_ACEOF
17552 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
17553 _ACEOF
17557 case $opsys in
17558 mingw32)
17559 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17562 esac
17564 XMENU_OBJ=
17565 XOBJ=
17566 FONT_OBJ=
17567 if test "${HAVE_X_WINDOWS}" = "yes" ; then
17569 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
17571 XMENU_OBJ=xmenu.o
17572 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
17573 FONT_OBJ=xfont.o
17574 if test "$HAVE_XFT" = "yes"; then
17575 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17576 elif test "$HAVE_FREETYPE" = "yes"; then
17577 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17585 WIDGET_OBJ=
17586 MOTIF_LIBW=
17587 if test "${USE_X_TOOLKIT}" != "none" ; then
17588 WIDGET_OBJ=widget.o
17590 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17592 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17594 $as_echo "#define USE_LUCID 1" >>confdefs.h
17596 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
17598 $as_echo "#define USE_MOTIF 1" >>confdefs.h
17600 MOTIF_LIBW=-lXm
17601 case "$opsys" in
17602 gnu-linux)
17603 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17604 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17607 unixware)
17608 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17609 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17610 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17613 aix4-2)
17614 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17615 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17617 esac
17618 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17623 TOOLKIT_LIBW=
17624 case "$USE_X_TOOLKIT" in
17625 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17626 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17627 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17628 esac
17631 if test "${opsys}" != "mingw32"; then
17632 if test "$USE_X_TOOLKIT" = "none"; then
17633 LIBXT_OTHER="\$(LIBXSM)"
17634 OLDXMENU_TARGET="really-oldXMenu"
17635 else
17636 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17637 OLDXMENU_TARGET="really-lwlib"
17642 ## The X Menu stuff is present in the X10 distribution, but missing
17643 ## from X11. If we have X10, just use the installed library;
17644 ## otherwise, use our own copy.
17645 if test "${HAVE_X11}" = "yes" ; then
17647 $as_echo "#define HAVE_X11 1" >>confdefs.h
17650 if test "$USE_X_TOOLKIT" = "none"; then
17651 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17652 else
17653 OLDXMENU="\${lwlibdir}/liblw.a"
17655 LIBXMENU="\$(OLDXMENU)"
17656 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17657 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
17658 else
17659 ## For a syntactically valid Makefile; not actually used for anything.
17660 ## See comments in src/Makefile.in.
17661 OLDXMENU=nothing
17662 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17663 if test "${HAVE_X_WINDOWS}" = "yes"; then
17664 LIBXMENU="-lXMenu"
17665 else
17666 LIBXMENU=
17668 LIBX_OTHER=
17669 OLDXMENU_DEPS=
17672 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17673 OLDXMENU_TARGET=
17674 OLDXMENU=nothing
17675 LIBXMENU=
17676 OLDXMENU_DEPS=
17685 if test "${HAVE_MENUS}" = "yes" ; then
17687 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
17691 if test "${GNU_MALLOC}" = "yes" ; then
17693 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
17697 RALLOC_OBJ=
17698 if test "${REL_ALLOC}" = "yes" ; then
17700 $as_echo "#define REL_ALLOC 1" >>confdefs.h
17703 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17707 if test "$opsys" = "cygwin"; then
17708 CYGWIN_OBJ="sheap.o cygw32.o"
17709 ## Cygwin differs because of its unexec().
17710 PRE_ALLOC_OBJ=
17711 POST_ALLOC_OBJ=lastfile.o
17712 elif test "$opsys" = "mingw32"; then
17713 CYGWIN_OBJ=
17714 PRE_ALLOC_OBJ=
17715 POST_ALLOC_OBJ=lastfile.o
17716 else
17717 CYGWIN_OBJ=
17718 PRE_ALLOC_OBJ=lastfile.o
17719 POST_ALLOC_OBJ=
17727 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17728 # it temporarily reverts them to their pre-pkg-config values,
17729 # because gnulib needs to work with both src (which uses the
17730 # pkg-config stuff) and lib-src (which does not). For example, gnulib
17731 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17732 # and it therefore needs to run in an environment where LIBS does not
17733 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17734 # for some package unrelated to lib-src.
17735 SAVE_CFLAGS=$CFLAGS
17736 SAVE_LIBS=$LIBS
17737 CFLAGS=$pre_PKG_CONFIG_CFLAGS
17738 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
17750 LIBC_FATAL_STDERR_=1
17751 export LIBC_FATAL_STDERR_
17753 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17754 # for constant arguments. Useless!
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17756 $as_echo_n "checking for working alloca.h... " >&6; }
17757 if test "${ac_cv_working_alloca_h+set}" = set; then :
17758 $as_echo_n "(cached) " >&6
17759 else
17760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17761 /* end confdefs.h. */
17762 #include <alloca.h>
17764 main ()
17766 char *p = (char *) alloca (2 * sizeof (int));
17767 if (p) return 0;
17769 return 0;
17771 _ACEOF
17772 if ac_fn_c_try_link "$LINENO"; then :
17773 ac_cv_working_alloca_h=yes
17774 else
17775 ac_cv_working_alloca_h=no
17777 rm -f core conftest.err conftest.$ac_objext \
17778 conftest$ac_exeext conftest.$ac_ext
17780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17781 $as_echo "$ac_cv_working_alloca_h" >&6; }
17782 if test $ac_cv_working_alloca_h = yes; then
17784 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17789 $as_echo_n "checking for alloca... " >&6; }
17790 if test "${ac_cv_func_alloca_works+set}" = set; then :
17791 $as_echo_n "(cached) " >&6
17792 else
17793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17794 /* end confdefs.h. */
17795 #ifdef __GNUC__
17796 # define alloca __builtin_alloca
17797 #else
17798 # ifdef _MSC_VER
17799 # include <malloc.h>
17800 # define alloca _alloca
17801 # else
17802 # ifdef HAVE_ALLOCA_H
17803 # include <alloca.h>
17804 # else
17805 # ifdef _AIX
17806 #pragma alloca
17807 # else
17808 # ifndef alloca /* predefined by HP cc +Olibcalls */
17809 char *alloca ();
17810 # endif
17811 # endif
17812 # endif
17813 # endif
17814 #endif
17817 main ()
17819 char *p = (char *) alloca (1);
17820 if (p) return 0;
17822 return 0;
17824 _ACEOF
17825 if ac_fn_c_try_link "$LINENO"; then :
17826 ac_cv_func_alloca_works=yes
17827 else
17828 ac_cv_func_alloca_works=no
17830 rm -f core conftest.err conftest.$ac_objext \
17831 conftest$ac_exeext conftest.$ac_ext
17833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17834 $as_echo "$ac_cv_func_alloca_works" >&6; }
17836 if test $ac_cv_func_alloca_works = yes; then
17838 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17840 else
17841 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17842 # that cause trouble. Some versions do not even contain alloca or
17843 # contain a buggy version. If you still want to use their alloca,
17844 # use ar to extract alloca.o from them instead of compiling alloca.c.
17850 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
17852 $as_echo "#define C_ALLOCA 1" >>confdefs.h
17855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17856 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17857 if test "${ac_cv_os_cray+set}" = set; then :
17858 $as_echo_n "(cached) " >&6
17859 else
17860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861 /* end confdefs.h. */
17862 #if defined CRAY && ! defined CRAY2
17863 webecray
17864 #else
17865 wenotbecray
17866 #endif
17868 _ACEOF
17869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17870 $EGREP "webecray" >/dev/null 2>&1; then :
17871 ac_cv_os_cray=yes
17872 else
17873 ac_cv_os_cray=no
17875 rm -f conftest*
17878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17879 $as_echo "$ac_cv_os_cray" >&6; }
17880 if test $ac_cv_os_cray = yes; then
17881 for ac_func in _getb67 GETB67 getb67; do
17882 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17883 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17884 eval as_val=\$$as_ac_var
17885 if test "x$as_val" = x""yes; then :
17887 cat >>confdefs.h <<_ACEOF
17888 #define CRAY_STACKSEG_END $ac_func
17889 _ACEOF
17891 break
17894 done
17897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17898 $as_echo_n "checking stack direction for C alloca... " >&6; }
17899 if test "${ac_cv_c_stack_direction+set}" = set; then :
17900 $as_echo_n "(cached) " >&6
17901 else
17902 if test "$cross_compiling" = yes; then :
17903 ac_cv_c_stack_direction=0
17904 else
17905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17906 /* end confdefs.h. */
17907 $ac_includes_default
17909 find_stack_direction (int *addr, int depth)
17911 int dir, dummy = 0;
17912 if (! addr)
17913 addr = &dummy;
17914 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17915 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17916 return dir + dummy;
17920 main (int argc, char **argv)
17922 return find_stack_direction (0, argc + !argv + 20) < 0;
17924 _ACEOF
17925 if ac_fn_c_try_run "$LINENO"; then :
17926 ac_cv_c_stack_direction=1
17927 else
17928 ac_cv_c_stack_direction=-1
17930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17931 conftest.$ac_objext conftest.beam conftest.$ac_ext
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17936 $as_echo "$ac_cv_c_stack_direction" >&6; }
17937 cat >>confdefs.h <<_ACEOF
17938 #define STACK_DIRECTION $ac_cv_c_stack_direction
17939 _ACEOF
17947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17948 $as_echo_n "checking for unsigned long long int... " >&6; }
17949 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
17950 $as_echo_n "(cached) " >&6
17951 else
17952 ac_cv_type_unsigned_long_long_int=yes
17953 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17955 /* end confdefs.h. */
17957 /* For now, do not test the preprocessor; as of 2007 there are too many
17958 implementations with broken preprocessors. Perhaps this can
17959 be revisited in 2012. In the meantime, code should not expect
17960 #if to work with literals wider than 32 bits. */
17961 /* Test literals. */
17962 long long int ll = 9223372036854775807ll;
17963 long long int nll = -9223372036854775807LL;
17964 unsigned long long int ull = 18446744073709551615ULL;
17965 /* Test constant expressions. */
17966 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17967 ? 1 : -1)];
17968 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17969 ? 1 : -1)];
17970 int i = 63;
17972 main ()
17974 /* Test availability of runtime routines for shift and division. */
17975 long long int llmax = 9223372036854775807ll;
17976 unsigned long long int ullmax = 18446744073709551615ull;
17977 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17978 | (llmax / ll) | (llmax % ll)
17979 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17980 | (ullmax / ull) | (ullmax % ull));
17982 return 0;
17985 _ACEOF
17986 if ac_fn_c_try_link "$LINENO"; then :
17988 else
17989 ac_cv_type_unsigned_long_long_int=no
17991 rm -f core conftest.err conftest.$ac_objext \
17992 conftest$ac_exeext conftest.$ac_ext
17995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17996 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17997 if test $ac_cv_type_unsigned_long_long_int = yes; then
17999 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
18004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
18005 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
18006 if test "${ac_cv_c_bigendian+set}" = set; then :
18007 $as_echo_n "(cached) " >&6
18008 else
18009 ac_cv_c_bigendian=unknown
18010 # See if we're dealing with a universal compiler.
18011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18012 /* end confdefs.h. */
18013 #ifndef __APPLE_CC__
18014 not a universal capable compiler
18015 #endif
18016 typedef int dummy;
18018 _ACEOF
18019 if ac_fn_c_try_compile "$LINENO"; then :
18021 # Check for potential -arch flags. It is not universal unless
18022 # there are at least two -arch flags with different values.
18023 ac_arch=
18024 ac_prev=
18025 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
18026 if test -n "$ac_prev"; then
18027 case $ac_word in
18028 i?86 | x86_64 | ppc | ppc64)
18029 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
18030 ac_arch=$ac_word
18031 else
18032 ac_cv_c_bigendian=universal
18033 break
18036 esac
18037 ac_prev=
18038 elif test "x$ac_word" = "x-arch"; then
18039 ac_prev=arch
18041 done
18043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18044 if test $ac_cv_c_bigendian = unknown; then
18045 # See if sys/param.h defines the BYTE_ORDER macro.
18046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18047 /* end confdefs.h. */
18048 #include <sys/types.h>
18049 #include <sys/param.h>
18052 main ()
18054 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
18055 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
18056 && LITTLE_ENDIAN)
18057 bogus endian macros
18058 #endif
18061 return 0;
18063 _ACEOF
18064 if ac_fn_c_try_compile "$LINENO"; then :
18065 # It does; now see whether it defined to BIG_ENDIAN or not.
18066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18067 /* end confdefs.h. */
18068 #include <sys/types.h>
18069 #include <sys/param.h>
18072 main ()
18074 #if BYTE_ORDER != BIG_ENDIAN
18075 not big endian
18076 #endif
18079 return 0;
18081 _ACEOF
18082 if ac_fn_c_try_compile "$LINENO"; then :
18083 ac_cv_c_bigendian=yes
18084 else
18085 ac_cv_c_bigendian=no
18087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18091 if test $ac_cv_c_bigendian = unknown; then
18092 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
18093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18094 /* end confdefs.h. */
18095 #include <limits.h>
18098 main ()
18100 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
18101 bogus endian macros
18102 #endif
18105 return 0;
18107 _ACEOF
18108 if ac_fn_c_try_compile "$LINENO"; then :
18109 # It does; now see whether it defined to _BIG_ENDIAN or not.
18110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18111 /* end confdefs.h. */
18112 #include <limits.h>
18115 main ()
18117 #ifndef _BIG_ENDIAN
18118 not big endian
18119 #endif
18122 return 0;
18124 _ACEOF
18125 if ac_fn_c_try_compile "$LINENO"; then :
18126 ac_cv_c_bigendian=yes
18127 else
18128 ac_cv_c_bigendian=no
18130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18134 if test $ac_cv_c_bigendian = unknown; then
18135 # Compile a test program.
18136 if test "$cross_compiling" = yes; then :
18137 # Try to guess by grepping values from an object file.
18138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18139 /* end confdefs.h. */
18140 short int ascii_mm[] =
18141 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18142 short int ascii_ii[] =
18143 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18144 int use_ascii (int i) {
18145 return ascii_mm[i] + ascii_ii[i];
18147 short int ebcdic_ii[] =
18148 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18149 short int ebcdic_mm[] =
18150 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18151 int use_ebcdic (int i) {
18152 return ebcdic_mm[i] + ebcdic_ii[i];
18154 extern int foo;
18157 main ()
18159 return use_ascii (foo) == use_ebcdic (foo);
18161 return 0;
18163 _ACEOF
18164 if ac_fn_c_try_compile "$LINENO"; then :
18165 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
18166 ac_cv_c_bigendian=yes
18168 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
18169 if test "$ac_cv_c_bigendian" = unknown; then
18170 ac_cv_c_bigendian=no
18171 else
18172 # finding both strings is unlikely to happen, but who knows?
18173 ac_cv_c_bigendian=unknown
18177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18178 else
18179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18180 /* end confdefs.h. */
18181 $ac_includes_default
18183 main ()
18186 /* Are we little or big endian? From Harbison&Steele. */
18187 union
18189 long int l;
18190 char c[sizeof (long int)];
18191 } u;
18192 u.l = 1;
18193 return u.c[sizeof (long int) - 1] == 1;
18196 return 0;
18198 _ACEOF
18199 if ac_fn_c_try_run "$LINENO"; then :
18200 ac_cv_c_bigendian=no
18201 else
18202 ac_cv_c_bigendian=yes
18204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18205 conftest.$ac_objext conftest.beam conftest.$ac_ext
18210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
18211 $as_echo "$ac_cv_c_bigendian" >&6; }
18212 case $ac_cv_c_bigendian in #(
18213 yes)
18214 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
18215 ;; #(
18217 ;; #(
18218 universal)
18220 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
18222 ;; #(
18224 as_fn_error "unknown endianness
18225 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
18226 esac
18230 GNULIB_CHDIR=0;
18231 GNULIB_CHOWN=0;
18232 GNULIB_CLOSE=0;
18233 GNULIB_DUP=0;
18234 GNULIB_DUP2=0;
18235 GNULIB_DUP3=0;
18236 GNULIB_ENVIRON=0;
18237 GNULIB_EUIDACCESS=0;
18238 GNULIB_FACCESSAT=0;
18239 GNULIB_FCHDIR=0;
18240 GNULIB_FCHOWNAT=0;
18241 GNULIB_FDATASYNC=0;
18242 GNULIB_FSYNC=0;
18243 GNULIB_FTRUNCATE=0;
18244 GNULIB_GETCWD=0;
18245 GNULIB_GETDOMAINNAME=0;
18246 GNULIB_GETDTABLESIZE=0;
18247 GNULIB_GETGROUPS=0;
18248 GNULIB_GETHOSTNAME=0;
18249 GNULIB_GETLOGIN=0;
18250 GNULIB_GETLOGIN_R=0;
18251 GNULIB_GETPAGESIZE=0;
18252 GNULIB_GETUSERSHELL=0;
18253 GNULIB_GROUP_MEMBER=0;
18254 GNULIB_ISATTY=0;
18255 GNULIB_LCHOWN=0;
18256 GNULIB_LINK=0;
18257 GNULIB_LINKAT=0;
18258 GNULIB_LSEEK=0;
18259 GNULIB_PIPE=0;
18260 GNULIB_PIPE2=0;
18261 GNULIB_PREAD=0;
18262 GNULIB_PWRITE=0;
18263 GNULIB_READ=0;
18264 GNULIB_READLINK=0;
18265 GNULIB_READLINKAT=0;
18266 GNULIB_RMDIR=0;
18267 GNULIB_SETHOSTNAME=0;
18268 GNULIB_SLEEP=0;
18269 GNULIB_SYMLINK=0;
18270 GNULIB_SYMLINKAT=0;
18271 GNULIB_TTYNAME_R=0;
18272 GNULIB_UNISTD_H_NONBLOCKING=0;
18273 GNULIB_UNISTD_H_SIGPIPE=0;
18274 GNULIB_UNLINK=0;
18275 GNULIB_UNLINKAT=0;
18276 GNULIB_USLEEP=0;
18277 GNULIB_WRITE=0;
18278 HAVE_CHOWN=1;
18279 HAVE_DUP2=1;
18280 HAVE_DUP3=1;
18281 HAVE_EUIDACCESS=1;
18282 HAVE_FACCESSAT=1;
18283 HAVE_FCHDIR=1;
18284 HAVE_FCHOWNAT=1;
18285 HAVE_FDATASYNC=1;
18286 HAVE_FSYNC=1;
18287 HAVE_FTRUNCATE=1;
18288 HAVE_GETDTABLESIZE=1;
18289 HAVE_GETGROUPS=1;
18290 HAVE_GETHOSTNAME=1;
18291 HAVE_GETLOGIN=1;
18292 HAVE_GETPAGESIZE=1;
18293 HAVE_GROUP_MEMBER=1;
18294 HAVE_LCHOWN=1;
18295 HAVE_LINK=1;
18296 HAVE_LINKAT=1;
18297 HAVE_PIPE=1;
18298 HAVE_PIPE2=1;
18299 HAVE_PREAD=1;
18300 HAVE_PWRITE=1;
18301 HAVE_READLINK=1;
18302 HAVE_READLINKAT=1;
18303 HAVE_SETHOSTNAME=1;
18304 HAVE_SLEEP=1;
18305 HAVE_SYMLINK=1;
18306 HAVE_SYMLINKAT=1;
18307 HAVE_UNLINKAT=1;
18308 HAVE_USLEEP=1;
18309 HAVE_DECL_ENVIRON=1;
18310 HAVE_DECL_FCHDIR=1;
18311 HAVE_DECL_FDATASYNC=1;
18312 HAVE_DECL_GETDOMAINNAME=1;
18313 HAVE_DECL_GETLOGIN_R=1;
18314 HAVE_DECL_GETPAGESIZE=1;
18315 HAVE_DECL_GETUSERSHELL=1;
18316 HAVE_DECL_SETHOSTNAME=1;
18317 HAVE_DECL_TTYNAME_R=1;
18318 HAVE_OS_H=0;
18319 HAVE_SYS_PARAM_H=0;
18320 REPLACE_CHOWN=0;
18321 REPLACE_CLOSE=0;
18322 REPLACE_DUP=0;
18323 REPLACE_DUP2=0;
18324 REPLACE_FCHOWNAT=0;
18325 REPLACE_FTRUNCATE=0;
18326 REPLACE_GETCWD=0;
18327 REPLACE_GETDOMAINNAME=0;
18328 REPLACE_GETDTABLESIZE=0;
18329 REPLACE_GETLOGIN_R=0;
18330 REPLACE_GETGROUPS=0;
18331 REPLACE_GETPAGESIZE=0;
18332 REPLACE_ISATTY=0;
18333 REPLACE_LCHOWN=0;
18334 REPLACE_LINK=0;
18335 REPLACE_LINKAT=0;
18336 REPLACE_LSEEK=0;
18337 REPLACE_PREAD=0;
18338 REPLACE_PWRITE=0;
18339 REPLACE_READ=0;
18340 REPLACE_READLINK=0;
18341 REPLACE_RMDIR=0;
18342 REPLACE_SLEEP=0;
18343 REPLACE_SYMLINK=0;
18344 REPLACE_TTYNAME_R=0;
18345 REPLACE_UNLINK=0;
18346 REPLACE_UNLINKAT=0;
18347 REPLACE_USLEEP=0;
18348 REPLACE_WRITE=0;
18349 UNISTD_H_HAVE_WINSOCK2_H=0;
18350 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
18354 GNULIB_OPENDIR=0;
18355 GNULIB_READDIR=0;
18356 GNULIB_REWINDDIR=0;
18357 GNULIB_CLOSEDIR=0;
18358 GNULIB_DIRFD=0;
18359 GNULIB_FDOPENDIR=0;
18360 GNULIB_SCANDIR=0;
18361 GNULIB_ALPHASORT=0;
18362 HAVE_OPENDIR=1;
18363 HAVE_READDIR=1;
18364 HAVE_REWINDDIR=1;
18365 HAVE_CLOSEDIR=1;
18366 HAVE_DECL_DIRFD=1;
18367 HAVE_DECL_FDOPENDIR=1;
18368 HAVE_FDOPENDIR=1;
18369 HAVE_SCANDIR=1;
18370 HAVE_ALPHASORT=1;
18371 REPLACE_OPENDIR=0;
18372 REPLACE_CLOSEDIR=0;
18373 REPLACE_DIRFD=0;
18374 REPLACE_FDOPENDIR=0;
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
18379 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
18380 if test "${gl_cv_have_include_next+set}" = set; then :
18381 $as_echo_n "(cached) " >&6
18382 else
18383 rm -rf conftestd1a conftestd1b conftestd2
18384 mkdir conftestd1a conftestd1b conftestd2
18385 cat <<EOF > conftestd1a/conftest.h
18386 #define DEFINED_IN_CONFTESTD1
18387 #include_next <conftest.h>
18388 #ifdef DEFINED_IN_CONFTESTD2
18389 int foo;
18390 #else
18391 #error "include_next doesn't work"
18392 #endif
18394 cat <<EOF > conftestd1b/conftest.h
18395 #define DEFINED_IN_CONFTESTD1
18396 #include <stdio.h>
18397 #include_next <conftest.h>
18398 #ifdef DEFINED_IN_CONFTESTD2
18399 int foo;
18400 #else
18401 #error "include_next doesn't work"
18402 #endif
18404 cat <<EOF > conftestd2/conftest.h
18405 #ifndef DEFINED_IN_CONFTESTD1
18406 #error "include_next test doesn't work"
18407 #endif
18408 #define DEFINED_IN_CONFTESTD2
18410 gl_save_CPPFLAGS="$CPPFLAGS"
18411 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
18412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18413 /* end confdefs.h. */
18414 #include <conftest.h>
18415 _ACEOF
18416 if ac_fn_c_try_compile "$LINENO"; then :
18417 gl_cv_have_include_next=yes
18418 else
18419 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
18420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18421 /* end confdefs.h. */
18422 #include <conftest.h>
18423 _ACEOF
18424 if ac_fn_c_try_compile "$LINENO"; then :
18425 gl_cv_have_include_next=buggy
18426 else
18427 gl_cv_have_include_next=no
18429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18433 CPPFLAGS="$gl_save_CPPFLAGS"
18434 rm -rf conftestd1a conftestd1b conftestd2
18437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
18438 $as_echo "$gl_cv_have_include_next" >&6; }
18439 PRAGMA_SYSTEM_HEADER=
18440 if test $gl_cv_have_include_next = yes; then
18441 INCLUDE_NEXT=include_next
18442 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18443 if test -n "$GCC"; then
18444 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
18446 else
18447 if test $gl_cv_have_include_next = buggy; then
18448 INCLUDE_NEXT=include
18449 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18450 else
18451 INCLUDE_NEXT=include
18452 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
18458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
18459 $as_echo_n "checking whether system header files limit the line length... " >&6; }
18460 if test "${gl_cv_pragma_columns+set}" = set; then :
18461 $as_echo_n "(cached) " >&6
18462 else
18463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18464 /* end confdefs.h. */
18466 #ifdef __TANDEM
18467 choke me
18468 #endif
18470 _ACEOF
18471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18472 $EGREP "choke me" >/dev/null 2>&1; then :
18473 gl_cv_pragma_columns=yes
18474 else
18475 gl_cv_pragma_columns=no
18477 rm -f conftest*
18481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
18482 $as_echo "$gl_cv_pragma_columns" >&6; }
18483 if test $gl_cv_pragma_columns = yes; then
18484 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
18485 else
18486 PRAGMA_COLUMNS=
18493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
18494 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
18495 if test "${gl_cv_func_c99_strtold+set}" = set; then :
18496 $as_echo_n "(cached) " >&6
18497 else
18498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18499 /* end confdefs.h. */
18500 /* On HP-UX before 11.23, strtold returns a struct instead of
18501 long double. Reject implementations like that, by requiring
18502 compatibility with the C99 prototype. */
18503 #include <stdlib.h>
18504 static long double (*p) (char const *, char **) = strtold;
18505 static long double
18506 test (char const *nptr, char **endptr)
18508 long double r;
18509 r = strtold (nptr, endptr);
18510 return r;
18513 main ()
18515 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
18517 return 0;
18519 _ACEOF
18520 if ac_fn_c_try_link "$LINENO"; then :
18521 gl_cv_func_c99_strtold=yes
18522 else
18523 gl_cv_func_c99_strtold=no
18525 rm -f core conftest.err conftest.$ac_objext \
18526 conftest$ac_exeext conftest.$ac_ext
18528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
18529 $as_echo "$gl_cv_func_c99_strtold" >&6; }
18530 if test $gl_cv_func_c99_strtold = yes; then
18532 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
18543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
18544 $as_echo_n "checking if environ is properly declared... " >&6; }
18545 if test "${gt_cv_var_environ_declaration+set}" = set; then :
18546 $as_echo_n "(cached) " >&6
18547 else
18549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18550 /* end confdefs.h. */
18551 #if HAVE_UNISTD_H
18552 #include <unistd.h>
18553 #endif
18554 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
18555 #include <stdlib.h>
18557 extern struct { int foo; } environ;
18559 main ()
18561 environ.foo = 1;
18563 return 0;
18565 _ACEOF
18566 if ac_fn_c_try_compile "$LINENO"; then :
18567 gt_cv_var_environ_declaration=no
18568 else
18569 gt_cv_var_environ_declaration=yes
18571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18575 $as_echo "$gt_cv_var_environ_declaration" >&6; }
18576 if test $gt_cv_var_environ_declaration = yes; then
18578 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18583 if test $gt_cv_var_environ_declaration != yes; then
18584 HAVE_DECL_ENVIRON=0
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18590 $as_echo_n "checking for complete errno.h... " >&6; }
18591 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18592 $as_echo_n "(cached) " >&6
18593 else
18595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18596 /* end confdefs.h. */
18598 #include <errno.h>
18599 #if !defined ETXTBSY
18600 booboo
18601 #endif
18602 #if !defined ENOMSG
18603 booboo
18604 #endif
18605 #if !defined EIDRM
18606 booboo
18607 #endif
18608 #if !defined ENOLINK
18609 booboo
18610 #endif
18611 #if !defined EPROTO
18612 booboo
18613 #endif
18614 #if !defined EMULTIHOP
18615 booboo
18616 #endif
18617 #if !defined EBADMSG
18618 booboo
18619 #endif
18620 #if !defined EOVERFLOW
18621 booboo
18622 #endif
18623 #if !defined ENOTSUP
18624 booboo
18625 #endif
18626 #if !defined ENETRESET
18627 booboo
18628 #endif
18629 #if !defined ECONNABORTED
18630 booboo
18631 #endif
18632 #if !defined ESTALE
18633 booboo
18634 #endif
18635 #if !defined EDQUOT
18636 booboo
18637 #endif
18638 #if !defined ECANCELED
18639 booboo
18640 #endif
18641 #if !defined EOWNERDEAD
18642 booboo
18643 #endif
18644 #if !defined ENOTRECOVERABLE
18645 booboo
18646 #endif
18647 #if !defined EILSEQ
18648 booboo
18649 #endif
18651 _ACEOF
18652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18653 $EGREP "booboo" >/dev/null 2>&1; then :
18654 gl_cv_header_errno_h_complete=no
18655 else
18656 gl_cv_header_errno_h_complete=yes
18658 rm -f conftest*
18662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18663 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
18664 if test $gl_cv_header_errno_h_complete = yes; then
18665 ERRNO_H=''
18666 else
18675 if test $gl_cv_have_include_next = yes; then
18676 gl_cv_next_errno_h='<'errno.h'>'
18677 else
18678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18679 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
18680 if test "${gl_cv_next_errno_h+set}" = set; then :
18681 $as_echo_n "(cached) " >&6
18682 else
18684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18685 /* end confdefs.h. */
18686 #include <errno.h>
18688 _ACEOF
18689 case "$host_os" in
18690 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18691 *) gl_absname_cpp="$ac_cpp" ;;
18692 esac
18694 case "$host_os" in
18695 mingw*)
18696 gl_dirsep_regex='[/\\]'
18699 gl_dirsep_regex='\/'
18701 esac
18702 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18704 gl_header_literal_regex=`echo 'errno.h' \
18705 | sed -e "$gl_make_literal_regex_sed"`
18706 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18707 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18708 s|^/[^/]|//&|
18712 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18713 sed -n "$gl_absolute_header_sed"`'"'
18717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18718 $as_echo "$gl_cv_next_errno_h" >&6; }
18720 NEXT_ERRNO_H=$gl_cv_next_errno_h
18722 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18723 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18724 gl_next_as_first_directive='<'errno.h'>'
18725 else
18726 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18727 gl_next_as_first_directive=$gl_cv_next_errno_h
18729 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
18734 ERRNO_H='errno.h'
18737 if test -n "$ERRNO_H"; then
18738 GL_GENERATE_ERRNO_H_TRUE=
18739 GL_GENERATE_ERRNO_H_FALSE='#'
18740 else
18741 GL_GENERATE_ERRNO_H_TRUE='#'
18742 GL_GENERATE_ERRNO_H_FALSE=
18746 if test -n "$ERRNO_H"; then
18747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18748 $as_echo_n "checking for EMULTIHOP value... " >&6; }
18749 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18750 $as_echo_n "(cached) " >&6
18751 else
18753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18754 /* end confdefs.h. */
18756 #include <errno.h>
18757 #ifdef EMULTIHOP
18759 #endif
18761 _ACEOF
18762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18763 $EGREP "yes" >/dev/null 2>&1; then :
18764 gl_cv_header_errno_h_EMULTIHOP=yes
18765 else
18766 gl_cv_header_errno_h_EMULTIHOP=no
18768 rm -f conftest*
18770 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18772 /* end confdefs.h. */
18774 #define _XOPEN_SOURCE_EXTENDED 1
18775 #include <errno.h>
18776 #ifdef EMULTIHOP
18778 #endif
18780 _ACEOF
18781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18782 $EGREP "yes" >/dev/null 2>&1; then :
18783 gl_cv_header_errno_h_EMULTIHOP=hidden
18785 rm -f conftest*
18787 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18788 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18789 #define _XOPEN_SOURCE_EXTENDED 1
18790 #include <errno.h>
18791 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18792 #include <stdio.h>
18793 #include <stdlib.h>
18794 "; then :
18802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18803 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18804 case $gl_cv_header_errno_h_EMULTIHOP in
18805 yes | no)
18806 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18809 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18811 esac
18817 if test -n "$ERRNO_H"; then
18818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18819 $as_echo_n "checking for ENOLINK value... " >&6; }
18820 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
18821 $as_echo_n "(cached) " >&6
18822 else
18824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18825 /* end confdefs.h. */
18827 #include <errno.h>
18828 #ifdef ENOLINK
18830 #endif
18832 _ACEOF
18833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18834 $EGREP "yes" >/dev/null 2>&1; then :
18835 gl_cv_header_errno_h_ENOLINK=yes
18836 else
18837 gl_cv_header_errno_h_ENOLINK=no
18839 rm -f conftest*
18841 if test $gl_cv_header_errno_h_ENOLINK = no; then
18842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18843 /* end confdefs.h. */
18845 #define _XOPEN_SOURCE_EXTENDED 1
18846 #include <errno.h>
18847 #ifdef ENOLINK
18849 #endif
18851 _ACEOF
18852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18853 $EGREP "yes" >/dev/null 2>&1; then :
18854 gl_cv_header_errno_h_ENOLINK=hidden
18856 rm -f conftest*
18858 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18859 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18860 #define _XOPEN_SOURCE_EXTENDED 1
18861 #include <errno.h>
18862 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18863 #include <stdio.h>
18864 #include <stdlib.h>
18865 "; then :
18873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18874 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18875 case $gl_cv_header_errno_h_ENOLINK in
18876 yes | no)
18877 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18880 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18882 esac
18888 if test -n "$ERRNO_H"; then
18889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18890 $as_echo_n "checking for EOVERFLOW value... " >&6; }
18891 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18892 $as_echo_n "(cached) " >&6
18893 else
18895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18896 /* end confdefs.h. */
18898 #include <errno.h>
18899 #ifdef EOVERFLOW
18901 #endif
18903 _ACEOF
18904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18905 $EGREP "yes" >/dev/null 2>&1; then :
18906 gl_cv_header_errno_h_EOVERFLOW=yes
18907 else
18908 gl_cv_header_errno_h_EOVERFLOW=no
18910 rm -f conftest*
18912 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18914 /* end confdefs.h. */
18916 #define _XOPEN_SOURCE_EXTENDED 1
18917 #include <errno.h>
18918 #ifdef EOVERFLOW
18920 #endif
18922 _ACEOF
18923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18924 $EGREP "yes" >/dev/null 2>&1; then :
18925 gl_cv_header_errno_h_EOVERFLOW=hidden
18927 rm -f conftest*
18929 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18930 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18931 #define _XOPEN_SOURCE_EXTENDED 1
18932 #include <errno.h>
18933 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18934 #include <stdio.h>
18935 #include <stdlib.h>
18936 "; then :
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18945 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18946 case $gl_cv_header_errno_h_EOVERFLOW in
18947 yes | no)
18948 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18951 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18953 esac
18967 GNULIB_FCNTL=0;
18968 GNULIB_NONBLOCKING=0;
18969 GNULIB_OPEN=0;
18970 GNULIB_OPENAT=0;
18971 HAVE_FCNTL=1;
18972 HAVE_OPENAT=1;
18973 REPLACE_FCNTL=0;
18974 REPLACE_OPEN=0;
18975 REPLACE_OPENAT=0;
18980 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18981 if test "x$ac_cv_type_mode_t" = x""yes; then :
18983 else
18985 cat >>confdefs.h <<_ACEOF
18986 #define mode_t int
18987 _ACEOF
18991 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18992 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18993 ac_have_decl=1
18994 else
18995 ac_have_decl=0
18998 cat >>confdefs.h <<_ACEOF
18999 #define HAVE_DECL_FDATASYNC $ac_have_decl
19000 _ACEOF
19004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
19005 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
19006 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
19007 $as_echo_n "(cached) " >&6
19008 else
19009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010 /* end confdefs.h. */
19012 #include <sys/types.h>
19013 #include <sys/stat.h>
19015 main ()
19017 struct stat s; s.st_dm_mode;
19019 return 0;
19021 _ACEOF
19022 if ac_fn_c_try_compile "$LINENO"; then :
19023 ac_cv_struct_st_dm_mode=yes
19024 else
19025 ac_cv_struct_st_dm_mode=no
19027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
19030 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
19032 if test $ac_cv_struct_st_dm_mode = yes; then
19034 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
19039 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
19040 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
19041 ac_have_decl=1
19042 else
19043 ac_have_decl=0
19046 cat >>confdefs.h <<_ACEOF
19047 #define HAVE_DECL_STRMODE $ac_have_decl
19048 _ACEOF
19053 GNULIB_FCHMODAT=0;
19054 GNULIB_FSTAT=0;
19055 GNULIB_FSTATAT=0;
19056 GNULIB_FUTIMENS=0;
19057 GNULIB_LCHMOD=0;
19058 GNULIB_LSTAT=0;
19059 GNULIB_MKDIRAT=0;
19060 GNULIB_MKFIFO=0;
19061 GNULIB_MKFIFOAT=0;
19062 GNULIB_MKNOD=0;
19063 GNULIB_MKNODAT=0;
19064 GNULIB_STAT=0;
19065 GNULIB_UTIMENSAT=0;
19066 HAVE_FCHMODAT=1;
19067 HAVE_FSTATAT=1;
19068 HAVE_FUTIMENS=1;
19069 HAVE_LCHMOD=1;
19070 HAVE_LSTAT=1;
19071 HAVE_MKDIRAT=1;
19072 HAVE_MKFIFO=1;
19073 HAVE_MKFIFOAT=1;
19074 HAVE_MKNOD=1;
19075 HAVE_MKNODAT=1;
19076 HAVE_UTIMENSAT=1;
19077 REPLACE_FSTAT=0;
19078 REPLACE_FSTATAT=0;
19079 REPLACE_FUTIMENS=0;
19080 REPLACE_LSTAT=0;
19081 REPLACE_MKDIR=0;
19082 REPLACE_MKFIFO=0;
19083 REPLACE_MKNOD=0;
19084 REPLACE_STAT=0;
19085 REPLACE_UTIMENSAT=0;
19088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
19089 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
19090 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
19091 $as_echo_n "(cached) " >&6
19092 else
19093 rm -f conftest.sym conftest.file
19094 echo >conftest.file
19095 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
19096 if test "$cross_compiling" = yes; then :
19097 case "$host_os" in
19098 # Guess yes on glibc systems.
19099 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19100 # If we don't know, assume the worst.
19101 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
19102 esac
19104 else
19105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19106 /* end confdefs.h. */
19107 $ac_includes_default
19109 main ()
19111 struct stat sbuf;
19112 /* Linux will dereference the symlink and fail, as required by
19113 POSIX. That is better in the sense that it means we will not
19114 have to compile and use the lstat wrapper. */
19115 return lstat ("conftest.sym/", &sbuf) == 0;
19118 return 0;
19120 _ACEOF
19121 if ac_fn_c_try_run "$LINENO"; then :
19122 gl_cv_func_lstat_dereferences_slashed_symlink=yes
19123 else
19124 gl_cv_func_lstat_dereferences_slashed_symlink=no
19126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19127 conftest.$ac_objext conftest.beam conftest.$ac_ext
19130 else
19131 # If the 'ln -s' command failed, then we probably don't even
19132 # have an lstat function.
19133 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
19135 rm -f conftest.sym conftest.file
19138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
19139 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
19140 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19141 *yes)
19143 cat >>confdefs.h <<_ACEOF
19144 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
19145 _ACEOF
19148 esac
19155 GNULIB__EXIT=0;
19156 GNULIB_ATOLL=0;
19157 GNULIB_CALLOC_POSIX=0;
19158 GNULIB_CANONICALIZE_FILE_NAME=0;
19159 GNULIB_GETLOADAVG=0;
19160 GNULIB_GETSUBOPT=0;
19161 GNULIB_GRANTPT=0;
19162 GNULIB_MALLOC_POSIX=0;
19163 GNULIB_MBTOWC=0;
19164 GNULIB_MKDTEMP=0;
19165 GNULIB_MKOSTEMP=0;
19166 GNULIB_MKOSTEMPS=0;
19167 GNULIB_MKSTEMP=0;
19168 GNULIB_MKSTEMPS=0;
19169 GNULIB_POSIX_OPENPT=0;
19170 GNULIB_PTSNAME=0;
19171 GNULIB_PTSNAME_R=0;
19172 GNULIB_PUTENV=0;
19173 GNULIB_RANDOM=0;
19174 GNULIB_RANDOM_R=0;
19175 GNULIB_REALLOC_POSIX=0;
19176 GNULIB_REALPATH=0;
19177 GNULIB_RPMATCH=0;
19178 GNULIB_SECURE_GETENV=0;
19179 GNULIB_SETENV=0;
19180 GNULIB_STRTOD=0;
19181 GNULIB_STRTOLL=0;
19182 GNULIB_STRTOULL=0;
19183 GNULIB_SYSTEM_POSIX=0;
19184 GNULIB_UNLOCKPT=0;
19185 GNULIB_UNSETENV=0;
19186 GNULIB_WCTOMB=0;
19187 HAVE__EXIT=1;
19188 HAVE_ATOLL=1;
19189 HAVE_CANONICALIZE_FILE_NAME=1;
19190 HAVE_DECL_GETLOADAVG=1;
19191 HAVE_GETSUBOPT=1;
19192 HAVE_GRANTPT=1;
19193 HAVE_MKDTEMP=1;
19194 HAVE_MKOSTEMP=1;
19195 HAVE_MKOSTEMPS=1;
19196 HAVE_MKSTEMP=1;
19197 HAVE_MKSTEMPS=1;
19198 HAVE_POSIX_OPENPT=1;
19199 HAVE_PTSNAME=1;
19200 HAVE_PTSNAME_R=1;
19201 HAVE_RANDOM=1;
19202 HAVE_RANDOM_H=1;
19203 HAVE_RANDOM_R=1;
19204 HAVE_REALPATH=1;
19205 HAVE_RPMATCH=1;
19206 HAVE_SECURE_GETENV=1;
19207 HAVE_SETENV=1;
19208 HAVE_DECL_SETENV=1;
19209 HAVE_STRTOD=1;
19210 HAVE_STRTOLL=1;
19211 HAVE_STRTOULL=1;
19212 HAVE_STRUCT_RANDOM_DATA=1;
19213 HAVE_SYS_LOADAVG_H=0;
19214 HAVE_UNLOCKPT=1;
19215 HAVE_DECL_UNSETENV=1;
19216 REPLACE_CALLOC=0;
19217 REPLACE_CANONICALIZE_FILE_NAME=0;
19218 REPLACE_MALLOC=0;
19219 REPLACE_MBTOWC=0;
19220 REPLACE_MKSTEMP=0;
19221 REPLACE_PTSNAME=0;
19222 REPLACE_PTSNAME_R=0;
19223 REPLACE_PUTENV=0;
19224 REPLACE_RANDOM_R=0;
19225 REPLACE_REALLOC=0;
19226 REPLACE_REALPATH=0;
19227 REPLACE_SETENV=0;
19228 REPLACE_STRTOD=0;
19229 REPLACE_UNSETENV=0;
19230 REPLACE_WCTOMB=0;
19247 if test $gl_cv_have_include_next = yes; then
19248 gl_cv_next_getopt_h='<'getopt.h'>'
19249 else
19250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
19251 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
19252 if test "${gl_cv_next_getopt_h+set}" = set; then :
19253 $as_echo_n "(cached) " >&6
19254 else
19256 if test $ac_cv_header_getopt_h = yes; then
19259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19260 /* end confdefs.h. */
19261 #include <getopt.h>
19263 _ACEOF
19264 case "$host_os" in
19265 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19266 *) gl_absname_cpp="$ac_cpp" ;;
19267 esac
19269 case "$host_os" in
19270 mingw*)
19271 gl_dirsep_regex='[/\\]'
19274 gl_dirsep_regex='\/'
19276 esac
19277 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19279 gl_header_literal_regex=`echo 'getopt.h' \
19280 | sed -e "$gl_make_literal_regex_sed"`
19281 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19282 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19283 s|^/[^/]|//&|
19287 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19288 sed -n "$gl_absolute_header_sed"`'"'
19289 else
19290 gl_cv_next_getopt_h='<'getopt.h'>'
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
19296 $as_echo "$gl_cv_next_getopt_h" >&6; }
19298 NEXT_GETOPT_H=$gl_cv_next_getopt_h
19300 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19301 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19302 gl_next_as_first_directive='<'getopt.h'>'
19303 else
19304 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19305 gl_next_as_first_directive=$gl_cv_next_getopt_h
19307 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
19312 if test $ac_cv_header_getopt_h = yes; then
19313 HAVE_GETOPT_H=1
19314 else
19315 HAVE_GETOPT_H=0
19319 gl_replace_getopt=
19321 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19322 for ac_header in getopt.h
19323 do :
19324 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
19325 if test "x$ac_cv_header_getopt_h" = x""yes; then :
19326 cat >>confdefs.h <<_ACEOF
19327 #define HAVE_GETOPT_H 1
19328 _ACEOF
19330 else
19331 gl_replace_getopt=yes
19334 done
19338 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19339 for ac_func in getopt_long_only
19340 do :
19341 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
19342 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
19343 cat >>confdefs.h <<_ACEOF
19344 #define HAVE_GETOPT_LONG_ONLY 1
19345 _ACEOF
19347 else
19348 gl_replace_getopt=yes
19350 done
19354 if test -z "$gl_replace_getopt"; then
19355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
19356 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
19357 if test "${gl_cv_func_getopt_posix+set}" = set; then :
19358 $as_echo_n "(cached) " >&6
19359 else
19361 if test $cross_compiling = no; then
19362 if test "$cross_compiling" = yes; then :
19363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19364 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19365 as_fn_error "cannot run test program while cross compiling
19366 See \`config.log' for more details." "$LINENO" 5; }
19367 else
19368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19369 /* end confdefs.h. */
19371 #include <unistd.h>
19372 #include <stdlib.h>
19373 #include <string.h>
19376 main ()
19378 static char program[] = "program";
19379 static char a[] = "-a";
19380 static char foo[] = "foo";
19381 static char bar[] = "bar";
19382 char *argv[] = { program, a, foo, bar, NULL };
19383 int c;
19385 c = getopt (4, argv, "ab");
19386 if (!(c == 'a'))
19387 return 1;
19388 c = getopt (4, argv, "ab");
19389 if (!(c == -1))
19390 return 2;
19391 if (!(optind == 2))
19392 return 3;
19393 return 0;
19396 _ACEOF
19397 if ac_fn_c_try_run "$LINENO"; then :
19398 gl_cv_func_getopt_posix=maybe
19399 else
19400 gl_cv_func_getopt_posix=no
19402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19403 conftest.$ac_objext conftest.beam conftest.$ac_ext
19406 if test $gl_cv_func_getopt_posix = maybe; then
19407 if test "$cross_compiling" = yes; then :
19408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19409 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19410 as_fn_error "cannot run test program while cross compiling
19411 See \`config.log' for more details." "$LINENO" 5; }
19412 else
19413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19414 /* end confdefs.h. */
19416 #include <unistd.h>
19417 #include <stdlib.h>
19418 #include <string.h>
19421 main ()
19423 static char program[] = "program";
19424 static char donald[] = "donald";
19425 static char p[] = "-p";
19426 static char billy[] = "billy";
19427 static char duck[] = "duck";
19428 static char a[] = "-a";
19429 static char bar[] = "bar";
19430 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
19431 int c;
19433 c = getopt (7, argv, "+abp:q:");
19434 if (!(c == -1))
19435 return 4;
19436 if (!(strcmp (argv[0], "program") == 0))
19437 return 5;
19438 if (!(strcmp (argv[1], "donald") == 0))
19439 return 6;
19440 if (!(strcmp (argv[2], "-p") == 0))
19441 return 7;
19442 if (!(strcmp (argv[3], "billy") == 0))
19443 return 8;
19444 if (!(strcmp (argv[4], "duck") == 0))
19445 return 9;
19446 if (!(strcmp (argv[5], "-a") == 0))
19447 return 10;
19448 if (!(strcmp (argv[6], "bar") == 0))
19449 return 11;
19450 if (!(optind == 1))
19451 return 12;
19452 return 0;
19455 _ACEOF
19456 if ac_fn_c_try_run "$LINENO"; then :
19457 gl_cv_func_getopt_posix=maybe
19458 else
19459 gl_cv_func_getopt_posix=no
19461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19462 conftest.$ac_objext conftest.beam conftest.$ac_ext
19466 if test $gl_cv_func_getopt_posix = maybe; then
19467 if test "$cross_compiling" = yes; then :
19468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19469 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19470 as_fn_error "cannot run test program while cross compiling
19471 See \`config.log' for more details." "$LINENO" 5; }
19472 else
19473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19474 /* end confdefs.h. */
19476 #include <unistd.h>
19477 #include <stdlib.h>
19478 #include <string.h>
19481 main ()
19483 static char program[] = "program";
19484 static char ab[] = "-ab";
19485 char *argv[3] = { program, ab, NULL };
19486 if (getopt (2, argv, "ab:") != 'a')
19487 return 13;
19488 if (getopt (2, argv, "ab:") != '?')
19489 return 14;
19490 if (optopt != 'b')
19491 return 15;
19492 if (optind != 2)
19493 return 16;
19494 return 0;
19497 _ACEOF
19498 if ac_fn_c_try_run "$LINENO"; then :
19499 gl_cv_func_getopt_posix=yes
19500 else
19501 gl_cv_func_getopt_posix=no
19503 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19504 conftest.$ac_objext conftest.beam conftest.$ac_ext
19508 else
19509 case "$host_os" in
19510 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
19511 *) gl_cv_func_getopt_posix="guessing yes";;
19512 esac
19516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
19517 $as_echo "$gl_cv_func_getopt_posix" >&6; }
19518 case "$gl_cv_func_getopt_posix" in
19519 *no) gl_replace_getopt=yes ;;
19520 esac
19523 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
19525 $as_echo_n "checking for working GNU getopt function... " >&6; }
19526 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
19527 $as_echo_n "(cached) " >&6
19528 else
19529 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
19530 # optstring is necessary for programs like m4 that have POSIX-mandated
19531 # semantics for supporting options interspersed with files.
19532 # Also, since getopt_long is a GNU extension, we require optind=0.
19533 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
19534 # so take care to revert to the correct (non-)export state.
19535 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
19536 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
19537 xx) gl_had_POSIXLY_CORRECT=exported ;;
19538 x) gl_had_POSIXLY_CORRECT=yes ;;
19539 *) gl_had_POSIXLY_CORRECT= ;;
19540 esac
19541 POSIXLY_CORRECT=1
19542 export POSIXLY_CORRECT
19543 if test "$cross_compiling" = yes; then :
19544 gl_cv_func_getopt_gnu="guessing no"
19546 else
19547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19548 /* end confdefs.h. */
19549 #include <getopt.h>
19550 #include <stddef.h>
19551 #include <string.h>
19553 #include <stdlib.h>
19554 #if defined __MACH__ && defined __APPLE__
19555 /* Avoid a crash on Mac OS X. */
19556 #include <mach/mach.h>
19557 #include <mach/mach_error.h>
19558 #include <mach/thread_status.h>
19559 #include <mach/exception.h>
19560 #include <mach/task.h>
19561 #include <pthread.h>
19562 /* The exception port on which our thread listens. */
19563 static mach_port_t our_exception_port;
19564 /* The main function of the thread listening for exceptions of type
19565 EXC_BAD_ACCESS. */
19566 static void *
19567 mach_exception_thread (void *arg)
19569 /* Buffer for a message to be received. */
19570 struct {
19571 mach_msg_header_t head;
19572 mach_msg_body_t msgh_body;
19573 char data[1024];
19574 } msg;
19575 mach_msg_return_t retval;
19576 /* Wait for a message on the exception port. */
19577 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19578 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19579 if (retval != MACH_MSG_SUCCESS)
19580 abort ();
19581 exit (1);
19583 static void
19584 nocrash_init (void)
19586 mach_port_t self = mach_task_self ();
19587 /* Allocate a port on which the thread shall listen for exceptions. */
19588 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19589 == KERN_SUCCESS) {
19590 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19591 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19592 MACH_MSG_TYPE_MAKE_SEND)
19593 == KERN_SUCCESS) {
19594 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19595 for us. */
19596 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19597 /* Create the thread listening on the exception port. */
19598 pthread_attr_t attr;
19599 pthread_t thread;
19600 if (pthread_attr_init (&attr) == 0
19601 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19602 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19603 pthread_attr_destroy (&attr);
19604 /* Replace the exception port info for these exceptions with our own.
19605 Note that we replace the exception port for the entire task, not only
19606 for a particular thread. This has the effect that when our exception
19607 port gets the message, the thread specific exception port has already
19608 been asked, and we don't need to bother about it.
19609 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19610 task_set_exception_ports (self, mask, our_exception_port,
19611 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19616 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19617 /* Avoid a crash on native Windows. */
19618 #define WIN32_LEAN_AND_MEAN
19619 #include <windows.h>
19620 #include <winerror.h>
19621 static LONG WINAPI
19622 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19624 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19626 case EXCEPTION_ACCESS_VIOLATION:
19627 case EXCEPTION_IN_PAGE_ERROR:
19628 case EXCEPTION_STACK_OVERFLOW:
19629 case EXCEPTION_GUARD_PAGE:
19630 case EXCEPTION_PRIV_INSTRUCTION:
19631 case EXCEPTION_ILLEGAL_INSTRUCTION:
19632 case EXCEPTION_DATATYPE_MISALIGNMENT:
19633 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19634 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19635 exit (1);
19637 return EXCEPTION_CONTINUE_SEARCH;
19639 static void
19640 nocrash_init (void)
19642 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19644 #else
19645 /* Avoid a crash on POSIX systems. */
19646 #include <signal.h>
19647 /* A POSIX signal handler. */
19648 static void
19649 exception_handler (int sig)
19651 exit (1);
19653 static void
19654 nocrash_init (void)
19656 #ifdef SIGSEGV
19657 signal (SIGSEGV, exception_handler);
19658 #endif
19659 #ifdef SIGBUS
19660 signal (SIGBUS, exception_handler);
19661 #endif
19663 #endif
19667 main ()
19670 int result = 0;
19672 nocrash_init();
19674 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19675 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19676 OSF/1 5.1, Solaris 10. */
19678 static char conftest[] = "conftest";
19679 static char plus[] = "-+";
19680 char *argv[3] = { conftest, plus, NULL };
19681 opterr = 0;
19682 if (getopt (2, argv, "+a") != '?')
19683 result |= 1;
19685 /* This code succeeds on glibc 2.8, mingw,
19686 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19687 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19689 static char program[] = "program";
19690 static char p[] = "-p";
19691 static char foo[] = "foo";
19692 static char bar[] = "bar";
19693 char *argv[] = { program, p, foo, bar, NULL };
19695 optind = 1;
19696 if (getopt (4, argv, "p::") != 'p')
19697 result |= 2;
19698 else if (optarg != NULL)
19699 result |= 4;
19700 else if (getopt (4, argv, "p::") != -1)
19701 result |= 6;
19702 else if (optind != 2)
19703 result |= 8;
19705 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19707 static char program[] = "program";
19708 static char foo[] = "foo";
19709 static char p[] = "-p";
19710 char *argv[] = { program, foo, p, NULL };
19711 optind = 0;
19712 if (getopt (3, argv, "-p") != 1)
19713 result |= 16;
19714 else if (getopt (3, argv, "-p") != 'p')
19715 result |= 16;
19717 /* This code fails on glibc 2.11. */
19719 static char program[] = "program";
19720 static char b[] = "-b";
19721 static char a[] = "-a";
19722 char *argv[] = { program, b, a, NULL };
19723 optind = opterr = 0;
19724 if (getopt (3, argv, "+:a:b") != 'b')
19725 result |= 32;
19726 else if (getopt (3, argv, "+:a:b") != ':')
19727 result |= 32;
19729 /* This code dumps core on glibc 2.14. */
19731 static char program[] = "program";
19732 static char w[] = "-W";
19733 static char dummy[] = "dummy";
19734 char *argv[] = { program, w, dummy, NULL };
19735 optind = opterr = 1;
19736 if (getopt (3, argv, "W;") != 'W')
19737 result |= 64;
19739 return result;
19742 return 0;
19744 _ACEOF
19745 if ac_fn_c_try_run "$LINENO"; then :
19746 gl_cv_func_getopt_gnu=yes
19747 else
19748 gl_cv_func_getopt_gnu=no
19750 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19751 conftest.$ac_objext conftest.beam conftest.$ac_ext
19754 case $gl_had_POSIXLY_CORRECT in
19755 exported) ;;
19756 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19757 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19758 esac
19761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19762 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
19763 if test "$gl_cv_func_getopt_gnu" != yes; then
19764 gl_replace_getopt=yes
19765 else
19766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19767 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
19768 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
19769 $as_echo_n "(cached) " >&6
19770 else
19771 if test "$cross_compiling" = yes; then :
19772 case "$host_os" in
19773 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19774 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19775 esac
19777 else
19778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19779 /* end confdefs.h. */
19780 #include <getopt.h>
19781 #include <stddef.h>
19782 #include <string.h>
19785 main ()
19787 static const struct option long_options[] =
19789 { "xtremely-",no_argument, NULL, 1003 },
19790 { "xtra", no_argument, NULL, 1001 },
19791 { "xtreme", no_argument, NULL, 1002 },
19792 { "xtremely", no_argument, NULL, 1003 },
19793 { NULL, 0, NULL, 0 }
19795 /* This code fails on OpenBSD 5.0. */
19797 static char program[] = "program";
19798 static char xtremel[] = "--xtremel";
19799 char *argv[] = { program, xtremel, NULL };
19800 int option_index;
19801 optind = 1; opterr = 0;
19802 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19803 return 1;
19805 return 0;
19808 return 0;
19810 _ACEOF
19811 if ac_fn_c_try_run "$LINENO"; then :
19812 gl_cv_func_getopt_long_gnu=yes
19813 else
19814 gl_cv_func_getopt_long_gnu=no
19816 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19817 conftest.$ac_objext conftest.beam conftest.$ac_ext
19822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19823 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19824 case "$gl_cv_func_getopt_long_gnu" in
19825 *yes) ;;
19826 *) gl_replace_getopt=yes ;;
19827 esac
19836 REPLACE_GETOPT=0
19837 if test -n "$gl_replace_getopt"; then
19838 REPLACE_GETOPT=1
19841 if test $REPLACE_GETOPT = 1; then
19843 GETOPT_H=getopt.h
19845 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
19851 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19852 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19853 ac_have_decl=1
19854 else
19855 ac_have_decl=0
19858 cat >>confdefs.h <<_ACEOF
19859 #define HAVE_DECL_GETENV $ac_have_decl
19860 _ACEOF
19867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19868 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19869 if test "${ac_cv_c_restrict+set}" = set; then :
19870 $as_echo_n "(cached) " >&6
19871 else
19872 ac_cv_c_restrict=no
19873 # The order here caters to the fact that C++ does not require restrict.
19874 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19876 /* end confdefs.h. */
19877 typedef int * int_ptr;
19878 int foo (int_ptr $ac_kw ip) {
19879 return ip[0];
19882 main ()
19884 int s[1];
19885 int * $ac_kw t = s;
19886 t[0] = 0;
19887 return foo(t)
19889 return 0;
19891 _ACEOF
19892 if ac_fn_c_try_compile "$LINENO"; then :
19893 ac_cv_c_restrict=$ac_kw
19895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19896 test "$ac_cv_c_restrict" != no && break
19897 done
19900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19901 $as_echo "$ac_cv_c_restrict" >&6; }
19903 case $ac_cv_c_restrict in
19904 restrict) ;;
19905 no) $as_echo "#define restrict /**/" >>confdefs.h
19907 *) cat >>confdefs.h <<_ACEOF
19908 #define restrict $ac_cv_c_restrict
19909 _ACEOF
19911 esac
19914 GNULIB_GETTIMEOFDAY=0;
19915 HAVE_GETTIMEOFDAY=1;
19916 HAVE_STRUCT_TIMEVAL=1;
19917 HAVE_SYS_TIME_H=1;
19918 REPLACE_GETTIMEOFDAY=0;
19919 REPLACE_STRUCT_TIMEVAL=0;
19936 if test $gl_cv_have_include_next = yes; then
19937 gl_cv_next_sys_time_h='<'sys/time.h'>'
19938 else
19939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19940 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19941 if test "${gl_cv_next_sys_time_h+set}" = set; then :
19942 $as_echo_n "(cached) " >&6
19943 else
19945 if test $ac_cv_header_sys_time_h = yes; then
19948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19949 /* end confdefs.h. */
19950 #include <sys/time.h>
19952 _ACEOF
19953 case "$host_os" in
19954 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19955 *) gl_absname_cpp="$ac_cpp" ;;
19956 esac
19958 case "$host_os" in
19959 mingw*)
19960 gl_dirsep_regex='[/\\]'
19963 gl_dirsep_regex='\/'
19965 esac
19966 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19968 gl_header_literal_regex=`echo 'sys/time.h' \
19969 | sed -e "$gl_make_literal_regex_sed"`
19970 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19971 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19972 s|^/[^/]|//&|
19976 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19977 sed -n "$gl_absolute_header_sed"`'"'
19978 else
19979 gl_cv_next_sys_time_h='<'sys/time.h'>'
19984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19985 $as_echo "$gl_cv_next_sys_time_h" >&6; }
19987 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
19989 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19990 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19991 gl_next_as_first_directive='<'sys/time.h'>'
19992 else
19993 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19994 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19996 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
20002 if test $ac_cv_header_sys_time_h != yes; then
20003 HAVE_SYS_TIME_H=0
20010 if test $ac_cv_header_sys_socket_h != yes; then
20011 for ac_header in winsock2.h
20012 do :
20013 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20014 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
20015 cat >>confdefs.h <<_ACEOF
20016 #define HAVE_WINSOCK2_H 1
20017 _ACEOF
20021 done
20024 if test "$ac_cv_header_winsock2_h" = yes; then
20025 HAVE_WINSOCK2_H=1
20026 UNISTD_H_HAVE_WINSOCK2_H=1
20027 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20028 else
20029 HAVE_WINSOCK2_H=0
20033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
20034 $as_echo_n "checking for struct timeval... " >&6; }
20035 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
20036 $as_echo_n "(cached) " >&6
20037 else
20038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20039 /* end confdefs.h. */
20040 #if HAVE_SYS_TIME_H
20041 #include <sys/time.h>
20042 #endif
20043 #include <time.h>
20044 #if HAVE_WINSOCK2_H
20045 # include <winsock2.h>
20046 #endif
20049 main ()
20051 static struct timeval x; x.tv_sec = x.tv_usec;
20053 return 0;
20055 _ACEOF
20056 if ac_fn_c_try_compile "$LINENO"; then :
20057 gl_cv_sys_struct_timeval=yes
20058 else
20059 gl_cv_sys_struct_timeval=no
20061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
20065 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
20066 if test $gl_cv_sys_struct_timeval != yes; then
20067 HAVE_STRUCT_TIMEVAL=0
20068 else
20069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
20070 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
20071 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
20072 $as_echo_n "(cached) " >&6
20073 else
20074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20075 /* end confdefs.h. */
20076 #if HAVE_SYS_TIME_H
20077 #include <sys/time.h>
20078 #endif
20079 #include <time.h>
20080 #if HAVE_WINSOCK2_H
20081 # include <winsock2.h>
20082 #endif
20085 main ()
20087 static struct timeval x;
20088 typedef int verify_tv_sec_type[
20089 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
20093 return 0;
20095 _ACEOF
20096 if ac_fn_c_try_compile "$LINENO"; then :
20097 gl_cv_sys_struct_timeval_tv_sec=yes
20098 else
20099 gl_cv_sys_struct_timeval_tv_sec=no
20101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
20105 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
20106 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
20107 REPLACE_STRUCT_TIMEVAL=1
20118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
20119 $as_echo_n "checking for long long int... " >&6; }
20120 if test "${ac_cv_type_long_long_int+set}" = set; then :
20121 $as_echo_n "(cached) " >&6
20122 else
20123 ac_cv_type_long_long_int=yes
20124 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
20125 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
20126 if test $ac_cv_type_long_long_int = yes; then
20127 if test "$cross_compiling" = yes; then :
20129 else
20130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20131 /* end confdefs.h. */
20132 #include <limits.h>
20133 #ifndef LLONG_MAX
20134 # define HALF \
20135 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
20136 # define LLONG_MAX (HALF - 1 + HALF)
20137 #endif
20139 main ()
20141 long long int n = 1;
20142 int i;
20143 for (i = 0; ; i++)
20145 long long int m = n << i;
20146 if (m >> i != n)
20147 return 1;
20148 if (LLONG_MAX / 2 < m)
20149 break;
20151 return 0;
20153 return 0;
20155 _ACEOF
20156 if ac_fn_c_try_run "$LINENO"; then :
20158 else
20159 ac_cv_type_long_long_int=no
20161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20162 conftest.$ac_objext conftest.beam conftest.$ac_ext
20168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
20169 $as_echo "$ac_cv_type_long_long_int" >&6; }
20170 if test $ac_cv_type_long_long_int = yes; then
20172 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
20181 gl_cv_c_multiarch=no
20182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20183 /* end confdefs.h. */
20184 #ifndef __APPLE_CC__
20185 not a universal capable compiler
20186 #endif
20187 typedef int dummy;
20189 _ACEOF
20190 if ac_fn_c_try_compile "$LINENO"; then :
20192 arch=
20193 prev=
20194 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
20195 if test -n "$prev"; then
20196 case $word in
20197 i?86 | x86_64 | ppc | ppc64)
20198 if test -z "$arch" || test "$arch" = "$word"; then
20199 arch="$word"
20200 else
20201 gl_cv_c_multiarch=yes
20204 esac
20205 prev=
20206 else
20207 if test "x$word" = "x-arch"; then
20208 prev=arch
20211 done
20214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20215 if test $gl_cv_c_multiarch = yes; then
20216 APPLE_UNIVERSAL_BUILD=1
20217 else
20218 APPLE_UNIVERSAL_BUILD=0
20225 if test $ac_cv_type_long_long_int = yes; then
20226 HAVE_LONG_LONG_INT=1
20227 else
20228 HAVE_LONG_LONG_INT=0
20232 if test $ac_cv_type_unsigned_long_long_int = yes; then
20233 HAVE_UNSIGNED_LONG_LONG_INT=1
20234 else
20235 HAVE_UNSIGNED_LONG_LONG_INT=0
20240 if test $ac_cv_header_wchar_h = yes; then
20241 HAVE_WCHAR_H=1
20242 else
20243 HAVE_WCHAR_H=0
20247 if test $ac_cv_header_inttypes_h = yes; then
20248 HAVE_INTTYPES_H=1
20249 else
20250 HAVE_INTTYPES_H=0
20254 if test $ac_cv_header_sys_types_h = yes; then
20255 HAVE_SYS_TYPES_H=1
20256 else
20257 HAVE_SYS_TYPES_H=0
20270 if test $gl_cv_have_include_next = yes; then
20271 gl_cv_next_stdint_h='<'stdint.h'>'
20272 else
20273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
20274 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
20275 if test "${gl_cv_next_stdint_h+set}" = set; then :
20276 $as_echo_n "(cached) " >&6
20277 else
20279 if test $ac_cv_header_stdint_h = yes; then
20282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20283 /* end confdefs.h. */
20284 #include <stdint.h>
20286 _ACEOF
20287 case "$host_os" in
20288 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20289 *) gl_absname_cpp="$ac_cpp" ;;
20290 esac
20292 case "$host_os" in
20293 mingw*)
20294 gl_dirsep_regex='[/\\]'
20297 gl_dirsep_regex='\/'
20299 esac
20300 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20302 gl_header_literal_regex=`echo 'stdint.h' \
20303 | sed -e "$gl_make_literal_regex_sed"`
20304 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20305 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20306 s|^/[^/]|//&|
20310 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20311 sed -n "$gl_absolute_header_sed"`'"'
20312 else
20313 gl_cv_next_stdint_h='<'stdint.h'>'
20318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
20319 $as_echo "$gl_cv_next_stdint_h" >&6; }
20321 NEXT_STDINT_H=$gl_cv_next_stdint_h
20323 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20324 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20325 gl_next_as_first_directive='<'stdint.h'>'
20326 else
20327 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20328 gl_next_as_first_directive=$gl_cv_next_stdint_h
20330 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
20335 if test $ac_cv_header_stdint_h = yes; then
20336 HAVE_STDINT_H=1
20337 else
20338 HAVE_STDINT_H=0
20342 if test $ac_cv_header_stdint_h = yes; then
20343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
20344 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
20345 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
20346 $as_echo_n "(cached) " >&6
20347 else
20348 gl_cv_header_working_stdint_h=no
20349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20350 /* end confdefs.h. */
20353 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20354 #include <stdint.h>
20355 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
20356 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
20357 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20358 #endif
20361 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20362 included before <wchar.h>. */
20363 #include <stddef.h>
20364 #include <signal.h>
20365 #if HAVE_WCHAR_H
20366 # include <stdio.h>
20367 # include <time.h>
20368 # include <wchar.h>
20369 #endif
20372 #ifdef INT8_MAX
20373 int8_t a1 = INT8_MAX;
20374 int8_t a1min = INT8_MIN;
20375 #endif
20376 #ifdef INT16_MAX
20377 int16_t a2 = INT16_MAX;
20378 int16_t a2min = INT16_MIN;
20379 #endif
20380 #ifdef INT32_MAX
20381 int32_t a3 = INT32_MAX;
20382 int32_t a3min = INT32_MIN;
20383 #endif
20384 #ifdef INT64_MAX
20385 int64_t a4 = INT64_MAX;
20386 int64_t a4min = INT64_MIN;
20387 #endif
20388 #ifdef UINT8_MAX
20389 uint8_t b1 = UINT8_MAX;
20390 #else
20391 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20392 #endif
20393 #ifdef UINT16_MAX
20394 uint16_t b2 = UINT16_MAX;
20395 #endif
20396 #ifdef UINT32_MAX
20397 uint32_t b3 = UINT32_MAX;
20398 #endif
20399 #ifdef UINT64_MAX
20400 uint64_t b4 = UINT64_MAX;
20401 #endif
20402 int_least8_t c1 = INT8_C (0x7f);
20403 int_least8_t c1max = INT_LEAST8_MAX;
20404 int_least8_t c1min = INT_LEAST8_MIN;
20405 int_least16_t c2 = INT16_C (0x7fff);
20406 int_least16_t c2max = INT_LEAST16_MAX;
20407 int_least16_t c2min = INT_LEAST16_MIN;
20408 int_least32_t c3 = INT32_C (0x7fffffff);
20409 int_least32_t c3max = INT_LEAST32_MAX;
20410 int_least32_t c3min = INT_LEAST32_MIN;
20411 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20412 int_least64_t c4max = INT_LEAST64_MAX;
20413 int_least64_t c4min = INT_LEAST64_MIN;
20414 uint_least8_t d1 = UINT8_C (0xff);
20415 uint_least8_t d1max = UINT_LEAST8_MAX;
20416 uint_least16_t d2 = UINT16_C (0xffff);
20417 uint_least16_t d2max = UINT_LEAST16_MAX;
20418 uint_least32_t d3 = UINT32_C (0xffffffff);
20419 uint_least32_t d3max = UINT_LEAST32_MAX;
20420 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20421 uint_least64_t d4max = UINT_LEAST64_MAX;
20422 int_fast8_t e1 = INT_FAST8_MAX;
20423 int_fast8_t e1min = INT_FAST8_MIN;
20424 int_fast16_t e2 = INT_FAST16_MAX;
20425 int_fast16_t e2min = INT_FAST16_MIN;
20426 int_fast32_t e3 = INT_FAST32_MAX;
20427 int_fast32_t e3min = INT_FAST32_MIN;
20428 int_fast64_t e4 = INT_FAST64_MAX;
20429 int_fast64_t e4min = INT_FAST64_MIN;
20430 uint_fast8_t f1 = UINT_FAST8_MAX;
20431 uint_fast16_t f2 = UINT_FAST16_MAX;
20432 uint_fast32_t f3 = UINT_FAST32_MAX;
20433 uint_fast64_t f4 = UINT_FAST64_MAX;
20434 #ifdef INTPTR_MAX
20435 intptr_t g = INTPTR_MAX;
20436 intptr_t gmin = INTPTR_MIN;
20437 #endif
20438 #ifdef UINTPTR_MAX
20439 uintptr_t h = UINTPTR_MAX;
20440 #endif
20441 intmax_t i = INTMAX_MAX;
20442 uintmax_t j = UINTMAX_MAX;
20444 #include <limits.h> /* for CHAR_BIT */
20445 #define TYPE_MINIMUM(t) \
20446 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
20447 #define TYPE_MAXIMUM(t) \
20448 ((t) ((t) 0 < (t) -1 \
20449 ? (t) -1 \
20450 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
20451 struct s {
20452 int check_PTRDIFF:
20453 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20454 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20455 ? 1 : -1;
20456 /* Detect bug in FreeBSD 6.0 / ia64. */
20457 int check_SIG_ATOMIC:
20458 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20459 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20460 ? 1 : -1;
20461 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20462 int check_WCHAR:
20463 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20464 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20465 ? 1 : -1;
20466 /* Detect bug in mingw. */
20467 int check_WINT:
20468 WINT_MIN == TYPE_MINIMUM (wint_t)
20469 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20470 ? 1 : -1;
20472 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20473 int check_UINT8_C:
20474 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20475 int check_UINT16_C:
20476 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20478 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20479 #ifdef UINT8_MAX
20480 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
20481 #endif
20482 #ifdef UINT16_MAX
20483 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20484 #endif
20485 #ifdef UINT32_MAX
20486 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20487 #endif
20488 #ifdef UINT64_MAX
20489 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20490 #endif
20491 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20492 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20493 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20494 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20495 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20496 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20497 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20498 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20499 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20500 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20501 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20505 main ()
20509 return 0;
20511 _ACEOF
20512 if ac_fn_c_try_compile "$LINENO"; then :
20513 if test "$cross_compiling" = yes; then :
20514 gl_cv_header_working_stdint_h=yes
20516 else
20517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20518 /* end confdefs.h. */
20521 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20522 #include <stdint.h>
20525 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20526 included before <wchar.h>. */
20527 #include <stddef.h>
20528 #include <signal.h>
20529 #if HAVE_WCHAR_H
20530 # include <stdio.h>
20531 # include <time.h>
20532 # include <wchar.h>
20533 #endif
20536 #include <stdio.h>
20537 #include <string.h>
20538 #define MVAL(macro) MVAL1(macro)
20539 #define MVAL1(expression) #expression
20540 static const char *macro_values[] =
20542 #ifdef INT8_MAX
20543 MVAL (INT8_MAX),
20544 #endif
20545 #ifdef INT16_MAX
20546 MVAL (INT16_MAX),
20547 #endif
20548 #ifdef INT32_MAX
20549 MVAL (INT32_MAX),
20550 #endif
20551 #ifdef INT64_MAX
20552 MVAL (INT64_MAX),
20553 #endif
20554 #ifdef UINT8_MAX
20555 MVAL (UINT8_MAX),
20556 #endif
20557 #ifdef UINT16_MAX
20558 MVAL (UINT16_MAX),
20559 #endif
20560 #ifdef UINT32_MAX
20561 MVAL (UINT32_MAX),
20562 #endif
20563 #ifdef UINT64_MAX
20564 MVAL (UINT64_MAX),
20565 #endif
20566 NULL
20570 main ()
20573 const char **mv;
20574 for (mv = macro_values; *mv != NULL; mv++)
20576 const char *value = *mv;
20577 /* Test whether it looks like a cast expression. */
20578 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20579 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20580 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20581 || strncmp (value, "((int)"/*)*/, 6) == 0
20582 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20583 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20584 return mv - macro_values + 1;
20586 return 0;
20589 return 0;
20591 _ACEOF
20592 if ac_fn_c_try_run "$LINENO"; then :
20593 gl_cv_header_working_stdint_h=yes
20595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20596 conftest.$ac_objext conftest.beam conftest.$ac_ext
20601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20605 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
20607 if test "$gl_cv_header_working_stdint_h" = yes; then
20608 STDINT_H=
20609 else
20610 for ac_header in sys/inttypes.h sys/bitypes.h
20611 do :
20612 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20613 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20614 eval as_val=\$$as_ac_Header
20615 if test "x$as_val" = x""yes; then :
20616 cat >>confdefs.h <<_ACEOF
20617 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20618 _ACEOF
20622 done
20624 if test $ac_cv_header_sys_inttypes_h = yes; then
20625 HAVE_SYS_INTTYPES_H=1
20626 else
20627 HAVE_SYS_INTTYPES_H=0
20630 if test $ac_cv_header_sys_bitypes_h = yes; then
20631 HAVE_SYS_BITYPES_H=1
20632 else
20633 HAVE_SYS_BITYPES_H=0
20639 if test $APPLE_UNIVERSAL_BUILD = 0; then
20642 for gltype in ptrdiff_t size_t ; do
20643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20644 $as_echo_n "checking for bit size of $gltype... " >&6; }
20645 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20646 $as_echo_n "(cached) " >&6
20647 else
20648 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20649 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20650 included before <wchar.h>. */
20651 #include <stddef.h>
20652 #include <signal.h>
20653 #if HAVE_WCHAR_H
20654 # include <stdio.h>
20655 # include <time.h>
20656 # include <wchar.h>
20657 #endif
20659 #include <limits.h>"; then :
20661 else
20662 result=unknown
20665 eval gl_cv_bitsizeof_${gltype}=\$result
20668 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20670 $as_echo "$ac_res" >&6; }
20671 eval result=\$gl_cv_bitsizeof_${gltype}
20672 if test $result = unknown; then
20673 result=0
20675 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20676 cat >>confdefs.h <<_ACEOF
20677 #define BITSIZEOF_${GLTYPE} $result
20678 _ACEOF
20680 eval BITSIZEOF_${GLTYPE}=\$result
20681 done
20687 for gltype in sig_atomic_t wchar_t wint_t ; do
20688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20689 $as_echo_n "checking for bit size of $gltype... " >&6; }
20690 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20691 $as_echo_n "(cached) " >&6
20692 else
20693 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20694 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20695 included before <wchar.h>. */
20696 #include <stddef.h>
20697 #include <signal.h>
20698 #if HAVE_WCHAR_H
20699 # include <stdio.h>
20700 # include <time.h>
20701 # include <wchar.h>
20702 #endif
20704 #include <limits.h>"; then :
20706 else
20707 result=unknown
20710 eval gl_cv_bitsizeof_${gltype}=\$result
20713 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20715 $as_echo "$ac_res" >&6; }
20716 eval result=\$gl_cv_bitsizeof_${gltype}
20717 if test $result = unknown; then
20718 result=0
20720 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20721 cat >>confdefs.h <<_ACEOF
20722 #define BITSIZEOF_${GLTYPE} $result
20723 _ACEOF
20725 eval BITSIZEOF_${GLTYPE}=\$result
20726 done
20731 for gltype in sig_atomic_t wchar_t wint_t ; do
20732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20733 $as_echo_n "checking whether $gltype is signed... " >&6; }
20734 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
20735 $as_echo_n "(cached) " >&6
20736 else
20737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20738 /* end confdefs.h. */
20740 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20741 included before <wchar.h>. */
20742 #include <stddef.h>
20743 #include <signal.h>
20744 #if HAVE_WCHAR_H
20745 # include <stdio.h>
20746 # include <time.h>
20747 # include <wchar.h>
20748 #endif
20750 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20752 main ()
20756 return 0;
20758 _ACEOF
20759 if ac_fn_c_try_compile "$LINENO"; then :
20760 result=yes
20761 else
20762 result=no
20764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20765 eval gl_cv_type_${gltype}_signed=\$result
20768 eval ac_res=\$gl_cv_type_${gltype}_signed
20769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20770 $as_echo "$ac_res" >&6; }
20771 eval result=\$gl_cv_type_${gltype}_signed
20772 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20773 if test "$result" = yes; then
20774 cat >>confdefs.h <<_ACEOF
20775 #define HAVE_SIGNED_${GLTYPE} 1
20776 _ACEOF
20778 eval HAVE_SIGNED_${GLTYPE}=1
20779 else
20780 eval HAVE_SIGNED_${GLTYPE}=0
20782 done
20785 gl_cv_type_ptrdiff_t_signed=yes
20786 gl_cv_type_size_t_signed=no
20787 if test $APPLE_UNIVERSAL_BUILD = 0; then
20790 for gltype in ptrdiff_t size_t ; do
20791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20792 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20793 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20794 $as_echo_n "(cached) " >&6
20795 else
20796 eval gl_cv_type_${gltype}_suffix=no
20797 eval result=\$gl_cv_type_${gltype}_signed
20798 if test "$result" = yes; then
20799 glsufu=
20800 else
20801 glsufu=u
20803 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20804 case $glsuf in
20805 '') gltype1='int';;
20806 l) gltype1='long int';;
20807 ll) gltype1='long long int';;
20808 i64) gltype1='__int64';;
20809 u) gltype1='unsigned int';;
20810 ul) gltype1='unsigned long int';;
20811 ull) gltype1='unsigned long long int';;
20812 ui64)gltype1='unsigned __int64';;
20813 esac
20814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20815 /* end confdefs.h. */
20817 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20818 included before <wchar.h>. */
20819 #include <stddef.h>
20820 #include <signal.h>
20821 #if HAVE_WCHAR_H
20822 # include <stdio.h>
20823 # include <time.h>
20824 # include <wchar.h>
20825 #endif
20827 extern $gltype foo;
20828 extern $gltype1 foo;
20830 main ()
20834 return 0;
20836 _ACEOF
20837 if ac_fn_c_try_compile "$LINENO"; then :
20838 eval gl_cv_type_${gltype}_suffix=\$glsuf
20840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20841 eval result=\$gl_cv_type_${gltype}_suffix
20842 test "$result" != no && break
20843 done
20845 eval ac_res=\$gl_cv_type_${gltype}_suffix
20846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20847 $as_echo "$ac_res" >&6; }
20848 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20849 eval result=\$gl_cv_type_${gltype}_suffix
20850 test "$result" = no && result=
20851 eval ${GLTYPE}_SUFFIX=\$result
20852 cat >>confdefs.h <<_ACEOF
20853 #define ${GLTYPE}_SUFFIX $result
20854 _ACEOF
20856 done
20862 for gltype in sig_atomic_t wchar_t wint_t ; do
20863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20864 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20865 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20866 $as_echo_n "(cached) " >&6
20867 else
20868 eval gl_cv_type_${gltype}_suffix=no
20869 eval result=\$gl_cv_type_${gltype}_signed
20870 if test "$result" = yes; then
20871 glsufu=
20872 else
20873 glsufu=u
20875 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20876 case $glsuf in
20877 '') gltype1='int';;
20878 l) gltype1='long int';;
20879 ll) gltype1='long long int';;
20880 i64) gltype1='__int64';;
20881 u) gltype1='unsigned int';;
20882 ul) gltype1='unsigned long int';;
20883 ull) gltype1='unsigned long long int';;
20884 ui64)gltype1='unsigned __int64';;
20885 esac
20886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20887 /* end confdefs.h. */
20889 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20890 included before <wchar.h>. */
20891 #include <stddef.h>
20892 #include <signal.h>
20893 #if HAVE_WCHAR_H
20894 # include <stdio.h>
20895 # include <time.h>
20896 # include <wchar.h>
20897 #endif
20899 extern $gltype foo;
20900 extern $gltype1 foo;
20902 main ()
20906 return 0;
20908 _ACEOF
20909 if ac_fn_c_try_compile "$LINENO"; then :
20910 eval gl_cv_type_${gltype}_suffix=\$glsuf
20912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20913 eval result=\$gl_cv_type_${gltype}_suffix
20914 test "$result" != no && break
20915 done
20917 eval ac_res=\$gl_cv_type_${gltype}_suffix
20918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20919 $as_echo "$ac_res" >&6; }
20920 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20921 eval result=\$gl_cv_type_${gltype}_suffix
20922 test "$result" = no && result=
20923 eval ${GLTYPE}_SUFFIX=\$result
20924 cat >>confdefs.h <<_ACEOF
20925 #define ${GLTYPE}_SUFFIX $result
20926 _ACEOF
20928 done
20932 if test $BITSIZEOF_WINT_T -lt 32; then
20933 BITSIZEOF_WINT_T=32
20936 STDINT_H=stdint.h
20939 if test -n "$STDINT_H"; then
20940 GL_GENERATE_STDINT_H_TRUE=
20941 GL_GENERATE_STDINT_H_FALSE='#'
20942 else
20943 GL_GENERATE_STDINT_H_TRUE='#'
20944 GL_GENERATE_STDINT_H_FALSE=
20951 GNULIB_IMAXABS=0;
20952 GNULIB_IMAXDIV=0;
20953 GNULIB_STRTOIMAX=0;
20954 GNULIB_STRTOUMAX=0;
20955 HAVE_DECL_IMAXABS=1;
20956 HAVE_DECL_IMAXDIV=1;
20957 HAVE_DECL_STRTOIMAX=1;
20958 HAVE_DECL_STRTOUMAX=1;
20959 REPLACE_STRTOIMAX=0;
20960 REPLACE_STRTOUMAX=0;
20961 INT32_MAX_LT_INTMAX_MAX=1;
20962 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20963 PRI_MACROS_BROKEN=0;
20964 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20965 UINT32_MAX_LT_UINTMAX_MAX=1;
20966 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
20982 if test $gl_cv_have_include_next = yes; then
20983 gl_cv_next_inttypes_h='<'inttypes.h'>'
20984 else
20985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20986 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20987 if test "${gl_cv_next_inttypes_h+set}" = set; then :
20988 $as_echo_n "(cached) " >&6
20989 else
20991 if test $ac_cv_header_inttypes_h = yes; then
20994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20995 /* end confdefs.h. */
20996 #include <inttypes.h>
20998 _ACEOF
20999 case "$host_os" in
21000 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21001 *) gl_absname_cpp="$ac_cpp" ;;
21002 esac
21004 case "$host_os" in
21005 mingw*)
21006 gl_dirsep_regex='[/\\]'
21009 gl_dirsep_regex='\/'
21011 esac
21012 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21014 gl_header_literal_regex=`echo 'inttypes.h' \
21015 | sed -e "$gl_make_literal_regex_sed"`
21016 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21017 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21018 s|^/[^/]|//&|
21022 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21023 sed -n "$gl_absolute_header_sed"`'"'
21024 else
21025 gl_cv_next_inttypes_h='<'inttypes.h'>'
21030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
21031 $as_echo "$gl_cv_next_inttypes_h" >&6; }
21033 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
21035 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21036 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21037 gl_next_as_first_directive='<'inttypes.h'>'
21038 else
21039 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21040 gl_next_as_first_directive=$gl_cv_next_inttypes_h
21042 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
21054 case "$host_os" in
21055 mingw*)
21056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
21057 $as_echo_n "checking for 64-bit off_t... " >&6; }
21058 if test "${gl_cv_type_off_t_64+set}" = set; then :
21059 $as_echo_n "(cached) " >&6
21060 else
21061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21062 /* end confdefs.h. */
21063 #include <sys/types.h>
21064 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
21067 main ()
21071 return 0;
21073 _ACEOF
21074 if ac_fn_c_try_compile "$LINENO"; then :
21075 gl_cv_type_off_t_64=yes
21076 else
21077 gl_cv_type_off_t_64=no
21079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
21083 $as_echo "$gl_cv_type_off_t_64" >&6; }
21084 if test $gl_cv_type_off_t_64 = no; then
21085 WINDOWS_64_BIT_OFF_T=1
21086 else
21087 WINDOWS_64_BIT_OFF_T=0
21089 WINDOWS_64_BIT_ST_SIZE=1
21092 WINDOWS_64_BIT_OFF_T=0
21093 WINDOWS_64_BIT_ST_SIZE=0
21095 esac
21100 GNULIB_FFSL=0;
21101 GNULIB_FFSLL=0;
21102 GNULIB_MEMCHR=0;
21103 GNULIB_MEMMEM=0;
21104 GNULIB_MEMPCPY=0;
21105 GNULIB_MEMRCHR=0;
21106 GNULIB_RAWMEMCHR=0;
21107 GNULIB_STPCPY=0;
21108 GNULIB_STPNCPY=0;
21109 GNULIB_STRCHRNUL=0;
21110 GNULIB_STRDUP=0;
21111 GNULIB_STRNCAT=0;
21112 GNULIB_STRNDUP=0;
21113 GNULIB_STRNLEN=0;
21114 GNULIB_STRPBRK=0;
21115 GNULIB_STRSEP=0;
21116 GNULIB_STRSTR=0;
21117 GNULIB_STRCASESTR=0;
21118 GNULIB_STRTOK_R=0;
21119 GNULIB_MBSLEN=0;
21120 GNULIB_MBSNLEN=0;
21121 GNULIB_MBSCHR=0;
21122 GNULIB_MBSRCHR=0;
21123 GNULIB_MBSSTR=0;
21124 GNULIB_MBSCASECMP=0;
21125 GNULIB_MBSNCASECMP=0;
21126 GNULIB_MBSPCASECMP=0;
21127 GNULIB_MBSCASESTR=0;
21128 GNULIB_MBSCSPN=0;
21129 GNULIB_MBSPBRK=0;
21130 GNULIB_MBSSPN=0;
21131 GNULIB_MBSSEP=0;
21132 GNULIB_MBSTOK_R=0;
21133 GNULIB_STRERROR=0;
21134 GNULIB_STRERROR_R=0;
21135 GNULIB_STRSIGNAL=0;
21136 GNULIB_STRVERSCMP=0;
21137 HAVE_MBSLEN=0;
21138 HAVE_FFSL=1;
21139 HAVE_FFSLL=1;
21140 HAVE_MEMCHR=1;
21141 HAVE_DECL_MEMMEM=1;
21142 HAVE_MEMPCPY=1;
21143 HAVE_DECL_MEMRCHR=1;
21144 HAVE_RAWMEMCHR=1;
21145 HAVE_STPCPY=1;
21146 HAVE_STPNCPY=1;
21147 HAVE_STRCHRNUL=1;
21148 HAVE_DECL_STRDUP=1;
21149 HAVE_DECL_STRNDUP=1;
21150 HAVE_DECL_STRNLEN=1;
21151 HAVE_STRPBRK=1;
21152 HAVE_STRSEP=1;
21153 HAVE_STRCASESTR=1;
21154 HAVE_DECL_STRTOK_R=1;
21155 HAVE_DECL_STRERROR_R=1;
21156 HAVE_DECL_STRSIGNAL=1;
21157 HAVE_STRVERSCMP=1;
21158 REPLACE_MEMCHR=0;
21159 REPLACE_MEMMEM=0;
21160 REPLACE_STPNCPY=0;
21161 REPLACE_STRDUP=0;
21162 REPLACE_STRSTR=0;
21163 REPLACE_STRCASESTR=0;
21164 REPLACE_STRCHRNUL=0;
21165 REPLACE_STRERROR=0;
21166 REPLACE_STRERROR_R=0;
21167 REPLACE_STRNCAT=0;
21168 REPLACE_STRNDUP=0;
21169 REPLACE_STRNLEN=0;
21170 REPLACE_STRSIGNAL=0;
21171 REPLACE_STRTOK_R=0;
21172 UNDEFINE_STRTOK_R=0;
21174 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
21175 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
21176 ac_have_decl=1
21177 else
21178 ac_have_decl=0
21181 cat >>confdefs.h <<_ACEOF
21182 #define HAVE_DECL_MEMRCHR $ac_have_decl
21183 _ACEOF
21188 GNULIB_MKTIME=0;
21189 GNULIB_NANOSLEEP=0;
21190 GNULIB_STRPTIME=0;
21191 GNULIB_TIMEGM=0;
21192 GNULIB_TIME_R=0;
21193 HAVE_DECL_LOCALTIME_R=1;
21194 HAVE_NANOSLEEP=1;
21195 HAVE_STRPTIME=1;
21196 HAVE_TIMEGM=1;
21197 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
21198 REPLACE_MKTIME=GNULIB_PORTCHECK;
21199 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
21200 REPLACE_TIMEGM=GNULIB_PORTCHECK;
21202 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
21203 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
21204 ac_have_decl=1
21205 else
21206 ac_have_decl=0
21209 cat >>confdefs.h <<_ACEOF
21210 #define HAVE_DECL_ALARM $ac_have_decl
21211 _ACEOF
21216 GNULIB_PSELECT=0;
21217 GNULIB_SELECT=0;
21218 HAVE_PSELECT=1;
21219 REPLACE_PSELECT=0;
21220 REPLACE_SELECT=0;
21227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
21228 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
21229 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
21230 $as_echo_n "(cached) " >&6
21231 else
21233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21234 /* end confdefs.h. */
21235 #include <sys/select.h>
21237 main ()
21239 struct timeval b;
21241 return 0;
21243 _ACEOF
21244 if ac_fn_c_try_compile "$LINENO"; then :
21245 gl_cv_header_sys_select_h_selfcontained=yes
21246 else
21247 gl_cv_header_sys_select_h_selfcontained=no
21249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21250 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
21251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21252 /* end confdefs.h. */
21253 #include <sys/select.h>
21255 main ()
21257 int memset; int bzero;
21259 return 0;
21262 _ACEOF
21263 if ac_fn_c_try_compile "$LINENO"; then :
21264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21265 /* end confdefs.h. */
21266 #include <sys/select.h>
21268 main ()
21271 #undef memset
21272 #define memset nonexistent_memset
21273 extern
21274 #ifdef __cplusplus
21276 #endif
21277 void *memset (void *, int, unsigned long);
21278 #undef bzero
21279 #define bzero nonexistent_bzero
21280 extern
21281 #ifdef __cplusplus
21283 #endif
21284 void bzero (void *, unsigned long);
21285 fd_set fds;
21286 FD_ZERO (&fds);
21289 return 0;
21292 _ACEOF
21293 if ac_fn_c_try_link "$LINENO"; then :
21295 else
21296 gl_cv_header_sys_select_h_selfcontained=no
21298 rm -f core conftest.err conftest.$ac_objext \
21299 conftest$ac_exeext conftest.$ac_ext
21302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
21307 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
21317 if test $gl_cv_have_include_next = yes; then
21318 gl_cv_next_sys_select_h='<'sys/select.h'>'
21319 else
21320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
21321 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
21322 if test "${gl_cv_next_sys_select_h+set}" = set; then :
21323 $as_echo_n "(cached) " >&6
21324 else
21326 if test $ac_cv_header_sys_select_h = yes; then
21329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21330 /* end confdefs.h. */
21331 #include <sys/select.h>
21333 _ACEOF
21334 case "$host_os" in
21335 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21336 *) gl_absname_cpp="$ac_cpp" ;;
21337 esac
21339 case "$host_os" in
21340 mingw*)
21341 gl_dirsep_regex='[/\\]'
21344 gl_dirsep_regex='\/'
21346 esac
21347 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21349 gl_header_literal_regex=`echo 'sys/select.h' \
21350 | sed -e "$gl_make_literal_regex_sed"`
21351 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21352 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21353 s|^/[^/]|//&|
21357 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21358 sed -n "$gl_absolute_header_sed"`'"'
21359 else
21360 gl_cv_next_sys_select_h='<'sys/select.h'>'
21365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
21366 $as_echo "$gl_cv_next_sys_select_h" >&6; }
21368 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
21370 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21371 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21372 gl_next_as_first_directive='<'sys/select.h'>'
21373 else
21374 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21375 gl_next_as_first_directive=$gl_cv_next_sys_select_h
21377 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
21382 if test $ac_cv_header_sys_select_h = yes; then
21383 HAVE_SYS_SELECT_H=1
21384 else
21385 HAVE_SYS_SELECT_H=0
21392 if test $ac_cv_header_sys_socket_h != yes; then
21393 for ac_header in winsock2.h
21394 do :
21395 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21396 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21397 cat >>confdefs.h <<_ACEOF
21398 #define HAVE_WINSOCK2_H 1
21399 _ACEOF
21403 done
21406 if test "$ac_cv_header_winsock2_h" = yes; then
21407 HAVE_WINSOCK2_H=1
21408 UNISTD_H_HAVE_WINSOCK2_H=1
21409 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21410 else
21411 HAVE_WINSOCK2_H=0
21421 GNULIB_PTHREAD_SIGMASK=0;
21422 GNULIB_RAISE=0;
21423 GNULIB_SIGNAL_H_SIGPIPE=0;
21424 GNULIB_SIGPROCMASK=0;
21425 GNULIB_SIGACTION=0;
21426 HAVE_POSIX_SIGNALBLOCKING=1;
21427 HAVE_PTHREAD_SIGMASK=1;
21428 HAVE_RAISE=1;
21429 HAVE_SIGSET_T=1;
21430 HAVE_SIGINFO_T=1;
21431 HAVE_SIGACTION=1;
21432 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
21434 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
21436 HAVE_SIGHANDLER_T=1;
21437 REPLACE_PTHREAD_SIGMASK=0;
21438 REPLACE_RAISE=0;
21446 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
21447 #include <signal.h>
21448 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
21449 #include <sys/types.h>
21452 if test "x$ac_cv_type_sigset_t" = x""yes; then :
21454 cat >>confdefs.h <<_ACEOF
21455 #define HAVE_SIGSET_T 1
21456 _ACEOF
21458 gl_cv_type_sigset_t=yes
21459 else
21460 gl_cv_type_sigset_t=no
21463 if test $gl_cv_type_sigset_t != yes; then
21464 HAVE_SIGSET_T=0
21469 if test $ac_cv_header_sys_socket_h = no; then
21470 for ac_header in ws2tcpip.h
21471 do :
21472 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
21473 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
21474 cat >>confdefs.h <<_ACEOF
21475 #define HAVE_WS2TCPIP_H 1
21476 _ACEOF
21480 done
21484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21485 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
21486 if test "${ac_cv_header_stdbool_h+set}" = set; then :
21487 $as_echo_n "(cached) " >&6
21488 else
21489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21490 /* end confdefs.h. */
21492 #include <stdbool.h>
21493 #ifndef bool
21494 "error: bool is not defined"
21495 #endif
21496 #ifndef false
21497 "error: false is not defined"
21498 #endif
21499 #if false
21500 "error: false is not 0"
21501 #endif
21502 #ifndef true
21503 "error: true is not defined"
21504 #endif
21505 #if true != 1
21506 "error: true is not 1"
21507 #endif
21508 #ifndef __bool_true_false_are_defined
21509 "error: __bool_true_false_are_defined is not defined"
21510 #endif
21512 struct s { _Bool s: 1; _Bool t; } s;
21514 char a[true == 1 ? 1 : -1];
21515 char b[false == 0 ? 1 : -1];
21516 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21517 char d[(bool) 0.5 == true ? 1 : -1];
21518 /* See body of main program for 'e'. */
21519 char f[(_Bool) 0.0 == false ? 1 : -1];
21520 char g[true];
21521 char h[sizeof (_Bool)];
21522 char i[sizeof s.t];
21523 enum { j = false, k = true, l = false * true, m = true * 256 };
21524 /* The following fails for
21525 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21526 _Bool n[m];
21527 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21528 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21529 /* Catch a bug in an HP-UX C compiler. See
21530 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21531 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21533 _Bool q = true;
21534 _Bool *pq = &q;
21537 main ()
21540 bool e = &s;
21541 *pq |= q;
21542 *pq |= ! q;
21543 /* Refer to every declared value, to avoid compiler optimizations. */
21544 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21545 + !m + !n + !o + !p + !q + !pq);
21548 return 0;
21550 _ACEOF
21551 if ac_fn_c_try_compile "$LINENO"; then :
21552 ac_cv_header_stdbool_h=yes
21553 else
21554 ac_cv_header_stdbool_h=no
21556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21559 $as_echo "$ac_cv_header_stdbool_h" >&6; }
21560 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21561 if test "x$ac_cv_type__Bool" = x""yes; then :
21563 cat >>confdefs.h <<_ACEOF
21564 #define HAVE__BOOL 1
21565 _ACEOF
21572 REPLACE_NULL=0;
21573 HAVE_WCHAR_T=1;
21576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21577 $as_echo_n "checking for wchar_t... " >&6; }
21578 if test "${gt_cv_c_wchar_t+set}" = set; then :
21579 $as_echo_n "(cached) " >&6
21580 else
21581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21582 /* end confdefs.h. */
21583 #include <stddef.h>
21584 wchar_t foo = (wchar_t)'\0';
21586 main ()
21590 return 0;
21592 _ACEOF
21593 if ac_fn_c_try_compile "$LINENO"; then :
21594 gt_cv_c_wchar_t=yes
21595 else
21596 gt_cv_c_wchar_t=no
21598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21601 $as_echo "$gt_cv_c_wchar_t" >&6; }
21602 if test $gt_cv_c_wchar_t = yes; then
21604 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21609 GNULIB_DPRINTF=0;
21610 GNULIB_FCLOSE=0;
21611 GNULIB_FDOPEN=0;
21612 GNULIB_FFLUSH=0;
21613 GNULIB_FGETC=0;
21614 GNULIB_FGETS=0;
21615 GNULIB_FOPEN=0;
21616 GNULIB_FPRINTF=0;
21617 GNULIB_FPRINTF_POSIX=0;
21618 GNULIB_FPURGE=0;
21619 GNULIB_FPUTC=0;
21620 GNULIB_FPUTS=0;
21621 GNULIB_FREAD=0;
21622 GNULIB_FREOPEN=0;
21623 GNULIB_FSCANF=0;
21624 GNULIB_FSEEK=0;
21625 GNULIB_FSEEKO=0;
21626 GNULIB_FTELL=0;
21627 GNULIB_FTELLO=0;
21628 GNULIB_FWRITE=0;
21629 GNULIB_GETC=0;
21630 GNULIB_GETCHAR=0;
21631 GNULIB_GETDELIM=0;
21632 GNULIB_GETLINE=0;
21633 GNULIB_OBSTACK_PRINTF=0;
21634 GNULIB_OBSTACK_PRINTF_POSIX=0;
21635 GNULIB_PCLOSE=0;
21636 GNULIB_PERROR=0;
21637 GNULIB_POPEN=0;
21638 GNULIB_PRINTF=0;
21639 GNULIB_PRINTF_POSIX=0;
21640 GNULIB_PUTC=0;
21641 GNULIB_PUTCHAR=0;
21642 GNULIB_PUTS=0;
21643 GNULIB_REMOVE=0;
21644 GNULIB_RENAME=0;
21645 GNULIB_RENAMEAT=0;
21646 GNULIB_SCANF=0;
21647 GNULIB_SNPRINTF=0;
21648 GNULIB_SPRINTF_POSIX=0;
21649 GNULIB_STDIO_H_NONBLOCKING=0;
21650 GNULIB_STDIO_H_SIGPIPE=0;
21651 GNULIB_TMPFILE=0;
21652 GNULIB_VASPRINTF=0;
21653 GNULIB_VFSCANF=0;
21654 GNULIB_VSCANF=0;
21655 GNULIB_VDPRINTF=0;
21656 GNULIB_VFPRINTF=0;
21657 GNULIB_VFPRINTF_POSIX=0;
21658 GNULIB_VPRINTF=0;
21659 GNULIB_VPRINTF_POSIX=0;
21660 GNULIB_VSNPRINTF=0;
21661 GNULIB_VSPRINTF_POSIX=0;
21662 HAVE_DECL_FPURGE=1;
21663 HAVE_DECL_FSEEKO=1;
21664 HAVE_DECL_FTELLO=1;
21665 HAVE_DECL_GETDELIM=1;
21666 HAVE_DECL_GETLINE=1;
21667 HAVE_DECL_OBSTACK_PRINTF=1;
21668 HAVE_DECL_SNPRINTF=1;
21669 HAVE_DECL_VSNPRINTF=1;
21670 HAVE_DPRINTF=1;
21671 HAVE_FSEEKO=1;
21672 HAVE_FTELLO=1;
21673 HAVE_PCLOSE=1;
21674 HAVE_POPEN=1;
21675 HAVE_RENAMEAT=1;
21676 HAVE_VASPRINTF=1;
21677 HAVE_VDPRINTF=1;
21678 REPLACE_DPRINTF=0;
21679 REPLACE_FCLOSE=0;
21680 REPLACE_FDOPEN=0;
21681 REPLACE_FFLUSH=0;
21682 REPLACE_FOPEN=0;
21683 REPLACE_FPRINTF=0;
21684 REPLACE_FPURGE=0;
21685 REPLACE_FREOPEN=0;
21686 REPLACE_FSEEK=0;
21687 REPLACE_FSEEKO=0;
21688 REPLACE_FTELL=0;
21689 REPLACE_FTELLO=0;
21690 REPLACE_GETDELIM=0;
21691 REPLACE_GETLINE=0;
21692 REPLACE_OBSTACK_PRINTF=0;
21693 REPLACE_PERROR=0;
21694 REPLACE_POPEN=0;
21695 REPLACE_PRINTF=0;
21696 REPLACE_REMOVE=0;
21697 REPLACE_RENAME=0;
21698 REPLACE_RENAMEAT=0;
21699 REPLACE_SNPRINTF=0;
21700 REPLACE_SPRINTF=0;
21701 REPLACE_STDIO_READ_FUNCS=0;
21702 REPLACE_STDIO_WRITE_FUNCS=0;
21703 REPLACE_TMPFILE=0;
21704 REPLACE_VASPRINTF=0;
21705 REPLACE_VDPRINTF=0;
21706 REPLACE_VFPRINTF=0;
21707 REPLACE_VPRINTF=0;
21708 REPLACE_VSNPRINTF=0;
21709 REPLACE_VSPRINTF=0;
21711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21712 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21713 if test "${ac_cv_struct_tm+set}" = set; then :
21714 $as_echo_n "(cached) " >&6
21715 else
21716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21717 /* end confdefs.h. */
21718 #include <sys/types.h>
21719 #include <time.h>
21722 main ()
21724 struct tm tm;
21725 int *p = &tm.tm_sec;
21726 return !p;
21728 return 0;
21730 _ACEOF
21731 if ac_fn_c_try_compile "$LINENO"; then :
21732 ac_cv_struct_tm=time.h
21733 else
21734 ac_cv_struct_tm=sys/time.h
21736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21739 $as_echo "$ac_cv_struct_tm" >&6; }
21740 if test $ac_cv_struct_tm = sys/time.h; then
21742 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
21746 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21747 #include <$ac_cv_struct_tm>
21750 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
21752 cat >>confdefs.h <<_ACEOF
21753 #define HAVE_STRUCT_TM_TM_ZONE 1
21754 _ACEOF
21759 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21761 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
21763 else
21764 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21766 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21767 ac_have_decl=1
21768 else
21769 ac_have_decl=0
21772 cat >>confdefs.h <<_ACEOF
21773 #define HAVE_DECL_TZNAME $ac_have_decl
21774 _ACEOF
21776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21777 $as_echo_n "checking for tzname... " >&6; }
21778 if test "${ac_cv_var_tzname+set}" = set; then :
21779 $as_echo_n "(cached) " >&6
21780 else
21781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21782 /* end confdefs.h. */
21783 #include <time.h>
21784 #if !HAVE_DECL_TZNAME
21785 extern char *tzname[];
21786 #endif
21789 main ()
21791 return tzname[0][0];
21793 return 0;
21795 _ACEOF
21796 if ac_fn_c_try_link "$LINENO"; then :
21797 ac_cv_var_tzname=yes
21798 else
21799 ac_cv_var_tzname=no
21801 rm -f core conftest.err conftest.$ac_objext \
21802 conftest$ac_exeext conftest.$ac_ext
21804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21805 $as_echo "$ac_cv_var_tzname" >&6; }
21806 if test $ac_cv_var_tzname = yes; then
21808 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
21814 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21816 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21818 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
21834 if test $gl_cv_have_include_next = yes; then
21835 gl_cv_next_string_h='<'string.h'>'
21836 else
21837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21838 $as_echo_n "checking absolute name of <string.h>... " >&6; }
21839 if test "${gl_cv_next_string_h+set}" = set; then :
21840 $as_echo_n "(cached) " >&6
21841 else
21843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21844 /* end confdefs.h. */
21845 #include <string.h>
21847 _ACEOF
21848 case "$host_os" in
21849 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21850 *) gl_absname_cpp="$ac_cpp" ;;
21851 esac
21853 case "$host_os" in
21854 mingw*)
21855 gl_dirsep_regex='[/\\]'
21858 gl_dirsep_regex='\/'
21860 esac
21861 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21863 gl_header_literal_regex=`echo 'string.h' \
21864 | sed -e "$gl_make_literal_regex_sed"`
21865 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21866 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21867 s|^/[^/]|//&|
21871 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21872 sed -n "$gl_absolute_header_sed"`'"'
21876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21877 $as_echo "$gl_cv_next_string_h" >&6; }
21879 NEXT_STRING_H=$gl_cv_next_string_h
21881 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21882 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21883 gl_next_as_first_directive='<'string.h'>'
21884 else
21885 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21886 gl_next_as_first_directive=$gl_cv_next_string_h
21888 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21898 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21899 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21900 ac_have_decl=1
21901 else
21902 ac_have_decl=0
21905 cat >>confdefs.h <<_ACEOF
21906 #define HAVE_DECL_STRTOIMAX $ac_have_decl
21907 _ACEOF
21911 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21912 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21913 ac_have_decl=1
21914 else
21915 ac_have_decl=0
21918 cat >>confdefs.h <<_ACEOF
21919 #define HAVE_DECL_STRTOUMAX $ac_have_decl
21920 _ACEOF
21924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21925 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21926 if test "${ac_cv_header_stat_broken+set}" = set; then :
21927 $as_echo_n "(cached) " >&6
21928 else
21929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21930 /* end confdefs.h. */
21931 #include <sys/types.h>
21932 #include <sys/stat.h>
21934 #if defined S_ISBLK && defined S_IFDIR
21935 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21936 #endif
21938 #if defined S_ISBLK && defined S_IFCHR
21939 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21940 #endif
21942 #if defined S_ISLNK && defined S_IFREG
21943 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21944 #endif
21946 #if defined S_ISSOCK && defined S_IFREG
21947 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21948 #endif
21950 _ACEOF
21951 if ac_fn_c_try_compile "$LINENO"; then :
21952 ac_cv_header_stat_broken=no
21953 else
21954 ac_cv_header_stat_broken=yes
21956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21959 $as_echo "$ac_cv_header_stat_broken" >&6; }
21960 if test $ac_cv_header_stat_broken = yes; then
21962 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
21970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21971 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21972 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21973 $as_echo_n "(cached) " >&6
21974 else
21975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21976 /* end confdefs.h. */
21977 #include <time.h>
21980 main ()
21982 static struct timespec x; x.tv_sec = x.tv_nsec;
21984 return 0;
21986 _ACEOF
21987 if ac_fn_c_try_compile "$LINENO"; then :
21988 gl_cv_sys_struct_timespec_in_time_h=yes
21989 else
21990 gl_cv_sys_struct_timespec_in_time_h=no
21992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21995 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21997 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21998 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21999 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
22000 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
22001 TIME_H_DEFINES_STRUCT_TIMESPEC=1
22002 else
22003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
22004 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
22005 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
22006 $as_echo_n "(cached) " >&6
22007 else
22008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22009 /* end confdefs.h. */
22010 #include <sys/time.h>
22013 main ()
22015 static struct timespec x; x.tv_sec = x.tv_nsec;
22017 return 0;
22019 _ACEOF
22020 if ac_fn_c_try_compile "$LINENO"; then :
22021 gl_cv_sys_struct_timespec_in_sys_time_h=yes
22022 else
22023 gl_cv_sys_struct_timespec_in_sys_time_h=no
22025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
22028 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
22029 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
22030 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
22031 else
22032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
22033 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
22034 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
22035 $as_echo_n "(cached) " >&6
22036 else
22037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22038 /* end confdefs.h. */
22039 #include <pthread.h>
22042 main ()
22044 static struct timespec x; x.tv_sec = x.tv_nsec;
22046 return 0;
22048 _ACEOF
22049 if ac_fn_c_try_compile "$LINENO"; then :
22050 gl_cv_sys_struct_timespec_in_pthread_h=yes
22051 else
22052 gl_cv_sys_struct_timespec_in_pthread_h=no
22054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
22057 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
22058 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
22059 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
22078 if test $gl_cv_have_include_next = yes; then
22079 gl_cv_next_time_h='<'time.h'>'
22080 else
22081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
22082 $as_echo_n "checking absolute name of <time.h>... " >&6; }
22083 if test "${gl_cv_next_time_h+set}" = set; then :
22084 $as_echo_n "(cached) " >&6
22085 else
22087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22088 /* end confdefs.h. */
22089 #include <time.h>
22091 _ACEOF
22092 case "$host_os" in
22093 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22094 *) gl_absname_cpp="$ac_cpp" ;;
22095 esac
22097 case "$host_os" in
22098 mingw*)
22099 gl_dirsep_regex='[/\\]'
22102 gl_dirsep_regex='\/'
22104 esac
22105 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22107 gl_header_literal_regex=`echo 'time.h' \
22108 | sed -e "$gl_make_literal_regex_sed"`
22109 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22110 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22111 s|^/[^/]|//&|
22115 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22116 sed -n "$gl_absolute_header_sed"`'"'
22120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
22121 $as_echo "$gl_cv_next_time_h" >&6; }
22123 NEXT_TIME_H=$gl_cv_next_time_h
22125 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22127 gl_next_as_first_directive='<'time.h'>'
22128 else
22129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22130 gl_next_as_first_directive=$gl_cv_next_time_h
22132 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
22147 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
22148 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
22149 ac_have_decl=1
22150 else
22151 ac_have_decl=0
22154 cat >>confdefs.h <<_ACEOF
22155 #define HAVE_DECL_UNSETENV $ac_have_decl
22156 _ACEOF
22159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
22160 $as_echo_n "checking whether the utimes function works... " >&6; }
22161 if test "${gl_cv_func_working_utimes+set}" = set; then :
22162 $as_echo_n "(cached) " >&6
22163 else
22165 if test "$cross_compiling" = yes; then :
22166 gl_cv_func_working_utimes=no
22167 else
22168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22169 /* end confdefs.h. */
22171 #include <sys/types.h>
22172 #include <sys/stat.h>
22173 #include <fcntl.h>
22174 #include <sys/time.h>
22175 #include <time.h>
22176 #include <unistd.h>
22177 #include <stdlib.h>
22178 #include <stdio.h>
22179 #include <utime.h>
22181 static int
22182 inorder (time_t a, time_t b, time_t c)
22184 return a <= b && b <= c;
22188 main ()
22190 int result = 0;
22191 char const *file = "conftest.utimes";
22192 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
22194 /* Test whether utimes() essentially works. */
22196 struct stat sbuf;
22197 FILE *f = fopen (file, "w");
22198 if (f == NULL)
22199 result |= 1;
22200 else if (fclose (f) != 0)
22201 result |= 1;
22202 else if (utimes (file, timeval) != 0)
22203 result |= 2;
22204 else if (lstat (file, &sbuf) != 0)
22205 result |= 1;
22206 else if (!(sbuf.st_atime == timeval[0].tv_sec
22207 && sbuf.st_mtime == timeval[1].tv_sec))
22208 result |= 4;
22209 if (unlink (file) != 0)
22210 result |= 1;
22213 /* Test whether utimes() with a NULL argument sets the file's timestamp
22214 to the current time. Use 'fstat' as well as 'time' to
22215 determine the "current" time, to accommodate NFS file systems
22216 if there is a time skew between the host and the NFS server. */
22218 int fd = open (file, O_WRONLY|O_CREAT, 0644);
22219 if (fd < 0)
22220 result |= 1;
22221 else
22223 time_t t0, t2;
22224 struct stat st0, st1, st2;
22225 if (time (&t0) == (time_t) -1)
22226 result |= 1;
22227 else if (fstat (fd, &st0) != 0)
22228 result |= 1;
22229 else if (utimes (file, timeval) != 0)
22230 result |= 2;
22231 else if (utimes (file, NULL) != 0)
22232 result |= 8;
22233 else if (fstat (fd, &st1) != 0)
22234 result |= 1;
22235 else if (write (fd, "\n", 1) != 1)
22236 result |= 1;
22237 else if (fstat (fd, &st2) != 0)
22238 result |= 1;
22239 else if (time (&t2) == (time_t) -1)
22240 result |= 1;
22241 else
22243 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
22244 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
22245 if (! (st1.st_atime == st1.st_mtime))
22246 result |= 16;
22247 if (! (m_ok_POSIX || m_ok_NFS))
22248 result |= 32;
22250 if (close (fd) != 0)
22251 result |= 1;
22253 if (unlink (file) != 0)
22254 result |= 1;
22257 /* Test whether utimes() with a NULL argument works on read-only files. */
22259 int fd = open (file, O_WRONLY|O_CREAT, 0444);
22260 if (fd < 0)
22261 result |= 1;
22262 else if (close (fd) != 0)
22263 result |= 1;
22264 else if (utimes (file, NULL) != 0)
22265 result |= 64;
22266 if (unlink (file) != 0)
22267 result |= 1;
22270 return result;
22273 _ACEOF
22274 if ac_fn_c_try_run "$LINENO"; then :
22275 gl_cv_func_working_utimes=yes
22276 else
22277 gl_cv_func_working_utimes=no
22279 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22280 conftest.$ac_objext conftest.beam conftest.$ac_ext
22284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
22285 $as_echo "$gl_cv_func_working_utimes" >&6; }
22287 if test $gl_cv_func_working_utimes = yes; then
22289 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
22297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
22298 $as_echo_n "checking for struct utimbuf... " >&6; }
22299 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
22300 $as_echo_n "(cached) " >&6
22301 else
22302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22303 /* end confdefs.h. */
22304 #if HAVE_SYS_TIME_H
22305 #include <sys/time.h>
22306 #endif
22307 #include <time.h>
22308 #ifdef HAVE_UTIME_H
22309 #include <utime.h>
22310 #endif
22313 main ()
22315 static struct utimbuf x; x.actime = x.modtime;
22317 return 0;
22319 _ACEOF
22320 if ac_fn_c_try_compile "$LINENO"; then :
22321 gl_cv_sys_struct_utimbuf=yes
22322 else
22323 gl_cv_sys_struct_utimbuf=no
22325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
22328 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
22330 if test $gl_cv_sys_struct_utimbuf = yes; then
22332 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
22346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
22347 $as_echo_n "checking type of array argument to getgroups... " >&6; }
22348 if test "${ac_cv_type_getgroups+set}" = set; then :
22349 $as_echo_n "(cached) " >&6
22350 else
22351 if test "$cross_compiling" = yes; then :
22352 ac_cv_type_getgroups=cross
22353 else
22354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22355 /* end confdefs.h. */
22356 /* Thanks to Mike Rendell for this test. */
22357 $ac_includes_default
22358 #define NGID 256
22359 #undef MAX
22360 #define MAX(x, y) ((x) > (y) ? (x) : (y))
22363 main ()
22365 gid_t gidset[NGID];
22366 int i, n;
22367 union { gid_t gval; long int lval; } val;
22369 val.lval = -1;
22370 for (i = 0; i < NGID; i++)
22371 gidset[i] = val.gval;
22372 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
22373 gidset);
22374 /* Exit non-zero if getgroups seems to require an array of ints. This
22375 happens when gid_t is short int but getgroups modifies an array
22376 of ints. */
22377 return n > 0 && gidset[n] != val.gval;
22379 _ACEOF
22380 if ac_fn_c_try_run "$LINENO"; then :
22381 ac_cv_type_getgroups=gid_t
22382 else
22383 ac_cv_type_getgroups=int
22385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22386 conftest.$ac_objext conftest.beam conftest.$ac_ext
22389 if test $ac_cv_type_getgroups = cross; then
22390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22391 /* end confdefs.h. */
22392 #include <unistd.h>
22394 _ACEOF
22395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22396 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
22397 ac_cv_type_getgroups=gid_t
22398 else
22399 ac_cv_type_getgroups=int
22401 rm -f conftest*
22405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
22406 $as_echo "$ac_cv_type_getgroups" >&6; }
22408 cat >>confdefs.h <<_ACEOF
22409 #define GETGROUPS_T $ac_cv_type_getgroups
22410 _ACEOF
22419 if false; then
22420 GL_COND_LIBTOOL_TRUE=
22421 GL_COND_LIBTOOL_FALSE='#'
22422 else
22423 GL_COND_LIBTOOL_TRUE='#'
22424 GL_COND_LIBTOOL_FALSE=
22427 gl_cond_libtool=false
22428 gl_libdeps=
22429 gl_ltlibdeps=
22430 gl_m4_base='m4'
22440 gl_source_base='lib'
22443 if test $ac_cv_func_alloca_works = no; then
22447 # Define an additional variable used in the Makefile substitution.
22448 if test $ac_cv_working_alloca_h = yes; then
22449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
22450 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
22451 if test "${gl_cv_rpl_alloca+set}" = set; then :
22452 $as_echo_n "(cached) " >&6
22453 else
22455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22456 /* end confdefs.h. */
22458 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
22459 Need own alloca
22460 #endif
22462 _ACEOF
22463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22464 $EGREP "Need own alloca" >/dev/null 2>&1; then :
22465 gl_cv_rpl_alloca=yes
22466 else
22467 gl_cv_rpl_alloca=no
22469 rm -f conftest*
22473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22474 $as_echo "$gl_cv_rpl_alloca" >&6; }
22475 if test $gl_cv_rpl_alloca = yes; then
22477 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
22479 ALLOCA_H=alloca.h
22480 else
22481 ALLOCA_H=
22483 else
22484 ALLOCA_H=alloca.h
22487 if test -n "$ALLOCA_H"; then
22488 GL_GENERATE_ALLOCA_H_TRUE=
22489 GL_GENERATE_ALLOCA_H_FALSE='#'
22490 else
22491 GL_GENERATE_ALLOCA_H_TRUE='#'
22492 GL_GENERATE_ALLOCA_H_FALSE=
22497 for ac_header in byteswap.h
22498 do :
22499 ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
22500 if test "x$ac_cv_header_byteswap_h" = x""yes; then :
22501 cat >>confdefs.h <<_ACEOF
22502 #define HAVE_BYTESWAP_H 1
22503 _ACEOF
22505 BYTESWAP_H=''
22507 else
22509 BYTESWAP_H='byteswap.h'
22513 done
22516 if test -n "$BYTESWAP_H"; then
22517 GL_GENERATE_BYTESWAP_H_TRUE=
22518 GL_GENERATE_BYTESWAP_H_FALSE='#'
22519 else
22520 GL_GENERATE_BYTESWAP_H_TRUE='#'
22521 GL_GENERATE_BYTESWAP_H_FALSE=
22529 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
22530 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
22532 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
22533 # programs in the package would end up linked with that potentially-shared
22534 # library, inducing unnecessary run-time overhead.
22535 LIB_CLOCK_GETTIME=
22537 gl_saved_libs=$LIBS
22538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22539 $as_echo_n "checking for library containing clock_gettime... " >&6; }
22540 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22541 $as_echo_n "(cached) " >&6
22542 else
22543 ac_func_search_save_LIBS=$LIBS
22544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22545 /* end confdefs.h. */
22547 /* Override any GCC internal prototype to avoid an error.
22548 Use char because int might match the return type of a GCC
22549 builtin and then its argument prototype would still apply. */
22550 #ifdef __cplusplus
22551 extern "C"
22552 #endif
22553 char clock_gettime ();
22555 main ()
22557 return clock_gettime ();
22559 return 0;
22561 _ACEOF
22562 for ac_lib in '' rt posix4; do
22563 if test -z "$ac_lib"; then
22564 ac_res="none required"
22565 else
22566 ac_res=-l$ac_lib
22567 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22569 if ac_fn_c_try_link "$LINENO"; then :
22570 ac_cv_search_clock_gettime=$ac_res
22572 rm -f core conftest.err conftest.$ac_objext \
22573 conftest$ac_exeext
22574 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22575 break
22577 done
22578 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22580 else
22581 ac_cv_search_clock_gettime=no
22583 rm conftest.$ac_ext
22584 LIBS=$ac_func_search_save_LIBS
22586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22587 $as_echo "$ac_cv_search_clock_gettime" >&6; }
22588 ac_res=$ac_cv_search_clock_gettime
22589 if test "$ac_res" != no; then :
22590 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22591 test "$ac_cv_search_clock_gettime" = "none required" ||
22592 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22595 for ac_func in clock_gettime clock_settime
22596 do :
22597 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22598 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22599 eval as_val=\$$as_ac_var
22600 if test "x$as_val" = x""yes; then :
22601 cat >>confdefs.h <<_ACEOF
22602 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22603 _ACEOF
22606 done
22608 LIBS=$gl_saved_libs
22615 cat >>confdefs.h <<_ACEOF
22616 #define GNULIB_CLOSE_STREAM 1
22617 _ACEOF
22654 if test $gl_cv_have_include_next = yes; then
22655 gl_cv_next_dirent_h='<'dirent.h'>'
22656 else
22657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22658 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22659 if test "${gl_cv_next_dirent_h+set}" = set; then :
22660 $as_echo_n "(cached) " >&6
22661 else
22663 if test $ac_cv_header_dirent_h = yes; then
22666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22667 /* end confdefs.h. */
22668 #include <dirent.h>
22670 _ACEOF
22671 case "$host_os" in
22672 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22673 *) gl_absname_cpp="$ac_cpp" ;;
22674 esac
22676 case "$host_os" in
22677 mingw*)
22678 gl_dirsep_regex='[/\\]'
22681 gl_dirsep_regex='\/'
22683 esac
22684 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22686 gl_header_literal_regex=`echo 'dirent.h' \
22687 | sed -e "$gl_make_literal_regex_sed"`
22688 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22689 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22690 s|^/[^/]|//&|
22694 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22695 sed -n "$gl_absolute_header_sed"`'"'
22696 else
22697 gl_cv_next_dirent_h='<'dirent.h'>'
22702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22703 $as_echo "$gl_cv_next_dirent_h" >&6; }
22705 NEXT_DIRENT_H=$gl_cv_next_dirent_h
22707 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22708 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22709 gl_next_as_first_directive='<'dirent.h'>'
22710 else
22711 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22712 gl_next_as_first_directive=$gl_cv_next_dirent_h
22714 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
22719 if test $ac_cv_header_dirent_h = yes; then
22720 HAVE_DIRENT_H=1
22721 else
22722 HAVE_DIRENT_H=0
22734 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
22737 if test $HAVE_DUP2 = 1; then
22738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22739 $as_echo_n "checking whether dup2 works... " >&6; }
22740 if test "${gl_cv_func_dup2_works+set}" = set; then :
22741 $as_echo_n "(cached) " >&6
22742 else
22743 if test "$cross_compiling" = yes; then :
22744 case "$host_os" in
22745 mingw*) # on this platform, dup2 always returns 0 for success
22746 gl_cv_func_dup2_works="guessing no" ;;
22747 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22748 gl_cv_func_dup2_works="guessing no" ;;
22749 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22750 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22751 gl_cv_func_dup2_works="guessing no" ;;
22752 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22753 gl_cv_func_dup2_works="guessing no" ;;
22754 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22755 gl_cv_func_dup2_works="guessing no" ;;
22756 *) gl_cv_func_dup2_works="guessing yes" ;;
22757 esac
22758 else
22759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22760 /* end confdefs.h. */
22762 #include <unistd.h>
22763 #include <fcntl.h>
22764 #include <errno.h>
22766 main ()
22768 int result = 0;
22769 #ifdef FD_CLOEXEC
22770 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22771 result |= 1;
22772 #endif
22773 if (dup2 (1, 1) == 0)
22774 result |= 2;
22775 #ifdef FD_CLOEXEC
22776 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22777 result |= 4;
22778 #endif
22779 close (0);
22780 if (dup2 (0, 0) != -1)
22781 result |= 8;
22782 /* Many gnulib modules require POSIX conformance of EBADF. */
22783 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22784 result |= 16;
22785 /* Flush out some cygwin core dumps. */
22786 if (dup2 (2, -1) != -1 || errno != EBADF)
22787 result |= 32;
22788 dup2 (2, 255);
22789 dup2 (2, 256);
22790 return result;
22793 return 0;
22796 _ACEOF
22797 if ac_fn_c_try_run "$LINENO"; then :
22798 gl_cv_func_dup2_works=yes
22799 else
22800 gl_cv_func_dup2_works=no
22802 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22803 conftest.$ac_objext conftest.beam conftest.$ac_ext
22808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22809 $as_echo "$gl_cv_func_dup2_works" >&6; }
22810 case "$gl_cv_func_dup2_works" in
22811 *yes) ;;
22813 REPLACE_DUP2=1
22814 for ac_func in setdtablesize
22815 do :
22816 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
22817 if test "x$ac_cv_func_setdtablesize" = x""yes; then :
22818 cat >>confdefs.h <<_ACEOF
22819 #define HAVE_SETDTABLESIZE 1
22820 _ACEOF
22823 done
22826 esac
22830 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22839 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22848 GNULIB_DUP2=1
22860 GNULIB_ENVIRON=1
22870 LIB_EXECINFO=''
22871 EXECINFO_H='execinfo.h'
22873 if test $ac_cv_header_execinfo_h = yes; then
22874 gl_saved_libs=$LIBS
22875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22876 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22877 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22878 $as_echo_n "(cached) " >&6
22879 else
22880 ac_func_search_save_LIBS=$LIBS
22881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22882 /* end confdefs.h. */
22884 /* Override any GCC internal prototype to avoid an error.
22885 Use char because int might match the return type of a GCC
22886 builtin and then its argument prototype would still apply. */
22887 #ifdef __cplusplus
22888 extern "C"
22889 #endif
22890 char backtrace_symbols_fd ();
22892 main ()
22894 return backtrace_symbols_fd ();
22896 return 0;
22898 _ACEOF
22899 for ac_lib in '' execinfo; do
22900 if test -z "$ac_lib"; then
22901 ac_res="none required"
22902 else
22903 ac_res=-l$ac_lib
22904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22906 if ac_fn_c_try_link "$LINENO"; then :
22907 ac_cv_search_backtrace_symbols_fd=$ac_res
22909 rm -f core conftest.err conftest.$ac_objext \
22910 conftest$ac_exeext
22911 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22912 break
22914 done
22915 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22917 else
22918 ac_cv_search_backtrace_symbols_fd=no
22920 rm conftest.$ac_ext
22921 LIBS=$ac_func_search_save_LIBS
22923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22924 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22925 ac_res=$ac_cv_search_backtrace_symbols_fd
22926 if test "$ac_res" != no; then :
22927 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22928 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22929 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22932 LIBS=$gl_saved_libs
22933 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22936 if test -n "$EXECINFO_H"; then
22945 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22951 if test -n "$EXECINFO_H"; then
22952 GL_GENERATE_EXECINFO_H_TRUE=
22953 GL_GENERATE_EXECINFO_H_FALSE='#'
22954 else
22955 GL_GENERATE_EXECINFO_H_TRUE='#'
22956 GL_GENERATE_EXECINFO_H_FALSE=
22967 if test $ac_cv_func_faccessat = no; then
22968 HAVE_FACCESSAT=0
22971 if test $HAVE_FACCESSAT = 0; then
22980 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22983 for ac_func in access
22984 do :
22985 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22986 if test "x$ac_cv_func_access" = x""yes; then :
22987 cat >>confdefs.h <<_ACEOF
22988 #define HAVE_ACCESS 1
22989 _ACEOF
22992 done
22998 cat >>confdefs.h <<_ACEOF
22999 #define GNULIB_FACCESSAT 1
23000 _ACEOF
23008 GNULIB_FACCESSAT=1
23019 if test $ac_cv_func_fcntl = no; then
23023 if test $ac_cv_func_fcntl = no; then
23024 HAVE_FCNTL=0
23025 else
23026 REPLACE_FCNTL=1
23029 else
23030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
23031 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
23032 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
23033 $as_echo_n "(cached) " >&6
23034 else
23035 if test "$cross_compiling" = yes; then :
23036 # Guess that it works on glibc systems
23037 case $host_os in #((
23038 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
23039 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
23040 esac
23041 else
23042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23043 /* end confdefs.h. */
23045 #include <fcntl.h>
23046 #include <errno.h>
23049 main ()
23051 int result = 0;
23052 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
23053 if (errno != EINVAL) result |= 2;
23054 return result;
23057 return 0;
23059 _ACEOF
23060 if ac_fn_c_try_run "$LINENO"; then :
23061 gl_cv_func_fcntl_f_dupfd_works=yes
23062 else
23063 gl_cv_func_fcntl_f_dupfd_works=no
23065 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23066 conftest.$ac_objext conftest.beam conftest.$ac_ext
23070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
23071 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
23072 case $gl_cv_func_fcntl_f_dupfd_works in
23073 *yes) ;;
23077 if test $ac_cv_func_fcntl = no; then
23078 HAVE_FCNTL=0
23079 else
23080 REPLACE_FCNTL=1
23084 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
23086 esac
23088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
23089 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
23090 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
23091 $as_echo_n "(cached) " >&6
23092 else
23093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23094 /* end confdefs.h. */
23096 #include <fcntl.h>
23097 #ifndef F_DUPFD_CLOEXEC
23098 choke me
23099 #endif
23102 main ()
23106 return 0;
23108 _ACEOF
23109 if ac_fn_c_try_compile "$LINENO"; then :
23110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23111 /* end confdefs.h. */
23113 #ifdef __linux__
23114 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
23115 it to support the semantics on older kernels that failed with EINVAL. */
23116 choke me
23117 #endif
23120 main ()
23124 return 0;
23126 _ACEOF
23127 if ac_fn_c_try_compile "$LINENO"; then :
23128 gl_cv_func_fcntl_f_dupfd_cloexec=yes
23129 else
23130 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
23132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23133 else
23134 gl_cv_func_fcntl_f_dupfd_cloexec=no
23136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
23139 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
23140 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
23144 if test $ac_cv_func_fcntl = no; then
23145 HAVE_FCNTL=0
23146 else
23147 REPLACE_FCNTL=1
23154 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
23163 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
23171 GNULIB_FCNTL=1
23188 if test $gl_cv_have_include_next = yes; then
23189 gl_cv_next_fcntl_h='<'fcntl.h'>'
23190 else
23191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
23192 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
23193 if test "${gl_cv_next_fcntl_h+set}" = set; then :
23194 $as_echo_n "(cached) " >&6
23195 else
23197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23198 /* end confdefs.h. */
23199 #include <fcntl.h>
23201 _ACEOF
23202 case "$host_os" in
23203 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23204 *) gl_absname_cpp="$ac_cpp" ;;
23205 esac
23207 case "$host_os" in
23208 mingw*)
23209 gl_dirsep_regex='[/\\]'
23212 gl_dirsep_regex='\/'
23214 esac
23215 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23217 gl_header_literal_regex=`echo 'fcntl.h' \
23218 | sed -e "$gl_make_literal_regex_sed"`
23219 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23220 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23221 s|^/[^/]|//&|
23225 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23226 sed -n "$gl_absolute_header_sed"`'"'
23230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
23231 $as_echo "$gl_cv_next_fcntl_h" >&6; }
23233 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
23235 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23236 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23237 gl_next_as_first_directive='<'fcntl.h'>'
23238 else
23239 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23240 gl_next_as_first_directive=$gl_cv_next_fcntl_h
23242 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
23258 LIB_FDATASYNC=
23261 if test $ac_cv_have_decl_fdatasync = no; then
23262 HAVE_DECL_FDATASYNC=0
23263 for ac_func in fdatasync
23264 do :
23265 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
23266 if test "x$ac_cv_func_fdatasync" = x""yes; then :
23267 cat >>confdefs.h <<_ACEOF
23268 #define HAVE_FDATASYNC 1
23269 _ACEOF
23272 done
23274 if test $ac_cv_func_fdatasync = no; then
23275 HAVE_FDATASYNC=0
23277 else
23278 gl_saved_libs=$LIBS
23279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
23280 $as_echo_n "checking for library containing fdatasync... " >&6; }
23281 if test "${ac_cv_search_fdatasync+set}" = set; then :
23282 $as_echo_n "(cached) " >&6
23283 else
23284 ac_func_search_save_LIBS=$LIBS
23285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23286 /* end confdefs.h. */
23288 /* Override any GCC internal prototype to avoid an error.
23289 Use char because int might match the return type of a GCC
23290 builtin and then its argument prototype would still apply. */
23291 #ifdef __cplusplus
23292 extern "C"
23293 #endif
23294 char fdatasync ();
23296 main ()
23298 return fdatasync ();
23300 return 0;
23302 _ACEOF
23303 for ac_lib in '' rt posix4; do
23304 if test -z "$ac_lib"; then
23305 ac_res="none required"
23306 else
23307 ac_res=-l$ac_lib
23308 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23310 if ac_fn_c_try_link "$LINENO"; then :
23311 ac_cv_search_fdatasync=$ac_res
23313 rm -f core conftest.err conftest.$ac_objext \
23314 conftest$ac_exeext
23315 if test "${ac_cv_search_fdatasync+set}" = set; then :
23316 break
23318 done
23319 if test "${ac_cv_search_fdatasync+set}" = set; then :
23321 else
23322 ac_cv_search_fdatasync=no
23324 rm conftest.$ac_ext
23325 LIBS=$ac_func_search_save_LIBS
23327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
23328 $as_echo "$ac_cv_search_fdatasync" >&6; }
23329 ac_res=$ac_cv_search_fdatasync
23330 if test "$ac_res" != no; then :
23331 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23332 test "$ac_cv_search_fdatasync" = "none required" ||
23333 LIB_FDATASYNC=$ac_cv_search_fdatasync
23336 LIBS=$gl_saved_libs
23339 if test $HAVE_FDATASYNC = 0; then
23348 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
23356 GNULIB_FDATASYNC=1
23367 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
23368 #include <dirent.h>
23371 if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
23372 ac_have_decl=1
23373 else
23374 ac_have_decl=0
23377 cat >>confdefs.h <<_ACEOF
23378 #define HAVE_DECL_FDOPENDIR $ac_have_decl
23379 _ACEOF
23380 if test $ac_have_decl = 1; then :
23382 else
23383 HAVE_DECL_FDOPENDIR=0
23387 if test $ac_cv_func_fdopendir = no; then
23388 HAVE_FDOPENDIR=0
23389 else
23390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
23391 $as_echo_n "checking whether fdopendir works... " >&6; }
23392 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
23393 $as_echo_n "(cached) " >&6
23394 else
23395 if test "$cross_compiling" = yes; then :
23396 case "$host_os" in
23397 # Guess yes on glibc systems.
23398 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
23399 # If we don't know, assume the worst.
23400 *) gl_cv_func_fdopendir_works="guessing no" ;;
23401 esac
23403 else
23404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23405 /* end confdefs.h. */
23407 #include <dirent.h>
23408 #include <fcntl.h>
23409 #include <unistd.h>
23410 #if !HAVE_DECL_FDOPENDIR
23411 extern
23412 # ifdef __cplusplus
23414 # endif
23415 DIR *fdopendir (int);
23416 #endif
23419 main ()
23421 int result = 0;
23422 int fd = open ("conftest.c", O_RDONLY);
23423 if (fd < 0) result |= 1;
23424 if (fdopendir (fd)) result |= 2;
23425 if (close (fd)) result |= 4;
23426 return result;
23428 return 0;
23430 _ACEOF
23431 if ac_fn_c_try_run "$LINENO"; then :
23432 gl_cv_func_fdopendir_works=yes
23433 else
23434 gl_cv_func_fdopendir_works=no
23436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23437 conftest.$ac_objext conftest.beam conftest.$ac_ext
23441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
23442 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
23443 case "$gl_cv_func_fdopendir_works" in
23444 *yes) ;;
23446 REPLACE_FDOPENDIR=1
23448 esac
23451 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
23460 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
23468 GNULIB_FDOPENDIR=1
23476 cat >>confdefs.h <<_ACEOF
23477 #define GNULIB_FDOPENDIR 1
23478 _ACEOF
23487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
23488 $as_echo_n "checking for __fpending... " >&6; }
23489 if test "${gl_cv_func___fpending+set}" = set; then :
23490 $as_echo_n "(cached) " >&6
23491 else
23493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23494 /* end confdefs.h. */
23495 #include <stdio.h>
23496 #if HAVE_STDIO_EXT_H
23497 # include <stdio_ext.h>
23498 #endif
23501 main ()
23503 return ! __fpending (stdin);
23505 return 0;
23507 _ACEOF
23508 if ac_fn_c_try_link "$LINENO"; then :
23509 gl_cv_func___fpending=yes
23510 else
23511 gl_cv_func___fpending=no
23513 rm -f core conftest.err conftest.$ac_objext \
23514 conftest$ac_exeext conftest.$ac_ext
23517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
23518 $as_echo "$gl_cv_func___fpending" >&6; }
23520 if test $gl_cv_func___fpending = no; then
23529 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
23532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
23533 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23534 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
23535 $as_echo_n "(cached) " >&6
23536 else
23538 for ac_expr in \
23540 '# glibc2' \
23541 'fp->_IO_write_ptr - fp->_IO_write_base' \
23543 '# traditional Unix' \
23544 'fp->_ptr - fp->_base' \
23546 '# BSD' \
23547 'fp->_p - fp->_bf._base' \
23549 '# SCO, Unixware' \
23550 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
23552 '# QNX' \
23553 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23555 '# old glibc?' \
23556 'fp->__bufp - fp->__buffer' \
23558 '# old glibc iostream?' \
23559 'fp->_pptr - fp->_pbase' \
23561 '# emx+gcc' \
23562 'fp->_ptr - fp->_buffer' \
23564 '# Minix' \
23565 'fp->_ptr - fp->_buf' \
23567 '# Plan9' \
23568 'fp->wp - fp->buf' \
23570 '# VMS' \
23571 '(*fp)->_ptr - (*fp)->_base' \
23573 '# e.g., DGUX R4.11; the info is not available' \
23575 ; do
23577 # Skip each embedded comment.
23578 case "$ac_expr" in '#'*) continue;; esac
23580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23581 /* end confdefs.h. */
23582 #include <stdio.h>
23584 main ()
23586 FILE *fp = stdin; (void) ($ac_expr);
23588 return 0;
23590 _ACEOF
23591 if ac_fn_c_try_compile "$LINENO"; then :
23592 fp_done=yes
23595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23596 test "$fp_done" = yes && break
23597 done
23599 ac_cv_sys_pending_output_n_bytes=$ac_expr
23603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23604 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23606 cat >>confdefs.h <<_ACEOF
23607 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23608 _ACEOF
23618 if test $ac_cv_func_fstatat = no; then
23619 HAVE_FSTATAT=0
23620 else
23621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23622 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23623 if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23624 $as_echo_n "(cached) " >&6
23625 else
23626 if test "$cross_compiling" = yes; then :
23627 case "$host_os" in
23628 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23629 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23630 esac
23632 else
23633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23634 /* end confdefs.h. */
23636 #include <fcntl.h>
23637 #include <sys/stat.h>
23639 main (void)
23641 struct stat a;
23642 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23645 _ACEOF
23646 if ac_fn_c_try_run "$LINENO"; then :
23647 gl_cv_func_fstatat_zero_flag=yes
23648 else
23649 gl_cv_func_fstatat_zero_flag=no
23651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23652 conftest.$ac_objext conftest.beam conftest.$ac_ext
23657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23658 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23660 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23661 *yes+*yes) ;;
23662 *) REPLACE_FSTATAT=1
23663 case $gl_cv_func_fstatat_zero_flag in
23664 *yes)
23666 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23669 esac
23671 esac
23674 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23683 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23691 GNULIB_FSTATAT=1
23700 if test $ac_cv_func_fsync = no; then
23701 HAVE_FSYNC=0
23704 if test $HAVE_FSYNC = 0; then
23713 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23722 GNULIB_FSYNC=1
23730 # Persuade glibc <stdlib.h> to declare getloadavg().
23733 gl_save_LIBS=$LIBS
23735 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23736 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23737 HAVE_GETLOADAVG=1
23738 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23739 if test "x$ac_cv_func_getloadavg" = x""yes; then :
23741 else
23742 gl_func_getloadavg_done=no
23744 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23745 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23746 # to get the right answer into the cache.
23747 # For kstat on solaris, we need to test for libelf and libkvm to force the
23748 # definition of SVR4 below.
23749 if test $gl_func_getloadavg_done = no; then
23750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23751 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
23752 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
23753 $as_echo_n "(cached) " >&6
23754 else
23755 ac_check_lib_save_LIBS=$LIBS
23756 LIBS="-lelf $LIBS"
23757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23758 /* end confdefs.h. */
23760 /* Override any GCC internal prototype to avoid an error.
23761 Use char because int might match the return type of a GCC
23762 builtin and then its argument prototype would still apply. */
23763 #ifdef __cplusplus
23764 extern "C"
23765 #endif
23766 char elf_begin ();
23768 main ()
23770 return elf_begin ();
23772 return 0;
23774 _ACEOF
23775 if ac_fn_c_try_link "$LINENO"; then :
23776 ac_cv_lib_elf_elf_begin=yes
23777 else
23778 ac_cv_lib_elf_elf_begin=no
23780 rm -f core conftest.err conftest.$ac_objext \
23781 conftest$ac_exeext conftest.$ac_ext
23782 LIBS=$ac_check_lib_save_LIBS
23784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23785 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23786 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23787 LIBS="-lelf $LIBS"
23790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23791 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23792 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
23793 $as_echo_n "(cached) " >&6
23794 else
23795 ac_check_lib_save_LIBS=$LIBS
23796 LIBS="-lkvm $LIBS"
23797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23798 /* end confdefs.h. */
23800 /* Override any GCC internal prototype to avoid an error.
23801 Use char because int might match the return type of a GCC
23802 builtin and then its argument prototype would still apply. */
23803 #ifdef __cplusplus
23804 extern "C"
23805 #endif
23806 char kvm_open ();
23808 main ()
23810 return kvm_open ();
23812 return 0;
23814 _ACEOF
23815 if ac_fn_c_try_link "$LINENO"; then :
23816 ac_cv_lib_kvm_kvm_open=yes
23817 else
23818 ac_cv_lib_kvm_kvm_open=no
23820 rm -f core conftest.err conftest.$ac_objext \
23821 conftest$ac_exeext conftest.$ac_ext
23822 LIBS=$ac_check_lib_save_LIBS
23824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23825 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23826 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23827 LIBS="-lkvm $LIBS"
23830 # Check for the 4.4BSD definition of getloadavg.
23831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23832 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
23833 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
23834 $as_echo_n "(cached) " >&6
23835 else
23836 ac_check_lib_save_LIBS=$LIBS
23837 LIBS="-lutil $LIBS"
23838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23839 /* end confdefs.h. */
23841 /* Override any GCC internal prototype to avoid an error.
23842 Use char because int might match the return type of a GCC
23843 builtin and then its argument prototype would still apply. */
23844 #ifdef __cplusplus
23845 extern "C"
23846 #endif
23847 char getloadavg ();
23849 main ()
23851 return getloadavg ();
23853 return 0;
23855 _ACEOF
23856 if ac_fn_c_try_link "$LINENO"; then :
23857 ac_cv_lib_util_getloadavg=yes
23858 else
23859 ac_cv_lib_util_getloadavg=no
23861 rm -f core conftest.err conftest.$ac_objext \
23862 conftest$ac_exeext conftest.$ac_ext
23863 LIBS=$ac_check_lib_save_LIBS
23865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23866 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23867 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23868 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
23873 if test $gl_func_getloadavg_done = no; then
23874 # There is a commonly available library for RS/6000 AIX.
23875 # Since it is not a standard part of AIX, it might be installed locally.
23876 gl_getloadavg_LIBS=$LIBS
23877 LIBS="-L/usr/local/lib $LIBS"
23878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23879 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23880 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
23881 $as_echo_n "(cached) " >&6
23882 else
23883 ac_check_lib_save_LIBS=$LIBS
23884 LIBS="-lgetloadavg $LIBS"
23885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23886 /* end confdefs.h. */
23888 /* Override any GCC internal prototype to avoid an error.
23889 Use char because int might match the return type of a GCC
23890 builtin and then its argument prototype would still apply. */
23891 #ifdef __cplusplus
23892 extern "C"
23893 #endif
23894 char getloadavg ();
23896 main ()
23898 return getloadavg ();
23900 return 0;
23902 _ACEOF
23903 if ac_fn_c_try_link "$LINENO"; then :
23904 ac_cv_lib_getloadavg_getloadavg=yes
23905 else
23906 ac_cv_lib_getloadavg_getloadavg=no
23908 rm -f core conftest.err conftest.$ac_objext \
23909 conftest$ac_exeext conftest.$ac_ext
23910 LIBS=$ac_check_lib_save_LIBS
23912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23913 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23914 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23915 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23916 else
23917 LIBS=$gl_getloadavg_LIBS
23922 # Set up the replacement function if necessary.
23923 if test $gl_func_getloadavg_done = no; then
23924 HAVE_GETLOADAVG=0
23926 # Solaris has libkstat which does not require root.
23927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23928 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23929 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
23930 $as_echo_n "(cached) " >&6
23931 else
23932 ac_check_lib_save_LIBS=$LIBS
23933 LIBS="-lkstat $LIBS"
23934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23935 /* end confdefs.h. */
23937 /* Override any GCC internal prototype to avoid an error.
23938 Use char because int might match the return type of a GCC
23939 builtin and then its argument prototype would still apply. */
23940 #ifdef __cplusplus
23941 extern "C"
23942 #endif
23943 char kstat_open ();
23945 main ()
23947 return kstat_open ();
23949 return 0;
23951 _ACEOF
23952 if ac_fn_c_try_link "$LINENO"; then :
23953 ac_cv_lib_kstat_kstat_open=yes
23954 else
23955 ac_cv_lib_kstat_kstat_open=no
23957 rm -f core conftest.err conftest.$ac_objext \
23958 conftest$ac_exeext conftest.$ac_ext
23959 LIBS=$ac_check_lib_save_LIBS
23961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23962 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23963 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
23964 cat >>confdefs.h <<_ACEOF
23965 #define HAVE_LIBKSTAT 1
23966 _ACEOF
23968 LIBS="-lkstat $LIBS"
23972 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
23974 # AIX has libperfstat which does not require root
23975 if test $gl_func_getloadavg_done = no; then
23976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23977 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23978 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
23979 $as_echo_n "(cached) " >&6
23980 else
23981 ac_check_lib_save_LIBS=$LIBS
23982 LIBS="-lperfstat $LIBS"
23983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23984 /* end confdefs.h. */
23986 /* Override any GCC internal prototype to avoid an error.
23987 Use char because int might match the return type of a GCC
23988 builtin and then its argument prototype would still apply. */
23989 #ifdef __cplusplus
23990 extern "C"
23991 #endif
23992 char perfstat_cpu_total ();
23994 main ()
23996 return perfstat_cpu_total ();
23998 return 0;
24000 _ACEOF
24001 if ac_fn_c_try_link "$LINENO"; then :
24002 ac_cv_lib_perfstat_perfstat_cpu_total=yes
24003 else
24004 ac_cv_lib_perfstat_perfstat_cpu_total=no
24006 rm -f core conftest.err conftest.$ac_objext \
24007 conftest$ac_exeext conftest.$ac_ext
24008 LIBS=$ac_check_lib_save_LIBS
24010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
24011 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
24012 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
24013 cat >>confdefs.h <<_ACEOF
24014 #define HAVE_LIBPERFSTAT 1
24015 _ACEOF
24017 LIBS="-lperfstat $LIBS"
24021 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
24024 if test $gl_func_getloadavg_done = no; then
24025 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
24026 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
24027 gl_func_getloadavg_done=yes
24029 $as_echo "#define DGUX 1" >>confdefs.h
24031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
24032 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
24033 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
24034 $as_echo_n "(cached) " >&6
24035 else
24036 ac_check_lib_save_LIBS=$LIBS
24037 LIBS="-ldgc $LIBS"
24038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24039 /* end confdefs.h. */
24041 /* Override any GCC internal prototype to avoid an error.
24042 Use char because int might match the return type of a GCC
24043 builtin and then its argument prototype would still apply. */
24044 #ifdef __cplusplus
24045 extern "C"
24046 #endif
24047 char dg_sys_info ();
24049 main ()
24051 return dg_sys_info ();
24053 return 0;
24055 _ACEOF
24056 if ac_fn_c_try_link "$LINENO"; then :
24057 ac_cv_lib_dgc_dg_sys_info=yes
24058 else
24059 ac_cv_lib_dgc_dg_sys_info=no
24061 rm -f core conftest.err conftest.$ac_objext \
24062 conftest$ac_exeext conftest.$ac_ext
24063 LIBS=$ac_check_lib_save_LIBS
24065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
24066 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
24067 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
24068 cat >>confdefs.h <<_ACEOF
24069 #define HAVE_LIBDGC 1
24070 _ACEOF
24072 LIBS="-ldgc $LIBS"
24084 if test "x$gl_save_LIBS" = x; then
24085 GETLOADAVG_LIBS=$LIBS
24086 else
24087 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
24089 LIBS=$gl_save_LIBS
24092 # Test whether the system declares getloadavg. Solaris has the function
24093 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
24094 for ac_header in sys/loadavg.h
24095 do :
24096 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
24097 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
24098 cat >>confdefs.h <<_ACEOF
24099 #define HAVE_SYS_LOADAVG_H 1
24100 _ACEOF
24104 done
24106 if test $ac_cv_header_sys_loadavg_h = yes; then
24107 HAVE_SYS_LOADAVG_H=1
24108 else
24109 HAVE_SYS_LOADAVG_H=0
24111 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
24112 # include <sys/loadavg.h>
24113 #endif
24114 #include <stdlib.h>
24116 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
24118 else
24119 HAVE_DECL_GETLOADAVG=0
24123 if test $HAVE_GETLOADAVG = 0; then
24132 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
24135 # Figure out what our getloadavg.c needs.
24139 # On HPUX9, an unprivileged user can get load averages this way.
24140 if test $gl_func_getloadavg_done = no; then
24141 for ac_func in pstat_getdynamic
24142 do :
24143 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
24144 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
24145 cat >>confdefs.h <<_ACEOF
24146 #define HAVE_PSTAT_GETDYNAMIC 1
24147 _ACEOF
24148 gl_func_getloadavg_done=yes
24150 done
24154 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
24155 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
24156 # Irix 4.0.5F has the header but not the library.
24157 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
24158 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
24159 gl_func_getloadavg_done=yes
24161 $as_echo "#define SVR4 1" >>confdefs.h
24165 if test $gl_func_getloadavg_done = no; then
24166 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
24167 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
24168 gl_func_getloadavg_done=yes
24170 $as_echo "#define UMAX 1" >>confdefs.h
24173 $as_echo "#define UMAX4_3 1" >>confdefs.h
24180 if test $gl_func_getloadavg_done = no; then
24181 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
24182 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
24183 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
24190 if test $gl_func_getloadavg_done = no; then
24191 for ac_header in mach/mach.h
24192 do :
24193 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
24194 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
24195 cat >>confdefs.h <<_ACEOF
24196 #define HAVE_MACH_MACH_H 1
24197 _ACEOF
24201 done
24205 for ac_header in nlist.h
24206 do :
24207 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
24208 if test "x$ac_cv_header_nlist_h" = x""yes; then :
24209 cat >>confdefs.h <<_ACEOF
24210 #define HAVE_NLIST_H 1
24211 _ACEOF
24212 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
24214 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
24216 cat >>confdefs.h <<_ACEOF
24217 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
24218 _ACEOF
24223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24224 /* end confdefs.h. */
24225 #include <nlist.h>
24227 main ()
24229 struct nlist x;
24230 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
24231 x.n_un.n_name = "";
24232 #else
24233 x.n_name = "";
24234 #endif
24236 return 0;
24238 _ACEOF
24239 if ac_fn_c_try_link "$LINENO"; then :
24241 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
24244 rm -f core conftest.err conftest.$ac_objext \
24245 conftest$ac_exeext conftest.$ac_ext
24249 done
24257 GNULIB_GETLOADAVG=1
24268 if test $REPLACE_GETOPT = 1; then
24277 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
24287 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
24292 GNULIB_GL_UNISTD_H_GETOPT=1
24301 REPLACE_GETOPT=0
24302 if test -n "$gl_replace_getopt"; then
24303 REPLACE_GETOPT=1
24306 if test $REPLACE_GETOPT = 1; then
24308 GETOPT_H=getopt.h
24310 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
24316 if test $REPLACE_GETOPT = 1; then
24325 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
24335 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
24340 GNULIB_GL_UNISTD_H_GETOPT=1
24354 gl_gettimeofday_timezone=void
24355 if test $ac_cv_func_gettimeofday != yes; then
24356 HAVE_GETTIMEOFDAY=0
24357 else
24361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
24362 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
24363 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
24364 $as_echo_n "(cached) " >&6
24365 else
24366 if test "$cross_compiling" = yes; then :
24367 # When cross-compiling:
24368 case "$host_os" in
24369 # Guess all is fine on glibc systems.
24370 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
24371 # If we don't know, assume the worst.
24372 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
24373 esac
24375 else
24376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24377 /* end confdefs.h. */
24378 #include <string.h>
24379 #include <sys/time.h>
24380 #include <time.h>
24381 #include <stdlib.h>
24384 main ()
24387 time_t t = 0;
24388 struct tm *lt;
24389 struct tm saved_lt;
24390 struct timeval tv;
24391 lt = localtime (&t);
24392 saved_lt = *lt;
24393 gettimeofday (&tv, NULL);
24394 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
24397 return 0;
24399 _ACEOF
24400 if ac_fn_c_try_run "$LINENO"; then :
24401 gl_cv_func_gettimeofday_clobber=no
24402 else
24403 gl_cv_func_gettimeofday_clobber=yes
24405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24406 conftest.$ac_objext conftest.beam conftest.$ac_ext
24410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
24411 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
24413 case "$gl_cv_func_gettimeofday_clobber" in
24414 *yes)
24415 REPLACE_GETTIMEOFDAY=1
24418 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
24421 $as_echo "#define localtime rpl_localtime" >>confdefs.h
24425 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
24428 esac
24430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
24431 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
24432 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
24433 $as_echo_n "(cached) " >&6
24434 else
24435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24436 /* end confdefs.h. */
24437 #include <sys/time.h>
24438 struct timeval c;
24439 int gettimeofday (struct timeval *restrict, void *restrict);
24442 main ()
24444 /* glibc uses struct timezone * rather than the POSIX void *
24445 if _GNU_SOURCE is defined. However, since the only portable
24446 use of gettimeofday uses NULL as the second parameter, and
24447 since the glibc definition is actually more typesafe, it is
24448 not worth wrapping this to get a compliant signature. */
24449 int (*f) (struct timeval *restrict, void *restrict)
24450 = gettimeofday;
24451 int x = f (&c, 0);
24452 return !(x | c.tv_sec | c.tv_usec);
24455 return 0;
24457 _ACEOF
24458 if ac_fn_c_try_compile "$LINENO"; then :
24459 gl_cv_func_gettimeofday_posix_signature=yes
24460 else
24461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24462 /* end confdefs.h. */
24463 #include <sys/time.h>
24464 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
24467 main ()
24471 return 0;
24473 _ACEOF
24474 if ac_fn_c_try_compile "$LINENO"; then :
24475 gl_cv_func_gettimeofday_posix_signature=almost
24476 else
24477 gl_cv_func_gettimeofday_posix_signature=no
24479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
24484 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
24485 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
24486 gl_gettimeofday_timezone='struct timezone'
24487 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
24488 REPLACE_GETTIMEOFDAY=1
24490 if test $REPLACE_STRUCT_TIMEVAL = 1; then
24491 REPLACE_GETTIMEOFDAY=1
24496 cat >>confdefs.h <<_ACEOF
24497 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
24498 _ACEOF
24501 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
24510 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
24513 for ac_header in sys/timeb.h
24514 do :
24515 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
24516 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
24517 cat >>confdefs.h <<_ACEOF
24518 #define HAVE_SYS_TIMEB_H 1
24519 _ACEOF
24523 done
24525 for ac_func in _ftime
24526 do :
24527 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
24528 if test "x$ac_cv_func__ftime" = x""yes; then :
24529 cat >>confdefs.h <<_ACEOF
24530 #define HAVE__FTIME 1
24531 _ACEOF
24534 done
24543 GNULIB_GETTIMEOFDAY=1
24554 if test $ac_cv_func_lstat = yes; then
24556 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24557 *no)
24558 REPLACE_LSTAT=1
24560 esac
24561 else
24562 HAVE_LSTAT=0
24565 if test $REPLACE_LSTAT = 1; then
24574 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24583 GNULIB_LSTAT=1
24594 if test $ac_cv_have_decl_memrchr = no; then
24595 HAVE_DECL_MEMRCHR=0
24598 for ac_func in memrchr
24599 do :
24600 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24601 if test "x$ac_cv_func_memrchr" = x""yes; then :
24602 cat >>confdefs.h <<_ACEOF
24603 #define HAVE_MEMRCHR 1
24604 _ACEOF
24607 done
24610 if test $ac_cv_func_memrchr = no; then
24619 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24628 GNULIB_MEMRCHR=1
24640 if test $ac_cv_func_mkostemp != yes; then
24641 HAVE_MKOSTEMP=0
24644 if test $HAVE_MKOSTEMP = 0; then
24653 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
24660 cat >>confdefs.h <<_ACEOF
24661 #define GNULIB_MKOSTEMP 1
24662 _ACEOF
24670 GNULIB_MKOSTEMP=1
24682 if test $APPLE_UNIVERSAL_BUILD = 1; then
24683 # A universal build on Apple Mac OS X platforms.
24684 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24685 # But we need a configuration result that is valid in both modes.
24686 gl_cv_func_working_mktime=no
24688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24689 $as_echo_n "checking for working mktime... " >&6; }
24690 if test "${gl_cv_func_working_mktime+set}" = set; then :
24691 $as_echo_n "(cached) " >&6
24692 else
24693 if test "$cross_compiling" = yes; then :
24694 gl_cv_func_working_mktime=no
24695 else
24696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24697 /* end confdefs.h. */
24698 /* Test program from Paul Eggert and Tony Leneis. */
24699 #include <limits.h>
24700 #include <stdlib.h>
24701 #include <time.h>
24703 #ifdef HAVE_UNISTD_H
24704 # include <unistd.h>
24705 #endif
24707 #if HAVE_DECL_ALARM
24708 # include <signal.h>
24709 #endif
24711 /* Work around redefinition to rpl_putenv by other config tests. */
24712 #undef putenv
24714 static time_t time_t_max;
24715 static time_t time_t_min;
24717 /* Values we'll use to set the TZ environment variable. */
24718 static char *tz_strings[] = {
24719 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24720 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24722 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24724 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
24725 Based on a problem report from Andreas Jaeger. */
24726 static int
24727 spring_forward_gap ()
24729 /* glibc (up to about 1998-10-07) failed this test. */
24730 struct tm tm;
24732 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24733 instead of "TZ=America/Vancouver" in order to detect the bug even
24734 on systems that don't support the Olson extension, or don't have the
24735 full zoneinfo tables installed. */
24736 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24738 tm.tm_year = 98;
24739 tm.tm_mon = 3;
24740 tm.tm_mday = 5;
24741 tm.tm_hour = 2;
24742 tm.tm_min = 0;
24743 tm.tm_sec = 0;
24744 tm.tm_isdst = -1;
24745 return mktime (&tm) != (time_t) -1;
24748 static int
24749 mktime_test1 (time_t now)
24751 struct tm *lt;
24752 return ! (lt = localtime (&now)) || mktime (lt) == now;
24755 static int
24756 mktime_test (time_t now)
24758 return (mktime_test1 (now)
24759 && mktime_test1 ((time_t) (time_t_max - now))
24760 && mktime_test1 ((time_t) (time_t_min + now)));
24763 static int
24764 irix_6_4_bug ()
24766 /* Based on code from Ariel Faigon. */
24767 struct tm tm;
24768 tm.tm_year = 96;
24769 tm.tm_mon = 3;
24770 tm.tm_mday = 0;
24771 tm.tm_hour = 0;
24772 tm.tm_min = 0;
24773 tm.tm_sec = 0;
24774 tm.tm_isdst = -1;
24775 mktime (&tm);
24776 return tm.tm_mon == 2 && tm.tm_mday == 31;
24779 static int
24780 bigtime_test (int j)
24782 struct tm tm;
24783 time_t now;
24784 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24785 now = mktime (&tm);
24786 if (now != (time_t) -1)
24788 struct tm *lt = localtime (&now);
24789 if (! (lt
24790 && lt->tm_year == tm.tm_year
24791 && lt->tm_mon == tm.tm_mon
24792 && lt->tm_mday == tm.tm_mday
24793 && lt->tm_hour == tm.tm_hour
24794 && lt->tm_min == tm.tm_min
24795 && lt->tm_sec == tm.tm_sec
24796 && lt->tm_yday == tm.tm_yday
24797 && lt->tm_wday == tm.tm_wday
24798 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24799 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24800 return 0;
24802 return 1;
24805 static int
24806 year_2050_test ()
24808 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24809 ignoring leap seconds. */
24810 unsigned long int answer = 2527315200UL;
24812 struct tm tm;
24813 time_t t;
24814 tm.tm_year = 2050 - 1900;
24815 tm.tm_mon = 2 - 1;
24816 tm.tm_mday = 1;
24817 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24818 tm.tm_isdst = -1;
24820 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24821 instead of "TZ=America/Vancouver" in order to detect the bug even
24822 on systems that don't support the Olson extension, or don't have the
24823 full zoneinfo tables installed. */
24824 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24826 t = mktime (&tm);
24828 /* Check that the result is either a failure, or close enough
24829 to the correct answer that we can assume the discrepancy is
24830 due to leap seconds. */
24831 return (t == (time_t) -1
24832 || (0 < t && answer - 120 <= t && t <= answer + 120));
24836 main ()
24838 int result = 0;
24839 time_t t, delta;
24840 int i, j;
24841 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24842 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24844 #if HAVE_DECL_ALARM
24845 /* This test makes some buggy mktime implementations loop.
24846 Give up after 60 seconds; a mktime slower than that
24847 isn't worth using anyway. */
24848 signal (SIGALRM, SIG_DFL);
24849 alarm (60);
24850 #endif
24852 time_t_max = (! time_t_signed
24853 ? (time_t) -1
24854 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24855 * 2 + 1));
24856 time_t_min = (! time_t_signed
24857 ? (time_t) 0
24858 : time_t_signed_magnitude
24859 ? ~ (time_t) 0
24860 : ~ time_t_max);
24862 delta = time_t_max / 997; /* a suitable prime number */
24863 for (i = 0; i < N_STRINGS; i++)
24865 if (tz_strings[i])
24866 putenv (tz_strings[i]);
24868 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24869 if (! mktime_test (t))
24870 result |= 1;
24871 if ((result & 2) == 0
24872 && ! (mktime_test ((time_t) 1)
24873 && mktime_test ((time_t) (60 * 60))
24874 && mktime_test ((time_t) (60 * 60 * 24))))
24875 result |= 2;
24877 for (j = 1; (result & 4) == 0; j <<= 1)
24879 if (! bigtime_test (j))
24880 result |= 4;
24881 if (INT_MAX / 2 < j)
24882 break;
24884 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24885 result |= 8;
24887 if (! irix_6_4_bug ())
24888 result |= 16;
24889 if (! spring_forward_gap ())
24890 result |= 32;
24891 if (! year_2050_test ())
24892 result |= 64;
24893 return result;
24895 _ACEOF
24896 if ac_fn_c_try_run "$LINENO"; then :
24897 gl_cv_func_working_mktime=yes
24898 else
24899 gl_cv_func_working_mktime=no
24901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24902 conftest.$ac_objext conftest.beam conftest.$ac_ext
24907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24908 $as_echo "$gl_cv_func_working_mktime" >&6; }
24910 if test $gl_cv_func_working_mktime = no; then
24911 REPLACE_MKTIME=1
24912 else
24913 REPLACE_MKTIME=0
24916 if test $REPLACE_MKTIME = 1; then
24925 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24934 GNULIB_MKTIME=1
24947 if test $ac_cv_func_pipe2 != yes; then
24948 HAVE_PIPE2=0
24956 GNULIB_PIPE2=1
24967 if test $ac_cv_func_pselect = yes; then
24968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24969 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24970 if test "${gl_cv_sig_pselect+set}" = set; then :
24971 $as_echo_n "(cached) " >&6
24972 else
24973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24974 /* end confdefs.h. */
24975 #include <sys/select.h>
24978 main ()
24980 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24981 struct timespec const *restrict,
24982 sigset_t const *restrict) = pselect;
24983 return !p;
24985 return 0;
24987 _ACEOF
24988 if ac_fn_c_try_link "$LINENO"; then :
24989 gl_cv_sig_pselect=yes
24990 else
24991 gl_cv_sig_pselect=no
24993 rm -f core conftest.err conftest.$ac_objext \
24994 conftest$ac_exeext conftest.$ac_ext
24996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24997 $as_echo "$gl_cv_sig_pselect" >&6; }
24999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
25000 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
25001 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
25002 $as_echo_n "(cached) " >&6
25003 else
25005 if test "$cross_compiling" = yes; then :
25007 case "$host_os" in
25008 # Guess yes on glibc systems.
25009 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
25010 # If we don't know, assume the worst.
25011 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
25012 esac
25014 else
25015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25016 /* end confdefs.h. */
25018 #include <sys/types.h>
25019 #include <sys/time.h>
25020 #if HAVE_SYS_SELECT_H
25021 # include <sys/select.h>
25022 #endif
25023 #include <unistd.h>
25024 #include <errno.h>
25027 main ()
25030 fd_set set;
25031 dup2(0, 16);
25032 FD_ZERO(&set);
25033 FD_SET(16, &set);
25034 close(16);
25035 struct timespec timeout;
25036 timeout.tv_sec = 0;
25037 timeout.tv_nsec = 5000;
25038 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
25041 return 0;
25043 _ACEOF
25044 if ac_fn_c_try_run "$LINENO"; then :
25045 gl_cv_func_pselect_detects_ebadf=yes
25046 else
25047 gl_cv_func_pselect_detects_ebadf=no
25049 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25050 conftest.$ac_objext conftest.beam conftest.$ac_ext
25055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
25056 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
25057 case $gl_cv_func_pselect_detects_ebadf in
25058 *yes) ;;
25059 *) REPLACE_PSELECT=1 ;;
25060 esac
25063 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
25064 REPLACE_PSELECT=1
25067 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
25076 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
25084 GNULIB_PSELECT=1
25094 LIB_PTHREAD_SIGMASK=
25099 if test "$gl_threads_api" = posix; then
25100 if test $ac_cv_func_pthread_sigmask = yes; then
25102 else
25103 if test -n "$LIBMULTITHREAD"; then
25104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
25105 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
25106 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
25107 $as_echo_n "(cached) " >&6
25108 else
25109 gl_save_LIBS="$LIBS"
25110 LIBS="$LIBS $LIBMULTITHREAD"
25111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25112 /* end confdefs.h. */
25113 #include <pthread.h>
25114 #include <signal.h>
25117 main ()
25119 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
25121 return 0;
25124 _ACEOF
25125 if ac_fn_c_try_link "$LINENO"; then :
25126 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
25127 else
25128 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
25130 rm -f core conftest.err conftest.$ac_objext \
25131 conftest$ac_exeext conftest.$ac_ext
25132 LIBS="$gl_save_LIBS"
25135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
25136 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
25137 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
25138 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
25139 else
25140 HAVE_PTHREAD_SIGMASK=0
25142 else
25143 HAVE_PTHREAD_SIGMASK=0
25146 else
25147 if test $ac_cv_func_pthread_sigmask = yes; then
25148 REPLACE_PTHREAD_SIGMASK=1
25149 else
25150 HAVE_PTHREAD_SIGMASK=0
25157 if test $HAVE_PTHREAD_SIGMASK = 1; then
25160 if test -z "$LIB_PTHREAD_SIGMASK"; then
25161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
25162 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
25163 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
25164 $as_echo_n "(cached) " >&6
25165 else
25167 if test "$cross_compiling" = yes; then :
25169 case "$host_os" in
25170 freebsd* | hpux* | solaris | solaris2.[2-9]*)
25171 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
25173 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
25174 esac
25176 else
25177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25178 /* end confdefs.h. */
25180 #include <pthread.h>
25181 #include <signal.h>
25182 #include <stddef.h>
25183 int main ()
25185 sigset_t set;
25186 sigemptyset (&set);
25187 return pthread_sigmask (1729, &set, NULL) != 0;
25189 _ACEOF
25190 if ac_fn_c_try_run "$LINENO"; then :
25191 gl_cv_func_pthread_sigmask_in_libc_works=no
25192 else
25193 gl_cv_func_pthread_sigmask_in_libc_works=yes
25195 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25196 conftest.$ac_objext conftest.beam conftest.$ac_ext
25201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
25202 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
25203 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
25204 *no)
25205 REPLACE_PTHREAD_SIGMASK=1
25207 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
25210 esac
25213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
25214 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
25215 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
25216 $as_echo_n "(cached) " >&6
25217 else
25219 gl_save_LIBS="$LIBS"
25220 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
25221 if test "$cross_compiling" = yes; then :
25222 case "$host_os" in
25223 cygwin*)
25224 gl_cv_func_pthread_sigmask_return_works="guessing no";;
25226 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
25227 esac
25229 else
25230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25231 /* end confdefs.h. */
25233 #include <pthread.h>
25234 #include <signal.h>
25235 #include <stddef.h>
25236 int main ()
25238 sigset_t set;
25239 sigemptyset (&set);
25240 if (pthread_sigmask (1729, &set, NULL) == -1)
25241 return 1;
25242 return 0;
25244 _ACEOF
25245 if ac_fn_c_try_run "$LINENO"; then :
25246 gl_cv_func_pthread_sigmask_return_works=yes
25247 else
25248 gl_cv_func_pthread_sigmask_return_works=no
25250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25251 conftest.$ac_objext conftest.beam conftest.$ac_ext
25254 LIBS="$gl_save_LIBS"
25257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
25258 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
25259 case "$gl_cv_func_pthread_sigmask_return_works" in
25260 *no)
25261 REPLACE_PTHREAD_SIGMASK=1
25263 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
25266 esac
25268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
25269 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
25270 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
25271 $as_echo_n "(cached) " >&6
25272 else
25274 case "$host_os" in
25275 irix*)
25276 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
25278 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
25279 esac
25280 gl_save_LIBS="$LIBS"
25281 LIBS="$LIBS $LIBMULTITHREAD"
25282 if test "$cross_compiling" = yes; then :
25284 else
25285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25286 /* end confdefs.h. */
25288 #include <pthread.h>
25289 #include <signal.h>
25290 #include <stdio.h>
25291 #include <stdlib.h>
25292 #include <unistd.h>
25293 static volatile int sigint_occurred;
25294 static void
25295 sigint_handler (int sig)
25297 sigint_occurred++;
25299 int main ()
25301 sigset_t set;
25302 int pid = getpid ();
25303 char command[80];
25304 signal (SIGINT, sigint_handler);
25305 sigemptyset (&set);
25306 sigaddset (&set, SIGINT);
25307 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
25308 return 1;
25309 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
25310 if (!(system (command) == 0))
25311 return 2;
25312 sleep (2);
25313 if (!(sigint_occurred == 0))
25314 return 3;
25315 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
25316 return 4;
25317 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
25318 return 5;
25319 return 0;
25321 _ACEOF
25322 if ac_fn_c_try_run "$LINENO"; then :
25324 else
25325 gl_cv_func_pthread_sigmask_unblock_works=no
25327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25328 conftest.$ac_objext conftest.beam conftest.$ac_ext
25331 LIBS="$gl_save_LIBS"
25334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
25335 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
25336 case "$gl_cv_func_pthread_sigmask_unblock_works" in
25337 *no)
25338 REPLACE_PTHREAD_SIGMASK=1
25340 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
25343 esac
25346 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
25355 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
25358 if test $HAVE_PTHREAD_SIGMASK = 1; then
25360 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
25370 GNULIB_PTHREAD_SIGMASK=1
25378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
25379 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
25380 if test "${gl_cv_func_svid_putenv+set}" = set; then :
25381 $as_echo_n "(cached) " >&6
25382 else
25383 if test "$cross_compiling" = yes; then :
25384 case "$host_os" in
25385 # Guess yes on glibc systems.
25386 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
25387 # If we don't know, assume the worst.
25388 *) gl_cv_func_svid_putenv="guessing no" ;;
25389 esac
25391 else
25392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25393 /* end confdefs.h. */
25394 $ac_includes_default
25396 main ()
25399 /* Put it in env. */
25400 if (putenv ("CONFTEST_putenv=val"))
25401 return 1;
25403 /* Try to remove it. */
25404 if (putenv ("CONFTEST_putenv"))
25405 return 2;
25407 /* Make sure it was deleted. */
25408 if (getenv ("CONFTEST_putenv") != 0)
25409 return 3;
25411 return 0;
25414 return 0;
25416 _ACEOF
25417 if ac_fn_c_try_run "$LINENO"; then :
25418 gl_cv_func_svid_putenv=yes
25419 else
25420 gl_cv_func_svid_putenv=no
25422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25423 conftest.$ac_objext conftest.beam conftest.$ac_ext
25428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
25429 $as_echo "$gl_cv_func_svid_putenv" >&6; }
25430 case "$gl_cv_func_svid_putenv" in
25431 *yes) ;;
25433 REPLACE_PUTENV=1
25435 esac
25437 if test $REPLACE_PUTENV = 1; then
25446 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
25449 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
25450 if test "x$ac_cv_have_decl__putenv" = x""yes; then :
25451 ac_have_decl=1
25452 else
25453 ac_have_decl=0
25456 cat >>confdefs.h <<_ACEOF
25457 #define HAVE_DECL__PUTENV $ac_have_decl
25458 _ACEOF
25467 GNULIB_PUTENV=1
25474 # Check whether --enable-acl was given.
25475 if test "${enable_acl+set}" = set; then :
25476 enableval=$enable_acl;
25477 else
25478 enable_acl=auto
25482 LIB_ACL=
25483 use_acl=0
25484 if test "x$enable_acl" != "xno"; then
25485 for ac_header in sys/acl.h
25486 do :
25487 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25488 if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
25489 cat >>confdefs.h <<_ACEOF
25490 #define HAVE_SYS_ACL_H 1
25491 _ACEOF
25495 done
25497 if test $ac_cv_header_sys_acl_h = yes; then
25498 ac_save_LIBS=$LIBS
25500 if test $use_acl = 0; then
25501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25502 $as_echo_n "checking for library containing acl_get_file... " >&6; }
25503 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25504 $as_echo_n "(cached) " >&6
25505 else
25506 ac_func_search_save_LIBS=$LIBS
25507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25508 /* end confdefs.h. */
25510 /* Override any GCC internal prototype to avoid an error.
25511 Use char because int might match the return type of a GCC
25512 builtin and then its argument prototype would still apply. */
25513 #ifdef __cplusplus
25514 extern "C"
25515 #endif
25516 char acl_get_file ();
25518 main ()
25520 return acl_get_file ();
25522 return 0;
25524 _ACEOF
25525 for ac_lib in '' acl pacl; do
25526 if test -z "$ac_lib"; then
25527 ac_res="none required"
25528 else
25529 ac_res=-l$ac_lib
25530 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25532 if ac_fn_c_try_link "$LINENO"; then :
25533 ac_cv_search_acl_get_file=$ac_res
25535 rm -f core conftest.err conftest.$ac_objext \
25536 conftest$ac_exeext
25537 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25538 break
25540 done
25541 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25543 else
25544 ac_cv_search_acl_get_file=no
25546 rm conftest.$ac_ext
25547 LIBS=$ac_func_search_save_LIBS
25549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25550 $as_echo "$ac_cv_search_acl_get_file" >&6; }
25551 ac_res=$ac_cv_search_acl_get_file
25552 if test "$ac_res" != no; then :
25553 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25554 if test "$ac_cv_search_acl_get_file" != "none required"; then
25555 LIB_ACL=$ac_cv_search_acl_get_file
25557 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25558 acl_free acl_from_mode acl_from_text \
25559 acl_delete_def_file acl_extended_file \
25560 acl_delete_fd_np acl_delete_file_np \
25561 acl_copy_ext_native acl_create_entry_np \
25562 acl_to_short_text acl_free_text
25563 do :
25564 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25565 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25566 eval as_val=\$$as_ac_var
25567 if test "x$as_val" = x""yes; then :
25568 cat >>confdefs.h <<_ACEOF
25569 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25570 _ACEOF
25573 done
25575 # If the acl_get_file bug is detected, don't enable the ACL support.
25577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25578 $as_echo_n "checking for working acl_get_file... " >&6; }
25579 if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
25580 $as_echo_n "(cached) " >&6
25581 else
25582 gl_cv_func_working_acl_get_file=no
25583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25584 /* end confdefs.h. */
25585 #include <sys/types.h>
25586 #include <sys/acl.h>
25587 #include <errno.h>
25590 main ()
25592 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25593 return 1;
25594 return 0;
25597 return 0;
25599 _ACEOF
25600 if ac_fn_c_try_link "$LINENO"; then :
25601 if test $cross_compiling = yes; then
25602 gl_cv_func_working_acl_get_file="guessing yes"
25603 elif ./conftest$ac_exeext; then
25604 gl_cv_func_working_acl_get_file=yes
25607 rm -f core conftest.err conftest.$ac_objext \
25608 conftest$ac_exeext conftest.$ac_ext
25610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25611 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25612 if test "$gl_cv_func_working_acl_get_file" != no; then :
25613 use_acl=1
25616 if test $use_acl = 1; then
25617 for ac_header in acl/libacl.h
25618 do :
25619 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25620 if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
25621 cat >>confdefs.h <<_ACEOF
25622 #define HAVE_ACL_LIBACL_H 1
25623 _ACEOF
25627 done
25637 for ac_func in acl_entries
25638 do :
25639 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25640 if test "x$ac_cv_func_acl_entries" = x""yes; then :
25641 cat >>confdefs.h <<_ACEOF
25642 #define HAVE_ACL_ENTRIES 1
25643 _ACEOF
25645 else
25647 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25650 done
25653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25654 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25655 if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
25656 $as_echo_n "(cached) " >&6
25657 else
25658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25659 /* end confdefs.h. */
25660 #include <sys/types.h>
25661 #include <sys/acl.h>
25662 int type = ACL_FIRST_ENTRY;
25664 main ()
25668 return 0;
25670 _ACEOF
25671 if ac_fn_c_try_compile "$LINENO"; then :
25672 gl_cv_acl_ACL_FIRST_ENTRY=yes
25673 else
25674 gl_cv_acl_ACL_FIRST_ENTRY=no
25676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25679 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25680 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25682 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25686 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25687 if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25688 $as_echo_n "(cached) " >&6
25689 else
25690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25691 /* end confdefs.h. */
25692 #include <sys/types.h>
25693 #include <sys/acl.h>
25694 int type = ACL_TYPE_EXTENDED;
25696 main ()
25700 return 0;
25702 _ACEOF
25703 if ac_fn_c_try_compile "$LINENO"; then :
25704 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25705 else
25706 gl_cv_acl_ACL_TYPE_EXTENDED=no
25708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25711 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25712 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25714 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25717 else
25718 LIB_ACL=
25725 if test $use_acl = 0; then
25726 for ac_func in facl
25727 do :
25728 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25729 if test "x$ac_cv_func_facl" = x""yes; then :
25730 cat >>confdefs.h <<_ACEOF
25731 #define HAVE_FACL 1
25732 _ACEOF
25735 done
25737 if test $ac_cv_func_facl = yes; then
25738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25739 $as_echo_n "checking for library containing acl_trivial... " >&6; }
25740 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25741 $as_echo_n "(cached) " >&6
25742 else
25743 ac_func_search_save_LIBS=$LIBS
25744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25745 /* end confdefs.h. */
25747 /* Override any GCC internal prototype to avoid an error.
25748 Use char because int might match the return type of a GCC
25749 builtin and then its argument prototype would still apply. */
25750 #ifdef __cplusplus
25751 extern "C"
25752 #endif
25753 char acl_trivial ();
25755 main ()
25757 return acl_trivial ();
25759 return 0;
25761 _ACEOF
25762 for ac_lib in '' sec; do
25763 if test -z "$ac_lib"; then
25764 ac_res="none required"
25765 else
25766 ac_res=-l$ac_lib
25767 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25769 if ac_fn_c_try_link "$LINENO"; then :
25770 ac_cv_search_acl_trivial=$ac_res
25772 rm -f core conftest.err conftest.$ac_objext \
25773 conftest$ac_exeext
25774 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25775 break
25777 done
25778 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25780 else
25781 ac_cv_search_acl_trivial=no
25783 rm conftest.$ac_ext
25784 LIBS=$ac_func_search_save_LIBS
25786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25787 $as_echo "$ac_cv_search_acl_trivial" >&6; }
25788 ac_res=$ac_cv_search_acl_trivial
25789 if test "$ac_res" != no; then :
25790 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25791 if test "$ac_cv_search_acl_trivial" != "none required"; then
25792 LIB_ACL=$ac_cv_search_acl_trivial
25797 for ac_func in acl_trivial
25798 do :
25799 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25800 if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25801 cat >>confdefs.h <<_ACEOF
25802 #define HAVE_ACL_TRIVIAL 1
25803 _ACEOF
25806 done
25808 use_acl=1
25812 if test $use_acl = 0; then
25813 for ac_func in getacl
25814 do :
25815 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25816 if test "x$ac_cv_func_getacl" = x""yes; then :
25817 cat >>confdefs.h <<_ACEOF
25818 #define HAVE_GETACL 1
25819 _ACEOF
25822 done
25824 if test $ac_cv_func_getacl = yes; then
25825 use_acl=1
25827 for ac_header in aclv.h
25828 do :
25829 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25831 if test "x$ac_cv_header_aclv_h" = x""yes; then :
25832 cat >>confdefs.h <<_ACEOF
25833 #define HAVE_ACLV_H 1
25834 _ACEOF
25838 done
25842 if test $use_acl = 0; then
25843 for ac_func in aclx_get
25844 do :
25845 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25846 if test "x$ac_cv_func_aclx_get" = x""yes; then :
25847 cat >>confdefs.h <<_ACEOF
25848 #define HAVE_ACLX_GET 1
25849 _ACEOF
25852 done
25854 if test $ac_cv_func_aclx_get = yes; then
25855 use_acl=1
25859 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25860 for ac_func in statacl
25861 do :
25862 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25863 if test "x$ac_cv_func_statacl" = x""yes; then :
25864 cat >>confdefs.h <<_ACEOF
25865 #define HAVE_STATACL 1
25866 _ACEOF
25869 done
25871 if test $ac_cv_func_statacl = yes; then
25872 use_acl=1
25876 if test $use_acl = 0; then
25877 for ac_func in aclsort
25878 do :
25879 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25880 if test "x$ac_cv_func_aclsort" = x""yes; then :
25881 cat >>confdefs.h <<_ACEOF
25882 #define HAVE_ACLSORT 1
25883 _ACEOF
25886 done
25888 if test $ac_cv_func_aclsort = yes; then
25889 use_acl=1
25893 LIBS=$ac_save_LIBS
25895 if test "x$enable_acl$use_acl" = "xyes0"; then
25896 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25897 elif test "x$enable_acl$use_acl" = "xauto0"; then
25898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25899 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25901 $as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25906 cat >>confdefs.h <<_ACEOF
25907 #define USE_ACL $use_acl
25908 _ACEOF
25910 USE_ACL=$use_acl
25916 if test $ac_cv_func_readlink = no; then
25917 HAVE_READLINK=0
25918 else
25919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25920 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25921 if test "${gl_cv_decl_readlink_works+set}" = set; then :
25922 $as_echo_n "(cached) " >&6
25923 else
25924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25925 /* end confdefs.h. */
25926 #include <unistd.h>
25927 /* Cause compilation failure if original declaration has wrong type. */
25928 ssize_t readlink (const char *, char *, size_t);
25930 main ()
25934 return 0;
25936 _ACEOF
25937 if ac_fn_c_try_compile "$LINENO"; then :
25938 gl_cv_decl_readlink_works=yes
25939 else
25940 gl_cv_decl_readlink_works=no
25942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25945 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25947 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25948 if test "${gl_cv_func_readlink_works+set}" = set; then :
25949 $as_echo_n "(cached) " >&6
25950 else
25951 # We have readlink, so assume ln -s works.
25952 ln -s conftest.no-such conftest.link
25953 ln -s conftest.link conftest.lnk2
25954 if test "$cross_compiling" = yes; then :
25955 case "$host_os" in
25956 # Guess yes on glibc systems.
25957 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25958 # If we don't know, assume the worst.
25959 *) gl_cv_func_readlink_works="guessing no" ;;
25960 esac
25962 else
25963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25964 /* end confdefs.h. */
25965 #include <unistd.h>
25968 main ()
25970 char buf[20];
25971 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25973 return 0;
25975 _ACEOF
25976 if ac_fn_c_try_run "$LINENO"; then :
25977 gl_cv_func_readlink_works=yes
25978 else
25979 gl_cv_func_readlink_works=no
25981 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25982 conftest.$ac_objext conftest.beam conftest.$ac_ext
25985 rm -f conftest.link conftest.lnk2
25987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25988 $as_echo "$gl_cv_func_readlink_works" >&6; }
25989 case "$gl_cv_func_readlink_works" in
25990 *yes)
25991 if test "$gl_cv_decl_readlink_works" != yes; then
25992 REPLACE_READLINK=1
25997 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25999 REPLACE_READLINK=1
26001 esac
26004 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26013 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26024 GNULIB_READLINK=1
26034 if test $ac_cv_func_readlinkat = no; then
26035 HAVE_READLINKAT=0
26038 if test $HAVE_READLINKAT = 0; then
26047 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
26055 GNULIB_READLINKAT=1
26062 for ac_func in sig2str
26063 do :
26064 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
26065 if test "x$ac_cv_func_sig2str" = x""yes; then :
26066 cat >>confdefs.h <<_ACEOF
26067 #define HAVE_SIG2STR 1
26068 _ACEOF
26071 done
26074 if test $ac_cv_func_sig2str = no; then
26083 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
26100 if test $gl_cv_have_include_next = yes; then
26101 gl_cv_next_signal_h='<'signal.h'>'
26102 else
26103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
26104 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
26105 if test "${gl_cv_next_signal_h+set}" = set; then :
26106 $as_echo_n "(cached) " >&6
26107 else
26109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26110 /* end confdefs.h. */
26111 #include <signal.h>
26113 _ACEOF
26114 case "$host_os" in
26115 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26116 *) gl_absname_cpp="$ac_cpp" ;;
26117 esac
26119 case "$host_os" in
26120 mingw*)
26121 gl_dirsep_regex='[/\\]'
26124 gl_dirsep_regex='\/'
26126 esac
26127 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26129 gl_header_literal_regex=`echo 'signal.h' \
26130 | sed -e "$gl_make_literal_regex_sed"`
26131 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26132 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26133 s|^/[^/]|//&|
26137 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26138 sed -n "$gl_absolute_header_sed"`'"'
26142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
26143 $as_echo "$gl_cv_next_signal_h" >&6; }
26145 NEXT_SIGNAL_H=$gl_cv_next_signal_h
26147 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26148 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26149 gl_next_as_first_directive='<'signal.h'>'
26150 else
26151 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26152 gl_next_as_first_directive=$gl_cv_next_signal_h
26154 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
26160 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
26161 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
26162 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
26163 #include <signal.h>
26166 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
26168 else
26169 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
26178 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
26179 #include <signal.h>
26182 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
26184 else
26185 HAVE_SIGHANDLER_T=0
26191 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
26192 /* <sys/types.h> is not needed according to POSIX, but the
26193 <sys/socket.h> in i386-unknown-freebsd4.10 and
26194 powerpc-apple-darwin5.5 required it. */
26195 #include <sys/types.h>
26196 #if HAVE_SYS_SOCKET_H
26197 # include <sys/socket.h>
26198 #elif HAVE_WS2TCPIP_H
26199 # include <ws2tcpip.h>
26200 #endif
26203 if test "x$ac_cv_type_socklen_t" = x""yes; then :
26205 else
26206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
26207 $as_echo_n "checking for socklen_t equivalent... " >&6; }
26208 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
26209 $as_echo_n "(cached) " >&6
26210 else
26211 # Systems have either "struct sockaddr *" or
26212 # "void *" as the second argument to getpeername
26213 gl_cv_socklen_t_equiv=
26214 for arg2 in "struct sockaddr" void; do
26215 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
26216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26217 /* end confdefs.h. */
26218 #include <sys/types.h>
26219 #include <sys/socket.h>
26221 int getpeername (int, $arg2 *, $t *);
26223 main ()
26225 $t len;
26226 getpeername (0, 0, &len);
26228 return 0;
26230 _ACEOF
26231 if ac_fn_c_try_compile "$LINENO"; then :
26232 gl_cv_socklen_t_equiv="$t"
26234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26235 test "$gl_cv_socklen_t_equiv" != "" && break
26236 done
26237 test "$gl_cv_socklen_t_equiv" != "" && break
26238 done
26242 if test "$gl_cv_socklen_t_equiv" = ""; then
26243 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
26245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
26246 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
26248 cat >>confdefs.h <<_ACEOF
26249 #define socklen_t $gl_cv_socklen_t_equiv
26250 _ACEOF
26255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26256 $as_echo_n "checking for ssize_t... " >&6; }
26257 if test "${gt_cv_ssize_t+set}" = set; then :
26258 $as_echo_n "(cached) " >&6
26259 else
26260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26261 /* end confdefs.h. */
26262 #include <sys/types.h>
26264 main ()
26266 int x = sizeof (ssize_t *) + sizeof (ssize_t);
26267 return !x;
26269 return 0;
26271 _ACEOF
26272 if ac_fn_c_try_compile "$LINENO"; then :
26273 gt_cv_ssize_t=yes
26274 else
26275 gt_cv_ssize_t=no
26277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26280 $as_echo "$gt_cv_ssize_t" >&6; }
26281 if test $gt_cv_ssize_t = no; then
26283 $as_echo "#define ssize_t int" >>confdefs.h
26291 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>
26292 #include <sys/stat.h>
26294 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
26296 cat >>confdefs.h <<_ACEOF
26297 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
26298 _ACEOF
26300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26301 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26302 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
26303 $as_echo_n "(cached) " >&6
26304 else
26305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26306 /* end confdefs.h. */
26308 #include <sys/types.h>
26309 #include <sys/stat.h>
26310 #if HAVE_SYS_TIME_H
26311 # include <sys/time.h>
26312 #endif
26313 #include <time.h>
26314 struct timespec ts;
26315 struct stat st;
26318 main ()
26321 st.st_atim = ts;
26324 return 0;
26326 _ACEOF
26327 if ac_fn_c_try_compile "$LINENO"; then :
26328 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
26329 else
26330 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
26332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26335 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26336 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
26338 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
26341 else
26342 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>
26343 #include <sys/stat.h>
26345 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
26347 cat >>confdefs.h <<_ACEOF
26348 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
26349 _ACEOF
26352 else
26353 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26354 #include <sys/stat.h>
26356 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
26358 cat >>confdefs.h <<_ACEOF
26359 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
26360 _ACEOF
26363 else
26364 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>
26365 #include <sys/stat.h>
26367 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
26369 cat >>confdefs.h <<_ACEOF
26370 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
26371 _ACEOF
26386 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>
26387 #include <sys/stat.h>
26389 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
26391 cat >>confdefs.h <<_ACEOF
26392 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
26393 _ACEOF
26396 else
26397 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26398 #include <sys/stat.h>
26400 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
26402 cat >>confdefs.h <<_ACEOF
26403 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
26404 _ACEOF
26407 else
26408 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>
26409 #include <sys/stat.h>
26411 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
26413 cat >>confdefs.h <<_ACEOF
26414 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
26415 _ACEOF
26426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
26427 $as_echo_n "checking for working stdalign.h... " >&6; }
26428 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
26429 $as_echo_n "(cached) " >&6
26430 else
26431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26432 /* end confdefs.h. */
26433 #include <stdalign.h>
26434 #include <stddef.h>
26436 /* Test that alignof yields a result consistent with offsetof.
26437 This catches GCC bug 52023
26438 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
26439 #ifdef __cplusplus
26440 template <class t> struct alignof_helper { char a; t b; };
26441 # define ao(type) offsetof (alignof_helper<type>, b)
26442 #else
26443 # define ao(type) offsetof (struct { char a; type b; }, b)
26444 #endif
26445 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
26446 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
26447 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
26449 /* Test _Alignas only on platforms where gnulib can help. */
26450 #if \
26451 ((defined __cplusplus && 201103 <= __cplusplus) \
26452 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
26453 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
26454 struct alignas_test { char c; char alignas (8) alignas_8; };
26455 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
26456 ? 1 : -1];
26457 #endif
26460 main ()
26464 return 0;
26466 _ACEOF
26467 if ac_fn_c_try_compile "$LINENO"; then :
26468 gl_cv_header_working_stdalign_h=yes
26469 else
26470 gl_cv_header_working_stdalign_h=no
26472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
26475 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
26477 if test $gl_cv_header_working_stdalign_h = yes; then
26478 STDALIGN_H=''
26479 else
26480 STDALIGN_H='stdalign.h'
26484 if test -n "$STDALIGN_H"; then
26485 GL_GENERATE_STDALIGN_H_TRUE=
26486 GL_GENERATE_STDALIGN_H_FALSE='#'
26487 else
26488 GL_GENERATE_STDALIGN_H_TRUE='#'
26489 GL_GENERATE_STDALIGN_H_FALSE=
26494 STDARG_H=''
26495 NEXT_STDARG_H='<stdarg.h>'
26496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
26497 $as_echo_n "checking for va_copy... " >&6; }
26498 if test "${gl_cv_func_va_copy+set}" = set; then :
26499 $as_echo_n "(cached) " >&6
26500 else
26502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26503 /* end confdefs.h. */
26504 #include <stdarg.h>
26506 main ()
26509 #ifndef va_copy
26510 void (*func) (va_list, va_list) = va_copy;
26511 #endif
26514 return 0;
26516 _ACEOF
26517 if ac_fn_c_try_compile "$LINENO"; then :
26518 gl_cv_func_va_copy=yes
26519 else
26520 gl_cv_func_va_copy=no
26522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
26526 $as_echo "$gl_cv_func_va_copy" >&6; }
26527 if test $gl_cv_func_va_copy = no; then
26528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26529 /* end confdefs.h. */
26530 #if defined _AIX && !defined __GNUC__
26531 AIX vaccine
26532 #endif
26534 _ACEOF
26535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26536 $EGREP "vaccine" >/dev/null 2>&1; then :
26537 gl_aixcc=yes
26538 else
26539 gl_aixcc=no
26541 rm -f conftest*
26543 if test $gl_aixcc = yes; then
26544 STDARG_H=stdarg.h
26553 if test $gl_cv_have_include_next = yes; then
26554 gl_cv_next_stdarg_h='<'stdarg.h'>'
26555 else
26556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
26557 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
26558 if test "${gl_cv_next_stdarg_h+set}" = set; then :
26559 $as_echo_n "(cached) " >&6
26560 else
26562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26563 /* end confdefs.h. */
26564 #include <stdarg.h>
26566 _ACEOF
26567 case "$host_os" in
26568 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26569 *) gl_absname_cpp="$ac_cpp" ;;
26570 esac
26572 case "$host_os" in
26573 mingw*)
26574 gl_dirsep_regex='[/\\]'
26577 gl_dirsep_regex='\/'
26579 esac
26580 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26582 gl_header_literal_regex=`echo 'stdarg.h' \
26583 | sed -e "$gl_make_literal_regex_sed"`
26584 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26585 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26586 s|^/[^/]|//&|
26590 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26591 sed -n "$gl_absolute_header_sed"`'"'
26595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
26596 $as_echo "$gl_cv_next_stdarg_h" >&6; }
26598 NEXT_STDARG_H=$gl_cv_next_stdarg_h
26600 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26601 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26602 gl_next_as_first_directive='<'stdarg.h'>'
26603 else
26604 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26605 gl_next_as_first_directive=$gl_cv_next_stdarg_h
26607 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
26612 if test "$gl_cv_next_stdarg_h" = '""'; then
26613 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
26614 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
26616 else
26618 saved_as_echo_n="$as_echo_n"
26619 as_echo_n=':'
26620 if test "${gl_cv_func___va_copy+set}" = set; then :
26621 $as_echo_n "(cached) " >&6
26622 else
26624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26625 /* end confdefs.h. */
26626 #include <stdarg.h>
26628 main ()
26631 #ifndef __va_copy
26632 error, bail out
26633 #endif
26636 return 0;
26638 _ACEOF
26639 if ac_fn_c_try_compile "$LINENO"; then :
26640 gl_cv_func___va_copy=yes
26641 else
26642 gl_cv_func___va_copy=no
26644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26647 as_echo_n="$saved_as_echo_n"
26649 if test $gl_cv_func___va_copy = yes; then
26651 $as_echo "#define va_copy __va_copy" >>confdefs.h
26653 else
26656 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
26662 if test -n "$STDARG_H"; then
26663 GL_GENERATE_STDARG_H_TRUE=
26664 GL_GENERATE_STDARG_H_FALSE='#'
26665 else
26666 GL_GENERATE_STDARG_H_TRUE='#'
26667 GL_GENERATE_STDARG_H_FALSE=
26675 # Define two additional variables used in the Makefile substitution.
26677 if test "$ac_cv_header_stdbool_h" = yes; then
26678 STDBOOL_H=''
26679 else
26680 STDBOOL_H='stdbool.h'
26683 if test -n "$STDBOOL_H"; then
26684 GL_GENERATE_STDBOOL_H_TRUE=
26685 GL_GENERATE_STDBOOL_H_FALSE='#'
26686 else
26687 GL_GENERATE_STDBOOL_H_TRUE='#'
26688 GL_GENERATE_STDBOOL_H_FALSE=
26692 if test "$ac_cv_type__Bool" = yes; then
26693 HAVE__BOOL=1
26694 else
26695 HAVE__BOOL=0
26702 STDDEF_H=
26703 if test $gt_cv_c_wchar_t = no; then
26704 HAVE_WCHAR_T=0
26705 STDDEF_H=stddef.h
26707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26708 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26709 if test "${gl_cv_decl_null_works+set}" = set; then :
26710 $as_echo_n "(cached) " >&6
26711 else
26712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26713 /* end confdefs.h. */
26714 #include <stddef.h>
26715 int test[2 * (sizeof NULL == sizeof (void *)) -1];
26718 main ()
26722 return 0;
26724 _ACEOF
26725 if ac_fn_c_try_compile "$LINENO"; then :
26726 gl_cv_decl_null_works=yes
26727 else
26728 gl_cv_decl_null_works=no
26730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26733 $as_echo "$gl_cv_decl_null_works" >&6; }
26734 if test $gl_cv_decl_null_works = no; then
26735 REPLACE_NULL=1
26736 STDDEF_H=stddef.h
26739 if test -n "$STDDEF_H"; then
26740 GL_GENERATE_STDDEF_H_TRUE=
26741 GL_GENERATE_STDDEF_H_FALSE='#'
26742 else
26743 GL_GENERATE_STDDEF_H_TRUE='#'
26744 GL_GENERATE_STDDEF_H_FALSE=
26747 if test -n "$STDDEF_H"; then
26756 if test $gl_cv_have_include_next = yes; then
26757 gl_cv_next_stddef_h='<'stddef.h'>'
26758 else
26759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26760 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26761 if test "${gl_cv_next_stddef_h+set}" = set; then :
26762 $as_echo_n "(cached) " >&6
26763 else
26765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26766 /* end confdefs.h. */
26767 #include <stddef.h>
26769 _ACEOF
26770 case "$host_os" in
26771 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26772 *) gl_absname_cpp="$ac_cpp" ;;
26773 esac
26775 case "$host_os" in
26776 mingw*)
26777 gl_dirsep_regex='[/\\]'
26780 gl_dirsep_regex='\/'
26782 esac
26783 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26785 gl_header_literal_regex=`echo 'stddef.h' \
26786 | sed -e "$gl_make_literal_regex_sed"`
26787 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26788 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26789 s|^/[^/]|//&|
26793 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26794 sed -n "$gl_absolute_header_sed"`'"'
26798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26799 $as_echo "$gl_cv_next_stddef_h" >&6; }
26801 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26803 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26804 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26805 gl_next_as_first_directive='<'stddef.h'>'
26806 else
26807 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26808 gl_next_as_first_directive=$gl_cv_next_stddef_h
26810 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26828 if test $gl_cv_have_include_next = yes; then
26829 gl_cv_next_stdio_h='<'stdio.h'>'
26830 else
26831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26832 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26833 if test "${gl_cv_next_stdio_h+set}" = set; then :
26834 $as_echo_n "(cached) " >&6
26835 else
26837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26838 /* end confdefs.h. */
26839 #include <stdio.h>
26841 _ACEOF
26842 case "$host_os" in
26843 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26844 *) gl_absname_cpp="$ac_cpp" ;;
26845 esac
26847 case "$host_os" in
26848 mingw*)
26849 gl_dirsep_regex='[/\\]'
26852 gl_dirsep_regex='\/'
26854 esac
26855 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26857 gl_header_literal_regex=`echo 'stdio.h' \
26858 | sed -e "$gl_make_literal_regex_sed"`
26859 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26860 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26861 s|^/[^/]|//&|
26865 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26866 sed -n "$gl_absolute_header_sed"`'"'
26870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26871 $as_echo "$gl_cv_next_stdio_h" >&6; }
26873 NEXT_STDIO_H=$gl_cv_next_stdio_h
26875 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26876 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26877 gl_next_as_first_directive='<'stdio.h'>'
26878 else
26879 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26880 gl_next_as_first_directive=$gl_cv_next_stdio_h
26882 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26888 GNULIB_FSCANF=1
26891 cat >>confdefs.h <<_ACEOF
26892 #define GNULIB_FSCANF 1
26893 _ACEOF
26896 GNULIB_SCANF=1
26899 cat >>confdefs.h <<_ACEOF
26900 #define GNULIB_SCANF 1
26901 _ACEOF
26904 GNULIB_FGETC=1
26905 GNULIB_GETC=1
26906 GNULIB_GETCHAR=1
26907 GNULIB_FGETS=1
26908 GNULIB_FREAD=1
26911 GNULIB_FPRINTF=1
26912 GNULIB_PRINTF=1
26913 GNULIB_VFPRINTF=1
26914 GNULIB_VPRINTF=1
26915 GNULIB_FPUTC=1
26916 GNULIB_PUTC=1
26917 GNULIB_PUTCHAR=1
26918 GNULIB_FPUTS=1
26919 GNULIB_PUTS=1
26920 GNULIB_FWRITE=1
26936 if test $gl_cv_have_include_next = yes; then
26937 gl_cv_next_stdlib_h='<'stdlib.h'>'
26938 else
26939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26940 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26941 if test "${gl_cv_next_stdlib_h+set}" = set; then :
26942 $as_echo_n "(cached) " >&6
26943 else
26945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26946 /* end confdefs.h. */
26947 #include <stdlib.h>
26949 _ACEOF
26950 case "$host_os" in
26951 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26952 *) gl_absname_cpp="$ac_cpp" ;;
26953 esac
26955 case "$host_os" in
26956 mingw*)
26957 gl_dirsep_regex='[/\\]'
26960 gl_dirsep_regex='\/'
26962 esac
26963 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26965 gl_header_literal_regex=`echo 'stdlib.h' \
26966 | sed -e "$gl_make_literal_regex_sed"`
26967 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26968 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26969 s|^/[^/]|//&|
26973 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26974 sed -n "$gl_absolute_header_sed"`'"'
26978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26979 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26981 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26983 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26985 gl_next_as_first_directive='<'stdlib.h'>'
26986 else
26987 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26988 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26990 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27000 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
27008 $as_echo "#define my_strftime nstrftime" >>confdefs.h
27020 if test "$ac_cv_have_decl_strtoimax" != yes; then
27021 HAVE_DECL_STRTOIMAX=0
27024 if test "$ac_cv_func_strtoimax" = yes; then
27025 HAVE_STRTOIMAX=1
27026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
27027 $as_echo_n "checking whether strtoimax works... " >&6; }
27028 if test "${gl_cv_func_strtoimax+set}" = set; then :
27029 $as_echo_n "(cached) " >&6
27030 else
27031 if test "$cross_compiling" = yes; then :
27032 case "$host_os" in
27033 # Guess no on AIX 5.
27034 aix5*) gl_cv_func_strtoimax="guessing no" ;;
27035 # Guess yes otherwise.
27036 *) gl_cv_func_strtoimax="guessing yes" ;;
27037 esac
27039 else
27040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27041 /* end confdefs.h. */
27043 #include <errno.h>
27044 #include <string.h>
27045 #include <inttypes.h>
27046 int main ()
27048 if (sizeof (intmax_t) > sizeof (int))
27050 const char *s = "4294967295";
27051 char *p;
27052 intmax_t res;
27053 errno = 0;
27054 res = strtoimax (s, &p, 10);
27055 if (p != s + strlen (s))
27056 return 1;
27057 if (errno != 0)
27058 return 2;
27059 if (res != (intmax_t) 65535 * (intmax_t) 65537)
27060 return 3;
27062 else
27064 const char *s = "2147483647";
27065 char *p;
27066 intmax_t res;
27067 errno = 0;
27068 res = strtoimax (s, &p, 10);
27069 if (p != s + strlen (s))
27070 return 1;
27071 if (errno != 0)
27072 return 2;
27073 if (res != 2147483647)
27074 return 3;
27076 return 0;
27079 _ACEOF
27080 if ac_fn_c_try_run "$LINENO"; then :
27081 gl_cv_func_strtoimax=yes
27082 else
27083 gl_cv_func_strtoimax=no
27085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27086 conftest.$ac_objext conftest.beam conftest.$ac_ext
27091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
27092 $as_echo "$gl_cv_func_strtoimax" >&6; }
27093 case "$gl_cv_func_strtoimax" in
27094 *no) REPLACE_STRTOIMAX=1 ;;
27095 esac
27096 else
27097 if test "$ac_cv_have_decl_strtoimax" = yes; then
27098 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
27099 REPLACE_STRTOIMAX=1
27101 HAVE_STRTOIMAX=0
27104 if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
27113 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
27116 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
27117 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
27118 ac_have_decl=1
27119 else
27120 ac_have_decl=0
27123 cat >>confdefs.h <<_ACEOF
27124 #define HAVE_DECL_STRTOLL $ac_have_decl
27125 _ACEOF
27135 GNULIB_STRTOIMAX=1
27145 if test "$ac_cv_have_decl_strtoumax" = yes; then
27146 if test "$ac_cv_func_strtoumax" != yes; then
27147 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
27148 REPLACE_STRTOUMAX=1
27150 else
27151 HAVE_DECL_STRTOUMAX=0
27154 if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
27163 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
27166 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
27167 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
27168 ac_have_decl=1
27169 else
27170 ac_have_decl=0
27173 cat >>confdefs.h <<_ACEOF
27174 #define HAVE_DECL_STRTOULL $ac_have_decl
27175 _ACEOF
27185 GNULIB_STRTOUMAX=1
27193 if test $ac_cv_func_symlink = no; then
27194 HAVE_SYMLINK=0
27195 else
27196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
27197 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
27198 if test "${gl_cv_func_symlink_works+set}" = set; then :
27199 $as_echo_n "(cached) " >&6
27200 else
27201 if test "$cross_compiling" = yes; then :
27202 case "$host_os" in
27203 # Guess yes on glibc systems.
27204 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
27205 # If we don't know, assume the worst.
27206 *) gl_cv_func_symlink_works="guessing no" ;;
27207 esac
27209 else
27210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27211 /* end confdefs.h. */
27212 #include <unistd.h>
27215 main ()
27217 int result = 0;
27218 if (!symlink ("a", "conftest.link/"))
27219 result |= 1;
27220 if (symlink ("conftest.f", "conftest.lnk2"))
27221 result |= 2;
27222 else if (!symlink ("a", "conftest.lnk2/"))
27223 result |= 4;
27224 return result;
27227 return 0;
27229 _ACEOF
27230 if ac_fn_c_try_run "$LINENO"; then :
27231 gl_cv_func_symlink_works=yes
27232 else
27233 gl_cv_func_symlink_works=no
27235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27236 conftest.$ac_objext conftest.beam conftest.$ac_ext
27239 rm -f conftest.f conftest.link conftest.lnk2
27241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
27242 $as_echo "$gl_cv_func_symlink_works" >&6; }
27243 case "$gl_cv_func_symlink_works" in
27244 *yes) ;;
27246 REPLACE_SYMLINK=1
27248 esac
27251 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
27260 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
27268 GNULIB_SYMLINK=1
27277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
27278 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
27279 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
27280 $as_echo_n "(cached) " >&6
27281 else
27283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27284 /* end confdefs.h. */
27285 #include <sys/select.h>
27287 main ()
27289 struct timeval b;
27291 return 0;
27293 _ACEOF
27294 if ac_fn_c_try_compile "$LINENO"; then :
27295 gl_cv_header_sys_select_h_selfcontained=yes
27296 else
27297 gl_cv_header_sys_select_h_selfcontained=no
27299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27300 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
27301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27302 /* end confdefs.h. */
27303 #include <sys/select.h>
27305 main ()
27307 int memset; int bzero;
27309 return 0;
27312 _ACEOF
27313 if ac_fn_c_try_compile "$LINENO"; then :
27314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27315 /* end confdefs.h. */
27316 #include <sys/select.h>
27318 main ()
27321 #undef memset
27322 #define memset nonexistent_memset
27323 extern
27324 #ifdef __cplusplus
27326 #endif
27327 void *memset (void *, int, unsigned long);
27328 #undef bzero
27329 #define bzero nonexistent_bzero
27330 extern
27331 #ifdef __cplusplus
27333 #endif
27334 void bzero (void *, unsigned long);
27335 fd_set fds;
27336 FD_ZERO (&fds);
27339 return 0;
27342 _ACEOF
27343 if ac_fn_c_try_link "$LINENO"; then :
27345 else
27346 gl_cv_header_sys_select_h_selfcontained=no
27348 rm -f core conftest.err conftest.$ac_objext \
27349 conftest$ac_exeext conftest.$ac_ext
27352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
27357 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
27367 if test $gl_cv_have_include_next = yes; then
27368 gl_cv_next_sys_select_h='<'sys/select.h'>'
27369 else
27370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
27371 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
27372 if test "${gl_cv_next_sys_select_h+set}" = set; then :
27373 $as_echo_n "(cached) " >&6
27374 else
27376 if test $ac_cv_header_sys_select_h = yes; then
27379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27380 /* end confdefs.h. */
27381 #include <sys/select.h>
27383 _ACEOF
27384 case "$host_os" in
27385 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27386 *) gl_absname_cpp="$ac_cpp" ;;
27387 esac
27389 case "$host_os" in
27390 mingw*)
27391 gl_dirsep_regex='[/\\]'
27394 gl_dirsep_regex='\/'
27396 esac
27397 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27399 gl_header_literal_regex=`echo 'sys/select.h' \
27400 | sed -e "$gl_make_literal_regex_sed"`
27401 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27402 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27403 s|^/[^/]|//&|
27407 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27408 sed -n "$gl_absolute_header_sed"`'"'
27409 else
27410 gl_cv_next_sys_select_h='<'sys/select.h'>'
27415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
27416 $as_echo "$gl_cv_next_sys_select_h" >&6; }
27418 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
27420 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27421 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27422 gl_next_as_first_directive='<'sys/select.h'>'
27423 else
27424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27425 gl_next_as_first_directive=$gl_cv_next_sys_select_h
27427 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
27432 if test $ac_cv_header_sys_select_h = yes; then
27433 HAVE_SYS_SELECT_H=1
27434 else
27435 HAVE_SYS_SELECT_H=0
27442 if test $ac_cv_header_sys_socket_h != yes; then
27443 for ac_header in winsock2.h
27444 do :
27445 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27446 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
27447 cat >>confdefs.h <<_ACEOF
27448 #define HAVE_WINSOCK2_H 1
27449 _ACEOF
27453 done
27456 if test "$ac_cv_header_winsock2_h" = yes; then
27457 HAVE_WINSOCK2_H=1
27458 UNISTD_H_HAVE_WINSOCK2_H=1
27459 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27460 else
27461 HAVE_WINSOCK2_H=0
27483 if test $gl_cv_have_include_next = yes; then
27484 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27485 else
27486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27487 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27488 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
27489 $as_echo_n "(cached) " >&6
27490 else
27492 if test $ac_cv_header_sys_stat_h = yes; then
27495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27496 /* end confdefs.h. */
27497 #include <sys/stat.h>
27499 _ACEOF
27500 case "$host_os" in
27501 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27502 *) gl_absname_cpp="$ac_cpp" ;;
27503 esac
27505 case "$host_os" in
27506 mingw*)
27507 gl_dirsep_regex='[/\\]'
27510 gl_dirsep_regex='\/'
27512 esac
27513 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27515 gl_header_literal_regex=`echo 'sys/stat.h' \
27516 | sed -e "$gl_make_literal_regex_sed"`
27517 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27518 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27519 s|^/[^/]|//&|
27523 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27524 sed -n "$gl_absolute_header_sed"`'"'
27525 else
27526 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27532 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
27534 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
27536 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27537 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27538 gl_next_as_first_directive='<'sys/stat.h'>'
27539 else
27540 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27541 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27543 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27555 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
27557 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
27561 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27562 #include <sys/stat.h>
27564 if test "x$ac_cv_type_nlink_t" = x""yes; then :
27566 else
27568 $as_echo "#define nlink_t int" >>confdefs.h
27589 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27591 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
27592 ac_have_decl=1
27593 else
27594 ac_have_decl=0
27597 cat >>confdefs.h <<_ACEOF
27598 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
27599 _ACEOF
27601 if test $ac_cv_have_decl_localtime_r = no; then
27602 HAVE_DECL_LOCALTIME_R=0
27606 if test $ac_cv_func_localtime_r = yes; then
27607 HAVE_LOCALTIME_R=1
27608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27609 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27610 if test "${gl_cv_time_r_posix+set}" = set; then :
27611 $as_echo_n "(cached) " >&6
27612 else
27613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27614 /* end confdefs.h. */
27615 #include <time.h>
27617 main ()
27619 /* We don't need to append 'restrict's to the argument types,
27620 even though the POSIX signature has the 'restrict's,
27621 since C99 says they can't affect type compatibility. */
27622 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27623 if (ptr) return 0;
27624 /* Check the return type is a pointer.
27625 On HP-UX 10 it is 'int'. */
27626 *localtime_r (0, 0);
27628 return 0;
27631 _ACEOF
27632 if ac_fn_c_try_compile "$LINENO"; then :
27633 gl_cv_time_r_posix=yes
27634 else
27635 gl_cv_time_r_posix=no
27637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27641 $as_echo "$gl_cv_time_r_posix" >&6; }
27642 if test $gl_cv_time_r_posix = yes; then
27643 REPLACE_LOCALTIME_R=0
27644 else
27645 REPLACE_LOCALTIME_R=1
27647 else
27648 HAVE_LOCALTIME_R=0
27651 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
27660 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27671 GNULIB_TIME_R=1
27682 LIB_TIMER_TIME=
27684 gl_saved_libs=$LIBS
27685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27686 $as_echo_n "checking for library containing timer_settime... " >&6; }
27687 if test "${ac_cv_search_timer_settime+set}" = set; then :
27688 $as_echo_n "(cached) " >&6
27689 else
27690 ac_func_search_save_LIBS=$LIBS
27691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27692 /* end confdefs.h. */
27694 /* Override any GCC internal prototype to avoid an error.
27695 Use char because int might match the return type of a GCC
27696 builtin and then its argument prototype would still apply. */
27697 #ifdef __cplusplus
27698 extern "C"
27699 #endif
27700 char timer_settime ();
27702 main ()
27704 return timer_settime ();
27706 return 0;
27708 _ACEOF
27709 for ac_lib in '' rt posix4; do
27710 if test -z "$ac_lib"; then
27711 ac_res="none required"
27712 else
27713 ac_res=-l$ac_lib
27714 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27716 if ac_fn_c_try_link "$LINENO"; then :
27717 ac_cv_search_timer_settime=$ac_res
27719 rm -f core conftest.err conftest.$ac_objext \
27720 conftest$ac_exeext
27721 if test "${ac_cv_search_timer_settime+set}" = set; then :
27722 break
27724 done
27725 if test "${ac_cv_search_timer_settime+set}" = set; then :
27727 else
27728 ac_cv_search_timer_settime=no
27730 rm conftest.$ac_ext
27731 LIBS=$ac_func_search_save_LIBS
27733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27734 $as_echo "$ac_cv_search_timer_settime" >&6; }
27735 ac_res=$ac_cv_search_timer_settime
27736 if test "$ac_res" != no; then :
27737 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27738 test "$ac_cv_search_timer_settime" = "none required" ||
27739 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27743 /* end confdefs.h. */
27745 #include <features.h>
27746 #ifdef __GNU_LIBRARY__
27747 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27748 && !defined __UCLIBC__
27749 Thread emulation available
27750 #endif
27751 #endif
27753 _ACEOF
27754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27755 $EGREP "Thread" >/dev/null 2>&1; then :
27756 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27758 rm -f conftest*
27760 for ac_func in timer_settime
27761 do :
27762 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27763 if test "x$ac_cv_func_timer_settime" = x""yes; then :
27764 cat >>confdefs.h <<_ACEOF
27765 #define HAVE_TIMER_SETTIME 1
27766 _ACEOF
27769 done
27771 LIBS=$gl_saved_libs
27786 if test $gl_cv_have_include_next = yes; then
27787 gl_cv_next_unistd_h='<'unistd.h'>'
27788 else
27789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27790 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27791 if test "${gl_cv_next_unistd_h+set}" = set; then :
27792 $as_echo_n "(cached) " >&6
27793 else
27795 if test $ac_cv_header_unistd_h = yes; then
27798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27799 /* end confdefs.h. */
27800 #include <unistd.h>
27802 _ACEOF
27803 case "$host_os" in
27804 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27805 *) gl_absname_cpp="$ac_cpp" ;;
27806 esac
27808 case "$host_os" in
27809 mingw*)
27810 gl_dirsep_regex='[/\\]'
27813 gl_dirsep_regex='\/'
27815 esac
27816 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27818 gl_header_literal_regex=`echo 'unistd.h' \
27819 | sed -e "$gl_make_literal_regex_sed"`
27820 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27821 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27822 s|^/[^/]|//&|
27826 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27827 sed -n "$gl_absolute_header_sed"`'"'
27828 else
27829 gl_cv_next_unistd_h='<'unistd.h'>'
27834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27835 $as_echo "$gl_cv_next_unistd_h" >&6; }
27837 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27839 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27840 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27841 gl_next_as_first_directive='<'unistd.h'>'
27842 else
27843 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27844 gl_next_as_first_directive=$gl_cv_next_unistd_h
27846 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27851 if test $ac_cv_header_unistd_h = yes; then
27852 HAVE_UNISTD_H=1
27853 else
27854 HAVE_UNISTD_H=0
27867 if test $ac_cv_have_decl_unsetenv = no; then
27868 HAVE_DECL_UNSETENV=0
27870 for ac_func in unsetenv
27871 do :
27872 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27873 if test "x$ac_cv_func_unsetenv" = x""yes; then :
27874 cat >>confdefs.h <<_ACEOF
27875 #define HAVE_UNSETENV 1
27876 _ACEOF
27879 done
27881 if test $ac_cv_func_unsetenv = no; then
27882 HAVE_UNSETENV=0
27883 else
27884 HAVE_UNSETENV=1
27885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27886 $as_echo_n "checking for unsetenv() return type... " >&6; }
27887 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27888 $as_echo_n "(cached) " >&6
27889 else
27890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27891 /* end confdefs.h. */
27893 #undef _BSD
27894 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27895 #include <stdlib.h>
27896 extern
27897 #ifdef __cplusplus
27899 #endif
27900 int unsetenv (const char *name);
27903 main ()
27907 return 0;
27909 _ACEOF
27910 if ac_fn_c_try_compile "$LINENO"; then :
27911 gt_cv_func_unsetenv_ret='int'
27912 else
27913 gt_cv_func_unsetenv_ret='void'
27915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27918 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27919 if test $gt_cv_func_unsetenv_ret = 'void'; then
27921 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27923 REPLACE_UNSETENV=1
27926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27927 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27928 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27929 $as_echo_n "(cached) " >&6
27930 else
27931 if test "$cross_compiling" = yes; then :
27932 case "$host_os" in
27933 # Guess yes on glibc systems.
27934 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27935 # If we don't know, assume the worst.
27936 *) gl_cv_func_unsetenv_works="guessing no" ;;
27937 esac
27939 else
27940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27941 /* end confdefs.h. */
27943 #include <stdlib.h>
27944 #include <errno.h>
27945 extern char **environ;
27948 main ()
27951 char entry1[] = "a=1";
27952 char entry2[] = "b=2";
27953 char *env[] = { entry1, entry2, NULL };
27954 if (putenv ((char *) "a=1")) return 1;
27955 if (putenv (entry2)) return 2;
27956 entry2[0] = 'a';
27957 unsetenv ("a");
27958 if (getenv ("a")) return 3;
27959 if (!unsetenv ("") || errno != EINVAL) return 4;
27960 entry2[0] = 'b';
27961 environ = env;
27962 if (!getenv ("a")) return 5;
27963 entry2[0] = 'a';
27964 unsetenv ("a");
27965 if (getenv ("a")) return 6;
27968 return 0;
27970 _ACEOF
27971 if ac_fn_c_try_run "$LINENO"; then :
27972 gl_cv_func_unsetenv_works=yes
27973 else
27974 gl_cv_func_unsetenv_works=no
27976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27977 conftest.$ac_objext conftest.beam conftest.$ac_ext
27981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27982 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27983 case "$gl_cv_func_unsetenv_works" in
27984 *yes) ;;
27986 REPLACE_UNSETENV=1
27988 esac
27991 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
28000 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
28012 GNULIB_UNSETENV=1
28024 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
28025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
28026 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
28027 if test "${gl_cv_func_futimesat_works+set}" = set; then :
28028 $as_echo_n "(cached) " >&6
28029 else
28030 touch conftest.file
28031 if test "$cross_compiling" = yes; then :
28032 case "$host_os" in
28033 # Guess yes on glibc systems.
28034 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
28035 # If we don't know, assume the worst.
28036 *) gl_cv_func_futimesat_works="guessing no" ;;
28037 esac
28039 else
28040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28041 /* end confdefs.h. */
28043 #include <stddef.h>
28044 #include <sys/times.h>
28045 #include <fcntl.h>
28048 main ()
28050 int fd = open ("conftest.file", O_RDWR);
28051 if (fd < 0) return 1;
28052 if (futimesat (fd, NULL, NULL)) return 2;
28055 return 0;
28057 _ACEOF
28058 if ac_fn_c_try_run "$LINENO"; then :
28059 gl_cv_func_futimesat_works=yes
28060 else
28061 gl_cv_func_futimesat_works=no
28063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28064 conftest.$ac_objext conftest.beam conftest.$ac_ext
28067 rm -f conftest.file
28069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
28070 $as_echo "$gl_cv_func_futimesat_works" >&6; }
28071 case "$gl_cv_func_futimesat_works" in
28072 *yes) ;;
28075 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
28078 esac
28081 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
28082 gl_gnulib_enabled_dosname=false
28083 gl_gnulib_enabled_euidaccess=false
28084 gl_gnulib_enabled_getdtablesize=false
28085 gl_gnulib_enabled_getgroups=false
28086 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
28087 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
28088 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
28089 gl_gnulib_enabled_pathmax=false
28090 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
28091 gl_gnulib_enabled_secure_getenv=false
28092 gl_gnulib_enabled_stat=false
28093 gl_gnulib_enabled_strtoll=false
28094 gl_gnulib_enabled_strtoull=false
28095 gl_gnulib_enabled_tempname=false
28096 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
28097 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
28099 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28108 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
28110 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
28113 func_gl_gnulib_m4code_dosname ()
28115 if ! $gl_gnulib_enabled_dosname; then
28116 gl_gnulib_enabled_dosname=true
28119 func_gl_gnulib_m4code_euidaccess ()
28121 if ! $gl_gnulib_enabled_euidaccess; then
28127 for ac_func in euidaccess
28128 do :
28129 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
28130 if test "x$ac_cv_func_euidaccess" = x""yes; then :
28131 cat >>confdefs.h <<_ACEOF
28132 #define HAVE_EUIDACCESS 1
28133 _ACEOF
28136 done
28138 if test $ac_cv_func_euidaccess = no; then
28139 HAVE_EUIDACCESS=0
28142 if test $HAVE_EUIDACCESS = 0; then
28151 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
28155 for ac_header in libgen.h
28156 do :
28157 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
28158 if test "x$ac_cv_header_libgen_h" = x""yes; then :
28159 cat >>confdefs.h <<_ACEOF
28160 #define HAVE_LIBGEN_H 1
28161 _ACEOF
28165 done
28168 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28169 if test "x$ac_cv_func_getgroups" = x""yes; then :
28174 # If we don't yet have getgroups, see if it's in -lbsd.
28175 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28176 ac_save_LIBS=$LIBS
28177 if test $ac_cv_func_getgroups = no; then
28178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28179 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
28180 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
28181 $as_echo_n "(cached) " >&6
28182 else
28183 ac_check_lib_save_LIBS=$LIBS
28184 LIBS="-lbsd $LIBS"
28185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28186 /* end confdefs.h. */
28188 /* Override any GCC internal prototype to avoid an error.
28189 Use char because int might match the return type of a GCC
28190 builtin and then its argument prototype would still apply. */
28191 #ifdef __cplusplus
28192 extern "C"
28193 #endif
28194 char getgroups ();
28196 main ()
28198 return getgroups ();
28200 return 0;
28202 _ACEOF
28203 if ac_fn_c_try_link "$LINENO"; then :
28204 ac_cv_lib_bsd_getgroups=yes
28205 else
28206 ac_cv_lib_bsd_getgroups=no
28208 rm -f core conftest.err conftest.$ac_objext \
28209 conftest$ac_exeext conftest.$ac_ext
28210 LIBS=$ac_check_lib_save_LIBS
28212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28213 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28214 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28215 GETGROUPS_LIB=-lbsd
28220 # Run the program to test the functionality of the system-supplied
28221 # getgroups function only if there is such a function.
28222 if test $ac_cv_func_getgroups = yes; then
28223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28224 $as_echo_n "checking for working getgroups... " >&6; }
28225 if test "${ac_cv_func_getgroups_works+set}" = set; then :
28226 $as_echo_n "(cached) " >&6
28227 else
28228 if test "$cross_compiling" = yes; then :
28229 case "$host_os" in # ((
28230 # Guess yes on glibc systems.
28231 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
28232 # If we don't know, assume the worst.
28233 *) ac_cv_func_getgroups_works="guessing no" ;;
28234 esac
28236 else
28237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28238 /* end confdefs.h. */
28239 $ac_includes_default
28241 main ()
28243 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
28244 return getgroups (0, 0) == -1;
28246 return 0;
28249 _ACEOF
28250 if ac_fn_c_try_run "$LINENO"; then :
28251 ac_cv_func_getgroups_works=yes
28252 else
28253 ac_cv_func_getgroups_works=no
28255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28256 conftest.$ac_objext conftest.beam conftest.$ac_ext
28261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28262 $as_echo "$ac_cv_func_getgroups_works" >&6; }
28263 else
28264 ac_cv_func_getgroups_works=no
28266 case "$ac_cv_func_getgroups_works" in
28267 *yes)
28269 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28272 esac
28273 LIBS=$ac_save_LIBS
28276 # Solaris 9 and 10 need -lgen to get the eaccess function.
28277 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
28278 # programs in the package would end up linked with that potentially-shared
28279 # library, inducing unnecessary run-time overhead.
28280 LIB_EACCESS=
28282 gl_saved_libs=$LIBS
28283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
28284 $as_echo_n "checking for library containing eaccess... " >&6; }
28285 if test "${ac_cv_search_eaccess+set}" = set; then :
28286 $as_echo_n "(cached) " >&6
28287 else
28288 ac_func_search_save_LIBS=$LIBS
28289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28290 /* end confdefs.h. */
28292 /* Override any GCC internal prototype to avoid an error.
28293 Use char because int might match the return type of a GCC
28294 builtin and then its argument prototype would still apply. */
28295 #ifdef __cplusplus
28296 extern "C"
28297 #endif
28298 char eaccess ();
28300 main ()
28302 return eaccess ();
28304 return 0;
28306 _ACEOF
28307 for ac_lib in '' gen; do
28308 if test -z "$ac_lib"; then
28309 ac_res="none required"
28310 else
28311 ac_res=-l$ac_lib
28312 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28314 if ac_fn_c_try_link "$LINENO"; then :
28315 ac_cv_search_eaccess=$ac_res
28317 rm -f core conftest.err conftest.$ac_objext \
28318 conftest$ac_exeext
28319 if test "${ac_cv_search_eaccess+set}" = set; then :
28320 break
28322 done
28323 if test "${ac_cv_search_eaccess+set}" = set; then :
28325 else
28326 ac_cv_search_eaccess=no
28328 rm conftest.$ac_ext
28329 LIBS=$ac_func_search_save_LIBS
28331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
28332 $as_echo "$ac_cv_search_eaccess" >&6; }
28333 ac_res=$ac_cv_search_eaccess
28334 if test "$ac_res" != no; then :
28335 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28336 test "$ac_cv_search_eaccess" = "none required" ||
28337 LIB_EACCESS=$ac_cv_search_eaccess
28340 for ac_func in eaccess
28341 do :
28342 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
28343 if test "x$ac_cv_func_eaccess" = x""yes; then :
28344 cat >>confdefs.h <<_ACEOF
28345 #define HAVE_EACCESS 1
28346 _ACEOF
28349 done
28351 LIBS=$gl_saved_libs
28359 GNULIB_EUIDACCESS=1
28365 gl_gnulib_enabled_euidaccess=true
28366 if test $HAVE_EUIDACCESS = 0; then
28367 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
28369 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
28370 if test $HAVE_EUIDACCESS = 0; then
28371 func_gl_gnulib_m4code_stat
28375 func_gl_gnulib_m4code_getdtablesize ()
28377 if ! $gl_gnulib_enabled_getdtablesize; then
28382 if test $ac_cv_func_getdtablesize = yes; then
28383 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
28384 # up to an unchangeable hard limit; all other platforms correctly
28385 # require setrlimit before getdtablesize() can report a larger value.
28386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
28387 $as_echo_n "checking whether getdtablesize works... " >&6; }
28388 if test "${gl_cv_func_getdtablesize_works+set}" = set; then :
28389 $as_echo_n "(cached) " >&6
28390 else
28391 if test "$cross_compiling" = yes; then :
28392 case "$host_os" in
28393 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
28394 gl_cv_func_getdtablesize_works="guessing no" ;;
28395 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
28396 esac
28397 else
28398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28399 /* end confdefs.h. */
28401 #include <unistd.h>
28403 main ()
28405 int size = getdtablesize();
28406 if (dup2 (0, getdtablesize()) != -1)
28407 return 1;
28408 if (size != getdtablesize())
28409 return 2;
28412 return 0;
28414 _ACEOF
28415 if ac_fn_c_try_run "$LINENO"; then :
28416 gl_cv_func_getdtablesize_works=yes
28417 else
28418 gl_cv_func_getdtablesize_works=no
28420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28421 conftest.$ac_objext conftest.beam conftest.$ac_ext
28426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
28427 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
28428 case "$gl_cv_func_getdtablesize_works" in
28429 *yes) ;;
28430 *) REPLACE_GETDTABLESIZE=1 ;;
28431 esac
28432 else
28433 HAVE_GETDTABLESIZE=0
28436 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
28445 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
28454 GNULIB_GETDTABLESIZE=1
28460 gl_gnulib_enabled_getdtablesize=true
28463 func_gl_gnulib_m4code_getgroups ()
28465 if ! $gl_gnulib_enabled_getgroups; then
28471 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28472 if test "x$ac_cv_func_getgroups" = x""yes; then :
28477 # If we don't yet have getgroups, see if it's in -lbsd.
28478 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28479 ac_save_LIBS=$LIBS
28480 if test $ac_cv_func_getgroups = no; then
28481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28482 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
28483 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
28484 $as_echo_n "(cached) " >&6
28485 else
28486 ac_check_lib_save_LIBS=$LIBS
28487 LIBS="-lbsd $LIBS"
28488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28489 /* end confdefs.h. */
28491 /* Override any GCC internal prototype to avoid an error.
28492 Use char because int might match the return type of a GCC
28493 builtin and then its argument prototype would still apply. */
28494 #ifdef __cplusplus
28495 extern "C"
28496 #endif
28497 char getgroups ();
28499 main ()
28501 return getgroups ();
28503 return 0;
28505 _ACEOF
28506 if ac_fn_c_try_link "$LINENO"; then :
28507 ac_cv_lib_bsd_getgroups=yes
28508 else
28509 ac_cv_lib_bsd_getgroups=no
28511 rm -f core conftest.err conftest.$ac_objext \
28512 conftest$ac_exeext conftest.$ac_ext
28513 LIBS=$ac_check_lib_save_LIBS
28515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28516 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28517 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28518 GETGROUPS_LIB=-lbsd
28523 # Run the program to test the functionality of the system-supplied
28524 # getgroups function only if there is such a function.
28525 if test $ac_cv_func_getgroups = yes; then
28526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28527 $as_echo_n "checking for working getgroups... " >&6; }
28528 if test "${ac_cv_func_getgroups_works+set}" = set; then :
28529 $as_echo_n "(cached) " >&6
28530 else
28531 if test "$cross_compiling" = yes; then :
28532 case "$host_os" in # ((
28533 # Guess yes on glibc systems.
28534 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
28535 # If we don't know, assume the worst.
28536 *) ac_cv_func_getgroups_works="guessing no" ;;
28537 esac
28539 else
28540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28541 /* end confdefs.h. */
28542 $ac_includes_default
28544 main ()
28546 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
28547 return getgroups (0, 0) == -1;
28549 return 0;
28552 _ACEOF
28553 if ac_fn_c_try_run "$LINENO"; then :
28554 ac_cv_func_getgroups_works=yes
28555 else
28556 ac_cv_func_getgroups_works=no
28558 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28559 conftest.$ac_objext conftest.beam conftest.$ac_ext
28564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28565 $as_echo "$ac_cv_func_getgroups_works" >&6; }
28566 else
28567 ac_cv_func_getgroups_works=no
28569 case "$ac_cv_func_getgroups_works" in
28570 *yes)
28572 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28575 esac
28576 LIBS=$ac_save_LIBS
28578 if test $ac_cv_func_getgroups != yes; then
28579 HAVE_GETGROUPS=0
28580 else
28581 if test "$ac_cv_type_getgroups" != gid_t \
28582 || { case "$ac_cv_func_getgroups_works" in
28583 *yes) false;;
28584 *) true;;
28585 esac
28586 }; then
28587 REPLACE_GETGROUPS=1
28589 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28591 else
28592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
28593 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
28594 if test "${gl_cv_func_getgroups_works+set}" = set; then :
28595 $as_echo_n "(cached) " >&6
28596 else
28597 if test "$cross_compiling" = yes; then :
28598 case "$host_os" in
28599 # Guess yes on glibc systems.
28600 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
28601 # If we don't know, assume the worst.
28602 *) gl_cv_func_getgroups_works="guessing no" ;;
28603 esac
28605 else
28606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28607 /* end confdefs.h. */
28608 $ac_includes_default
28610 main ()
28612 int size = getgroups (0, 0);
28613 gid_t *list = malloc (size * sizeof *list);
28614 return getgroups (-1, list) != -1;
28616 return 0;
28618 _ACEOF
28619 if ac_fn_c_try_run "$LINENO"; then :
28620 gl_cv_func_getgroups_works=yes
28621 else
28622 gl_cv_func_getgroups_works=no
28624 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28625 conftest.$ac_objext conftest.beam conftest.$ac_ext
28629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
28630 $as_echo "$gl_cv_func_getgroups_works" >&6; }
28631 case "$gl_cv_func_getgroups_works" in
28632 *yes) ;;
28633 *) REPLACE_GETGROUPS=1 ;;
28634 esac
28637 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
28639 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
28648 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
28656 GNULIB_GETGROUPS=1
28662 gl_gnulib_enabled_getgroups=true
28665 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
28667 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28670 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
28673 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
28675 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28681 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
28682 if test "x$ac_cv_func_group_member" = x""yes; then :
28684 else
28686 HAVE_GROUP_MEMBER=0
28691 if test $HAVE_GROUP_MEMBER = 0; then
28700 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
28711 GNULIB_GROUP_MEMBER=1
28717 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
28718 if test $HAVE_GROUP_MEMBER = 0; then
28719 func_gl_gnulib_m4code_getgroups
28721 if test $HAVE_GROUP_MEMBER = 0; then
28722 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
28726 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
28728 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28729 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
28732 func_gl_gnulib_m4code_pathmax ()
28734 if ! $gl_gnulib_enabled_pathmax; then
28738 gl_gnulib_enabled_pathmax=true
28741 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
28743 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28744 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
28747 func_gl_gnulib_m4code_secure_getenv ()
28749 if ! $gl_gnulib_enabled_secure_getenv; then
28755 if test $ac_cv_func_secure_getenv = no; then
28756 HAVE_SECURE_GETENV=0
28759 if test $HAVE_SECURE_GETENV = 0; then
28768 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
28771 for ac_func in __secure_getenv
28772 do :
28773 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28774 if test "x$ac_cv_func___secure_getenv" = x""yes; then :
28775 cat >>confdefs.h <<_ACEOF
28776 #define HAVE___SECURE_GETENV 1
28777 _ACEOF
28780 done
28782 if test $ac_cv_func___secure_getenv = no; then
28783 for ac_func in issetugid
28784 do :
28785 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28786 if test "x$ac_cv_func_issetugid" = x""yes; then :
28787 cat >>confdefs.h <<_ACEOF
28788 #define HAVE_ISSETUGID 1
28789 _ACEOF
28792 done
28802 GNULIB_SECURE_GETENV=1
28808 gl_gnulib_enabled_secure_getenv=true
28811 func_gl_gnulib_m4code_stat ()
28813 if ! $gl_gnulib_enabled_stat; then
28817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28818 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28819 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
28820 $as_echo_n "(cached) " >&6
28821 else
28822 if test "$cross_compiling" = yes; then :
28823 case $host_os in
28824 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28825 *) gl_cv_func_stat_dir_slash="guessing yes";;
28826 esac
28827 else
28828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28829 /* end confdefs.h. */
28830 #include <sys/stat.h>
28833 main ()
28835 struct stat st; return stat (".", &st) != stat ("./", &st);
28837 return 0;
28839 _ACEOF
28840 if ac_fn_c_try_run "$LINENO"; then :
28841 gl_cv_func_stat_dir_slash=yes
28842 else
28843 gl_cv_func_stat_dir_slash=no
28845 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28846 conftest.$ac_objext conftest.beam conftest.$ac_ext
28850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28851 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28853 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28854 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28855 $as_echo_n "(cached) " >&6
28856 else
28857 touch conftest.tmp
28858 # Assume that if we have lstat, we can also check symlinks.
28859 if test $ac_cv_func_lstat = yes; then
28860 ln -s conftest.tmp conftest.lnk
28862 if test "$cross_compiling" = yes; then :
28863 case "$host_os" in
28864 # Guess yes on glibc systems.
28865 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28866 # If we don't know, assume the worst.
28867 *) gl_cv_func_stat_file_slash="guessing no" ;;
28868 esac
28870 else
28871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28872 /* end confdefs.h. */
28873 #include <sys/stat.h>
28876 main ()
28878 int result = 0;
28879 struct stat st;
28880 if (!stat ("conftest.tmp/", &st))
28881 result |= 1;
28882 #if HAVE_LSTAT
28883 if (!stat ("conftest.lnk/", &st))
28884 result |= 2;
28885 #endif
28886 return result;
28889 return 0;
28891 _ACEOF
28892 if ac_fn_c_try_run "$LINENO"; then :
28893 gl_cv_func_stat_file_slash=yes
28894 else
28895 gl_cv_func_stat_file_slash=no
28897 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28898 conftest.$ac_objext conftest.beam conftest.$ac_ext
28901 rm -f conftest.tmp conftest.lnk
28903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28904 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28905 case $gl_cv_func_stat_dir_slash in
28906 *no) REPLACE_STAT=1
28908 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28910 esac
28911 case $gl_cv_func_stat_file_slash in
28912 *no) REPLACE_STAT=1
28914 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28916 esac
28918 if test $REPLACE_STAT = 1; then
28927 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28936 GNULIB_STAT=1
28942 gl_gnulib_enabled_stat=true
28943 if test $REPLACE_STAT = 1; then
28944 func_gl_gnulib_m4code_dosname
28946 if test $REPLACE_STAT = 1; then
28947 func_gl_gnulib_m4code_pathmax
28951 func_gl_gnulib_m4code_strtoll ()
28953 if ! $gl_gnulib_enabled_strtoll; then
28957 if test "$ac_cv_type_long_long_int" = yes; then
28958 for ac_func in strtoll
28959 do :
28960 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28961 if test "x$ac_cv_func_strtoll" = x""yes; then :
28962 cat >>confdefs.h <<_ACEOF
28963 #define HAVE_STRTOLL 1
28964 _ACEOF
28967 done
28969 if test $ac_cv_func_strtoll = no; then
28970 HAVE_STRTOLL=0
28974 if test $HAVE_STRTOLL = 0; then
28983 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
28994 GNULIB_STRTOLL=1
29000 gl_gnulib_enabled_strtoll=true
29003 func_gl_gnulib_m4code_strtoull ()
29005 if ! $gl_gnulib_enabled_strtoull; then
29009 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
29010 for ac_func in strtoull
29011 do :
29012 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
29013 if test "x$ac_cv_func_strtoull" = x""yes; then :
29014 cat >>confdefs.h <<_ACEOF
29015 #define HAVE_STRTOULL 1
29016 _ACEOF
29019 done
29021 if test $ac_cv_func_strtoull = no; then
29022 HAVE_STRTOULL=0
29026 if test $HAVE_STRTOULL = 0; then
29035 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
29046 GNULIB_STRTOULL=1
29052 gl_gnulib_enabled_strtoull=true
29055 func_gl_gnulib_m4code_tempname ()
29057 if ! $gl_gnulib_enabled_tempname; then
29063 gl_gnulib_enabled_tempname=true
29064 func_gl_gnulib_m4code_secure_getenv
29067 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
29069 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
29070 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
29073 if test $HAVE_FACCESSAT = 0; then
29074 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
29076 if test $HAVE_FACCESSAT = 0; then
29077 func_gl_gnulib_m4code_dosname
29079 if test $HAVE_FACCESSAT = 0; then
29080 func_gl_gnulib_m4code_euidaccess
29082 if test $HAVE_FACCESSAT = 0; then
29083 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
29085 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
29086 func_gl_gnulib_m4code_getdtablesize
29088 if test $HAVE_FDOPENDIR = 0; then
29089 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
29091 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
29092 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
29094 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
29095 func_gl_gnulib_m4code_dosname
29097 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
29098 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
29100 if test $REPLACE_GETOPT = 1; then
29101 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
29103 if test $REPLACE_LSTAT = 1; then
29104 func_gl_gnulib_m4code_dosname
29106 if test $REPLACE_LSTAT = 1; then
29107 func_gl_gnulib_m4code_stat
29109 if test $HAVE_MKOSTEMP = 0; then
29110 func_gl_gnulib_m4code_tempname
29112 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
29113 func_gl_gnulib_m4code_stat
29115 if test $HAVE_READLINKAT = 0; then
29116 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
29118 if test $HAVE_READLINKAT = 0; then
29119 func_gl_gnulib_m4code_dosname
29121 if test $HAVE_READLINKAT = 0; then
29122 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
29124 if { test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
29125 func_gl_gnulib_m4code_strtoll
29127 if { test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; } && test $ac_cv_type_unsigned_long_long_int = yes; then
29128 func_gl_gnulib_m4code_strtoull
29131 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
29132 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
29133 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
29134 else
29135 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
29136 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
29139 if $gl_gnulib_enabled_dosname; then
29140 gl_GNULIB_ENABLED_dosname_TRUE=
29141 gl_GNULIB_ENABLED_dosname_FALSE='#'
29142 else
29143 gl_GNULIB_ENABLED_dosname_TRUE='#'
29144 gl_GNULIB_ENABLED_dosname_FALSE=
29147 if $gl_gnulib_enabled_euidaccess; then
29148 gl_GNULIB_ENABLED_euidaccess_TRUE=
29149 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
29150 else
29151 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
29152 gl_GNULIB_ENABLED_euidaccess_FALSE=
29155 if $gl_gnulib_enabled_getdtablesize; then
29156 gl_GNULIB_ENABLED_getdtablesize_TRUE=
29157 gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
29158 else
29159 gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
29160 gl_GNULIB_ENABLED_getdtablesize_FALSE=
29163 if $gl_gnulib_enabled_getgroups; then
29164 gl_GNULIB_ENABLED_getgroups_TRUE=
29165 gl_GNULIB_ENABLED_getgroups_FALSE='#'
29166 else
29167 gl_GNULIB_ENABLED_getgroups_TRUE='#'
29168 gl_GNULIB_ENABLED_getgroups_FALSE=
29171 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
29172 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
29173 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
29174 else
29175 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
29176 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
29179 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
29180 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
29181 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
29182 else
29183 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
29184 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
29187 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
29188 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
29189 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
29190 else
29191 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
29192 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
29195 if $gl_gnulib_enabled_pathmax; then
29196 gl_GNULIB_ENABLED_pathmax_TRUE=
29197 gl_GNULIB_ENABLED_pathmax_FALSE='#'
29198 else
29199 gl_GNULIB_ENABLED_pathmax_TRUE='#'
29200 gl_GNULIB_ENABLED_pathmax_FALSE=
29203 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
29204 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
29205 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
29206 else
29207 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
29208 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
29211 if $gl_gnulib_enabled_secure_getenv; then
29212 gl_GNULIB_ENABLED_secure_getenv_TRUE=
29213 gl_GNULIB_ENABLED_secure_getenv_FALSE='#'
29214 else
29215 gl_GNULIB_ENABLED_secure_getenv_TRUE='#'
29216 gl_GNULIB_ENABLED_secure_getenv_FALSE=
29219 if $gl_gnulib_enabled_stat; then
29220 gl_GNULIB_ENABLED_stat_TRUE=
29221 gl_GNULIB_ENABLED_stat_FALSE='#'
29222 else
29223 gl_GNULIB_ENABLED_stat_TRUE='#'
29224 gl_GNULIB_ENABLED_stat_FALSE=
29227 if $gl_gnulib_enabled_strtoll; then
29228 gl_GNULIB_ENABLED_strtoll_TRUE=
29229 gl_GNULIB_ENABLED_strtoll_FALSE='#'
29230 else
29231 gl_GNULIB_ENABLED_strtoll_TRUE='#'
29232 gl_GNULIB_ENABLED_strtoll_FALSE=
29235 if $gl_gnulib_enabled_strtoull; then
29236 gl_GNULIB_ENABLED_strtoull_TRUE=
29237 gl_GNULIB_ENABLED_strtoull_FALSE='#'
29238 else
29239 gl_GNULIB_ENABLED_strtoull_TRUE='#'
29240 gl_GNULIB_ENABLED_strtoull_FALSE=
29243 if $gl_gnulib_enabled_tempname; then
29244 gl_GNULIB_ENABLED_tempname_TRUE=
29245 gl_GNULIB_ENABLED_tempname_FALSE='#'
29246 else
29247 gl_GNULIB_ENABLED_tempname_TRUE='#'
29248 gl_GNULIB_ENABLED_tempname_FALSE=
29251 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
29252 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
29253 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
29254 else
29255 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
29256 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
29259 # End of code from modules
29269 gltests_libdeps=
29270 gltests_ltlibdeps=
29280 gl_source_base='tests'
29281 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
29283 gl_module_indicator_condition=$gltests_WITNESS
29294 LIBGNU_LIBDEPS="$gl_libdeps"
29296 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
29299 CFLAGS=$SAVE_CFLAGS
29300 LIBS=$SAVE_LIBS
29302 if test "${opsys}" = "mingw32"; then
29303 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \${abs_top_srcdir}/nt/inc"
29304 # Remove unneeded switches from the value of CC that goes to Makefiles
29305 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
29308 case "$opsys" in
29309 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
29311 darwin)
29312 ## The -headerpad option tells ld (see man page) to leave room at the
29313 ## end of the header for adding load commands. Needed for dumping.
29314 ## 0x690 is the total size of 30 segment load commands (at 56
29315 ## each); under Cocoa 31 commands are required.
29316 if test "$HAVE_NS" = "yes"; then
29317 libs_nsgui="-framework AppKit"
29318 if test "$NS_IMPL_COCOA" = "yes"; then
29319 libs_nsgui="$libs_nsgui -framework IOKit"
29321 headerpad_extra=6C8
29322 else
29323 libs_nsgui=
29324 headerpad_extra=690
29326 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
29328 ## This is here because src/Makefile.in did some extra fiddling around
29329 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
29330 ## LD_SWITCH_SYSTEM_TEMACS instead,
29331 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
29332 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
29335 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
29336 ## find X at run-time.
29337 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
29338 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
29339 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
29340 ## had different values in configure (in ac_link) and src/Makefile.in.
29341 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
29342 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
29344 mingw32)
29345 ## MinGW64 does not prepend an underscore to symbols, so we must
29346 ## pass a different -entry switch to linker. FIXME: It is better
29347 ## to make the entry points the same by changing unexw32.c.
29348 case "$canonical" in
29349 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
29350 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
29351 esac
29354 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
29356 *) LD_SWITCH_SYSTEM_TEMACS= ;;
29357 esac
29359 if test x$ac_enable_profiling != x ; then
29360 case $opsys in
29361 *freebsd | gnu-linux) ;;
29362 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
29363 esac
29366 LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
29370 ## MinGW-specific post-link processing of temacs.
29371 TEMACS_POST_LINK=":"
29372 ADDSECTION=
29373 EMACS_HEAPSIZE=
29374 if test "${opsys}" = "mingw32"; then
29375 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
29376 ADDSECTION="../nt/addsection\$(EXEEXT)"
29377 ## Preload heap size of temacs.exe in MB.
29378 case "$canonical" in
29379 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
29380 *) EMACS_HEAPSIZE=27 ;;
29381 esac
29388 ## Common for all window systems
29389 if test "$window_system" != "none"; then
29391 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
29393 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
29400 #### Report on what we decided to do.
29401 #### Report GTK as a toolkit, even if it doesn't use Xt.
29402 #### It makes printing result more understandable as using GTK sets
29403 #### toolkit_scroll_bars to yes by default.
29404 if test "${HAVE_GTK}" = "yes"; then
29405 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
29408 if test $USE_ACL -ne 0; then
29409 acl_summary="yes $LIB_ACL"
29410 else
29411 acl_summary=no
29414 echo "
29415 Configured for \`${canonical}'.
29417 Where should the build process find the source code? ${srcdir}
29418 What compiler should emacs be built with? ${CC} ${CFLAGS}
29419 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
29420 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
29421 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
29422 What window system should Emacs use? ${window_system}
29423 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
29425 if test -n "${x_includes}"; then
29426 echo " Where do we find X Windows header files? ${x_includes}"
29427 else
29428 echo " Where do we find X Windows header files? Standard dirs"
29430 if test -n "${x_libraries}"; then
29431 echo " Where do we find X Windows libraries? ${x_libraries}"
29432 else
29433 echo " Where do we find X Windows libraries? Standard dirs"
29436 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
29437 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
29438 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
29439 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
29440 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
29441 echo " Does Emacs use -lpng? ${HAVE_PNG}"
29442 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
29443 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
29445 echo " Does Emacs support sound? ${HAVE_SOUND}"
29447 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
29448 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
29449 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
29450 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
29451 echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
29452 echo " Does Emacs use access control lists? ${acl_summary}"
29453 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
29454 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
29455 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
29457 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
29458 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
29459 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
29460 echo " Does Emacs use -lxft? ${HAVE_XFT}"
29461 echo " Does Emacs directly use zlib? ${HAVE_ZLIB}"
29463 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
29464 echo
29466 if test -n "${EMACSDATA}"; then
29467 echo " Environment variable EMACSDATA set to: $EMACSDATA"
29469 if test -n "${EMACSDOC}"; then
29470 echo " Environment variable EMACSDOC set to: $EMACSDOC"
29473 echo
29475 if test "$HAVE_NS" = "yes"; then
29476 echo
29477 echo "You must run \"${MAKE-make} install\" in order to test the built application.
29478 The installed application will go to nextstep/Emacs.app and can be
29479 run or moved from there."
29480 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
29481 echo "The application will be fully self-contained."
29482 else
29483 echo "The lisp resources for the application will be installed under ${prefix}.
29484 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
29485 to run if these resources are not installed."
29487 echo
29490 if test "${opsys}" = "cygwin"; then
29491 case `uname -r` in
29492 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
29493 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
29494 echo
29496 esac
29499 # Remove any trailing slashes in these variables.
29500 test "${prefix}" != NONE &&
29501 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
29502 test "${exec_prefix}" != NONE &&
29503 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
29505 if test "$HAVE_NS" = "yes"; then
29506 if test "$NS_IMPL_GNUSTEP" = yes; then
29507 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"
29509 ns_check_file=Resources/Info-gnustep.plist
29510 else
29511 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"
29513 ns_check_file=Contents/Info.plist
29518 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"
29520 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"
29523 opt_makefile=test/automated/Makefile
29525 if test -f "$srcdir/$opt_makefile.in"; then
29526 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
29527 ac_config_files="$ac_config_files test/automated/Makefile"
29532 opt_makefile=admin/unidata/Makefile
29534 if test -f "$srcdir/$opt_makefile.in"; then
29535 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
29536 ac_config_files="$ac_config_files admin/unidata/Makefile"
29541 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
29545 ac_config_commands="$ac_config_commands src/epaths.h"
29548 ac_config_commands="$ac_config_commands src/.gdbinit"
29551 cat >confcache <<\_ACEOF
29552 # This file is a shell script that caches the results of configure
29553 # tests run on this system so they can be shared between configure
29554 # scripts and configure runs, see configure's option --config-cache.
29555 # It is not useful on other systems. If it contains results you don't
29556 # want to keep, you may remove or edit it.
29558 # config.status only pays attention to the cache file if you give it
29559 # the --recheck option to rerun configure.
29561 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29562 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29563 # following values.
29565 _ACEOF
29567 # The following way of writing the cache mishandles newlines in values,
29568 # but we know of no workaround that is simple, portable, and efficient.
29569 # So, we kill variables containing newlines.
29570 # Ultrix sh set writes to stderr and can't be redirected directly,
29571 # and sets the high bit in the cache file unless we assign to the vars.
29573 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29574 eval ac_val=\$$ac_var
29575 case $ac_val in #(
29576 *${as_nl}*)
29577 case $ac_var in #(
29578 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29579 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29580 esac
29581 case $ac_var in #(
29582 _ | IFS | as_nl) ;; #(
29583 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29584 *) { eval $ac_var=; unset $ac_var;} ;;
29585 esac ;;
29586 esac
29587 done
29589 (set) 2>&1 |
29590 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29591 *${as_nl}ac_space=\ *)
29592 # `set' does not quote correctly, so add quotes: double-quote
29593 # substitution turns \\\\ into \\, and sed turns \\ into \.
29594 sed -n \
29595 "s/'/'\\\\''/g;
29596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29597 ;; #(
29599 # `set' quotes correctly as required by POSIX, so do not add quotes.
29600 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29602 esac |
29603 sort
29605 sed '
29606 /^ac_cv_env_/b end
29607 t clear
29608 :clear
29609 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29610 t end
29611 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29612 :end' >>confcache
29613 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29614 if test -w "$cache_file"; then
29615 test "x$cache_file" != "x/dev/null" &&
29616 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29617 $as_echo "$as_me: updating cache $cache_file" >&6;}
29618 cat confcache >$cache_file
29619 else
29620 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29621 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29624 rm -f confcache
29626 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29627 # Let make expand exec_prefix.
29628 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29630 DEFS=-DHAVE_CONFIG_H
29632 ac_libobjs=
29633 ac_ltlibobjs=
29634 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29635 # 1. Remove the extension, and $U if already installed.
29636 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29637 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29638 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29639 # will be set to the directory where LIBOBJS objects are built.
29640 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29641 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29642 done
29643 LIBOBJS=$ac_libobjs
29645 LTLIBOBJS=$ac_ltlibobjs
29648 if test -n "$EXEEXT"; then
29649 am__EXEEXT_TRUE=
29650 am__EXEEXT_FALSE='#'
29651 else
29652 am__EXEEXT_TRUE='#'
29653 am__EXEEXT_FALSE=
29656 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29657 as_fn_error "conditional \"AMDEP\" was never defined.
29658 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29660 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29661 as_fn_error "conditional \"am__fastdepCC\" was never defined.
29662 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29664 if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
29665 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
29666 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29668 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
29669 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
29670 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29672 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
29673 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29674 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29676 if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
29677 as_fn_error "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
29678 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29681 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29682 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29683 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29685 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
29686 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
29687 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29689 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29690 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29691 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29693 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29694 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29695 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29697 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
29698 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
29699 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29701 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29702 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29703 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29705 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29706 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29707 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29709 if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
29710 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
29711 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29713 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
29714 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
29715 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29717 if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
29718 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
29719 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29721 if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
29722 as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
29723 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29725 if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
29726 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
29727 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29729 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
29730 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
29731 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29733 if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
29734 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
29735 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29737 if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
29738 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
29739 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29741 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
29742 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
29743 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29745 if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
29746 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
29747 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29749 if test -z "${gl_GNULIB_ENABLED_secure_getenv_TRUE}" && test -z "${gl_GNULIB_ENABLED_secure_getenv_FALSE}"; then
29750 as_fn_error "conditional \"gl_GNULIB_ENABLED_secure_getenv\" was never defined.
29751 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29753 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
29754 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
29755 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29757 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
29758 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
29759 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29761 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
29762 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
29763 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29765 if test -z "${gl_GNULIB_ENABLED_tempname_TRUE}" && test -z "${gl_GNULIB_ENABLED_tempname_FALSE}"; then
29766 as_fn_error "conditional \"gl_GNULIB_ENABLED_tempname\" was never defined.
29767 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29769 if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
29770 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
29771 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29774 gl_libobjs=
29775 gl_ltlibobjs=
29776 if test -n "$gl_LIBOBJS"; then
29777 # Remove the extension.
29778 sed_drop_objext='s/\.o$//;s/\.obj$//'
29779 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29780 gl_libobjs="$gl_libobjs $i.$ac_objext"
29781 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29782 done
29784 gl_LIBOBJS=$gl_libobjs
29786 gl_LTLIBOBJS=$gl_ltlibobjs
29790 gltests_libobjs=
29791 gltests_ltlibobjs=
29792 if test -n "$gltests_LIBOBJS"; then
29793 # Remove the extension.
29794 sed_drop_objext='s/\.o$//;s/\.obj$//'
29795 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29796 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29797 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29798 done
29800 gltests_LIBOBJS=$gltests_libobjs
29802 gltests_LTLIBOBJS=$gltests_ltlibobjs
29806 : ${CONFIG_STATUS=./config.status}
29807 ac_write_fail=0
29808 ac_clean_files_save=$ac_clean_files
29809 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29810 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29811 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29812 as_write_fail=0
29813 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29814 #! $SHELL
29815 # Generated by $as_me.
29816 # Run this file to recreate the current configuration.
29817 # Compiler output produced by configure, useful for debugging
29818 # configure, is in config.log if it exists.
29820 debug=false
29821 ac_cs_recheck=false
29822 ac_cs_silent=false
29824 SHELL=\${CONFIG_SHELL-$SHELL}
29825 export SHELL
29826 _ASEOF
29827 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29828 ## -------------------- ##
29829 ## M4sh Initialization. ##
29830 ## -------------------- ##
29832 # Be more Bourne compatible
29833 DUALCASE=1; export DUALCASE # for MKS sh
29834 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29835 emulate sh
29836 NULLCMD=:
29837 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29838 # is contrary to our usage. Disable this feature.
29839 alias -g '${1+"$@"}'='"$@"'
29840 setopt NO_GLOB_SUBST
29841 else
29842 case `(set -o) 2>/dev/null` in #(
29843 *posix*) :
29844 set -o posix ;; #(
29845 *) :
29847 esac
29851 as_nl='
29853 export as_nl
29854 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29855 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29856 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29857 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29858 # Prefer a ksh shell builtin over an external printf program on Solaris,
29859 # but without wasting forks for bash or zsh.
29860 if test -z "$BASH_VERSION$ZSH_VERSION" \
29861 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29862 as_echo='print -r --'
29863 as_echo_n='print -rn --'
29864 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29865 as_echo='printf %s\n'
29866 as_echo_n='printf %s'
29867 else
29868 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29869 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29870 as_echo_n='/usr/ucb/echo -n'
29871 else
29872 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29873 as_echo_n_body='eval
29874 arg=$1;
29875 case $arg in #(
29876 *"$as_nl"*)
29877 expr "X$arg" : "X\\(.*\\)$as_nl";
29878 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29879 esac;
29880 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29882 export as_echo_n_body
29883 as_echo_n='sh -c $as_echo_n_body as_echo'
29885 export as_echo_body
29886 as_echo='sh -c $as_echo_body as_echo'
29889 # The user is always right.
29890 if test "${PATH_SEPARATOR+set}" != set; then
29891 PATH_SEPARATOR=:
29892 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29893 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29894 PATH_SEPARATOR=';'
29899 # IFS
29900 # We need space, tab and new line, in precisely that order. Quoting is
29901 # there to prevent editors from complaining about space-tab.
29902 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29903 # splitting by setting IFS to empty value.)
29904 IFS=" "" $as_nl"
29906 # Find who we are. Look in the path if we contain no directory separator.
29907 case $0 in #((
29908 *[\\/]* ) as_myself=$0 ;;
29909 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29910 for as_dir in $PATH
29912 IFS=$as_save_IFS
29913 test -z "$as_dir" && as_dir=.
29914 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29915 done
29916 IFS=$as_save_IFS
29919 esac
29920 # We did not find ourselves, most probably we were run as `sh COMMAND'
29921 # in which case we are not to be found in the path.
29922 if test "x$as_myself" = x; then
29923 as_myself=$0
29925 if test ! -f "$as_myself"; then
29926 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29927 exit 1
29930 # Unset variables that we do not need and which cause bugs (e.g. in
29931 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29932 # suppresses any "Segmentation fault" message there. '((' could
29933 # trigger a bug in pdksh 5.2.14.
29934 for as_var in BASH_ENV ENV MAIL MAILPATH
29935 do eval test x\${$as_var+set} = xset \
29936 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29937 done
29938 PS1='$ '
29939 PS2='> '
29940 PS4='+ '
29942 # NLS nuisances.
29943 LC_ALL=C
29944 export LC_ALL
29945 LANGUAGE=C
29946 export LANGUAGE
29948 # CDPATH.
29949 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29952 # as_fn_error ERROR [LINENO LOG_FD]
29953 # ---------------------------------
29954 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29955 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29956 # script with status $?, using 1 if that was 0.
29957 as_fn_error ()
29959 as_status=$?; test $as_status -eq 0 && as_status=1
29960 if test "$3"; then
29961 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29962 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
29964 $as_echo "$as_me: error: $1" >&2
29965 as_fn_exit $as_status
29966 } # as_fn_error
29969 # as_fn_set_status STATUS
29970 # -----------------------
29971 # Set $? to STATUS, without forking.
29972 as_fn_set_status ()
29974 return $1
29975 } # as_fn_set_status
29977 # as_fn_exit STATUS
29978 # -----------------
29979 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29980 as_fn_exit ()
29982 set +e
29983 as_fn_set_status $1
29984 exit $1
29985 } # as_fn_exit
29987 # as_fn_unset VAR
29988 # ---------------
29989 # Portably unset VAR.
29990 as_fn_unset ()
29992 { eval $1=; unset $1;}
29994 as_unset=as_fn_unset
29995 # as_fn_append VAR VALUE
29996 # ----------------------
29997 # Append the text in VALUE to the end of the definition contained in VAR. Take
29998 # advantage of any shell optimizations that allow amortized linear growth over
29999 # repeated appends, instead of the typical quadratic growth present in naive
30000 # implementations.
30001 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30002 eval 'as_fn_append ()
30004 eval $1+=\$2
30006 else
30007 as_fn_append ()
30009 eval $1=\$$1\$2
30011 fi # as_fn_append
30013 # as_fn_arith ARG...
30014 # ------------------
30015 # Perform arithmetic evaluation on the ARGs, and store the result in the
30016 # global $as_val. Take advantage of shells that can avoid forks. The arguments
30017 # must be portable across $(()) and expr.
30018 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
30019 eval 'as_fn_arith ()
30021 as_val=$(( $* ))
30023 else
30024 as_fn_arith ()
30026 as_val=`expr "$@" || test $? -eq 1`
30028 fi # as_fn_arith
30031 if expr a : '\(a\)' >/dev/null 2>&1 &&
30032 test "X`expr 00001 : '.*\(...\)'`" = X001; then
30033 as_expr=expr
30034 else
30035 as_expr=false
30038 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30039 as_basename=basename
30040 else
30041 as_basename=false
30044 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30045 as_dirname=dirname
30046 else
30047 as_dirname=false
30050 as_me=`$as_basename -- "$0" ||
30051 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30052 X"$0" : 'X\(//\)$' \| \
30053 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30054 $as_echo X/"$0" |
30055 sed '/^.*\/\([^/][^/]*\)\/*$/{
30056 s//\1/
30059 /^X\/\(\/\/\)$/{
30060 s//\1/
30063 /^X\/\(\/\).*/{
30064 s//\1/
30067 s/.*/./; q'`
30069 # Avoid depending upon Character Ranges.
30070 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30071 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30072 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30073 as_cr_digits='0123456789'
30074 as_cr_alnum=$as_cr_Letters$as_cr_digits
30076 ECHO_C= ECHO_N= ECHO_T=
30077 case `echo -n x` in #(((((
30078 -n*)
30079 case `echo 'xy\c'` in
30080 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
30081 xy) ECHO_C='\c';;
30082 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
30083 ECHO_T=' ';;
30084 esac;;
30086 ECHO_N='-n';;
30087 esac
30089 rm -f conf$$ conf$$.exe conf$$.file
30090 if test -d conf$$.dir; then
30091 rm -f conf$$.dir/conf$$.file
30092 else
30093 rm -f conf$$.dir
30094 mkdir conf$$.dir 2>/dev/null
30096 if (echo >conf$$.file) 2>/dev/null; then
30097 if ln -s conf$$.file conf$$ 2>/dev/null; then
30098 as_ln_s='ln -s'
30099 # ... but there are two gotchas:
30100 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30101 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30102 # In both cases, we have to default to `cp -p'.
30103 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30104 as_ln_s='cp -p'
30105 elif ln conf$$.file conf$$ 2>/dev/null; then
30106 as_ln_s=ln
30107 else
30108 as_ln_s='cp -p'
30110 else
30111 as_ln_s='cp -p'
30113 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30114 rmdir conf$$.dir 2>/dev/null
30117 # as_fn_mkdir_p
30118 # -------------
30119 # Create "$as_dir" as a directory, including parents if necessary.
30120 as_fn_mkdir_p ()
30123 case $as_dir in #(
30124 -*) as_dir=./$as_dir;;
30125 esac
30126 test -d "$as_dir" || eval $as_mkdir_p || {
30127 as_dirs=
30128 while :; do
30129 case $as_dir in #(
30130 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30131 *) as_qdir=$as_dir;;
30132 esac
30133 as_dirs="'$as_qdir' $as_dirs"
30134 as_dir=`$as_dirname -- "$as_dir" ||
30135 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30136 X"$as_dir" : 'X\(//\)[^/]' \| \
30137 X"$as_dir" : 'X\(//\)$' \| \
30138 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30139 $as_echo X"$as_dir" |
30140 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30141 s//\1/
30144 /^X\(\/\/\)[^/].*/{
30145 s//\1/
30148 /^X\(\/\/\)$/{
30149 s//\1/
30152 /^X\(\/\).*/{
30153 s//\1/
30156 s/.*/./; q'`
30157 test -d "$as_dir" && break
30158 done
30159 test -z "$as_dirs" || eval "mkdir $as_dirs"
30160 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
30163 } # as_fn_mkdir_p
30164 if mkdir -p . 2>/dev/null; then
30165 as_mkdir_p='mkdir -p "$as_dir"'
30166 else
30167 test -d ./-p && rmdir ./-p
30168 as_mkdir_p=false
30171 if test -x / >/dev/null 2>&1; then
30172 as_test_x='test -x'
30173 else
30174 if ls -dL / >/dev/null 2>&1; then
30175 as_ls_L_option=L
30176 else
30177 as_ls_L_option=
30179 as_test_x='
30180 eval sh -c '\''
30181 if test -d "$1"; then
30182 test -d "$1/.";
30183 else
30184 case $1 in #(
30185 -*)set "./$1";;
30186 esac;
30187 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
30188 ???[sx]*):;;*)false;;esac;fi
30189 '\'' sh
30192 as_executable_p=$as_test_x
30194 # Sed expression to map a string onto a valid CPP name.
30195 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30197 # Sed expression to map a string onto a valid variable name.
30198 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30201 exec 6>&1
30202 ## ----------------------------------- ##
30203 ## Main body of $CONFIG_STATUS script. ##
30204 ## ----------------------------------- ##
30205 _ASEOF
30206 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
30208 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30209 # Save the log message, to keep $0 and so on meaningful, and to
30210 # report actual input values of CONFIG_FILES etc. instead of their
30211 # values after options handling.
30212 ac_log="
30213 This file was extended by emacs $as_me 24.3.50, which was
30214 generated by GNU Autoconf 2.65. Invocation command line was
30216 CONFIG_FILES = $CONFIG_FILES
30217 CONFIG_HEADERS = $CONFIG_HEADERS
30218 CONFIG_LINKS = $CONFIG_LINKS
30219 CONFIG_COMMANDS = $CONFIG_COMMANDS
30220 $ $0 $@
30222 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30225 _ACEOF
30227 case $ac_config_files in *"
30228 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30229 esac
30231 case $ac_config_headers in *"
30232 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30233 esac
30236 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30237 # Files that config.status was made for.
30238 config_files="$ac_config_files"
30239 config_headers="$ac_config_headers"
30240 config_commands="$ac_config_commands"
30242 _ACEOF
30244 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30245 ac_cs_usage="\
30246 \`$as_me' instantiates files and other configuration actions
30247 from templates according to the current configuration. Unless the files
30248 and actions are specified as TAGs, all are instantiated by default.
30250 Usage: $0 [OPTION]... [TAG]...
30252 -h, --help print this help, then exit
30253 -V, --version print version number and configuration settings, then exit
30254 --config print configuration, then exit
30255 -q, --quiet, --silent
30256 do not print progress messages
30257 -d, --debug don't remove temporary files
30258 --recheck update $as_me by reconfiguring in the same conditions
30259 --file=FILE[:TEMPLATE]
30260 instantiate the configuration file FILE
30261 --header=FILE[:TEMPLATE]
30262 instantiate the configuration header FILE
30264 Configuration files:
30265 $config_files
30267 Configuration headers:
30268 $config_headers
30270 Configuration commands:
30271 $config_commands
30273 Report bugs to the package provider."
30275 _ACEOF
30276 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30277 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
30278 ac_cs_version="\\
30279 emacs config.status 24.3.50
30280 configured by $0, generated by GNU Autoconf 2.65,
30281 with options \\"\$ac_cs_config\\"
30283 Copyright (C) 2009 Free Software Foundation, Inc.
30284 This config.status script is free software; the Free Software Foundation
30285 gives unlimited permission to copy, distribute and modify it."
30287 ac_pwd='$ac_pwd'
30288 srcdir='$srcdir'
30289 INSTALL='$INSTALL'
30290 MKDIR_P='$MKDIR_P'
30291 AWK='$AWK'
30292 test -n "\$AWK" || AWK=awk
30293 _ACEOF
30295 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30296 # The default lists apply if the user does not specify any file.
30297 ac_need_defaults=:
30298 while test $# != 0
30300 case $1 in
30301 --*=*)
30302 ac_option=`expr "X$1" : 'X\([^=]*\)='`
30303 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30304 ac_shift=:
30307 ac_option=$1
30308 ac_optarg=$2
30309 ac_shift=shift
30311 esac
30313 case $ac_option in
30314 # Handling of the options.
30315 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30316 ac_cs_recheck=: ;;
30317 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30318 $as_echo "$ac_cs_version"; exit ;;
30319 --config | --confi | --conf | --con | --co | --c )
30320 $as_echo "$ac_cs_config"; exit ;;
30321 --debug | --debu | --deb | --de | --d | -d )
30322 debug=: ;;
30323 --file | --fil | --fi | --f )
30324 $ac_shift
30325 case $ac_optarg in
30326 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30327 esac
30328 as_fn_append CONFIG_FILES " '$ac_optarg'"
30329 ac_need_defaults=false;;
30330 --header | --heade | --head | --hea )
30331 $ac_shift
30332 case $ac_optarg in
30333 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30334 esac
30335 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
30336 ac_need_defaults=false;;
30337 --he | --h)
30338 # Conflict between --help and --header
30339 as_fn_error "ambiguous option: \`$1'
30340 Try \`$0 --help' for more information.";;
30341 --help | --hel | -h )
30342 $as_echo "$ac_cs_usage"; exit ;;
30343 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30344 | -silent | --silent | --silen | --sile | --sil | --si | --s)
30345 ac_cs_silent=: ;;
30347 # This is an error.
30348 -*) as_fn_error "unrecognized option: \`$1'
30349 Try \`$0 --help' for more information." ;;
30351 *) as_fn_append ac_config_targets " $1"
30352 ac_need_defaults=false ;;
30354 esac
30355 shift
30356 done
30358 ac_configure_extra_args=
30360 if $ac_cs_silent; then
30361 exec 6>/dev/null
30362 ac_configure_extra_args="$ac_configure_extra_args --silent"
30365 _ACEOF
30366 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30367 if \$ac_cs_recheck; then
30368 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30369 shift
30370 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30371 CONFIG_SHELL='$SHELL'
30372 export CONFIG_SHELL
30373 exec "\$@"
30376 _ACEOF
30377 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30378 exec 5>>config.log
30380 echo
30381 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30382 ## Running $as_me. ##
30383 _ASBOX
30384 $as_echo "$ac_log"
30385 } >&5
30387 _ACEOF
30388 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30390 # INIT-COMMANDS
30392 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
30393 GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
30395 _ACEOF
30397 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30399 # Handling of arguments.
30400 for ac_config_target in $ac_config_targets
30402 case $ac_config_target in
30403 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
30404 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
30405 "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" ;;
30406 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
30407 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
30408 "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" ;;
30409 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
30410 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
30411 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
30412 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
30413 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
30414 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
30415 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
30416 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
30417 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
30418 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
30419 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
30420 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
30421 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
30422 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
30423 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
30424 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
30425 "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;;
30426 "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;;
30428 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
30429 esac
30430 done
30433 # If the user did not use the arguments to specify the items to instantiate,
30434 # then the envvar interface is used. Set only those that are not.
30435 # We use the long form for the default assignment because of an extremely
30436 # bizarre bug on SunOS 4.1.3.
30437 if $ac_need_defaults; then
30438 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30439 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30440 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30443 # Have a temporary directory for convenience. Make it in the build tree
30444 # simply because there is no reason against having it here, and in addition,
30445 # creating and moving files from /tmp can sometimes cause problems.
30446 # Hook for its removal unless debugging.
30447 # Note that there is a small window in which the directory will not be cleaned:
30448 # after its creation but before its name has been assigned to `$tmp'.
30449 $debug ||
30451 tmp=
30452 trap 'exit_status=$?
30453 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
30455 trap 'as_fn_exit 1' 1 2 13 15
30457 # Create a (secure) tmp directory for tmp files.
30460 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
30461 test -n "$tmp" && test -d "$tmp"
30462 } ||
30464 tmp=./conf$$-$RANDOM
30465 (umask 077 && mkdir "$tmp")
30466 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
30468 # Set up the scripts for CONFIG_FILES section.
30469 # No need to generate them if there are no CONFIG_FILES.
30470 # This happens for instance with `./config.status config.h'.
30471 if test -n "$CONFIG_FILES"; then
30473 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
30474 ac_cs_awk_getline=:
30475 ac_cs_awk_pipe_init=
30476 ac_cs_awk_read_file='
30477 while ((getline aline < (F[key])) > 0)
30478 print(aline)
30479 close(F[key])'
30480 ac_cs_awk_pipe_fini=
30481 else
30482 ac_cs_awk_getline=false
30483 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
30484 ac_cs_awk_read_file='
30485 print "|#_!!_#|"
30486 print "cat " F[key] " &&"
30487 '$ac_cs_awk_pipe_init
30488 # The final `:' finishes the AND list.
30489 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
30491 ac_cr=`echo X | tr X '\015'`
30492 # On cygwin, bash can eat \r inside `` if the user requested igncr.
30493 # But we know of no other shell where ac_cr would be empty at this
30494 # point, so we can use a bashism as a fallback.
30495 if test "x$ac_cr" = x; then
30496 eval ac_cr=\$\'\\r\'
30498 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30499 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
30500 ac_cs_awk_cr='\r'
30501 else
30502 ac_cs_awk_cr=$ac_cr
30505 echo 'BEGIN {' >"$tmp/subs1.awk" &&
30506 _ACEOF
30508 # Create commands to substitute file output variables.
30510 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
30511 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
30512 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
30513 echo "_ACAWK" &&
30514 echo "_ACEOF"
30515 } >conf$$files.sh &&
30516 . ./conf$$files.sh ||
30517 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30518 rm -f conf$$files.sh
30521 echo "cat >conf$$subs.awk <<_ACEOF" &&
30522 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30523 echo "_ACEOF"
30524 } >conf$$subs.sh ||
30525 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30526 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
30527 ac_delim='%!_!# '
30528 for ac_last_try in false false false false false :; do
30529 . ./conf$$subs.sh ||
30530 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30532 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30533 if test $ac_delim_n = $ac_delim_num; then
30534 break
30535 elif $ac_last_try; then
30536 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30537 else
30538 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30540 done
30541 rm -f conf$$subs.sh
30543 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30544 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
30545 _ACEOF
30546 sed -n '
30548 s/^/S["/; s/!.*/"]=/
30551 s/^[^!]*!//
30552 :repl
30553 t repl
30554 s/'"$ac_delim"'$//
30555 t delim
30558 s/\(.\{148\}\)..*/\1/
30559 t more1
30560 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
30563 b repl
30564 :more1
30565 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30568 s/.\{148\}//
30569 t nl
30570 :delim
30572 s/\(.\{148\}\)..*/\1/
30573 t more2
30574 s/["\\]/\\&/g; s/^/"/; s/$/"/
30577 :more2
30578 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30581 s/.\{148\}//
30582 t delim
30583 ' <conf$$subs.awk | sed '
30584 /^[^""]/{
30586 s/\n//
30588 ' >>$CONFIG_STATUS || ac_write_fail=1
30589 rm -f conf$$subs.awk
30590 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30591 _ACAWK
30592 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
30593 for (key in S) S_is_set[key] = 1
30594 FS = "\a"
30595 \$ac_cs_awk_pipe_init
30598 line = $ 0
30599 nfields = split(line, field, "@")
30600 substed = 0
30601 len = length(field[1])
30602 for (i = 2; i < nfields; i++) {
30603 key = field[i]
30604 keylen = length(key)
30605 if (S_is_set[key]) {
30606 value = S[key]
30607 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30608 len += length(value) + length(field[++i])
30609 substed = 1
30610 } else
30611 len += 1 + keylen
30613 if (nfields == 3 && !substed) {
30614 key = field[2]
30615 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
30616 \$ac_cs_awk_read_file
30617 next
30620 print line
30622 \$ac_cs_awk_pipe_fini
30623 _ACAWK
30624 _ACEOF
30625 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30626 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30627 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30628 else
30630 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
30631 || as_fn_error "could not setup config files machinery" "$LINENO" 5
30632 _ACEOF
30634 # VPATH may cause trouble with some makes, so we remove $(srcdir),
30635 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
30636 # trailing colons and then remove the whole line if VPATH becomes empty
30637 # (actually we leave an empty line to preserve line numbers).
30638 if test "x$srcdir" = x.; then
30639 ac_vpsub='/^[ ]*VPATH[ ]*=/{
30640 s/:*\$(srcdir):*/:/
30641 s/:*\${srcdir}:*/:/
30642 s/:*@srcdir@:*/:/
30643 s/^\([^=]*=[ ]*\):*/\1/
30644 s/:*$//
30645 s/^[^=]*=[ ]*$//
30649 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30650 fi # test -n "$CONFIG_FILES"
30652 # Set up the scripts for CONFIG_HEADERS section.
30653 # No need to generate them if there are no CONFIG_HEADERS.
30654 # This happens for instance with `./config.status Makefile'.
30655 if test -n "$CONFIG_HEADERS"; then
30656 cat >"$tmp/defines.awk" <<\_ACAWK ||
30657 BEGIN {
30658 _ACEOF
30660 # Transform confdefs.h into an awk script `defines.awk', embedded as
30661 # here-document in config.status, that substitutes the proper values into
30662 # config.h.in to produce config.h.
30664 # Create a delimiter string that does not exist in confdefs.h, to ease
30665 # handling of long lines.
30666 ac_delim='%!_!# '
30667 for ac_last_try in false false :; do
30668 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30669 if test -z "$ac_t"; then
30670 break
30671 elif $ac_last_try; then
30672 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
30673 else
30674 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30676 done
30678 # For the awk script, D is an array of macro values keyed by name,
30679 # likewise P contains macro parameters if any. Preserve backslash
30680 # newline sequences.
30682 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30683 sed -n '
30684 s/.\{148\}/&'"$ac_delim"'/g
30685 t rset
30686 :rset
30687 s/^[ ]*#[ ]*define[ ][ ]*/ /
30688 t def
30690 :def
30691 s/\\$//
30692 t bsnl
30693 s/["\\]/\\&/g
30694 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30695 D["\1"]=" \3"/p
30696 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30698 :bsnl
30699 s/["\\]/\\&/g
30700 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30701 D["\1"]=" \3\\\\\\n"\\/p
30702 t cont
30703 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30704 t cont
30706 :cont
30708 s/.\{148\}/&'"$ac_delim"'/g
30709 t clear
30710 :clear
30711 s/\\$//
30712 t bsnlc
30713 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30715 :bsnlc
30716 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30717 b cont
30718 ' <confdefs.h | sed '
30719 s/'"$ac_delim"'/"\\\
30720 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30722 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30723 for (key in D) D_is_set[key] = 1
30724 FS = "\a"
30726 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30727 line = \$ 0
30728 split(line, arg, " ")
30729 if (arg[1] == "#") {
30730 defundef = arg[2]
30731 mac1 = arg[3]
30732 } else {
30733 defundef = substr(arg[1], 2)
30734 mac1 = arg[2]
30736 split(mac1, mac2, "(") #)
30737 macro = mac2[1]
30738 prefix = substr(line, 1, index(line, defundef) - 1)
30739 if (D_is_set[macro]) {
30740 # Preserve the white space surrounding the "#".
30741 print prefix "define", macro P[macro] D[macro]
30742 next
30743 } else {
30744 # Replace #undef with comments. This is necessary, for example,
30745 # in the case of _POSIX_SOURCE, which is predefined and required
30746 # on some systems where configure will not decide to define it.
30747 if (defundef == "undef") {
30748 print "/*", prefix defundef, macro, "*/"
30749 next
30753 { print }
30754 _ACAWK
30755 _ACEOF
30756 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30757 as_fn_error "could not setup config headers machinery" "$LINENO" 5
30758 fi # test -n "$CONFIG_HEADERS"
30761 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30762 shift
30763 for ac_tag
30765 case $ac_tag in
30766 :[FHLC]) ac_mode=$ac_tag; continue;;
30767 esac
30768 case $ac_mode$ac_tag in
30769 :[FHL]*:*);;
30770 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
30771 :[FH]-) ac_tag=-:-;;
30772 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30773 esac
30774 ac_save_IFS=$IFS
30775 IFS=:
30776 set x $ac_tag
30777 IFS=$ac_save_IFS
30778 shift
30779 ac_file=$1
30780 shift
30782 case $ac_mode in
30783 :L) ac_source=$1;;
30784 :[FH])
30785 ac_file_inputs=
30786 for ac_f
30788 case $ac_f in
30789 -) ac_f="$tmp/stdin";;
30790 *) # Look for the file first in the build tree, then in the source tree
30791 # (if the path is not absolute). The absolute path cannot be DOS-style,
30792 # because $ac_f cannot contain `:'.
30793 test -f "$ac_f" ||
30794 case $ac_f in
30795 [\\/$]*) false;;
30796 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30797 esac ||
30798 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30799 esac
30800 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30801 as_fn_append ac_file_inputs " '$ac_f'"
30802 done
30804 # Let's still pretend it is `configure' which instantiates (i.e., don't
30805 # use $as_me), people would be surprised to read:
30806 # /* config.h. Generated by config.status. */
30807 configure_input='Generated from '`
30808 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30809 `' by configure.'
30810 if test x"$ac_file" != x-; then
30811 configure_input="$ac_file. $configure_input"
30812 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30813 $as_echo "$as_me: creating $ac_file" >&6;}
30815 # Neutralize special characters interpreted by sed in replacement strings.
30816 case $configure_input in #(
30817 *\&* | *\|* | *\\* )
30818 ac_sed_conf_input=`$as_echo "$configure_input" |
30819 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30820 *) ac_sed_conf_input=$configure_input;;
30821 esac
30823 case $ac_tag in
30824 *:-:* | *:-) cat >"$tmp/stdin" \
30825 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
30826 esac
30828 esac
30830 ac_dir=`$as_dirname -- "$ac_file" ||
30831 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30832 X"$ac_file" : 'X\(//\)[^/]' \| \
30833 X"$ac_file" : 'X\(//\)$' \| \
30834 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30835 $as_echo X"$ac_file" |
30836 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30837 s//\1/
30840 /^X\(\/\/\)[^/].*/{
30841 s//\1/
30844 /^X\(\/\/\)$/{
30845 s//\1/
30848 /^X\(\/\).*/{
30849 s//\1/
30852 s/.*/./; q'`
30853 as_dir="$ac_dir"; as_fn_mkdir_p
30854 ac_builddir=.
30856 case "$ac_dir" in
30857 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30859 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30860 # A ".." for each directory in $ac_dir_suffix.
30861 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30862 case $ac_top_builddir_sub in
30863 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30864 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30865 esac ;;
30866 esac
30867 ac_abs_top_builddir=$ac_pwd
30868 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30869 # for backward compatibility:
30870 ac_top_builddir=$ac_top_build_prefix
30872 case $srcdir in
30873 .) # We are building in place.
30874 ac_srcdir=.
30875 ac_top_srcdir=$ac_top_builddir_sub
30876 ac_abs_top_srcdir=$ac_pwd ;;
30877 [\\/]* | ?:[\\/]* ) # Absolute name.
30878 ac_srcdir=$srcdir$ac_dir_suffix;
30879 ac_top_srcdir=$srcdir
30880 ac_abs_top_srcdir=$srcdir ;;
30881 *) # Relative name.
30882 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30883 ac_top_srcdir=$ac_top_build_prefix$srcdir
30884 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30885 esac
30886 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30889 case $ac_mode in
30892 # CONFIG_FILE
30895 case $INSTALL in
30896 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30897 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30898 esac
30899 ac_MKDIR_P=$MKDIR_P
30900 case $MKDIR_P in
30901 [\\/$]* | ?:[\\/]* ) ;;
30902 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30903 esac
30904 _ACEOF
30906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30907 # If the template does not know about datarootdir, expand it.
30908 # FIXME: This hack should be removed a few years after 2.60.
30909 ac_datarootdir_hack=; ac_datarootdir_seen=
30910 ac_sed_dataroot='
30911 /datarootdir/ {
30915 /@datadir@/p
30916 /@docdir@/p
30917 /@infodir@/p
30918 /@localedir@/p
30919 /@mandir@/p'
30920 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30921 *datarootdir*) ac_datarootdir_seen=yes;;
30922 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30924 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30925 _ACEOF
30926 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30927 ac_datarootdir_hack='
30928 s&@datadir@&$datadir&g
30929 s&@docdir@&$docdir&g
30930 s&@infodir@&$infodir&g
30931 s&@localedir@&$localedir&g
30932 s&@mandir@&$mandir&g
30933 s&\\\${datarootdir}&$datarootdir&g' ;;
30934 esac
30935 _ACEOF
30937 # Neutralize VPATH when `$srcdir' = `.'.
30938 # Shell code in configure.ac might set extrasub.
30939 # FIXME: do we really want to maintain this feature?
30940 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30941 ac_sed_extra="$ac_vpsub
30942 $extrasub
30943 _ACEOF
30944 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30946 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30947 s|@configure_input@|$ac_sed_conf_input|;t t
30948 s&@top_builddir@&$ac_top_builddir_sub&;t t
30949 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30950 s&@srcdir@&$ac_srcdir&;t t
30951 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30952 s&@top_srcdir@&$ac_top_srcdir&;t t
30953 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30954 s&@builddir@&$ac_builddir&;t t
30955 s&@abs_builddir@&$ac_abs_builddir&;t t
30956 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30957 s&@INSTALL@&$ac_INSTALL&;t t
30958 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30959 $ac_datarootdir_hack
30961 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30962 if $ac_cs_awk_getline; then
30963 $AWK -f "$tmp/subs.awk"
30964 else
30965 $AWK -f "$tmp/subs.awk" | $SHELL
30966 fi >$tmp/out \
30967 || as_fn_error "could not create $ac_file" "$LINENO" 5
30969 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30970 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30971 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
30972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30973 which seems to be undefined. Please make sure it is defined." >&5
30974 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30975 which seems to be undefined. Please make sure it is defined." >&2;}
30977 rm -f "$tmp/stdin"
30978 case $ac_file in
30979 -) cat "$tmp/out" && rm -f "$tmp/out";;
30980 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
30981 esac \
30982 || as_fn_error "could not create $ac_file" "$LINENO" 5
30986 # CONFIG_HEADER
30988 if test x"$ac_file" != x-; then
30990 $as_echo "/* $configure_input */" \
30991 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30992 } >"$tmp/config.h" \
30993 || as_fn_error "could not create $ac_file" "$LINENO" 5
30994 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
30995 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30996 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30997 else
30998 rm -f "$ac_file"
30999 mv "$tmp/config.h" "$ac_file" \
31000 || as_fn_error "could not create $ac_file" "$LINENO" 5
31002 else
31003 $as_echo "/* $configure_input */" \
31004 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
31005 || as_fn_error "could not create -" "$LINENO" 5
31007 # Compute "$ac_file"'s index in $config_headers.
31008 _am_arg="$ac_file"
31009 _am_stamp_count=1
31010 for _am_header in $config_headers :; do
31011 case $_am_header in
31012 $_am_arg | $_am_arg:* )
31013 break ;;
31015 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
31016 esac
31017 done
31018 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
31019 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31020 X"$_am_arg" : 'X\(//\)[^/]' \| \
31021 X"$_am_arg" : 'X\(//\)$' \| \
31022 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
31023 $as_echo X"$_am_arg" |
31024 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31025 s//\1/
31028 /^X\(\/\/\)[^/].*/{
31029 s//\1/
31032 /^X\(\/\/\)$/{
31033 s//\1/
31036 /^X\(\/\).*/{
31037 s//\1/
31040 s/.*/./; q'`/stamp-h$_am_stamp_count
31043 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
31044 $as_echo "$as_me: executing $ac_file commands" >&6;}
31046 esac
31049 case $ac_file$ac_mode in
31050 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
31051 # Autoconf 2.62 quotes --file arguments for eval, but not when files
31052 # are listed without --file. Let's play safe and only enable the eval
31053 # if we detect the quoting.
31054 case $CONFIG_FILES in
31055 *\'*) eval set x "$CONFIG_FILES" ;;
31056 *) set x $CONFIG_FILES ;;
31057 esac
31058 shift
31059 for mf
31061 # Strip MF so we end up with the name of the file.
31062 mf=`echo "$mf" | sed -e 's/:.*$//'`
31063 # Check whether this is an Automake generated Makefile or not.
31064 # We used to match only the files named `Makefile.in', but
31065 # some people rename them; so instead we look at the file content.
31066 # Grep'ing the first line is not enough: some people post-process
31067 # each Makefile.in and add a new line on top of each file to say so.
31068 # Grep'ing the whole file is not good either: AIX grep has a line
31069 # limit of 2048, but all sed's we know have understand at least 4000.
31070 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
31071 dirpart=`$as_dirname -- "$mf" ||
31072 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31073 X"$mf" : 'X\(//\)[^/]' \| \
31074 X"$mf" : 'X\(//\)$' \| \
31075 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
31076 $as_echo X"$mf" |
31077 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31078 s//\1/
31081 /^X\(\/\/\)[^/].*/{
31082 s//\1/
31085 /^X\(\/\/\)$/{
31086 s//\1/
31089 /^X\(\/\).*/{
31090 s//\1/
31093 s/.*/./; q'`
31094 else
31095 continue
31097 # Extract the definition of DEPDIR, am__include, and am__quote
31098 # from the Makefile without running `make'.
31099 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
31100 test -z "$DEPDIR" && continue
31101 am__include=`sed -n 's/^am__include = //p' < "$mf"`
31102 test -z "am__include" && continue
31103 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
31104 # When using ansi2knr, U may be empty or an underscore; expand it
31105 U=`sed -n 's/^U = //p' < "$mf"`
31106 # Find all dependency output files, they are included files with
31107 # $(DEPDIR) in their names. We invoke sed twice because it is the
31108 # simplest approach to changing $(DEPDIR) to its actual value in the
31109 # expansion.
31110 for file in `sed -n "
31111 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
31112 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
31113 # Make sure the directory exists.
31114 test -f "$dirpart/$file" && continue
31115 fdir=`$as_dirname -- "$file" ||
31116 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31117 X"$file" : 'X\(//\)[^/]' \| \
31118 X"$file" : 'X\(//\)$' \| \
31119 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
31120 $as_echo X"$file" |
31121 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31122 s//\1/
31125 /^X\(\/\/\)[^/].*/{
31126 s//\1/
31129 /^X\(\/\/\)$/{
31130 s//\1/
31133 /^X\(\/\).*/{
31134 s//\1/
31137 s/.*/./; q'`
31138 as_dir=$dirpart/$fdir; as_fn_mkdir_p
31139 # echo "creating $dirpart/$file"
31140 echo '# dummy' > "$dirpart/$file"
31141 done
31142 done
31145 "src/epaths.h":C)
31146 if test "${opsys}" = "mingw32"; then
31147 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
31148 else
31149 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
31152 "src/.gdbinit":C)
31153 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
31154 echo "source $ac_abs_top_srcdir/src/.gdbinit" > src/.gdbinit
31158 esac
31159 done # for ac_tag
31162 as_fn_exit 0
31163 _ACEOF
31164 ac_clean_files=$ac_clean_files_save
31166 test $ac_write_fail = 0 ||
31167 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
31170 # configure is writing to config.log, and then calls config.status.
31171 # config.status does its own redirection, appending to config.log.
31172 # Unfortunately, on DOS this fails, as config.log is still kept open
31173 # by configure, so config.status won't be able to write to it; its
31174 # output is simply discarded. So we exec the FD to /dev/null,
31175 # effectively closing config.log, so it can be properly (re)opened and
31176 # appended to by config.status. When coming back to configure, we
31177 # need to make the FD available again.
31178 if test "$no_create" != yes; then
31179 ac_cs_success=:
31180 ac_config_status_args=
31181 test "$silent" = yes &&
31182 ac_config_status_args="$ac_config_status_args --quiet"
31183 exec 5>/dev/null
31184 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31185 exec 5>>config.log
31186 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31187 # would make configure fail if this is the last instruction.
31188 $ac_cs_success || as_fn_exit $?
31190 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31191 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31192 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}