Auto-commit of generated files.
[emacs.git] / autogen / configure
blob33576638fddd6029f51ffda56bc13cec69364981
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.65 for emacs 24.1.
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.1'
553 PACKAGE_STRING='emacs 24.1'
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 LIB_GCC
608 LD_FIRSTFLAG
609 LD_SWITCH_SYSTEM_TEMACS
610 LIBGNU_LTLIBDEPS
611 LIBGNU_LIBDEPS
612 gltests_WITNESS
613 gl_GNULIB_ENABLED_verify_FALSE
614 gl_GNULIB_ENABLED_verify_TRUE
615 gl_GNULIB_ENABLED_strtoull_FALSE
616 gl_GNULIB_ENABLED_strtoull_TRUE
617 gl_GNULIB_ENABLED_strtoll_FALSE
618 gl_GNULIB_ENABLED_strtoll_TRUE
619 gl_GNULIB_ENABLED_stat_FALSE
620 gl_GNULIB_ENABLED_stat_TRUE
621 gl_GNULIB_ENABLED_sigprocmask_FALSE
622 gl_GNULIB_ENABLED_sigprocmask_TRUE
623 gl_GNULIB_ENABLED_pathmax_FALSE
624 gl_GNULIB_ENABLED_pathmax_TRUE
625 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
626 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
627 gl_GNULIB_ENABLED_dosname_FALSE
628 gl_GNULIB_ENABLED_dosname_TRUE
629 LTLIBINTL
630 LIBINTL
631 HAVE_UNISTD_H
632 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
633 NEXT_UNISTD_H
634 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
635 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
636 TIME_H_DEFINES_STRUCT_TIMESPEC
637 NEXT_AS_FIRST_DIRECTIVE_TIME_H
638 NEXT_TIME_H
639 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
640 NEXT_SYS_STAT_H
641 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
642 NEXT_STDLIB_H
643 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
644 NEXT_STDIO_H
645 REPLACE_VSPRINTF
646 REPLACE_VSNPRINTF
647 REPLACE_VPRINTF
648 REPLACE_VFPRINTF
649 REPLACE_VDPRINTF
650 REPLACE_VASPRINTF
651 REPLACE_TMPFILE
652 REPLACE_STDIO_WRITE_FUNCS
653 REPLACE_STDIO_READ_FUNCS
654 REPLACE_SPRINTF
655 REPLACE_SNPRINTF
656 REPLACE_RENAMEAT
657 REPLACE_RENAME
658 REPLACE_REMOVE
659 REPLACE_PRINTF
660 REPLACE_POPEN
661 REPLACE_PERROR
662 REPLACE_OBSTACK_PRINTF
663 REPLACE_GETLINE
664 REPLACE_GETDELIM
665 REPLACE_FTELLO
666 REPLACE_FTELL
667 REPLACE_FSEEKO
668 REPLACE_FSEEK
669 REPLACE_FREOPEN
670 REPLACE_FPURGE
671 REPLACE_FPRINTF
672 REPLACE_FOPEN
673 REPLACE_FFLUSH
674 REPLACE_FDOPEN
675 REPLACE_FCLOSE
676 REPLACE_DPRINTF
677 HAVE_VDPRINTF
678 HAVE_VASPRINTF
679 HAVE_RENAMEAT
680 HAVE_POPEN
681 HAVE_PCLOSE
682 HAVE_FTELLO
683 HAVE_FSEEKO
684 HAVE_DPRINTF
685 HAVE_DECL_VSNPRINTF
686 HAVE_DECL_SNPRINTF
687 HAVE_DECL_OBSTACK_PRINTF
688 HAVE_DECL_GETLINE
689 HAVE_DECL_GETDELIM
690 HAVE_DECL_FTELLO
691 HAVE_DECL_FSEEKO
692 HAVE_DECL_FPURGE
693 GNULIB_VSPRINTF_POSIX
694 GNULIB_VSNPRINTF
695 GNULIB_VPRINTF_POSIX
696 GNULIB_VPRINTF
697 GNULIB_VFPRINTF_POSIX
698 GNULIB_VFPRINTF
699 GNULIB_VDPRINTF
700 GNULIB_VSCANF
701 GNULIB_VFSCANF
702 GNULIB_VASPRINTF
703 GNULIB_TMPFILE
704 GNULIB_STDIO_H_SIGPIPE
705 GNULIB_STDIO_H_NONBLOCKING
706 GNULIB_SPRINTF_POSIX
707 GNULIB_SNPRINTF
708 GNULIB_SCANF
709 GNULIB_RENAMEAT
710 GNULIB_RENAME
711 GNULIB_REMOVE
712 GNULIB_PUTS
713 GNULIB_PUTCHAR
714 GNULIB_PUTC
715 GNULIB_PRINTF_POSIX
716 GNULIB_PRINTF
717 GNULIB_POPEN
718 GNULIB_PERROR
719 GNULIB_PCLOSE
720 GNULIB_OBSTACK_PRINTF_POSIX
721 GNULIB_OBSTACK_PRINTF
722 GNULIB_GETS
723 GNULIB_GETLINE
724 GNULIB_GETDELIM
725 GNULIB_GETCHAR
726 GNULIB_GETC
727 GNULIB_FWRITE
728 GNULIB_FTELLO
729 GNULIB_FTELL
730 GNULIB_FSEEKO
731 GNULIB_FSEEK
732 GNULIB_FSCANF
733 GNULIB_FREOPEN
734 GNULIB_FREAD
735 GNULIB_FPUTS
736 GNULIB_FPUTC
737 GNULIB_FPURGE
738 GNULIB_FPRINTF_POSIX
739 GNULIB_FPRINTF
740 GNULIB_FOPEN
741 GNULIB_FGETS
742 GNULIB_FGETC
743 GNULIB_FFLUSH
744 GNULIB_FDOPEN
745 GNULIB_FCLOSE
746 GNULIB_DPRINTF
747 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
748 NEXT_STDDEF_H
749 GL_GENERATE_STDDEF_H_FALSE
750 GL_GENERATE_STDDEF_H_TRUE
751 STDDEF_H
752 HAVE_WCHAR_T
753 REPLACE_NULL
754 HAVE__BOOL
755 GL_GENERATE_STDBOOL_H_FALSE
756 GL_GENERATE_STDBOOL_H_TRUE
757 STDBOOL_H
758 GL_GENERATE_STDARG_H_FALSE
759 GL_GENERATE_STDARG_H_TRUE
760 STDARG_H
761 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
762 NEXT_STDARG_H
763 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
764 NEXT_SIGNAL_H
765 REPLACE_RAISE
766 REPLACE_PTHREAD_SIGMASK
767 HAVE_SIGHANDLER_T
768 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
769 HAVE_STRUCT_SIGACTION_SA_SIGACTION
770 HAVE_SIGACTION
771 HAVE_SIGINFO_T
772 HAVE_SIGSET_T
773 HAVE_RAISE
774 HAVE_PTHREAD_SIGMASK
775 HAVE_POSIX_SIGNALBLOCKING
776 GNULIB_SIGACTION
777 GNULIB_SIGPROCMASK
778 GNULIB_SIGNAL_H_SIGPIPE
779 GNULIB_RAISE
780 GNULIB_PTHREAD_SIGMASK
781 LIB_PTHREAD_SIGMASK
782 REPLACE_TIMEGM
783 REPLACE_NANOSLEEP
784 REPLACE_MKTIME
785 REPLACE_LOCALTIME_R
786 HAVE_TIMEGM
787 HAVE_STRPTIME
788 HAVE_NANOSLEEP
789 HAVE_DECL_LOCALTIME_R
790 GNULIB_TIME_R
791 GNULIB_TIMEGM
792 GNULIB_STRPTIME
793 GNULIB_NANOSLEEP
794 GNULIB_MKTIME
795 REPLACE_UTIMENSAT
796 REPLACE_STAT
797 REPLACE_MKNOD
798 REPLACE_MKFIFO
799 REPLACE_MKDIR
800 REPLACE_LSTAT
801 REPLACE_FUTIMENS
802 REPLACE_FSTATAT
803 REPLACE_FSTAT
804 HAVE_UTIMENSAT
805 HAVE_MKNODAT
806 HAVE_MKNOD
807 HAVE_MKFIFOAT
808 HAVE_MKFIFO
809 HAVE_MKDIRAT
810 HAVE_LSTAT
811 HAVE_LCHMOD
812 HAVE_FUTIMENS
813 HAVE_FSTATAT
814 HAVE_FCHMODAT
815 GNULIB_UTIMENSAT
816 GNULIB_STAT
817 GNULIB_MKNODAT
818 GNULIB_MKNOD
819 GNULIB_MKFIFOAT
820 GNULIB_MKFIFO
821 GNULIB_MKDIRAT
822 GNULIB_LSTAT
823 GNULIB_LCHMOD
824 GNULIB_FUTIMENS
825 GNULIB_FSTATAT
826 GNULIB_FSTAT
827 GNULIB_FCHMODAT
828 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
829 NEXT_INTTYPES_H
830 UINT64_MAX_EQ_ULONG_MAX
831 UINT32_MAX_LT_UINTMAX_MAX
832 PRIPTR_PREFIX
833 PRI_MACROS_BROKEN
834 INT64_MAX_EQ_LONG_MAX
835 INT32_MAX_LT_INTMAX_MAX
836 HAVE_DECL_STRTOUMAX
837 HAVE_DECL_STRTOIMAX
838 HAVE_DECL_IMAXDIV
839 HAVE_DECL_IMAXABS
840 GNULIB_STRTOUMAX
841 GNULIB_STRTOIMAX
842 GNULIB_IMAXDIV
843 GNULIB_IMAXABS
844 GL_GENERATE_STDINT_H_FALSE
845 GL_GENERATE_STDINT_H_TRUE
846 STDINT_H
847 WINT_T_SUFFIX
848 WCHAR_T_SUFFIX
849 SIG_ATOMIC_T_SUFFIX
850 SIZE_T_SUFFIX
851 PTRDIFF_T_SUFFIX
852 HAVE_SIGNED_WINT_T
853 HAVE_SIGNED_WCHAR_T
854 HAVE_SIGNED_SIG_ATOMIC_T
855 BITSIZEOF_WINT_T
856 BITSIZEOF_WCHAR_T
857 BITSIZEOF_SIG_ATOMIC_T
858 BITSIZEOF_SIZE_T
859 BITSIZEOF_PTRDIFF_T
860 APPLE_UNIVERSAL_BUILD
861 HAVE_SYS_BITYPES_H
862 HAVE_SYS_INTTYPES_H
863 HAVE_STDINT_H
864 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
865 NEXT_STDINT_H
866 HAVE_SYS_TYPES_H
867 HAVE_INTTYPES_H
868 HAVE_WCHAR_H
869 HAVE_UNSIGNED_LONG_LONG_INT
870 HAVE_LONG_LONG_INT
871 GETOPT_H
872 HAVE_GETOPT_H
873 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
874 NEXT_GETOPT_H
875 PRAGMA_COLUMNS
876 PRAGMA_SYSTEM_HEADER
877 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
878 INCLUDE_NEXT
879 GETLOADAVG_LIBS
880 REPLACE_WCTOMB
881 REPLACE_UNSETENV
882 REPLACE_STRTOD
883 REPLACE_SETENV
884 REPLACE_REALPATH
885 REPLACE_REALLOC
886 REPLACE_PUTENV
887 REPLACE_MKSTEMP
888 REPLACE_MBTOWC
889 REPLACE_MALLOC
890 REPLACE_CANONICALIZE_FILE_NAME
891 REPLACE_CALLOC
892 HAVE_DECL_UNSETENV
893 HAVE_UNLOCKPT
894 HAVE_SYS_LOADAVG_H
895 HAVE_STRUCT_RANDOM_DATA
896 HAVE_STRTOULL
897 HAVE_STRTOLL
898 HAVE_STRTOD
899 HAVE_DECL_SETENV
900 HAVE_SETENV
901 HAVE_RPMATCH
902 HAVE_REALPATH
903 HAVE_RANDOM_R
904 HAVE_RANDOM_H
905 HAVE_PTSNAME
906 HAVE_MKSTEMPS
907 HAVE_MKSTEMP
908 HAVE_MKOSTEMPS
909 HAVE_MKOSTEMP
910 HAVE_MKDTEMP
911 HAVE_GRANTPT
912 HAVE_GETSUBOPT
913 HAVE_DECL_GETLOADAVG
914 HAVE_CANONICALIZE_FILE_NAME
915 HAVE_ATOLL
916 HAVE__EXIT
917 GNULIB_WCTOMB
918 GNULIB_UNSETENV
919 GNULIB_UNLOCKPT
920 GNULIB_SYSTEM_POSIX
921 GNULIB_STRTOULL
922 GNULIB_STRTOLL
923 GNULIB_STRTOD
924 GNULIB_SETENV
925 GNULIB_RPMATCH
926 GNULIB_REALPATH
927 GNULIB_REALLOC_POSIX
928 GNULIB_RANDOM_R
929 GNULIB_PUTENV
930 GNULIB_PTSNAME
931 GNULIB_MKSTEMPS
932 GNULIB_MKSTEMP
933 GNULIB_MKOSTEMPS
934 GNULIB_MKOSTEMP
935 GNULIB_MKDTEMP
936 GNULIB_MBTOWC
937 GNULIB_MALLOC_POSIX
938 GNULIB_GRANTPT
939 GNULIB_GETSUBOPT
940 GNULIB_GETLOADAVG
941 GNULIB_CANONICALIZE_FILE_NAME
942 GNULIB_CALLOC_POSIX
943 GNULIB_ATOLL
944 GNULIB__EXIT
945 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
946 UNISTD_H_HAVE_WINSOCK2_H
947 REPLACE_WRITE
948 REPLACE_USLEEP
949 REPLACE_UNLINKAT
950 REPLACE_UNLINK
951 REPLACE_TTYNAME_R
952 REPLACE_SYMLINK
953 REPLACE_SLEEP
954 REPLACE_RMDIR
955 REPLACE_READLINK
956 REPLACE_READ
957 REPLACE_PWRITE
958 REPLACE_PREAD
959 REPLACE_LSEEK
960 REPLACE_LINKAT
961 REPLACE_LINK
962 REPLACE_LCHOWN
963 REPLACE_GETPAGESIZE
964 REPLACE_GETGROUPS
965 REPLACE_GETLOGIN_R
966 REPLACE_GETDOMAINNAME
967 REPLACE_GETCWD
968 REPLACE_FCHOWNAT
969 REPLACE_DUP2
970 REPLACE_DUP
971 REPLACE_CLOSE
972 REPLACE_CHOWN
973 HAVE_SYS_PARAM_H
974 HAVE_OS_H
975 HAVE_DECL_TTYNAME_R
976 HAVE_DECL_GETUSERSHELL
977 HAVE_DECL_GETPAGESIZE
978 HAVE_DECL_GETLOGIN_R
979 HAVE_DECL_GETDOMAINNAME
980 HAVE_DECL_FDATASYNC
981 HAVE_DECL_FCHDIR
982 HAVE_DECL_ENVIRON
983 HAVE_USLEEP
984 HAVE_UNLINKAT
985 HAVE_SYMLINKAT
986 HAVE_SYMLINK
987 HAVE_SLEEP
988 HAVE_READLINKAT
989 HAVE_READLINK
990 HAVE_PWRITE
991 HAVE_PREAD
992 HAVE_PIPE2
993 HAVE_PIPE
994 HAVE_LINKAT
995 HAVE_LINK
996 HAVE_LCHOWN
997 HAVE_GROUP_MEMBER
998 HAVE_GETPAGESIZE
999 HAVE_GETLOGIN
1000 HAVE_GETHOSTNAME
1001 HAVE_GETGROUPS
1002 HAVE_GETDTABLESIZE
1003 HAVE_FTRUNCATE
1004 HAVE_FSYNC
1005 HAVE_FDATASYNC
1006 HAVE_FCHOWNAT
1007 HAVE_FCHDIR
1008 HAVE_FACCESSAT
1009 HAVE_EUIDACCESS
1010 HAVE_DUP3
1011 HAVE_DUP2
1012 HAVE_CHOWN
1013 GNULIB_WRITE
1014 GNULIB_USLEEP
1015 GNULIB_UNLINKAT
1016 GNULIB_UNLINK
1017 GNULIB_UNISTD_H_SIGPIPE
1018 GNULIB_UNISTD_H_NONBLOCKING
1019 GNULIB_UNISTD_H_GETOPT
1020 GNULIB_TTYNAME_R
1021 GNULIB_SYMLINKAT
1022 GNULIB_SYMLINK
1023 GNULIB_SLEEP
1024 GNULIB_RMDIR
1025 GNULIB_READLINKAT
1026 GNULIB_READLINK
1027 GNULIB_READ
1028 GNULIB_PWRITE
1029 GNULIB_PREAD
1030 GNULIB_PIPE2
1031 GNULIB_PIPE
1032 GNULIB_LSEEK
1033 GNULIB_LINKAT
1034 GNULIB_LINK
1035 GNULIB_LCHOWN
1036 GNULIB_GROUP_MEMBER
1037 GNULIB_GETUSERSHELL
1038 GNULIB_GETPAGESIZE
1039 GNULIB_GETLOGIN_R
1040 GNULIB_GETLOGIN
1041 GNULIB_GETHOSTNAME
1042 GNULIB_GETGROUPS
1043 GNULIB_GETDTABLESIZE
1044 GNULIB_GETDOMAINNAME
1045 GNULIB_GETCWD
1046 GNULIB_FTRUNCATE
1047 GNULIB_FSYNC
1048 GNULIB_FDATASYNC
1049 GNULIB_FCHOWNAT
1050 GNULIB_FCHDIR
1051 GNULIB_FACCESSAT
1052 GNULIB_EUIDACCESS
1053 GNULIB_ENVIRON
1054 GNULIB_DUP3
1055 GNULIB_DUP2
1056 GNULIB_DUP
1057 GNULIB_CLOSE
1058 GNULIB_CHOWN
1059 GNULIB_CHDIR
1060 GL_GENERATE_ALLOCA_H_FALSE
1061 GL_GENERATE_ALLOCA_H_TRUE
1062 ALLOCA_H
1063 ALLOCA
1064 GL_COND_LIBTOOL_FALSE
1065 GL_COND_LIBTOOL_TRUE
1066 POST_ALLOC_OBJ
1067 PRE_ALLOC_OBJ
1068 CYGWIN_OBJ
1069 RALLOC_OBJ
1070 OLDXMENU_DEPS
1071 LIBX_OTHER
1072 LIBXMENU
1073 OLDXMENU
1074 OLDXMENU_TARGET
1075 LIBXT_OTHER
1076 TOOLKIT_LIBW
1077 WIDGET_OBJ
1078 XOBJ
1079 XMENU_OBJ
1080 FONT_OBJ
1081 OTHER_FILES
1082 GNU_OBJC_CFLAGS
1083 ns_appsrc
1084 ns_appresdir
1085 ns_appbindir
1086 ns_appdir
1087 S_FILE
1088 M_FILE
1089 X_TOOLKIT_TYPE
1090 C_SWITCH_X_SYSTEM
1091 C_SWITCH_X_SITE
1092 LD_SWITCH_X_SITE
1093 gameuser
1094 gamedir
1095 bitmapdir
1096 archlibdir
1097 etcdir
1098 x_default_search_path
1099 lisppath
1100 locallisppath
1101 lispdir
1102 srcdir
1103 canonical
1104 configuration
1105 version
1106 KRB4LIB
1107 DESLIB
1108 KRB5LIB
1109 CRYPTOLIB
1110 COM_ERRLIB
1111 LIBRESOLV
1112 LIBHESIOD
1113 TERMCAP_OBJ
1114 LIBS_TERMCAP
1115 BLESSMAIL_TARGET
1116 LIBS_MAIL
1117 liblockfile
1118 LIBXML2_LIBS
1119 LIBXML2_CFLAGS
1120 LIBXSM
1121 LIBGPM
1122 LIBGIF
1123 LIBTIFF
1124 LIBPNG
1125 LIBJPEG
1126 LIBXPM
1127 M17N_FLT_LIBS
1128 M17N_FLT_CFLAGS
1129 LIBOTF_LIBS
1130 LIBOTF_CFLAGS
1131 FREETYPE_LIBS
1132 FREETYPE_CFLAGS
1133 XFT_LIBS
1134 XFT_CFLAGS
1135 FONTCONFIG_LIBS
1136 FONTCONFIG_CFLAGS
1137 LIBXMU
1138 LIBXTR6
1139 LIBGNUTLS_LIBS
1140 LIBGNUTLS_CFLAGS
1141 LIBSELINUX_LIBS
1142 SETTINGS_LIBS
1143 SETTINGS_CFLAGS
1144 GCONF_LIBS
1145 GCONF_CFLAGS
1146 GSETTINGS_LIBS
1147 GSETTINGS_CFLAGS
1148 DBUS_OBJ
1149 DBUS_LIBS
1150 DBUS_CFLAGS
1151 GTK_OBJ
1152 GTK_LIBS
1153 GTK_CFLAGS
1154 IMAGEMAGICK_LIBS
1155 IMAGEMAGICK_CFLAGS
1156 RSVG_LIBS
1157 RSVG_CFLAGS
1158 LIB_PTHREAD
1159 VMLIMIT_OBJ
1160 GMALLOC_OBJ
1161 HAVE_XSERVER
1162 LIB_STANDARD
1163 NS_OBJC_OBJ
1164 NS_OBJ
1165 TEMACS_LDFLAGS2
1166 LD_SWITCH_X_SITE_AUX_RPATH
1167 LD_SWITCH_X_SITE_AUX
1168 XMKMF
1169 DEPFLAGS
1170 MKDEPDIR
1171 CFLAGS_SOUND
1172 ALSA_LIBS
1173 ALSA_CFLAGS
1174 PKG_CONFIG
1175 LIBSOUND
1176 CRT_DIR
1177 START_FILES
1178 LIB_MATH
1179 LIBS_SYSTEM
1180 C_SWITCH_SYSTEM
1181 UNEXEC_OBJ
1182 C_SWITCH_MACHINE
1183 LD_SWITCH_SYSTEM
1184 CANNOT_DUMP
1185 HAVE_MAKEINFO
1186 GZIP_PROG
1187 INSTALL_INFO
1188 C_WARNINGS_SWITCH
1189 RANLIB
1190 ARFLAGS
1192 EGREP
1193 GREP
1195 am__fastdepCC_FALSE
1196 am__fastdepCC_TRUE
1197 CCDEPMODE
1198 AMDEPBACKSLASH
1199 AMDEP_FALSE
1200 AMDEP_TRUE
1201 am__quote
1202 am__include
1203 DEPDIR
1204 OBJEXT
1205 EXEEXT
1206 ac_ct_CC
1207 CPPFLAGS
1208 LDFLAGS
1209 CFLAGS
1211 host_os
1212 host_vendor
1213 host_cpu
1214 host
1215 build_os
1216 build_vendor
1217 build_cpu
1218 build
1219 PROFILING_CFLAGS
1220 MAINT
1221 GZIP_INFO
1222 cache_file
1223 am__untar
1224 am__tar
1225 AMTAR
1226 am__leading_dot
1227 SET_MAKE
1229 mkdir_p
1230 MKDIR_P
1231 INSTALL_STRIP_PROGRAM
1232 STRIP
1233 install_sh
1234 MAKEINFO
1235 AUTOHEADER
1236 AUTOMAKE
1237 AUTOCONF
1238 ACLOCAL
1239 VERSION
1240 PACKAGE
1241 CYGPATH_W
1242 am__isrc
1243 INSTALL_DATA
1244 INSTALL_SCRIPT
1245 INSTALL_PROGRAM
1246 target_alias
1247 host_alias
1248 build_alias
1249 LIBS
1250 ECHO_T
1251 ECHO_N
1252 ECHO_C
1253 DEFS
1254 mandir
1255 localedir
1256 libdir
1257 psdir
1258 pdfdir
1259 dvidir
1260 htmldir
1261 infodir
1262 docdir
1263 oldincludedir
1264 includedir
1265 localstatedir
1266 sharedstatedir
1267 sysconfdir
1268 datadir
1269 datarootdir
1270 libexecdir
1271 sbindir
1272 bindir
1273 program_transform_name
1274 prefix
1275 exec_prefix
1276 PACKAGE_URL
1277 PACKAGE_BUGREPORT
1278 PACKAGE_STRING
1279 PACKAGE_VERSION
1280 PACKAGE_TARNAME
1281 PACKAGE_NAME
1282 PATH_SEPARATOR
1283 SHELL'
1284 ac_subst_files='deps_frag
1285 lisp_frag
1286 ns_frag'
1287 ac_user_opts='
1288 enable_option_checking
1289 with_pop
1290 with_kerberos
1291 with_kerberos5
1292 with_hesiod
1293 with_mmdf
1294 with_mail_unlink
1295 with_mailhost
1296 with_sound
1297 with_sync_input
1298 with_x_toolkit
1299 with_wide_int
1300 with_xpm
1301 with_jpeg
1302 with_tiff
1303 with_gif
1304 with_png
1305 with_rsvg
1306 with_xml2
1307 with_imagemagick
1308 with_xft
1309 with_libotf
1310 with_m17n_flt
1311 with_toolkit_scroll_bars
1312 with_xaw3d
1313 with_xim
1314 with_ns
1315 with_gpm
1316 with_dbus
1317 with_gconf
1318 with_gsettings
1319 with_selinux
1320 with_gnutls
1321 with_makeinfo
1322 with_compress_info
1323 with_pkg_config_prog
1324 with_crt_dir
1325 with_gameuser
1326 with_gnustep_conf
1327 enable_ns_self_contained
1328 enable_asserts
1329 enable_maintainer_mode
1330 enable_locallisppath
1331 enable_checking
1332 enable_use_lisp_union_type
1333 enable_profiling
1334 enable_autodepend
1335 enable_dependency_tracking
1336 enable_largefile
1337 with_x
1339 ac_precious_vars='build_alias
1340 host_alias
1341 target_alias
1343 CFLAGS
1344 LDFLAGS
1345 LIBS
1346 CPPFLAGS
1348 XMKMF'
1351 # Initialize some variables set by options.
1352 ac_init_help=
1353 ac_init_version=false
1354 ac_unrecognized_opts=
1355 ac_unrecognized_sep=
1356 # The variables have the same names as the options, with
1357 # dashes changed to underlines.
1358 cache_file=/dev/null
1359 exec_prefix=NONE
1360 no_create=
1361 no_recursion=
1362 prefix=NONE
1363 program_prefix=NONE
1364 program_suffix=NONE
1365 program_transform_name=s,x,x,
1366 silent=
1367 site=
1368 srcdir=
1369 verbose=
1370 x_includes=NONE
1371 x_libraries=NONE
1373 # Installation directory options.
1374 # These are left unexpanded so users can "make install exec_prefix=/foo"
1375 # and all the variables that are supposed to be based on exec_prefix
1376 # by default will actually change.
1377 # Use braces instead of parens because sh, perl, etc. also accept them.
1378 # (The list follows the same order as the GNU Coding Standards.)
1379 bindir='${exec_prefix}/bin'
1380 sbindir='${exec_prefix}/sbin'
1381 libexecdir='${exec_prefix}/libexec'
1382 datarootdir='${prefix}/share'
1383 datadir='${datarootdir}'
1384 sysconfdir='${prefix}/etc'
1385 sharedstatedir='${prefix}/com'
1386 localstatedir='${prefix}/var'
1387 includedir='${prefix}/include'
1388 oldincludedir='/usr/include'
1389 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1390 infodir='${datarootdir}/info'
1391 htmldir='${docdir}'
1392 dvidir='${docdir}'
1393 pdfdir='${docdir}'
1394 psdir='${docdir}'
1395 libdir='${exec_prefix}/lib'
1396 localedir='${datarootdir}/locale'
1397 mandir='${datarootdir}/man'
1399 ac_prev=
1400 ac_dashdash=
1401 for ac_option
1403 # If the previous option needs an argument, assign it.
1404 if test -n "$ac_prev"; then
1405 eval $ac_prev=\$ac_option
1406 ac_prev=
1407 continue
1410 case $ac_option in
1411 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1412 *) ac_optarg=yes ;;
1413 esac
1415 # Accept the important Cygnus configure options, so we can diagnose typos.
1417 case $ac_dashdash$ac_option in
1419 ac_dashdash=yes ;;
1421 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1422 ac_prev=bindir ;;
1423 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1424 bindir=$ac_optarg ;;
1426 -build | --build | --buil | --bui | --bu)
1427 ac_prev=build_alias ;;
1428 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1429 build_alias=$ac_optarg ;;
1431 -cache-file | --cache-file | --cache-fil | --cache-fi \
1432 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1433 ac_prev=cache_file ;;
1434 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1435 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1436 cache_file=$ac_optarg ;;
1438 --config-cache | -C)
1439 cache_file=config.cache ;;
1441 -datadir | --datadir | --datadi | --datad)
1442 ac_prev=datadir ;;
1443 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1444 datadir=$ac_optarg ;;
1446 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1447 | --dataroo | --dataro | --datar)
1448 ac_prev=datarootdir ;;
1449 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1450 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1451 datarootdir=$ac_optarg ;;
1453 -disable-* | --disable-*)
1454 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1455 # Reject names that are not valid shell variable names.
1456 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1457 as_fn_error "invalid feature name: $ac_useropt"
1458 ac_useropt_orig=$ac_useropt
1459 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1460 case $ac_user_opts in
1462 "enable_$ac_useropt"
1463 "*) ;;
1464 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1465 ac_unrecognized_sep=', ';;
1466 esac
1467 eval enable_$ac_useropt=no ;;
1469 -docdir | --docdir | --docdi | --doc | --do)
1470 ac_prev=docdir ;;
1471 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1472 docdir=$ac_optarg ;;
1474 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1475 ac_prev=dvidir ;;
1476 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1477 dvidir=$ac_optarg ;;
1479 -enable-* | --enable-*)
1480 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1481 # Reject names that are not valid shell variable names.
1482 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1483 as_fn_error "invalid feature name: $ac_useropt"
1484 ac_useropt_orig=$ac_useropt
1485 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1486 case $ac_user_opts in
1488 "enable_$ac_useropt"
1489 "*) ;;
1490 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1491 ac_unrecognized_sep=', ';;
1492 esac
1493 eval enable_$ac_useropt=\$ac_optarg ;;
1495 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1496 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1497 | --exec | --exe | --ex)
1498 ac_prev=exec_prefix ;;
1499 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1500 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1501 | --exec=* | --exe=* | --ex=*)
1502 exec_prefix=$ac_optarg ;;
1504 -gas | --gas | --ga | --g)
1505 # Obsolete; use --with-gas.
1506 with_gas=yes ;;
1508 -help | --help | --hel | --he | -h)
1509 ac_init_help=long ;;
1510 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1511 ac_init_help=recursive ;;
1512 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1513 ac_init_help=short ;;
1515 -host | --host | --hos | --ho)
1516 ac_prev=host_alias ;;
1517 -host=* | --host=* | --hos=* | --ho=*)
1518 host_alias=$ac_optarg ;;
1520 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1521 ac_prev=htmldir ;;
1522 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1523 | --ht=*)
1524 htmldir=$ac_optarg ;;
1526 -includedir | --includedir | --includedi | --included | --include \
1527 | --includ | --inclu | --incl | --inc)
1528 ac_prev=includedir ;;
1529 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1530 | --includ=* | --inclu=* | --incl=* | --inc=*)
1531 includedir=$ac_optarg ;;
1533 -infodir | --infodir | --infodi | --infod | --info | --inf)
1534 ac_prev=infodir ;;
1535 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1536 infodir=$ac_optarg ;;
1538 -libdir | --libdir | --libdi | --libd)
1539 ac_prev=libdir ;;
1540 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1541 libdir=$ac_optarg ;;
1543 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1544 | --libexe | --libex | --libe)
1545 ac_prev=libexecdir ;;
1546 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1547 | --libexe=* | --libex=* | --libe=*)
1548 libexecdir=$ac_optarg ;;
1550 -localedir | --localedir | --localedi | --localed | --locale)
1551 ac_prev=localedir ;;
1552 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1553 localedir=$ac_optarg ;;
1555 -localstatedir | --localstatedir | --localstatedi | --localstated \
1556 | --localstate | --localstat | --localsta | --localst | --locals)
1557 ac_prev=localstatedir ;;
1558 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1559 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1560 localstatedir=$ac_optarg ;;
1562 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1563 ac_prev=mandir ;;
1564 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1565 mandir=$ac_optarg ;;
1567 -nfp | --nfp | --nf)
1568 # Obsolete; use --without-fp.
1569 with_fp=no ;;
1571 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1572 | --no-cr | --no-c | -n)
1573 no_create=yes ;;
1575 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1576 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1577 no_recursion=yes ;;
1579 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1580 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1581 | --oldin | --oldi | --old | --ol | --o)
1582 ac_prev=oldincludedir ;;
1583 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1584 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1585 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1586 oldincludedir=$ac_optarg ;;
1588 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1589 ac_prev=prefix ;;
1590 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1591 prefix=$ac_optarg ;;
1593 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1594 | --program-pre | --program-pr | --program-p)
1595 ac_prev=program_prefix ;;
1596 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1597 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1598 program_prefix=$ac_optarg ;;
1600 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1601 | --program-suf | --program-su | --program-s)
1602 ac_prev=program_suffix ;;
1603 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1604 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1605 program_suffix=$ac_optarg ;;
1607 -program-transform-name | --program-transform-name \
1608 | --program-transform-nam | --program-transform-na \
1609 | --program-transform-n | --program-transform- \
1610 | --program-transform | --program-transfor \
1611 | --program-transfo | --program-transf \
1612 | --program-trans | --program-tran \
1613 | --progr-tra | --program-tr | --program-t)
1614 ac_prev=program_transform_name ;;
1615 -program-transform-name=* | --program-transform-name=* \
1616 | --program-transform-nam=* | --program-transform-na=* \
1617 | --program-transform-n=* | --program-transform-=* \
1618 | --program-transform=* | --program-transfor=* \
1619 | --program-transfo=* | --program-transf=* \
1620 | --program-trans=* | --program-tran=* \
1621 | --progr-tra=* | --program-tr=* | --program-t=*)
1622 program_transform_name=$ac_optarg ;;
1624 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1625 ac_prev=pdfdir ;;
1626 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1627 pdfdir=$ac_optarg ;;
1629 -psdir | --psdir | --psdi | --psd | --ps)
1630 ac_prev=psdir ;;
1631 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1632 psdir=$ac_optarg ;;
1634 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1635 | -silent | --silent | --silen | --sile | --sil)
1636 silent=yes ;;
1638 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1639 ac_prev=sbindir ;;
1640 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1641 | --sbi=* | --sb=*)
1642 sbindir=$ac_optarg ;;
1644 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1645 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1646 | --sharedst | --shareds | --shared | --share | --shar \
1647 | --sha | --sh)
1648 ac_prev=sharedstatedir ;;
1649 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1650 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1651 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1652 | --sha=* | --sh=*)
1653 sharedstatedir=$ac_optarg ;;
1655 -site | --site | --sit)
1656 ac_prev=site ;;
1657 -site=* | --site=* | --sit=*)
1658 site=$ac_optarg ;;
1660 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1661 ac_prev=srcdir ;;
1662 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1663 srcdir=$ac_optarg ;;
1665 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1666 | --syscon | --sysco | --sysc | --sys | --sy)
1667 ac_prev=sysconfdir ;;
1668 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1669 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1670 sysconfdir=$ac_optarg ;;
1672 -target | --target | --targe | --targ | --tar | --ta | --t)
1673 ac_prev=target_alias ;;
1674 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1675 target_alias=$ac_optarg ;;
1677 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1678 verbose=yes ;;
1680 -version | --version | --versio | --versi | --vers | -V)
1681 ac_init_version=: ;;
1683 -with-* | --with-*)
1684 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1685 # Reject names that are not valid shell variable names.
1686 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1687 as_fn_error "invalid package name: $ac_useropt"
1688 ac_useropt_orig=$ac_useropt
1689 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1690 case $ac_user_opts in
1692 "with_$ac_useropt"
1693 "*) ;;
1694 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1695 ac_unrecognized_sep=', ';;
1696 esac
1697 eval with_$ac_useropt=\$ac_optarg ;;
1699 -without-* | --without-*)
1700 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1701 # Reject names that are not valid shell variable names.
1702 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1703 as_fn_error "invalid package name: $ac_useropt"
1704 ac_useropt_orig=$ac_useropt
1705 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1706 case $ac_user_opts in
1708 "with_$ac_useropt"
1709 "*) ;;
1710 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1711 ac_unrecognized_sep=', ';;
1712 esac
1713 eval with_$ac_useropt=no ;;
1715 --x)
1716 # Obsolete; use --with-x.
1717 with_x=yes ;;
1719 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1720 | --x-incl | --x-inc | --x-in | --x-i)
1721 ac_prev=x_includes ;;
1722 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1723 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1724 x_includes=$ac_optarg ;;
1726 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1727 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1728 ac_prev=x_libraries ;;
1729 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1730 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1731 x_libraries=$ac_optarg ;;
1733 -*) as_fn_error "unrecognized option: \`$ac_option'
1734 Try \`$0 --help' for more information."
1737 *=*)
1738 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1739 # Reject names that are not valid shell variable names.
1740 case $ac_envvar in #(
1741 '' | [0-9]* | *[!_$as_cr_alnum]* )
1742 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1743 esac
1744 eval $ac_envvar=\$ac_optarg
1745 export $ac_envvar ;;
1748 # FIXME: should be removed in autoconf 3.0.
1749 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1750 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1751 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1752 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1755 esac
1756 done
1758 if test -n "$ac_prev"; then
1759 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1760 as_fn_error "missing argument to $ac_option"
1763 if test -n "$ac_unrecognized_opts"; then
1764 case $enable_option_checking in
1765 no) ;;
1766 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1767 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1768 esac
1771 # Check all directory arguments for consistency.
1772 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1773 datadir sysconfdir sharedstatedir localstatedir includedir \
1774 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1775 libdir localedir mandir
1777 eval ac_val=\$$ac_var
1778 # Remove trailing slashes.
1779 case $ac_val in
1780 */ )
1781 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1782 eval $ac_var=\$ac_val;;
1783 esac
1784 # Be sure to have absolute directory names.
1785 case $ac_val in
1786 [\\/$]* | ?:[\\/]* ) continue;;
1787 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1788 esac
1789 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1790 done
1792 # There might be people who depend on the old broken behavior: `$host'
1793 # used to hold the argument of --host etc.
1794 # FIXME: To remove some day.
1795 build=$build_alias
1796 host=$host_alias
1797 target=$target_alias
1799 # FIXME: To remove some day.
1800 if test "x$host_alias" != x; then
1801 if test "x$build_alias" = x; then
1802 cross_compiling=maybe
1803 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1804 If a cross compiler is detected then cross compile mode will be used." >&2
1805 elif test "x$build_alias" != "x$host_alias"; then
1806 cross_compiling=yes
1810 ac_tool_prefix=
1811 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1813 test "$silent" = yes && exec 6>/dev/null
1816 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1817 ac_ls_di=`ls -di .` &&
1818 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1819 as_fn_error "working directory cannot be determined"
1820 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1821 as_fn_error "pwd does not report name of working directory"
1824 # Find the source files, if location was not specified.
1825 if test -z "$srcdir"; then
1826 ac_srcdir_defaulted=yes
1827 # Try the directory containing this script, then the parent directory.
1828 ac_confdir=`$as_dirname -- "$as_myself" ||
1829 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1830 X"$as_myself" : 'X\(//\)[^/]' \| \
1831 X"$as_myself" : 'X\(//\)$' \| \
1832 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1833 $as_echo X"$as_myself" |
1834 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1835 s//\1/
1838 /^X\(\/\/\)[^/].*/{
1839 s//\1/
1842 /^X\(\/\/\)$/{
1843 s//\1/
1846 /^X\(\/\).*/{
1847 s//\1/
1850 s/.*/./; q'`
1851 srcdir=$ac_confdir
1852 if test ! -r "$srcdir/$ac_unique_file"; then
1853 srcdir=..
1855 else
1856 ac_srcdir_defaulted=no
1858 if test ! -r "$srcdir/$ac_unique_file"; then
1859 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1860 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1862 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1863 ac_abs_confdir=`(
1864 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1865 pwd)`
1866 # When building in place, set srcdir=.
1867 if test "$ac_abs_confdir" = "$ac_pwd"; then
1868 srcdir=.
1870 # Remove unnecessary trailing slashes from srcdir.
1871 # Double slashes in file names in object file debugging info
1872 # mess up M-x gdb in Emacs.
1873 case $srcdir in
1874 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1875 esac
1876 for ac_var in $ac_precious_vars; do
1877 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1878 eval ac_env_${ac_var}_value=\$${ac_var}
1879 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1880 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1881 done
1884 # Report the --help message.
1886 if test "$ac_init_help" = "long"; then
1887 # Omit some internal or obsolete options to make the list less imposing.
1888 # This message is too long to be a string in the A/UX 3.1 sh.
1889 cat <<_ACEOF
1890 \`configure' configures emacs 24.1 to adapt to many kinds of systems.
1892 Usage: $0 [OPTION]... [VAR=VALUE]...
1894 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1895 VAR=VALUE. See below for descriptions of some of the useful variables.
1897 Defaults for the options are specified in brackets.
1899 Configuration:
1900 -h, --help display this help and exit
1901 --help=short display options specific to this package
1902 --help=recursive display the short help of all the included packages
1903 -V, --version display version information and exit
1904 -q, --quiet, --silent do not print \`checking...' messages
1905 --cache-file=FILE cache test results in FILE [disabled]
1906 -C, --config-cache alias for \`--cache-file=config.cache'
1907 -n, --no-create do not create output files
1908 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1910 Installation directories:
1911 --prefix=PREFIX install architecture-independent files in PREFIX
1912 [$ac_default_prefix]
1913 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1914 [PREFIX]
1916 By default, \`make install' will install all the files in
1917 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1918 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1919 for instance \`--prefix=\$HOME'.
1921 For better control, use the options below.
1923 Fine tuning of the installation directories:
1924 --bindir=DIR user executables [EPREFIX/bin]
1925 --sbindir=DIR system admin executables [EPREFIX/sbin]
1926 --libexecdir=DIR program executables [EPREFIX/libexec]
1927 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1928 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1929 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1930 --libdir=DIR object code libraries [EPREFIX/lib]
1931 --includedir=DIR C header files [PREFIX/include]
1932 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1933 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1934 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1935 --infodir=DIR info documentation [DATAROOTDIR/info]
1936 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1937 --mandir=DIR man documentation [DATAROOTDIR/man]
1938 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1939 --htmldir=DIR html documentation [DOCDIR]
1940 --dvidir=DIR dvi documentation [DOCDIR]
1941 --pdfdir=DIR pdf documentation [DOCDIR]
1942 --psdir=DIR ps documentation [DOCDIR]
1943 _ACEOF
1945 cat <<\_ACEOF
1947 Program names:
1948 --program-prefix=PREFIX prepend PREFIX to installed program names
1949 --program-suffix=SUFFIX append SUFFIX to installed program names
1950 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1952 X features:
1953 --x-includes=DIR X include files are in DIR
1954 --x-libraries=DIR X library files are in DIR
1956 System types:
1957 --build=BUILD configure for building on BUILD [guessed]
1958 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1959 _ACEOF
1962 if test -n "$ac_init_help"; then
1963 case $ac_init_help in
1964 short | recursive ) echo "Configuration of emacs 24.1:";;
1965 esac
1966 cat <<\_ACEOF
1968 Optional Features:
1969 --disable-option-checking ignore unrecognized --enable/--with options
1970 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1971 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1972 --disable-ns-self-contained
1973 disable self contained build under NeXTstep
1974 --enable-asserts compile code with asserts enabled
1975 --disable-maintainer-mode
1976 disable make rules and dependencies not useful (and
1977 sometimes confusing) to the casual installer
1978 --enable-locallisppath=PATH
1979 directories Emacs should search for lisp files
1980 specific to this site
1981 --enable-checking[=LIST]
1982 enable expensive run-time checks. With LIST, enable
1983 only specific categories of checks. Categories are:
1984 all,yes,no. Flags are: stringbytes, stringoverrun,
1985 stringfreelist, xmallocoverrun, conslist
1986 --enable-use-lisp-union-type
1987 use a union for the Lisp_Object data type. This is
1988 only useful for development for catching certain
1989 types of bugs.
1990 --enable-profiling build emacs with profiling support. This might not
1991 work on all platforms
1992 --enable-autodepend automatically generate dependencies to .h-files.
1993 Requires GNU Make and Gcc. Enabled if GNU Make and
1994 Gcc is found
1995 --disable-dependency-tracking speeds up one-time build
1996 --enable-dependency-tracking do not reject slow dependency extractors
1997 --disable-largefile omit support for large files
1999 Optional Packages:
2000 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2001 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2002 --without-pop don't support POP mail retrieval with movemail
2003 --with-kerberos support Kerberos-authenticated POP
2004 --with-kerberos5 support Kerberos version 5 authenticated POP
2005 --with-hesiod support Hesiod to get the POP server host
2006 --with-mmdf support MMDF mailboxes
2007 --with-mail-unlink unlink, rather than empty, mail spool after reading
2008 --with-mailhost=HOSTNAME
2009 string giving default POP mail host
2010 --without-sound don't compile with sound support
2011 --without-sync-input process async input synchronously
2012 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
2013 lucid or athena, motif, no)
2014 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2015 --without-xpm don't compile with XPM image support
2016 --without-jpeg don't compile with JPEG image support
2017 --without-tiff don't compile with TIFF image support
2018 --without-gif don't compile with GIF image support
2019 --without-png don't compile with PNG image support
2020 --without-rsvg don't compile with SVG image support
2021 --without-xml2 don't compile with XML parsing support
2022 --without-imagemagick don't compile with ImageMagick image support
2023 --without-xft don't use XFT for anti aliased fonts
2024 --without-libotf don't use libotf for OpenType font support
2025 --without-m17n-flt don't use m17n-flt for text shaping
2026 --without-toolkit-scroll-bars
2027 don't use Motif or Xaw3d scroll bars
2028 --without-xaw3d don't use Xaw3d
2029 --without-xim don't use X11 XIM
2030 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2031 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2032 console
2033 --without-dbus don't compile with D-Bus support
2034 --without-gconf don't compile with GConf support
2035 --without-gsettings don't compile with GSettings support
2036 --without-selinux don't compile with SELinux support
2037 --without-gnutls don't use -lgnutls for SSL/TLS support
2038 --without-makeinfo don't require makeinfo for building manuals
2039 --without-compress-info don't compress the installed Info pages
2040 --with-pkg-config-prog=PATH
2041 path to pkg-config for finding GTK and librsvg
2042 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2043 /usr/lib, or /usr/lib64 on some platforms.
2044 --with-gameuser=USER user for shared game score files
2045 --with-gnustep-conf=PATH
2046 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2047 or /etc/GNUstep/GNUstep.conf
2048 --with-x use the X Window System
2050 Some influential environment variables:
2051 CC C compiler command
2052 CFLAGS C compiler flags
2053 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2054 nonstandard directory <lib dir>
2055 LIBS libraries to pass to the linker, e.g. -l<library>
2056 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2057 you have headers in a nonstandard directory <include dir>
2058 CPP C preprocessor
2059 XMKMF Path to xmkmf, Makefile generator for X Window System
2061 Use these variables to override the choices made by `configure' or to help
2062 it to find libraries and programs with nonstandard names/locations.
2064 Report bugs to the package provider.
2065 _ACEOF
2066 ac_status=$?
2069 if test "$ac_init_help" = "recursive"; then
2070 # If there are subdirs, report their specific --help.
2071 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2072 test -d "$ac_dir" ||
2073 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2074 continue
2075 ac_builddir=.
2077 case "$ac_dir" in
2078 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2080 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2081 # A ".." for each directory in $ac_dir_suffix.
2082 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2083 case $ac_top_builddir_sub in
2084 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2085 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2086 esac ;;
2087 esac
2088 ac_abs_top_builddir=$ac_pwd
2089 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2090 # for backward compatibility:
2091 ac_top_builddir=$ac_top_build_prefix
2093 case $srcdir in
2094 .) # We are building in place.
2095 ac_srcdir=.
2096 ac_top_srcdir=$ac_top_builddir_sub
2097 ac_abs_top_srcdir=$ac_pwd ;;
2098 [\\/]* | ?:[\\/]* ) # Absolute name.
2099 ac_srcdir=$srcdir$ac_dir_suffix;
2100 ac_top_srcdir=$srcdir
2101 ac_abs_top_srcdir=$srcdir ;;
2102 *) # Relative name.
2103 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2104 ac_top_srcdir=$ac_top_build_prefix$srcdir
2105 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2106 esac
2107 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2109 cd "$ac_dir" || { ac_status=$?; continue; }
2110 # Check for guested configure.
2111 if test -f "$ac_srcdir/configure.gnu"; then
2112 echo &&
2113 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2114 elif test -f "$ac_srcdir/configure"; then
2115 echo &&
2116 $SHELL "$ac_srcdir/configure" --help=recursive
2117 else
2118 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2119 fi || ac_status=$?
2120 cd "$ac_pwd" || { ac_status=$?; break; }
2121 done
2124 test -n "$ac_init_help" && exit $ac_status
2125 if $ac_init_version; then
2126 cat <<\_ACEOF
2127 emacs configure 24.1
2128 generated by GNU Autoconf 2.65
2130 Copyright (C) 2009 Free Software Foundation, Inc.
2131 This configure script is free software; the Free Software Foundation
2132 gives unlimited permission to copy, distribute and modify it.
2133 _ACEOF
2134 exit
2137 ## ------------------------ ##
2138 ## Autoconf initialization. ##
2139 ## ------------------------ ##
2141 # ac_fn_c_try_compile LINENO
2142 # --------------------------
2143 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2144 ac_fn_c_try_compile ()
2146 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2147 rm -f conftest.$ac_objext
2148 if { { ac_try="$ac_compile"
2149 case "(($ac_try" in
2150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2151 *) ac_try_echo=$ac_try;;
2152 esac
2153 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2154 $as_echo "$ac_try_echo"; } >&5
2155 (eval "$ac_compile") 2>conftest.err
2156 ac_status=$?
2157 if test -s conftest.err; then
2158 grep -v '^ *+' conftest.err >conftest.er1
2159 cat conftest.er1 >&5
2160 mv -f conftest.er1 conftest.err
2162 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2163 test $ac_status = 0; } && {
2164 test -z "$ac_c_werror_flag" ||
2165 test ! -s conftest.err
2166 } && test -s conftest.$ac_objext; then :
2167 ac_retval=0
2168 else
2169 $as_echo "$as_me: failed program was:" >&5
2170 sed 's/^/| /' conftest.$ac_ext >&5
2172 ac_retval=1
2174 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2175 as_fn_set_status $ac_retval
2177 } # ac_fn_c_try_compile
2179 # ac_fn_c_try_cpp LINENO
2180 # ----------------------
2181 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2182 ac_fn_c_try_cpp ()
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 if { { ac_try="$ac_cpp conftest.$ac_ext"
2186 case "(($ac_try" in
2187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2188 *) ac_try_echo=$ac_try;;
2189 esac
2190 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2191 $as_echo "$ac_try_echo"; } >&5
2192 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2193 ac_status=$?
2194 if test -s conftest.err; then
2195 grep -v '^ *+' conftest.err >conftest.er1
2196 cat conftest.er1 >&5
2197 mv -f conftest.er1 conftest.err
2199 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2200 test $ac_status = 0; } >/dev/null && {
2201 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2202 test ! -s conftest.err
2203 }; then :
2204 ac_retval=0
2205 else
2206 $as_echo "$as_me: failed program was:" >&5
2207 sed 's/^/| /' conftest.$ac_ext >&5
2209 ac_retval=1
2211 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2212 as_fn_set_status $ac_retval
2214 } # ac_fn_c_try_cpp
2216 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2217 # -------------------------------------------------------
2218 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2219 # the include files in INCLUDES and setting the cache variable VAR
2220 # accordingly.
2221 ac_fn_c_check_header_mongrel ()
2223 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2226 $as_echo_n "checking for $2... " >&6; }
2227 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2228 $as_echo_n "(cached) " >&6
2230 eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232 $as_echo "$ac_res" >&6; }
2233 else
2234 # Is the header compilable?
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2236 $as_echo_n "checking $2 usability... " >&6; }
2237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238 /* end confdefs.h. */
2240 #include <$2>
2241 _ACEOF
2242 if ac_fn_c_try_compile "$LINENO"; then :
2243 ac_header_compiler=yes
2244 else
2245 ac_header_compiler=no
2247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2249 $as_echo "$ac_header_compiler" >&6; }
2251 # Is the header present?
2252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2253 $as_echo_n "checking $2 presence... " >&6; }
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255 /* end confdefs.h. */
2256 #include <$2>
2257 _ACEOF
2258 if ac_fn_c_try_cpp "$LINENO"; then :
2259 ac_header_preproc=yes
2260 else
2261 ac_header_preproc=no
2263 rm -f conftest.err conftest.$ac_ext
2264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2265 $as_echo "$ac_header_preproc" >&6; }
2267 # So? What about this header?
2268 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2269 yes:no: )
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2271 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2273 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2275 no:yes:* )
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2277 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2279 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2281 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2283 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2285 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2287 esac
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2289 $as_echo_n "checking for $2... " >&6; }
2290 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2291 $as_echo_n "(cached) " >&6
2292 else
2293 eval "$3=\$ac_header_compiler"
2295 eval ac_res=\$$3
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297 $as_echo "$ac_res" >&6; }
2299 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2301 } # ac_fn_c_check_header_mongrel
2303 # ac_fn_c_try_run LINENO
2304 # ----------------------
2305 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2306 # that executables *can* be run.
2307 ac_fn_c_try_run ()
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310 if { { ac_try="$ac_link"
2311 case "(($ac_try" in
2312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313 *) ac_try_echo=$ac_try;;
2314 esac
2315 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316 $as_echo "$ac_try_echo"; } >&5
2317 (eval "$ac_link") 2>&5
2318 ac_status=$?
2319 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2320 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2321 { { case "(($ac_try" in
2322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2323 *) ac_try_echo=$ac_try;;
2324 esac
2325 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2326 $as_echo "$ac_try_echo"; } >&5
2327 (eval "$ac_try") 2>&5
2328 ac_status=$?
2329 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2330 test $ac_status = 0; }; }; then :
2331 ac_retval=0
2332 else
2333 $as_echo "$as_me: program exited with status $ac_status" >&5
2334 $as_echo "$as_me: failed program was:" >&5
2335 sed 's/^/| /' conftest.$ac_ext >&5
2337 ac_retval=$ac_status
2339 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2340 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2341 as_fn_set_status $ac_retval
2343 } # ac_fn_c_try_run
2345 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2346 # -------------------------------------------------------
2347 # Tests whether HEADER exists and can be compiled using the include files in
2348 # INCLUDES, setting the cache variable VAR accordingly.
2349 ac_fn_c_check_header_compile ()
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2353 $as_echo_n "checking for $2... " >&6; }
2354 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2355 $as_echo_n "(cached) " >&6
2356 else
2357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358 /* end confdefs.h. */
2360 #include <$2>
2361 _ACEOF
2362 if ac_fn_c_try_compile "$LINENO"; then :
2363 eval "$3=yes"
2364 else
2365 eval "$3=no"
2367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369 eval ac_res=\$$3
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2371 $as_echo "$ac_res" >&6; }
2372 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2374 } # ac_fn_c_check_header_compile
2376 # ac_fn_c_try_link LINENO
2377 # -----------------------
2378 # Try to link conftest.$ac_ext, and return whether this succeeded.
2379 ac_fn_c_try_link ()
2381 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2382 rm -f conftest.$ac_objext conftest$ac_exeext
2383 if { { ac_try="$ac_link"
2384 case "(($ac_try" in
2385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2386 *) ac_try_echo=$ac_try;;
2387 esac
2388 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2389 $as_echo "$ac_try_echo"; } >&5
2390 (eval "$ac_link") 2>conftest.err
2391 ac_status=$?
2392 if test -s conftest.err; then
2393 grep -v '^ *+' conftest.err >conftest.er1
2394 cat conftest.er1 >&5
2395 mv -f conftest.er1 conftest.err
2397 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2398 test $ac_status = 0; } && {
2399 test -z "$ac_c_werror_flag" ||
2400 test ! -s conftest.err
2401 } && test -s conftest$ac_exeext && {
2402 test "$cross_compiling" = yes ||
2403 $as_test_x conftest$ac_exeext
2404 }; then :
2405 ac_retval=0
2406 else
2407 $as_echo "$as_me: failed program was:" >&5
2408 sed 's/^/| /' conftest.$ac_ext >&5
2410 ac_retval=1
2412 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2413 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2414 # interfere with the next link command; also delete a directory that is
2415 # left behind by Apple's compiler. We do this before executing the actions.
2416 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2417 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2418 as_fn_set_status $ac_retval
2420 } # ac_fn_c_try_link
2422 # ac_fn_c_check_decl LINENO SYMBOL VAR
2423 # ------------------------------------
2424 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2425 ac_fn_c_check_decl ()
2427 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2429 $as_echo_n "checking whether $2 is declared... " >&6; }
2430 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2431 $as_echo_n "(cached) " >&6
2432 else
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434 /* end confdefs.h. */
2437 main ()
2439 #ifndef $2
2440 (void) $2;
2441 #endif
2444 return 0;
2446 _ACEOF
2447 if ac_fn_c_try_compile "$LINENO"; then :
2448 eval "$3=yes"
2449 else
2450 eval "$3=no"
2452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454 eval ac_res=\$$3
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456 $as_echo "$ac_res" >&6; }
2457 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2459 } # ac_fn_c_check_decl
2461 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2462 # ----------------------------------------------
2463 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2464 ac_fn_c_check_header_preproc ()
2466 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2468 $as_echo_n "checking for $2... " >&6; }
2469 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2470 $as_echo_n "(cached) " >&6
2471 else
2472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2473 /* end confdefs.h. */
2474 #include <$2>
2475 _ACEOF
2476 if ac_fn_c_try_cpp "$LINENO"; then :
2477 eval "$3=yes"
2478 else
2479 eval "$3=no"
2481 rm -f conftest.err conftest.$ac_ext
2483 eval ac_res=\$$3
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2485 $as_echo "$ac_res" >&6; }
2486 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2488 } # ac_fn_c_check_header_preproc
2490 # ac_fn_c_check_func LINENO FUNC VAR
2491 # ----------------------------------
2492 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2493 ac_fn_c_check_func ()
2495 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2497 $as_echo_n "checking for $2... " >&6; }
2498 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2499 $as_echo_n "(cached) " >&6
2500 else
2501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2502 /* end confdefs.h. */
2503 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2504 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2505 #define $2 innocuous_$2
2507 /* System header to define __stub macros and hopefully few prototypes,
2508 which can conflict with char $2 (); below.
2509 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2510 <limits.h> exists even on freestanding compilers. */
2512 #ifdef __STDC__
2513 # include <limits.h>
2514 #else
2515 # include <assert.h>
2516 #endif
2518 #undef $2
2520 /* Override any GCC internal prototype to avoid an error.
2521 Use char because int might match the return type of a GCC
2522 builtin and then its argument prototype would still apply. */
2523 #ifdef __cplusplus
2524 extern "C"
2525 #endif
2526 char $2 ();
2527 /* The GNU C library defines this for functions which it implements
2528 to always fail with ENOSYS. Some functions are actually named
2529 something starting with __ and the normal name is an alias. */
2530 #if defined __stub_$2 || defined __stub___$2
2531 choke me
2532 #endif
2535 main ()
2537 return $2 ();
2539 return 0;
2541 _ACEOF
2542 if ac_fn_c_try_link "$LINENO"; then :
2543 eval "$3=yes"
2544 else
2545 eval "$3=no"
2547 rm -f core conftest.err conftest.$ac_objext \
2548 conftest$ac_exeext conftest.$ac_ext
2550 eval ac_res=\$$3
2551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2552 $as_echo "$ac_res" >&6; }
2553 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2555 } # ac_fn_c_check_func
2557 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2558 # ----------------------------------------------------
2559 # Tries to find if the field MEMBER exists in type AGGR, after including
2560 # INCLUDES, setting cache variable VAR accordingly.
2561 ac_fn_c_check_member ()
2563 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2565 $as_echo_n "checking for $2.$3... " >&6; }
2566 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2567 $as_echo_n "(cached) " >&6
2568 else
2569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570 /* end confdefs.h. */
2573 main ()
2575 static $2 ac_aggr;
2576 if (ac_aggr.$3)
2577 return 0;
2579 return 0;
2581 _ACEOF
2582 if ac_fn_c_try_compile "$LINENO"; then :
2583 eval "$4=yes"
2584 else
2585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2586 /* end confdefs.h. */
2589 main ()
2591 static $2 ac_aggr;
2592 if (sizeof ac_aggr.$3)
2593 return 0;
2595 return 0;
2597 _ACEOF
2598 if ac_fn_c_try_compile "$LINENO"; then :
2599 eval "$4=yes"
2600 else
2601 eval "$4=no"
2603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2607 eval ac_res=\$$4
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2609 $as_echo "$ac_res" >&6; }
2610 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2612 } # ac_fn_c_check_member
2614 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2615 # -------------------------------------------
2616 # Tests whether TYPE exists after having included INCLUDES, setting cache
2617 # variable VAR accordingly.
2618 ac_fn_c_check_type ()
2620 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2622 $as_echo_n "checking for $2... " >&6; }
2623 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2624 $as_echo_n "(cached) " >&6
2625 else
2626 eval "$3=no"
2627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628 /* end confdefs.h. */
2631 main ()
2633 if (sizeof ($2))
2634 return 0;
2636 return 0;
2638 _ACEOF
2639 if ac_fn_c_try_compile "$LINENO"; then :
2640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2641 /* end confdefs.h. */
2644 main ()
2646 if (sizeof (($2)))
2647 return 0;
2649 return 0;
2651 _ACEOF
2652 if ac_fn_c_try_compile "$LINENO"; then :
2654 else
2655 eval "$3=yes"
2657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2661 eval ac_res=\$$3
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2663 $as_echo "$ac_res" >&6; }
2664 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2666 } # ac_fn_c_check_type
2668 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2669 # --------------------------------------------
2670 # Tries to find the compile-time value of EXPR in a program that includes
2671 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2672 # computed
2673 ac_fn_c_compute_int ()
2675 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2676 if test "$cross_compiling" = yes; then
2677 # Depending upon the size, compute the lo and hi bounds.
2678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679 /* end confdefs.h. */
2682 main ()
2684 static int test_array [1 - 2 * !(($2) >= 0)];
2685 test_array [0] = 0
2688 return 0;
2690 _ACEOF
2691 if ac_fn_c_try_compile "$LINENO"; then :
2692 ac_lo=0 ac_mid=0
2693 while :; do
2694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695 /* end confdefs.h. */
2698 main ()
2700 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2701 test_array [0] = 0
2704 return 0;
2706 _ACEOF
2707 if ac_fn_c_try_compile "$LINENO"; then :
2708 ac_hi=$ac_mid; break
2709 else
2710 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2711 if test $ac_lo -le $ac_mid; then
2712 ac_lo= ac_hi=
2713 break
2715 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2718 done
2719 else
2720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2721 /* end confdefs.h. */
2724 main ()
2726 static int test_array [1 - 2 * !(($2) < 0)];
2727 test_array [0] = 0
2730 return 0;
2732 _ACEOF
2733 if ac_fn_c_try_compile "$LINENO"; then :
2734 ac_hi=-1 ac_mid=-1
2735 while :; do
2736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2737 /* end confdefs.h. */
2740 main ()
2742 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2743 test_array [0] = 0
2746 return 0;
2748 _ACEOF
2749 if ac_fn_c_try_compile "$LINENO"; then :
2750 ac_lo=$ac_mid; break
2751 else
2752 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2753 if test $ac_mid -le $ac_hi; then
2754 ac_lo= ac_hi=
2755 break
2757 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2760 done
2761 else
2762 ac_lo= ac_hi=
2764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2767 # Binary search between lo and hi bounds.
2768 while test "x$ac_lo" != "x$ac_hi"; do
2769 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2771 /* end confdefs.h. */
2774 main ()
2776 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2777 test_array [0] = 0
2780 return 0;
2782 _ACEOF
2783 if ac_fn_c_try_compile "$LINENO"; then :
2784 ac_hi=$ac_mid
2785 else
2786 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2789 done
2790 case $ac_lo in #((
2791 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2792 '') ac_retval=1 ;;
2793 esac
2794 else
2795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2796 /* end confdefs.h. */
2798 static long int longval () { return $2; }
2799 static unsigned long int ulongval () { return $2; }
2800 #include <stdio.h>
2801 #include <stdlib.h>
2803 main ()
2806 FILE *f = fopen ("conftest.val", "w");
2807 if (! f)
2808 return 1;
2809 if (($2) < 0)
2811 long int i = longval ();
2812 if (i != ($2))
2813 return 1;
2814 fprintf (f, "%ld", i);
2816 else
2818 unsigned long int i = ulongval ();
2819 if (i != ($2))
2820 return 1;
2821 fprintf (f, "%lu", i);
2823 /* Do not output a trailing newline, as this causes \r\n confusion
2824 on some platforms. */
2825 return ferror (f) || fclose (f) != 0;
2828 return 0;
2830 _ACEOF
2831 if ac_fn_c_try_run "$LINENO"; then :
2832 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2833 else
2834 ac_retval=1
2836 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2837 conftest.$ac_objext conftest.beam conftest.$ac_ext
2838 rm -f conftest.val
2841 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2842 as_fn_set_status $ac_retval
2844 } # ac_fn_c_compute_int
2845 cat >config.log <<_ACEOF
2846 This file contains any messages produced by compilers while
2847 running configure, to aid debugging if configure makes a mistake.
2849 It was created by emacs $as_me 24.1, which was
2850 generated by GNU Autoconf 2.65. Invocation command line was
2852 $ $0 $@
2854 _ACEOF
2855 exec 5>>config.log
2857 cat <<_ASUNAME
2858 ## --------- ##
2859 ## Platform. ##
2860 ## --------- ##
2862 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2863 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2864 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2865 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2866 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2868 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2869 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2871 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2872 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2873 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2874 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2875 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2876 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2877 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2879 _ASUNAME
2881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2882 for as_dir in $PATH
2884 IFS=$as_save_IFS
2885 test -z "$as_dir" && as_dir=.
2886 $as_echo "PATH: $as_dir"
2887 done
2888 IFS=$as_save_IFS
2890 } >&5
2892 cat >&5 <<_ACEOF
2895 ## ----------- ##
2896 ## Core tests. ##
2897 ## ----------- ##
2899 _ACEOF
2902 # Keep a trace of the command line.
2903 # Strip out --no-create and --no-recursion so they do not pile up.
2904 # Strip out --silent because we don't want to record it for future runs.
2905 # Also quote any args containing shell meta-characters.
2906 # Make two passes to allow for proper duplicate-argument suppression.
2907 ac_configure_args=
2908 ac_configure_args0=
2909 ac_configure_args1=
2910 ac_must_keep_next=false
2911 for ac_pass in 1 2
2913 for ac_arg
2915 case $ac_arg in
2916 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2917 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2918 | -silent | --silent | --silen | --sile | --sil)
2919 continue ;;
2920 *\'*)
2921 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2922 esac
2923 case $ac_pass in
2924 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2926 as_fn_append ac_configure_args1 " '$ac_arg'"
2927 if test $ac_must_keep_next = true; then
2928 ac_must_keep_next=false # Got value, back to normal.
2929 else
2930 case $ac_arg in
2931 *=* | --config-cache | -C | -disable-* | --disable-* \
2932 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2933 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2934 | -with-* | --with-* | -without-* | --without-* | --x)
2935 case "$ac_configure_args0 " in
2936 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2937 esac
2939 -* ) ac_must_keep_next=true ;;
2940 esac
2942 as_fn_append ac_configure_args " '$ac_arg'"
2944 esac
2945 done
2946 done
2947 { ac_configure_args0=; unset ac_configure_args0;}
2948 { ac_configure_args1=; unset ac_configure_args1;}
2950 # When interrupted or exit'd, cleanup temporary files, and complete
2951 # config.log. We remove comments because anyway the quotes in there
2952 # would cause problems or look ugly.
2953 # WARNING: Use '\'' to represent an apostrophe within the trap.
2954 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2955 trap 'exit_status=$?
2956 # Save into config.log some information that might help in debugging.
2958 echo
2960 cat <<\_ASBOX
2961 ## ---------------- ##
2962 ## Cache variables. ##
2963 ## ---------------- ##
2964 _ASBOX
2965 echo
2966 # The following way of writing the cache mishandles newlines in values,
2968 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2969 eval ac_val=\$$ac_var
2970 case $ac_val in #(
2971 *${as_nl}*)
2972 case $ac_var in #(
2973 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2974 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2975 esac
2976 case $ac_var in #(
2977 _ | IFS | as_nl) ;; #(
2978 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2979 *) { eval $ac_var=; unset $ac_var;} ;;
2980 esac ;;
2981 esac
2982 done
2983 (set) 2>&1 |
2984 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2985 *${as_nl}ac_space=\ *)
2986 sed -n \
2987 "s/'\''/'\''\\\\'\'''\''/g;
2988 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2989 ;; #(
2991 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2993 esac |
2994 sort
2996 echo
2998 cat <<\_ASBOX
2999 ## ----------------- ##
3000 ## Output variables. ##
3001 ## ----------------- ##
3002 _ASBOX
3003 echo
3004 for ac_var in $ac_subst_vars
3006 eval ac_val=\$$ac_var
3007 case $ac_val in
3008 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3009 esac
3010 $as_echo "$ac_var='\''$ac_val'\''"
3011 done | sort
3012 echo
3014 if test -n "$ac_subst_files"; then
3015 cat <<\_ASBOX
3016 ## ------------------- ##
3017 ## File substitutions. ##
3018 ## ------------------- ##
3019 _ASBOX
3020 echo
3021 for ac_var in $ac_subst_files
3023 eval ac_val=\$$ac_var
3024 case $ac_val in
3025 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3026 esac
3027 $as_echo "$ac_var='\''$ac_val'\''"
3028 done | sort
3029 echo
3032 if test -s confdefs.h; then
3033 cat <<\_ASBOX
3034 ## ----------- ##
3035 ## confdefs.h. ##
3036 ## ----------- ##
3037 _ASBOX
3038 echo
3039 cat confdefs.h
3040 echo
3042 test "$ac_signal" != 0 &&
3043 $as_echo "$as_me: caught signal $ac_signal"
3044 $as_echo "$as_me: exit $exit_status"
3045 } >&5
3046 rm -f core *.core core.conftest.* &&
3047 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3048 exit $exit_status
3050 for ac_signal in 1 2 13 15; do
3051 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3052 done
3053 ac_signal=0
3055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3056 rm -f -r conftest* confdefs.h
3058 $as_echo "/* confdefs.h */" > confdefs.h
3060 # Predefined preprocessor variables.
3062 cat >>confdefs.h <<_ACEOF
3063 #define PACKAGE_NAME "$PACKAGE_NAME"
3064 _ACEOF
3066 cat >>confdefs.h <<_ACEOF
3067 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3068 _ACEOF
3070 cat >>confdefs.h <<_ACEOF
3071 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3072 _ACEOF
3074 cat >>confdefs.h <<_ACEOF
3075 #define PACKAGE_STRING "$PACKAGE_STRING"
3076 _ACEOF
3078 cat >>confdefs.h <<_ACEOF
3079 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3080 _ACEOF
3082 cat >>confdefs.h <<_ACEOF
3083 #define PACKAGE_URL "$PACKAGE_URL"
3084 _ACEOF
3087 # Let the site file select an alternate cache file if it wants to.
3088 # Prefer an explicitly selected file to automatically selected ones.
3089 ac_site_file1=NONE
3090 ac_site_file2=NONE
3091 if test -n "$CONFIG_SITE"; then
3092 ac_site_file1=$CONFIG_SITE
3093 elif test "x$prefix" != xNONE; then
3094 ac_site_file1=$prefix/share/config.site
3095 ac_site_file2=$prefix/etc/config.site
3096 else
3097 ac_site_file1=$ac_default_prefix/share/config.site
3098 ac_site_file2=$ac_default_prefix/etc/config.site
3100 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3102 test "x$ac_site_file" = xNONE && continue
3103 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3105 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3106 sed 's/^/| /' "$ac_site_file" >&5
3107 . "$ac_site_file"
3109 done
3111 if test -r "$cache_file"; then
3112 # Some versions of bash will fail to source /dev/null (special files
3113 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3114 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3116 $as_echo "$as_me: loading cache $cache_file" >&6;}
3117 case $cache_file in
3118 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3119 *) . "./$cache_file";;
3120 esac
3122 else
3123 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3124 $as_echo "$as_me: creating cache $cache_file" >&6;}
3125 >$cache_file
3128 as_fn_append ac_header_list " stdlib.h"
3129 as_fn_append ac_header_list " unistd.h"
3130 as_fn_append ac_header_list " sys/param.h"
3131 as_fn_append ac_func_list " readlinkat"
3132 gl_getopt_required=GNU
3133 as_fn_append ac_header_list " getopt.h"
3134 as_fn_append ac_header_list " wchar.h"
3135 as_fn_append ac_header_list " stdint.h"
3136 as_fn_append ac_header_list " inttypes.h"
3137 as_fn_append ac_func_list " lstat"
3138 as_fn_append ac_func_list " alarm"
3139 as_fn_append ac_func_list " pthread_sigmask"
3140 as_fn_append ac_func_list " readlink"
3141 as_fn_append ac_header_list " sys/socket.h"
3142 as_fn_append ac_func_list " tzset"
3143 as_fn_append ac_func_list " strtoimax"
3144 as_fn_append ac_func_list " strtoumax"
3145 as_fn_append ac_func_list " symlink"
3146 as_fn_append ac_header_list " sys/stat.h"
3147 as_fn_append ac_header_list " sys/time.h"
3148 as_fn_append ac_func_list " localtime_r"
3149 # Check that the precious variables saved in the cache have kept the same
3150 # value.
3151 ac_cache_corrupted=false
3152 for ac_var in $ac_precious_vars; do
3153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3154 eval ac_new_set=\$ac_env_${ac_var}_set
3155 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3156 eval ac_new_val=\$ac_env_${ac_var}_value
3157 case $ac_old_set,$ac_new_set in
3158 set,)
3159 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3160 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3161 ac_cache_corrupted=: ;;
3162 ,set)
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3164 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3165 ac_cache_corrupted=: ;;
3166 ,);;
3168 if test "x$ac_old_val" != "x$ac_new_val"; then
3169 # differences in whitespace do not lead to failure.
3170 ac_old_val_w=`echo x $ac_old_val`
3171 ac_new_val_w=`echo x $ac_new_val`
3172 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3173 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3174 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3175 ac_cache_corrupted=:
3176 else
3177 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3178 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3179 eval $ac_var=\$ac_old_val
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3182 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3183 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3184 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3185 fi;;
3186 esac
3187 # Pass precious variables to config.status.
3188 if test "$ac_new_set" = set; then
3189 case $ac_new_val in
3190 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3191 *) ac_arg=$ac_var=$ac_new_val ;;
3192 esac
3193 case " $ac_configure_args " in
3194 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3195 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3196 esac
3198 done
3199 if $ac_cache_corrupted; then
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3201 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3203 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3204 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3206 ## -------------------- ##
3207 ## Main body of script. ##
3208 ## -------------------- ##
3210 ac_ext=c
3211 ac_cpp='$CPP $CPPFLAGS'
3212 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3213 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3214 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3217 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3220 ac_aux_dir=
3221 for ac_dir in build-aux "$srcdir"/build-aux; do
3222 for ac_t in install-sh install.sh shtool; do
3223 if test -f "$ac_dir/$ac_t"; then
3224 ac_aux_dir=$ac_dir
3225 ac_install_sh="$ac_aux_dir/$ac_t -c"
3226 break 2
3228 done
3229 done
3230 if test -z "$ac_aux_dir"; then
3231 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3234 # These three variables are undocumented and unsupported,
3235 # and are intended to be withdrawn in a future Autoconf release.
3236 # They can cause serious problems if a builder's source tree is in a directory
3237 # whose full name contains unusual characters.
3238 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3239 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3240 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3243 am__api_version='1.11'
3245 # Find a good install program. We prefer a C program (faster),
3246 # so one script is as good as another. But avoid the broken or
3247 # incompatible versions:
3248 # SysV /etc/install, /usr/sbin/install
3249 # SunOS /usr/etc/install
3250 # IRIX /sbin/install
3251 # AIX /bin/install
3252 # AmigaOS /C/install, which installs bootblocks on floppy discs
3253 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3254 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3255 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3256 # OS/2's system install, which has a completely different semantic
3257 # ./install, which can be erroneously created by make from ./install.sh.
3258 # Reject install programs that cannot install multiple files.
3259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3260 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3261 if test -z "$INSTALL"; then
3262 if test "${ac_cv_path_install+set}" = set; then :
3263 $as_echo_n "(cached) " >&6
3264 else
3265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3266 for as_dir in $PATH
3268 IFS=$as_save_IFS
3269 test -z "$as_dir" && as_dir=.
3270 # Account for people who put trailing slashes in PATH elements.
3271 case $as_dir/ in #((
3272 ./ | .// | /[cC]/* | \
3273 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3274 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3275 /usr/ucb/* ) ;;
3277 # OSF1 and SCO ODT 3.0 have their own names for install.
3278 # Don't use installbsd from OSF since it installs stuff as root
3279 # by default.
3280 for ac_prog in ginstall scoinst install; do
3281 for ac_exec_ext in '' $ac_executable_extensions; do
3282 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3283 if test $ac_prog = install &&
3284 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3285 # AIX install. It has an incompatible calling convention.
3287 elif test $ac_prog = install &&
3288 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3289 # program-specific install script used by HP pwplus--don't use.
3291 else
3292 rm -rf conftest.one conftest.two conftest.dir
3293 echo one > conftest.one
3294 echo two > conftest.two
3295 mkdir conftest.dir
3296 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3297 test -s conftest.one && test -s conftest.two &&
3298 test -s conftest.dir/conftest.one &&
3299 test -s conftest.dir/conftest.two
3300 then
3301 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3302 break 3
3306 done
3307 done
3309 esac
3311 done
3312 IFS=$as_save_IFS
3314 rm -rf conftest.one conftest.two conftest.dir
3317 if test "${ac_cv_path_install+set}" = set; then
3318 INSTALL=$ac_cv_path_install
3319 else
3320 # As a last resort, use the slow shell script. Don't cache a
3321 # value for INSTALL within a source directory, because that will
3322 # break other packages using the cache if that directory is
3323 # removed, or if the value is a relative name.
3324 INSTALL=$ac_install_sh
3327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3328 $as_echo "$INSTALL" >&6; }
3330 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3331 # It thinks the first close brace ends the variable substitution.
3332 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3334 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3336 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3339 $as_echo_n "checking whether build environment is sane... " >&6; }
3340 # Just in case
3341 sleep 1
3342 echo timestamp > conftest.file
3343 # Reject unsafe characters in $srcdir or the absolute working directory
3344 # name. Accept space and tab only in the latter.
3345 am_lf='
3347 case `pwd` in
3348 *[\\\"\#\$\&\'\`$am_lf]*)
3349 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3350 esac
3351 case $srcdir in
3352 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3353 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3354 esac
3356 # Do `set' in a subshell so we don't clobber the current shell's
3357 # arguments. Must try -L first in case configure is actually a
3358 # symlink; some systems play weird games with the mod time of symlinks
3359 # (eg FreeBSD returns the mod time of the symlink's containing
3360 # directory).
3361 if (
3362 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3363 if test "$*" = "X"; then
3364 # -L didn't work.
3365 set X `ls -t "$srcdir/configure" conftest.file`
3367 rm -f conftest.file
3368 if test "$*" != "X $srcdir/configure conftest.file" \
3369 && test "$*" != "X conftest.file $srcdir/configure"; then
3371 # If neither matched, then we have a broken ls. This can happen
3372 # if, for instance, CONFIG_SHELL is bash and it inherits a
3373 # broken ls alias from the environment. This has actually
3374 # happened. Such a system could not be considered "sane".
3375 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3376 alias in your environment" "$LINENO" 5
3379 test "$2" = conftest.file
3381 then
3382 # Ok.
3384 else
3385 as_fn_error "newly created file is older than distributed files!
3386 Check your system clock" "$LINENO" 5
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3389 $as_echo "yes" >&6; }
3390 test "$program_prefix" != NONE &&
3391 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3392 # Use a double $ so make ignores it.
3393 test "$program_suffix" != NONE &&
3394 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3395 # Double any \ or $.
3396 # By default was `s,x,x', remove it if useless.
3397 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3398 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3400 # expand $ac_aux_dir to an absolute path
3401 am_aux_dir=`cd $ac_aux_dir && pwd`
3403 if test x"${MISSING+set}" != xset; then
3404 case $am_aux_dir in
3405 *\ * | *\ *)
3406 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3408 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3409 esac
3411 # Use eval to expand $SHELL
3412 if eval "$MISSING --run true"; then
3413 am_missing_run="$MISSING --run "
3414 else
3415 am_missing_run=
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3417 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3420 if test x"${install_sh}" != xset; then
3421 case $am_aux_dir in
3422 *\ * | *\ *)
3423 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3425 install_sh="\${SHELL} $am_aux_dir/install-sh"
3426 esac
3429 # Installed binaries are usually stripped using `strip' when the user
3430 # run `make install-strip'. However `strip' might not be the right
3431 # tool to use in cross-compilation environments, therefore Automake
3432 # will honor the `STRIP' environment variable to overrule this program.
3433 if test "$cross_compiling" != no; then
3434 if test -n "$ac_tool_prefix"; then
3435 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3436 set dummy ${ac_tool_prefix}strip; ac_word=$2
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438 $as_echo_n "checking for $ac_word... " >&6; }
3439 if test "${ac_cv_prog_STRIP+set}" = set; then :
3440 $as_echo_n "(cached) " >&6
3441 else
3442 if test -n "$STRIP"; then
3443 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3444 else
3445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446 for as_dir in $PATH
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
3450 for ac_exec_ext in '' $ac_executable_extensions; do
3451 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3452 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3454 break 2
3456 done
3457 done
3458 IFS=$as_save_IFS
3462 STRIP=$ac_cv_prog_STRIP
3463 if test -n "$STRIP"; then
3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3465 $as_echo "$STRIP" >&6; }
3466 else
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468 $as_echo "no" >&6; }
3473 if test -z "$ac_cv_prog_STRIP"; then
3474 ac_ct_STRIP=$STRIP
3475 # Extract the first word of "strip", so it can be a program name with args.
3476 set dummy strip; ac_word=$2
3477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3478 $as_echo_n "checking for $ac_word... " >&6; }
3479 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3480 $as_echo_n "(cached) " >&6
3481 else
3482 if test -n "$ac_ct_STRIP"; then
3483 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3484 else
3485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3486 for as_dir in $PATH
3488 IFS=$as_save_IFS
3489 test -z "$as_dir" && as_dir=.
3490 for ac_exec_ext in '' $ac_executable_extensions; do
3491 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3492 ac_cv_prog_ac_ct_STRIP="strip"
3493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3494 break 2
3496 done
3497 done
3498 IFS=$as_save_IFS
3502 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3503 if test -n "$ac_ct_STRIP"; then
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3505 $as_echo "$ac_ct_STRIP" >&6; }
3506 else
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3508 $as_echo "no" >&6; }
3511 if test "x$ac_ct_STRIP" = x; then
3512 STRIP=":"
3513 else
3514 case $cross_compiling:$ac_tool_warned in
3515 yes:)
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3517 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3518 ac_tool_warned=yes ;;
3519 esac
3520 STRIP=$ac_ct_STRIP
3522 else
3523 STRIP="$ac_cv_prog_STRIP"
3527 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3530 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3531 if test -z "$MKDIR_P"; then
3532 if test "${ac_cv_path_mkdir+set}" = set; then :
3533 $as_echo_n "(cached) " >&6
3534 else
3535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3536 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3538 IFS=$as_save_IFS
3539 test -z "$as_dir" && as_dir=.
3540 for ac_prog in mkdir gmkdir; do
3541 for ac_exec_ext in '' $ac_executable_extensions; do
3542 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3543 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3544 'mkdir (GNU coreutils) '* | \
3545 'mkdir (coreutils) '* | \
3546 'mkdir (fileutils) '4.1*)
3547 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3548 break 3;;
3549 esac
3550 done
3551 done
3552 done
3553 IFS=$as_save_IFS
3557 test -d ./--version && rmdir ./--version
3558 if test "${ac_cv_path_mkdir+set}" = set; then
3559 MKDIR_P="$ac_cv_path_mkdir -p"
3560 else
3561 # As a last resort, use the slow shell script. Don't cache a
3562 # value for MKDIR_P within a source directory, because that will
3563 # break other packages using the cache if that directory is
3564 # removed, or if the value is a relative name.
3565 MKDIR_P="$ac_install_sh -d"
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3569 $as_echo "$MKDIR_P" >&6; }
3572 mkdir_p="$MKDIR_P"
3573 case $mkdir_p in
3574 [\\/$]* | ?:[\\/]*) ;;
3575 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3576 esac
3578 for ac_prog in gawk mawk nawk awk
3580 # Extract the first word of "$ac_prog", so it can be a program name with args.
3581 set dummy $ac_prog; ac_word=$2
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583 $as_echo_n "checking for $ac_word... " >&6; }
3584 if test "${ac_cv_prog_AWK+set}" = set; then :
3585 $as_echo_n "(cached) " >&6
3586 else
3587 if test -n "$AWK"; then
3588 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3589 else
3590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591 for as_dir in $PATH
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
3595 for ac_exec_ext in '' $ac_executable_extensions; do
3596 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3597 ac_cv_prog_AWK="$ac_prog"
3598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3599 break 2
3601 done
3602 done
3603 IFS=$as_save_IFS
3607 AWK=$ac_cv_prog_AWK
3608 if test -n "$AWK"; then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3610 $as_echo "$AWK" >&6; }
3611 else
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613 $as_echo "no" >&6; }
3617 test -n "$AWK" && break
3618 done
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3621 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3622 set x ${MAKE-make}
3623 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3624 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3625 $as_echo_n "(cached) " >&6
3626 else
3627 cat >conftest.make <<\_ACEOF
3628 SHELL = /bin/sh
3629 all:
3630 @echo '@@@%%%=$(MAKE)=@@@%%%'
3631 _ACEOF
3632 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3633 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3634 *@@@%%%=?*=@@@%%%*)
3635 eval ac_cv_prog_make_${ac_make}_set=yes;;
3637 eval ac_cv_prog_make_${ac_make}_set=no;;
3638 esac
3639 rm -f conftest.make
3641 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3643 $as_echo "yes" >&6; }
3644 SET_MAKE=
3645 else
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3647 $as_echo "no" >&6; }
3648 SET_MAKE="MAKE=${MAKE-make}"
3651 rm -rf .tst 2>/dev/null
3652 mkdir .tst 2>/dev/null
3653 if test -d .tst; then
3654 am__leading_dot=.
3655 else
3656 am__leading_dot=_
3658 rmdir .tst 2>/dev/null
3660 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3661 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3662 # is not polluted with repeated "-I."
3663 am__isrc=' -I$(srcdir)'
3664 # test to see if srcdir already configured
3665 if test -f $srcdir/config.status; then
3666 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3670 # test whether we have cygpath
3671 if test -z "$CYGPATH_W"; then
3672 if (cygpath --version) >/dev/null 2>/dev/null; then
3673 CYGPATH_W='cygpath -w'
3674 else
3675 CYGPATH_W=echo
3680 # Define the identity of the package.
3681 PACKAGE='emacs'
3682 VERSION='24.1'
3685 cat >>confdefs.h <<_ACEOF
3686 #define PACKAGE "$PACKAGE"
3687 _ACEOF
3690 cat >>confdefs.h <<_ACEOF
3691 #define VERSION "$VERSION"
3692 _ACEOF
3694 # Some tools Automake needs.
3696 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3699 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3702 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3705 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3708 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3710 # We need awk for the "check" target. The system "awk" is bad on
3711 # some platforms.
3712 # Always define AMTAR for backward compatibility.
3714 AMTAR=${AMTAR-"${am_missing_run}tar"}
3716 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3725 lispdir='${datadir}/emacs/${version}/lisp'
3726 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3727 '${datadir}/emacs/site-lisp'
3728 lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
3729 etcdir='${datadir}/emacs/${version}/etc'
3730 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3731 docdir='${datadir}/emacs/${version}/etc'
3732 gamedir='${localstatedir}/games/emacs'
3737 # Check whether --with-pop was given.
3738 if test "${with_pop+set}" = set; then :
3739 withval=$with_pop;
3740 else
3741 with_pop=yes
3744 if test "$with_pop" = yes; then
3745 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3750 # Check whether --with-kerberos was given.
3751 if test "${with_kerberos+set}" = set; then :
3752 withval=$with_kerberos;
3753 else
3754 with_kerberos=no
3757 if test "$with_kerberos" != no; then
3758 $as_echo "#define KERBEROS 1" >>confdefs.h
3763 # Check whether --with-kerberos5 was given.
3764 if test "${with_kerberos5+set}" = set; then :
3765 withval=$with_kerberos5;
3766 else
3767 with_kerberos5=no
3770 if test "${with_kerberos5}" != no; then
3771 if test "${with_kerberos}" = no; then
3772 with_kerberos=yes
3773 $as_echo "#define KERBEROS 1" >>confdefs.h
3777 $as_echo "#define KERBEROS5 1" >>confdefs.h
3782 # Check whether --with-hesiod was given.
3783 if test "${with_hesiod+set}" = set; then :
3784 withval=$with_hesiod;
3785 else
3786 with_hesiod=no
3789 if test "$with_hesiod" != no; then
3791 $as_echo "#define HESIOD 1" >>confdefs.h
3796 # Check whether --with-mmdf was given.
3797 if test "${with_mmdf+set}" = set; then :
3798 withval=$with_mmdf;
3799 else
3800 with_mmdf=no
3803 if test "$with_mmdf" != no; then
3805 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3810 # Check whether --with-mail-unlink was given.
3811 if test "${with_mail_unlink+set}" = set; then :
3812 withval=$with_mail_unlink;
3813 else
3814 with_mail_unlink=no
3817 if test "$with_mail_unlink" != no; then
3819 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3824 # Check whether --with-mailhost was given.
3825 if test "${with_mailhost+set}" = set; then :
3826 withval=$with_mailhost;
3827 cat >>confdefs.h <<_ACEOF
3828 #define MAILHOST "$withval"
3829 _ACEOF
3835 # Check whether --with-sound was given.
3836 if test "${with_sound+set}" = set; then :
3837 withval=$with_sound;
3838 else
3839 with_sound=yes
3844 # Check whether --with-sync-input was given.
3845 if test "${with_sync_input+set}" = set; then :
3846 withval=$with_sync_input;
3847 else
3848 with_sync_input=yes
3851 if test "$with_sync_input" = yes; then
3853 $as_echo "#define SYNC_INPUT 1" >>confdefs.h
3858 # Check whether --with-x-toolkit was given.
3859 if test "${with_x_toolkit+set}" = set; then :
3860 withval=$with_x_toolkit; case "${withval}" in
3861 y | ye | yes ) val=gtk ;;
3862 n | no ) val=no ;;
3863 l | lu | luc | luci | lucid ) val=lucid ;;
3864 a | at | ath | athe | athen | athena ) val=athena ;;
3865 m | mo | mot | moti | motif ) val=motif ;;
3866 g | gt | gtk ) val=gtk ;;
3867 gtk3 ) val=gtk3 ;;
3869 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
3870 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
3871 \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
3873 esac
3874 with_x_toolkit=$val
3880 # Check whether --with-wide-int was given.
3881 if test "${with_wide_int+set}" = set; then :
3882 withval=$with_wide_int;
3883 else
3884 with_wide_int=no
3887 if test "$with_wide_int" = yes; then
3889 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
3894 # Check whether --with-xpm was given.
3895 if test "${with_xpm+set}" = set; then :
3896 withval=$with_xpm;
3897 else
3898 with_xpm=yes
3902 # Check whether --with-jpeg was given.
3903 if test "${with_jpeg+set}" = set; then :
3904 withval=$with_jpeg;
3905 else
3906 with_jpeg=yes
3910 # Check whether --with-tiff was given.
3911 if test "${with_tiff+set}" = set; then :
3912 withval=$with_tiff;
3913 else
3914 with_tiff=yes
3918 # Check whether --with-gif was given.
3919 if test "${with_gif+set}" = set; then :
3920 withval=$with_gif;
3921 else
3922 with_gif=yes
3926 # Check whether --with-png was given.
3927 if test "${with_png+set}" = set; then :
3928 withval=$with_png;
3929 else
3930 with_png=yes
3934 # Check whether --with-rsvg was given.
3935 if test "${with_rsvg+set}" = set; then :
3936 withval=$with_rsvg;
3937 else
3938 with_rsvg=yes
3942 # Check whether --with-xml2 was given.
3943 if test "${with_xml2+set}" = set; then :
3944 withval=$with_xml2;
3945 else
3946 with_xml2=yes
3950 # Check whether --with-imagemagick was given.
3951 if test "${with_imagemagick+set}" = set; then :
3952 withval=$with_imagemagick;
3953 else
3954 with_imagemagick=yes
3959 # Check whether --with-xft was given.
3960 if test "${with_xft+set}" = set; then :
3961 withval=$with_xft;
3962 else
3963 with_xft=yes
3967 # Check whether --with-libotf was given.
3968 if test "${with_libotf+set}" = set; then :
3969 withval=$with_libotf;
3970 else
3971 with_libotf=yes
3975 # Check whether --with-m17n-flt was given.
3976 if test "${with_m17n_flt+set}" = set; then :
3977 withval=$with_m17n_flt;
3978 else
3979 with_m17n_flt=yes
3984 # Check whether --with-toolkit-scroll-bars was given.
3985 if test "${with_toolkit_scroll_bars+set}" = set; then :
3986 withval=$with_toolkit_scroll_bars;
3987 else
3988 with_toolkit_scroll_bars=yes
3992 # Check whether --with-xaw3d was given.
3993 if test "${with_xaw3d+set}" = set; then :
3994 withval=$with_xaw3d;
3995 else
3996 with_xaw3d=yes
4000 # Check whether --with-xim was given.
4001 if test "${with_xim+set}" = set; then :
4002 withval=$with_xim;
4003 else
4004 with_xim=yes
4008 # Check whether --with-ns was given.
4009 if test "${with_ns+set}" = set; then :
4010 withval=$with_ns;
4011 else
4012 with_ns=no
4017 # Check whether --with-gpm was given.
4018 if test "${with_gpm+set}" = set; then :
4019 withval=$with_gpm;
4020 else
4021 with_gpm=yes
4025 # Check whether --with-dbus was given.
4026 if test "${with_dbus+set}" = set; then :
4027 withval=$with_dbus;
4028 else
4029 with_dbus=yes
4033 # Check whether --with-gconf was given.
4034 if test "${with_gconf+set}" = set; then :
4035 withval=$with_gconf;
4036 else
4037 with_gconf=yes
4041 # Check whether --with-gsettings was given.
4042 if test "${with_gsettings+set}" = set; then :
4043 withval=$with_gsettings;
4044 else
4045 with_gsettings=yes
4049 # Check whether --with-selinux was given.
4050 if test "${with_selinux+set}" = set; then :
4051 withval=$with_selinux;
4052 else
4053 with_selinux=yes
4057 # Check whether --with-gnutls was given.
4058 if test "${with_gnutls+set}" = set; then :
4059 withval=$with_gnutls;
4060 else
4061 with_gnutls=yes
4065 ## For the times when you want to build Emacs but don't have
4066 ## a suitable makeinfo, and can live without the manuals.
4068 # Check whether --with-makeinfo was given.
4069 if test "${with_makeinfo+set}" = set; then :
4070 withval=$with_makeinfo;
4071 else
4072 with_makeinfo=yes
4076 ## Makefile.in needs the cache file name.
4079 ## This is an option because I do not know if all info/man support
4080 ## compressed files, nor how to test if they do so.
4082 # Check whether --with-compress-info was given.
4083 if test "${with_compress_info+set}" = set; then :
4084 withval=$with_compress_info;
4085 else
4086 with_compress_info=yes
4089 if test $with_compress_info = yes; then
4090 GZIP_INFO=yes
4091 else
4092 GZIP_INFO=
4097 # Check whether --with-pkg-config-prog was given.
4098 if test "${with_pkg_config_prog+set}" = set; then :
4099 withval=$with_pkg_config_prog;
4102 if test "X${with_pkg_config_prog}" != X; then
4103 if test "${with_pkg_config_prog}" != yes; then
4104 PKG_CONFIG="${with_pkg_config_prog}"
4108 CRT_DIR=
4110 # Check whether --with-crt-dir was given.
4111 if test "${with_crt_dir+set}" = set; then :
4112 withval=$with_crt_dir;
4115 CRT_DIR="${with_crt_dir}"
4118 # Check whether --with-gameuser was given.
4119 if test "${with_gameuser+set}" = set; then :
4120 withval=$with_gameuser;
4123 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4124 && gameuser="${with_gameuser}"
4125 test "X$gameuser" = X && gameuser=games
4128 # Check whether --with-gnustep-conf was given.
4129 if test "${with_gnustep_conf+set}" = set; then :
4130 withval=$with_gnustep_conf;
4133 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4134 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4135 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4136 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4138 # Check whether --enable-ns-self-contained was given.
4139 if test "${enable_ns_self_contained+set}" = set; then :
4140 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4141 else
4142 EN_NS_SELF_CONTAINED=yes
4146 # Check whether --enable-asserts was given.
4147 if test "${enable_asserts+set}" = set; then :
4148 enableval=$enable_asserts; USE_XASSERTS=$enableval
4149 else
4150 USE_XASSERTS=no
4154 # Check whether --enable-maintainer-mode was given.
4155 if test "${enable_maintainer_mode+set}" = set; then :
4156 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
4157 else
4158 USE_MAINTAINER_MODE=yes
4161 if test $USE_MAINTAINER_MODE = yes; then
4162 MAINT=
4163 else
4164 MAINT=#
4168 # Check whether --enable-locallisppath was given.
4169 if test "${enable_locallisppath+set}" = set; then :
4170 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4171 locallisppath=
4172 elif test "${enableval}" != "yes"; then
4173 locallisppath=${enableval}
4178 # Check whether --enable-checking was given.
4179 if test "${enable_checking+set}" = set; then :
4180 enableval=$enable_checking; ac_checking_flags="${enableval}"
4183 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4184 for check in $ac_checking_flags
4186 case $check in
4187 # these set all the flags to specific states
4188 yes) ac_enable_checking=1 ;;
4189 no) ac_enable_checking= ;
4190 ac_gc_check_stringbytes= ;
4191 ac_gc_check_string_overrun= ;
4192 ac_gc_check_string_free_list= ;
4193 ac_xmalloc_overrun= ;
4194 ac_gc_check_cons_list= ;;
4195 all) ac_enable_checking=1 ;
4196 ac_gc_check_stringbytes=1 ;
4197 ac_gc_check_string_overrun=1 ;
4198 ac_gc_check_string_free_list=1 ;
4199 ac_xmalloc_overrun=1 ;
4200 ac_gc_check_cons_list=1 ;;
4201 # these enable particular checks
4202 stringbytes) ac_gc_check_stringbytes=1 ;;
4203 stringoverrun) ac_gc_check_string_overrun=1 ;;
4204 stringfreelist) ac_gc_check_string_free_list=1 ;;
4205 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4206 conslist) ac_gc_check_cons_list=1 ;;
4207 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4208 esac
4209 done
4210 IFS="$ac_save_IFS"
4212 if test x$ac_enable_checking != x ; then
4214 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4217 if test x$ac_gc_check_stringbytes != x ; then
4219 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4222 if test x$ac_gc_check_string_overrun != x ; then
4224 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4227 if test x$ac_gc_check_string_free_list != x ; then
4229 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4232 if test x$ac_xmalloc_overrun != x ; then
4234 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4237 if test x$ac_gc_check_cons_list != x ; then
4239 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4243 # Check whether --enable-use-lisp-union-type was given.
4244 if test "${enable_use_lisp_union_type+set}" = set; then :
4245 enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
4247 $as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
4254 # Check whether --enable-profiling was given.
4255 if test "${enable_profiling+set}" = set; then :
4256 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4259 if test x$ac_enable_profiling != x ; then
4260 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4261 else
4262 PROFILING_CFLAGS=
4266 # Check whether --enable-autodepend was given.
4267 if test "${enable_autodepend+set}" = set; then :
4268 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4269 else
4270 ac_enable_autodepend=yes
4274 #### Make srcdir absolute, if it isn't already. It's important to
4275 #### avoid running the path through pwd unnecessarily, since pwd can
4276 #### give you automounter prefixes, which can go away. We do all this
4277 #### so Emacs can find its files when run uninstalled.
4278 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4279 unset CDPATH
4280 case "${srcdir}" in
4281 /* ) ;;
4283 ## We may be able to use the $PWD environment variable to make this
4284 ## absolute. But sometimes PWD is inaccurate.
4285 ## Note: we used to use ${PWD} at the end instead of `pwd`,
4286 ## but that tested only for a well-formed and valid PWD,
4287 ## it did not object when PWD was well-formed and valid but just wrong.
4288 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
4289 then
4290 srcdir="$PWD"
4291 else
4292 srcdir="`(cd ${srcdir}; pwd)`"
4295 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
4296 esac
4298 #### Given the configuration name, set machfile and opsysfile to the
4299 #### names of the m/*.h and s/*.h files we should use.
4301 ### Canonicalize the configuration name.
4303 # Make sure we can run config.sub.
4304 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4305 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4308 $as_echo_n "checking build system type... " >&6; }
4309 if test "${ac_cv_build+set}" = set; then :
4310 $as_echo_n "(cached) " >&6
4311 else
4312 ac_build_alias=$build_alias
4313 test "x$ac_build_alias" = x &&
4314 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4315 test "x$ac_build_alias" = x &&
4316 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4317 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4318 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4322 $as_echo "$ac_cv_build" >&6; }
4323 case $ac_cv_build in
4324 *-*-*) ;;
4325 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4326 esac
4327 build=$ac_cv_build
4328 ac_save_IFS=$IFS; IFS='-'
4329 set x $ac_cv_build
4330 shift
4331 build_cpu=$1
4332 build_vendor=$2
4333 shift; shift
4334 # Remember, the first character of IFS is used to create $*,
4335 # except with old shells:
4336 build_os=$*
4337 IFS=$ac_save_IFS
4338 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4342 $as_echo_n "checking host system type... " >&6; }
4343 if test "${ac_cv_host+set}" = set; then :
4344 $as_echo_n "(cached) " >&6
4345 else
4346 if test "x$host_alias" = x; then
4347 ac_cv_host=$ac_cv_build
4348 else
4349 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4350 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4355 $as_echo "$ac_cv_host" >&6; }
4356 case $ac_cv_host in
4357 *-*-*) ;;
4358 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4359 esac
4360 host=$ac_cv_host
4361 ac_save_IFS=$IFS; IFS='-'
4362 set x $ac_cv_host
4363 shift
4364 host_cpu=$1
4365 host_vendor=$2
4366 shift; shift
4367 # Remember, the first character of IFS is used to create $*,
4368 # except with old shells:
4369 host_os=$*
4370 IFS=$ac_save_IFS
4371 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4374 canonical=$host
4375 configuration=${host_alias-${build_alias-$host}}
4379 ### If you add support for a new configuration, add code to this
4380 ### switch statement to recognize your configuration name and select
4381 ### the appropriate operating system and machine description files.
4383 ### You would hope that you could choose an m/*.h file pretty much
4384 ### based on the machine portion of the configuration name, and an s/*.h
4385 ### file based on the operating system portion. However, it turns out
4386 ### that each m/*.h file is pretty manufacturer-specific - for
4387 ### example mips.h is MIPS
4388 ### So we basically have to have a special case for each
4389 ### configuration name.
4391 ### As far as handling version numbers on operating systems is
4392 ### concerned, make sure things will fail in a fixable way. If
4393 ### /etc/MACHINES doesn't say anything about version numbers, be
4394 ### prepared to handle anything reasonably. If version numbers
4395 ### matter, be sure /etc/MACHINES says something about it.
4397 machine='' opsys='' unported=no
4398 case "${canonical}" in
4400 ## GNU/Linux and similar ports
4401 *-*-linux* )
4402 opsys=gnu-linux
4403 case ${canonical} in
4404 alpha*) machine=alpha ;;
4405 s390x-*) machine=ibms390x ;;
4406 powerpc*) machine=macppc ;;
4407 sparc*) machine=sparc ;;
4408 ia64*) machine=ia64 ;;
4409 m68k*) machine=m68k ;;
4410 x86_64*) machine=amdx86-64 ;;
4411 esac
4414 ## FreeBSD ports
4415 *-*-freebsd* )
4416 opsys=freebsd
4417 case "${canonical}" in
4418 alpha*) machine=alpha ;;
4419 amd64-*|x86_64-*) machine=amdx86-64 ;;
4420 ia64-*) machine=ia64 ;;
4421 i[3456]86-*) machine=intel386 ;;
4422 powerpc-*) machine=macppc ;;
4423 sparc-*) machine=sparc ;;
4424 sparc64-*) machine=sparc ;;
4425 esac
4428 ## FreeBSD kernel + glibc based userland
4429 *-*-kfreebsd*gnu* )
4430 opsys=gnu-kfreebsd
4431 case "${canonical}" in
4432 alpha*) machine=alpha ;;
4433 amd64-*|x86_64-*) machine=amdx86-64 ;;
4434 ia64-*) machine=ia64 ;;
4435 i[3456]86-*) machine=intel386 ;;
4436 powerpc-*) machine=macppc ;;
4437 sparc-*) machine=sparc ;;
4438 sparc64-*) machine=sparc ;;
4439 esac
4442 ## NetBSD ports
4443 *-*-netbsd* )
4444 opsys=netbsd
4445 case "${canonical}" in
4446 alpha*) machine=alpha ;;
4447 x86_64-*) machine=amdx86-64 ;;
4448 i[3456]86-*) machine=intel386 ;;
4449 m68k-*) machine=m68k ;;
4450 powerpc-*) machine=macppc ;;
4451 sparc*-) machine=sparc ;;
4452 vax-*) machine=vax ;;
4453 esac
4456 ## OpenBSD ports
4457 *-*-openbsd* )
4458 opsys=openbsd
4459 case "${canonical}" in
4460 alpha*) machine=alpha ;;
4461 x86_64-*) machine=amdx86-64 ;;
4462 i386-*) machine=intel386 ;;
4463 powerpc-*) machine=macppc ;;
4464 sparc*) machine=sparc ;;
4465 vax-*) machine=vax ;;
4466 esac
4469 ## Apple Darwin / Mac OS X
4470 *-apple-darwin* )
4471 case "${canonical}" in
4472 i[3456]86-* ) machine=intel386 ;;
4473 powerpc-* ) machine=macppc ;;
4474 x86_64-* ) machine=amdx86-64 ;;
4475 * ) unported=yes ;;
4476 esac
4477 opsys=darwin
4478 # Define CPP as follows to make autoconf work correctly.
4479 CPP="${CC-cc} -E -no-cpp-precomp"
4480 # Use fink packages if available.
4481 if test -d /sw/include && test -d /sw/lib; then
4482 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4483 CPP="${CPP} ${GCC_TEST_OPTIONS}"
4484 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4488 ## HP 9000 series 700 and 800, running HP/UX
4489 hppa*-hp-hpux10.2* )
4490 opsys=hpux10-20
4492 hppa*-hp-hpux1[1-9]* )
4493 opsys=hpux11
4494 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4497 ## IBM machines
4498 rs6000-ibm-aix4.[23]* )
4499 machine=ibmrs6000 opsys=aix4-2
4501 powerpc-ibm-aix4.[23]* )
4502 machine=ibmrs6000 opsys=aix4-2
4504 rs6000-ibm-aix[56]* )
4505 machine=ibmrs6000 opsys=aix4-2
4507 powerpc-ibm-aix[56]* )
4508 machine=ibmrs6000 opsys=aix4-2
4511 ## Silicon Graphics machines
4512 ## Iris 4D
4513 mips-sgi-irix6.5 )
4514 opsys=irix6-5
4515 # Without defining _LANGUAGE_C, things get masked out in the headers
4516 # so that, for instance, grepping for `free' in stdlib.h fails and
4517 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4518 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
4519 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4522 ## Suns
4523 *-sun-solaris* \
4524 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4525 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4526 case "${canonical}" in
4527 i[3456]86-*-* ) machine=intel386 ;;
4528 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
4529 sparc* ) machine=sparc ;;
4530 * ) unported=yes ;;
4531 esac
4532 case "${canonical}" in
4533 *-sunos5.6* | *-solaris2.6* )
4534 opsys=sol2-6
4535 NON_GNU_CPP=/usr/ccs/lib/cpp
4536 RANLIB="ar -ts"
4538 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4539 opsys=sol2-6
4540 emacs_check_sunpro_c=yes
4541 NON_GNU_CPP=/usr/ccs/lib/cpp
4543 *-sunos5* | *-solaris* )
4544 opsys=sol2-10
4545 emacs_check_sunpro_c=yes
4546 NON_GNU_CPP=/usr/ccs/lib/cpp
4548 esac
4549 ## Watch out for a compiler that we know will not work.
4550 case "${canonical}" in
4551 *-solaris* | *-sunos5* )
4552 if [ "x$CC" = x/usr/ucb/cc ]; then
4553 ## /usr/ucb/cc doesn't work;
4554 ## we should find some other compiler that does work.
4555 unset CC
4558 *) ;;
4559 esac
4562 ## Intel 386 machines where we don't care about the manufacturer.
4563 i[3456]86-*-* )
4564 machine=intel386
4565 case "${canonical}" in
4566 *-cygwin ) opsys=cygwin ;;
4567 *-darwin* ) opsys=darwin
4568 CPP="${CC-cc} -E -no-cpp-precomp"
4570 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
4571 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
4572 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
4573 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4574 esac
4578 unported=yes
4580 esac
4582 ### If the code above didn't choose an operating system, just choose
4583 ### an operating system based on the configuration name. You really
4584 ### only want to use this when you have no idea what the right
4585 ### operating system is; if you know what operating systems a machine
4586 ### runs, it's cleaner to make it explicit in the case statement
4587 ### above.
4588 if test x"${opsys}" = x; then
4589 case "${canonical}" in
4590 *-gnu* ) opsys=gnu ;;
4592 unported=yes
4594 esac
4599 if test $unported = yes; then
4600 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4601 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4604 if test -n "$machine"; then
4605 machfile="m/${machine}.h"
4606 else
4607 machfile=
4609 opsysfile="s/${opsys}.h"
4612 #### Choose a compiler.
4613 test -n "$CC" && cc_specified=yes
4615 # Save the value of CFLAGS that the user specified.
4616 SPECIFIED_CFLAGS="$CFLAGS"
4618 ac_ext=c
4619 ac_cpp='$CPP $CPPFLAGS'
4620 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4621 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4622 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4623 if test -n "$ac_tool_prefix"; then
4624 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4625 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627 $as_echo_n "checking for $ac_word... " >&6; }
4628 if test "${ac_cv_prog_CC+set}" = set; then :
4629 $as_echo_n "(cached) " >&6
4630 else
4631 if test -n "$CC"; then
4632 ac_cv_prog_CC="$CC" # Let the user override the test.
4633 else
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635 for as_dir in $PATH
4637 IFS=$as_save_IFS
4638 test -z "$as_dir" && as_dir=.
4639 for ac_exec_ext in '' $ac_executable_extensions; do
4640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4641 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643 break 2
4645 done
4646 done
4647 IFS=$as_save_IFS
4651 CC=$ac_cv_prog_CC
4652 if test -n "$CC"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4654 $as_echo "$CC" >&6; }
4655 else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657 $as_echo "no" >&6; }
4662 if test -z "$ac_cv_prog_CC"; then
4663 ac_ct_CC=$CC
4664 # Extract the first word of "gcc", so it can be a program name with args.
4665 set dummy gcc; ac_word=$2
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667 $as_echo_n "checking for $ac_word... " >&6; }
4668 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4669 $as_echo_n "(cached) " >&6
4670 else
4671 if test -n "$ac_ct_CC"; then
4672 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4673 else
4674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4675 for as_dir in $PATH
4677 IFS=$as_save_IFS
4678 test -z "$as_dir" && as_dir=.
4679 for ac_exec_ext in '' $ac_executable_extensions; do
4680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4681 ac_cv_prog_ac_ct_CC="gcc"
4682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4683 break 2
4685 done
4686 done
4687 IFS=$as_save_IFS
4691 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4692 if test -n "$ac_ct_CC"; then
4693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4694 $as_echo "$ac_ct_CC" >&6; }
4695 else
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697 $as_echo "no" >&6; }
4700 if test "x$ac_ct_CC" = x; then
4701 CC=""
4702 else
4703 case $cross_compiling:$ac_tool_warned in
4704 yes:)
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4706 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4707 ac_tool_warned=yes ;;
4708 esac
4709 CC=$ac_ct_CC
4711 else
4712 CC="$ac_cv_prog_CC"
4715 if test -z "$CC"; then
4716 if test -n "$ac_tool_prefix"; then
4717 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4718 set dummy ${ac_tool_prefix}cc; ac_word=$2
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4720 $as_echo_n "checking for $ac_word... " >&6; }
4721 if test "${ac_cv_prog_CC+set}" = set; then :
4722 $as_echo_n "(cached) " >&6
4723 else
4724 if test -n "$CC"; then
4725 ac_cv_prog_CC="$CC" # Let the user override the test.
4726 else
4727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4728 for as_dir in $PATH
4730 IFS=$as_save_IFS
4731 test -z "$as_dir" && as_dir=.
4732 for ac_exec_ext in '' $ac_executable_extensions; do
4733 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4734 ac_cv_prog_CC="${ac_tool_prefix}cc"
4735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4736 break 2
4738 done
4739 done
4740 IFS=$as_save_IFS
4744 CC=$ac_cv_prog_CC
4745 if test -n "$CC"; then
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4747 $as_echo "$CC" >&6; }
4748 else
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750 $as_echo "no" >&6; }
4756 if test -z "$CC"; then
4757 # Extract the first word of "cc", so it can be a program name with args.
4758 set dummy cc; ac_word=$2
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760 $as_echo_n "checking for $ac_word... " >&6; }
4761 if test "${ac_cv_prog_CC+set}" = set; then :
4762 $as_echo_n "(cached) " >&6
4763 else
4764 if test -n "$CC"; then
4765 ac_cv_prog_CC="$CC" # Let the user override the test.
4766 else
4767 ac_prog_rejected=no
4768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4769 for as_dir in $PATH
4771 IFS=$as_save_IFS
4772 test -z "$as_dir" && as_dir=.
4773 for ac_exec_ext in '' $ac_executable_extensions; do
4774 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4775 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4776 ac_prog_rejected=yes
4777 continue
4779 ac_cv_prog_CC="cc"
4780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4781 break 2
4783 done
4784 done
4785 IFS=$as_save_IFS
4787 if test $ac_prog_rejected = yes; then
4788 # We found a bogon in the path, so make sure we never use it.
4789 set dummy $ac_cv_prog_CC
4790 shift
4791 if test $# != 0; then
4792 # We chose a different compiler from the bogus one.
4793 # However, it has the same basename, so the bogon will be chosen
4794 # first if we set CC to just the basename; use the full file name.
4795 shift
4796 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4801 CC=$ac_cv_prog_CC
4802 if test -n "$CC"; then
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4804 $as_echo "$CC" >&6; }
4805 else
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807 $as_echo "no" >&6; }
4812 if test -z "$CC"; then
4813 if test -n "$ac_tool_prefix"; then
4814 for ac_prog in cl.exe
4816 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4817 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819 $as_echo_n "checking for $ac_word... " >&6; }
4820 if test "${ac_cv_prog_CC+set}" = set; then :
4821 $as_echo_n "(cached) " >&6
4822 else
4823 if test -n "$CC"; then
4824 ac_cv_prog_CC="$CC" # Let the user override the test.
4825 else
4826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827 for as_dir in $PATH
4829 IFS=$as_save_IFS
4830 test -z "$as_dir" && as_dir=.
4831 for ac_exec_ext in '' $ac_executable_extensions; do
4832 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4833 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835 break 2
4837 done
4838 done
4839 IFS=$as_save_IFS
4843 CC=$ac_cv_prog_CC
4844 if test -n "$CC"; then
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4846 $as_echo "$CC" >&6; }
4847 else
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849 $as_echo "no" >&6; }
4853 test -n "$CC" && break
4854 done
4856 if test -z "$CC"; then
4857 ac_ct_CC=$CC
4858 for ac_prog in cl.exe
4860 # Extract the first word of "$ac_prog", so it can be a program name with args.
4861 set dummy $ac_prog; ac_word=$2
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863 $as_echo_n "checking for $ac_word... " >&6; }
4864 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4865 $as_echo_n "(cached) " >&6
4866 else
4867 if test -n "$ac_ct_CC"; then
4868 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4869 else
4870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871 for as_dir in $PATH
4873 IFS=$as_save_IFS
4874 test -z "$as_dir" && as_dir=.
4875 for ac_exec_ext in '' $ac_executable_extensions; do
4876 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4877 ac_cv_prog_ac_ct_CC="$ac_prog"
4878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879 break 2
4881 done
4882 done
4883 IFS=$as_save_IFS
4887 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4888 if test -n "$ac_ct_CC"; then
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4890 $as_echo "$ac_ct_CC" >&6; }
4891 else
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4893 $as_echo "no" >&6; }
4897 test -n "$ac_ct_CC" && break
4898 done
4900 if test "x$ac_ct_CC" = x; then
4901 CC=""
4902 else
4903 case $cross_compiling:$ac_tool_warned in
4904 yes:)
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4906 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4907 ac_tool_warned=yes ;;
4908 esac
4909 CC=$ac_ct_CC
4916 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4917 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4918 as_fn_error "no acceptable C compiler found in \$PATH
4919 See \`config.log' for more details." "$LINENO" 5; }
4921 # Provide some information about the compiler.
4922 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4923 set X $ac_compile
4924 ac_compiler=$2
4925 for ac_option in --version -v -V -qversion; do
4926 { { ac_try="$ac_compiler $ac_option >&5"
4927 case "(($ac_try" in
4928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4929 *) ac_try_echo=$ac_try;;
4930 esac
4931 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4932 $as_echo "$ac_try_echo"; } >&5
4933 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4934 ac_status=$?
4935 if test -s conftest.err; then
4936 sed '10a\
4937 ... rest of stderr output deleted ...
4938 10q' conftest.err >conftest.er1
4939 cat conftest.er1 >&5
4941 rm -f conftest.er1 conftest.err
4942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4943 test $ac_status = 0; }
4944 done
4946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4947 /* end confdefs.h. */
4950 main ()
4954 return 0;
4956 _ACEOF
4957 ac_clean_files_save=$ac_clean_files
4958 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4959 # Try to create an executable without -o first, disregard a.out.
4960 # It will help us diagnose broken compilers, and finding out an intuition
4961 # of exeext.
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4963 $as_echo_n "checking whether the C compiler works... " >&6; }
4964 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4966 # The possible output files:
4967 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4969 ac_rmfiles=
4970 for ac_file in $ac_files
4972 case $ac_file in
4973 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4974 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4975 esac
4976 done
4977 rm -f $ac_rmfiles
4979 if { { ac_try="$ac_link_default"
4980 case "(($ac_try" in
4981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4982 *) ac_try_echo=$ac_try;;
4983 esac
4984 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4985 $as_echo "$ac_try_echo"; } >&5
4986 (eval "$ac_link_default") 2>&5
4987 ac_status=$?
4988 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4989 test $ac_status = 0; }; then :
4990 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4991 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4992 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4993 # so that the user can short-circuit this test for compilers unknown to
4994 # Autoconf.
4995 for ac_file in $ac_files ''
4997 test -f "$ac_file" || continue
4998 case $ac_file in
4999 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5001 [ab].out )
5002 # We found the default executable, but exeext='' is most
5003 # certainly right.
5004 break;;
5005 *.* )
5006 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5007 then :; else
5008 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5010 # We set ac_cv_exeext here because the later test for it is not
5011 # safe: cross compilers may not add the suffix if given an `-o'
5012 # argument, so we may need to know it at that point already.
5013 # Even if this section looks crufty: it has the advantage of
5014 # actually working.
5015 break;;
5017 break;;
5018 esac
5019 done
5020 test "$ac_cv_exeext" = no && ac_cv_exeext=
5022 else
5023 ac_file=''
5025 if test -z "$ac_file"; then :
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027 $as_echo "no" >&6; }
5028 $as_echo "$as_me: failed program was:" >&5
5029 sed 's/^/| /' conftest.$ac_ext >&5
5031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5032 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5033 { as_fn_set_status 77
5034 as_fn_error "C compiler cannot create executables
5035 See \`config.log' for more details." "$LINENO" 5; }; }
5036 else
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5038 $as_echo "yes" >&6; }
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5041 $as_echo_n "checking for C compiler default output file name... " >&6; }
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5043 $as_echo "$ac_file" >&6; }
5044 ac_exeext=$ac_cv_exeext
5046 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5047 ac_clean_files=$ac_clean_files_save
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5049 $as_echo_n "checking for suffix of executables... " >&6; }
5050 if { { ac_try="$ac_link"
5051 case "(($ac_try" in
5052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5053 *) ac_try_echo=$ac_try;;
5054 esac
5055 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5056 $as_echo "$ac_try_echo"; } >&5
5057 (eval "$ac_link") 2>&5
5058 ac_status=$?
5059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5060 test $ac_status = 0; }; then :
5061 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5062 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5063 # work properly (i.e., refer to `conftest.exe'), while it won't with
5064 # `rm'.
5065 for ac_file in conftest.exe conftest conftest.*; do
5066 test -f "$ac_file" || continue
5067 case $ac_file in
5068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5069 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5070 break;;
5071 * ) break;;
5072 esac
5073 done
5074 else
5075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5076 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5077 as_fn_error "cannot compute suffix of executables: cannot compile and link
5078 See \`config.log' for more details." "$LINENO" 5; }
5080 rm -f conftest conftest$ac_cv_exeext
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5082 $as_echo "$ac_cv_exeext" >&6; }
5084 rm -f conftest.$ac_ext
5085 EXEEXT=$ac_cv_exeext
5086 ac_exeext=$EXEEXT
5087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5088 /* end confdefs.h. */
5089 #include <stdio.h>
5091 main ()
5093 FILE *f = fopen ("conftest.out", "w");
5094 return ferror (f) || fclose (f) != 0;
5097 return 0;
5099 _ACEOF
5100 ac_clean_files="$ac_clean_files conftest.out"
5101 # Check that the compiler produces executables we can run. If not, either
5102 # the compiler is broken, or we cross compile.
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5104 $as_echo_n "checking whether we are cross compiling... " >&6; }
5105 if test "$cross_compiling" != yes; then
5106 { { ac_try="$ac_link"
5107 case "(($ac_try" in
5108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5109 *) ac_try_echo=$ac_try;;
5110 esac
5111 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5112 $as_echo "$ac_try_echo"; } >&5
5113 (eval "$ac_link") 2>&5
5114 ac_status=$?
5115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5116 test $ac_status = 0; }
5117 if { ac_try='./conftest$ac_cv_exeext'
5118 { { case "(($ac_try" in
5119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5120 *) ac_try_echo=$ac_try;;
5121 esac
5122 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5123 $as_echo "$ac_try_echo"; } >&5
5124 (eval "$ac_try") 2>&5
5125 ac_status=$?
5126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5127 test $ac_status = 0; }; }; then
5128 cross_compiling=no
5129 else
5130 if test "$cross_compiling" = maybe; then
5131 cross_compiling=yes
5132 else
5133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5134 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5135 as_fn_error "cannot run C compiled programs.
5136 If you meant to cross compile, use \`--host'.
5137 See \`config.log' for more details." "$LINENO" 5; }
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5142 $as_echo "$cross_compiling" >&6; }
5144 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5145 ac_clean_files=$ac_clean_files_save
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5147 $as_echo_n "checking for suffix of object files... " >&6; }
5148 if test "${ac_cv_objext+set}" = set; then :
5149 $as_echo_n "(cached) " >&6
5150 else
5151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5152 /* end confdefs.h. */
5155 main ()
5159 return 0;
5161 _ACEOF
5162 rm -f conftest.o conftest.obj
5163 if { { ac_try="$ac_compile"
5164 case "(($ac_try" in
5165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5166 *) ac_try_echo=$ac_try;;
5167 esac
5168 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5169 $as_echo "$ac_try_echo"; } >&5
5170 (eval "$ac_compile") 2>&5
5171 ac_status=$?
5172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5173 test $ac_status = 0; }; then :
5174 for ac_file in conftest.o conftest.obj conftest.*; do
5175 test -f "$ac_file" || continue;
5176 case $ac_file in
5177 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5178 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5179 break;;
5180 esac
5181 done
5182 else
5183 $as_echo "$as_me: failed program was:" >&5
5184 sed 's/^/| /' conftest.$ac_ext >&5
5186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5187 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5188 as_fn_error "cannot compute suffix of object files: cannot compile
5189 See \`config.log' for more details." "$LINENO" 5; }
5191 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5194 $as_echo "$ac_cv_objext" >&6; }
5195 OBJEXT=$ac_cv_objext
5196 ac_objext=$OBJEXT
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5198 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5199 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5200 $as_echo_n "(cached) " >&6
5201 else
5202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5203 /* end confdefs.h. */
5206 main ()
5208 #ifndef __GNUC__
5209 choke me
5210 #endif
5213 return 0;
5215 _ACEOF
5216 if ac_fn_c_try_compile "$LINENO"; then :
5217 ac_compiler_gnu=yes
5218 else
5219 ac_compiler_gnu=no
5221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5222 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5226 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5227 if test $ac_compiler_gnu = yes; then
5228 GCC=yes
5229 else
5230 GCC=
5232 ac_test_CFLAGS=${CFLAGS+set}
5233 ac_save_CFLAGS=$CFLAGS
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5235 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5236 if test "${ac_cv_prog_cc_g+set}" = set; then :
5237 $as_echo_n "(cached) " >&6
5238 else
5239 ac_save_c_werror_flag=$ac_c_werror_flag
5240 ac_c_werror_flag=yes
5241 ac_cv_prog_cc_g=no
5242 CFLAGS="-g"
5243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5244 /* end confdefs.h. */
5247 main ()
5251 return 0;
5253 _ACEOF
5254 if ac_fn_c_try_compile "$LINENO"; then :
5255 ac_cv_prog_cc_g=yes
5256 else
5257 CFLAGS=""
5258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5259 /* end confdefs.h. */
5262 main ()
5266 return 0;
5268 _ACEOF
5269 if ac_fn_c_try_compile "$LINENO"; then :
5271 else
5272 ac_c_werror_flag=$ac_save_c_werror_flag
5273 CFLAGS="-g"
5274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5275 /* end confdefs.h. */
5278 main ()
5282 return 0;
5284 _ACEOF
5285 if ac_fn_c_try_compile "$LINENO"; then :
5286 ac_cv_prog_cc_g=yes
5288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5293 ac_c_werror_flag=$ac_save_c_werror_flag
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5296 $as_echo "$ac_cv_prog_cc_g" >&6; }
5297 if test "$ac_test_CFLAGS" = set; then
5298 CFLAGS=$ac_save_CFLAGS
5299 elif test $ac_cv_prog_cc_g = yes; then
5300 if test "$GCC" = yes; then
5301 CFLAGS="-g -O2"
5302 else
5303 CFLAGS="-g"
5305 else
5306 if test "$GCC" = yes; then
5307 CFLAGS="-O2"
5308 else
5309 CFLAGS=
5312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5313 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5314 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5315 $as_echo_n "(cached) " >&6
5316 else
5317 ac_cv_prog_cc_c89=no
5318 ac_save_CC=$CC
5319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320 /* end confdefs.h. */
5321 #include <stdarg.h>
5322 #include <stdio.h>
5323 #include <sys/types.h>
5324 #include <sys/stat.h>
5325 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5326 struct buf { int x; };
5327 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5328 static char *e (p, i)
5329 char **p;
5330 int i;
5332 return p[i];
5334 static char *f (char * (*g) (char **, int), char **p, ...)
5336 char *s;
5337 va_list v;
5338 va_start (v,p);
5339 s = g (p, va_arg (v,int));
5340 va_end (v);
5341 return s;
5344 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5345 function prototypes and stuff, but not '\xHH' hex character constants.
5346 These don't provoke an error unfortunately, instead are silently treated
5347 as 'x'. The following induces an error, until -std is added to get
5348 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5349 array size at least. It's necessary to write '\x00'==0 to get something
5350 that's true only with -std. */
5351 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5353 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5354 inside strings and character constants. */
5355 #define FOO(x) 'x'
5356 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5358 int test (int i, double x);
5359 struct s1 {int (*f) (int a);};
5360 struct s2 {int (*f) (double a);};
5361 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5362 int argc;
5363 char **argv;
5365 main ()
5367 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5369 return 0;
5371 _ACEOF
5372 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5373 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5375 CC="$ac_save_CC $ac_arg"
5376 if ac_fn_c_try_compile "$LINENO"; then :
5377 ac_cv_prog_cc_c89=$ac_arg
5379 rm -f core conftest.err conftest.$ac_objext
5380 test "x$ac_cv_prog_cc_c89" != "xno" && break
5381 done
5382 rm -f conftest.$ac_ext
5383 CC=$ac_save_CC
5386 # AC_CACHE_VAL
5387 case "x$ac_cv_prog_cc_c89" in
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5390 $as_echo "none needed" >&6; } ;;
5391 xno)
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5393 $as_echo "unsupported" >&6; } ;;
5395 CC="$CC $ac_cv_prog_cc_c89"
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5397 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5398 esac
5399 if test "x$ac_cv_prog_cc_c89" != xno; then :
5403 ac_ext=c
5404 ac_cpp='$CPP $CPPFLAGS'
5405 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5406 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5407 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5408 DEPDIR="${am__leading_dot}deps"
5410 ac_config_commands="$ac_config_commands depfiles"
5413 am_make=${MAKE-make}
5414 cat > confinc << 'END'
5415 am__doit:
5416 @echo this is the am__doit target
5417 .PHONY: am__doit
5419 # If we don't find an include directive, just comment out the code.
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5421 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5422 am__include="#"
5423 am__quote=
5424 _am_result=none
5425 # First try GNU make style include.
5426 echo "include confinc" > confmf
5427 # Ignore all kinds of additional output from `make'.
5428 case `$am_make -s -f confmf 2> /dev/null` in #(
5429 *the\ am__doit\ target*)
5430 am__include=include
5431 am__quote=
5432 _am_result=GNU
5434 esac
5435 # Now try BSD make style include.
5436 if test "$am__include" = "#"; then
5437 echo '.include "confinc"' > confmf
5438 case `$am_make -s -f confmf 2> /dev/null` in #(
5439 *the\ am__doit\ target*)
5440 am__include=.include
5441 am__quote="\""
5442 _am_result=BSD
5444 esac
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5449 $as_echo "$_am_result" >&6; }
5450 rm -f confinc confmf
5452 # Check whether --enable-dependency-tracking was given.
5453 if test "${enable_dependency_tracking+set}" = set; then :
5454 enableval=$enable_dependency_tracking;
5457 if test "x$enable_dependency_tracking" != xno; then
5458 am_depcomp="$ac_aux_dir/depcomp"
5459 AMDEPBACKSLASH='\'
5461 if test "x$enable_dependency_tracking" != xno; then
5462 AMDEP_TRUE=
5463 AMDEP_FALSE='#'
5464 else
5465 AMDEP_TRUE='#'
5466 AMDEP_FALSE=
5471 depcc="$CC" am_compiler_list=
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5474 $as_echo_n "checking dependency style of $depcc... " >&6; }
5475 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5476 $as_echo_n "(cached) " >&6
5477 else
5478 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5479 # We make a subdir and do the tests there. Otherwise we can end up
5480 # making bogus files that we don't know about and never remove. For
5481 # instance it was reported that on HP-UX the gcc test will end up
5482 # making a dummy file named `D' -- because `-MD' means `put the output
5483 # in D'.
5484 mkdir conftest.dir
5485 # Copy depcomp to subdir because otherwise we won't find it if we're
5486 # using a relative directory.
5487 cp "$am_depcomp" conftest.dir
5488 cd conftest.dir
5489 # We will build objects and dependencies in a subdirectory because
5490 # it helps to detect inapplicable dependency modes. For instance
5491 # both Tru64's cc and ICC support -MD to output dependencies as a
5492 # side effect of compilation, but ICC will put the dependencies in
5493 # the current directory while Tru64 will put them in the object
5494 # directory.
5495 mkdir sub
5497 am_cv_CC_dependencies_compiler_type=none
5498 if test "$am_compiler_list" = ""; then
5499 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5501 am__universal=false
5502 case " $depcc " in #(
5503 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5504 esac
5506 for depmode in $am_compiler_list; do
5507 # Setup a source with many dependencies, because some compilers
5508 # like to wrap large dependency lists on column 80 (with \), and
5509 # we should not choose a depcomp mode which is confused by this.
5511 # We need to recreate these files for each test, as the compiler may
5512 # overwrite some of them when testing with obscure command lines.
5513 # This happens at least with the AIX C compiler.
5514 : > sub/conftest.c
5515 for i in 1 2 3 4 5 6; do
5516 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5517 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5518 # Solaris 8's {/usr,}/bin/sh.
5519 touch sub/conftst$i.h
5520 done
5521 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5523 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5524 # mode. It turns out that the SunPro C++ compiler does not properly
5525 # handle `-M -o', and we need to detect this. Also, some Intel
5526 # versions had trouble with output in subdirs
5527 am__obj=sub/conftest.${OBJEXT-o}
5528 am__minus_obj="-o $am__obj"
5529 case $depmode in
5530 gcc)
5531 # This depmode causes a compiler race in universal mode.
5532 test "$am__universal" = false || continue
5534 nosideeffect)
5535 # after this tag, mechanisms are not by side-effect, so they'll
5536 # only be used when explicitly requested
5537 if test "x$enable_dependency_tracking" = xyes; then
5538 continue
5539 else
5540 break
5543 msvisualcpp | msvcmsys)
5544 # This compiler won't grok `-c -o', but also, the minuso test has
5545 # not run yet. These depmodes are late enough in the game, and
5546 # so weak that their functioning should not be impacted.
5547 am__obj=conftest.${OBJEXT-o}
5548 am__minus_obj=
5550 none) break ;;
5551 esac
5552 if depmode=$depmode \
5553 source=sub/conftest.c object=$am__obj \
5554 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5555 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5556 >/dev/null 2>conftest.err &&
5557 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5558 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5559 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5560 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5561 # icc doesn't choke on unknown options, it will just issue warnings
5562 # or remarks (even with -Werror). So we grep stderr for any message
5563 # that says an option was ignored or not supported.
5564 # When given -MP, icc 7.0 and 7.1 complain thusly:
5565 # icc: Command line warning: ignoring option '-M'; no argument required
5566 # The diagnosis changed in icc 8.0:
5567 # icc: Command line remark: option '-MP' not supported
5568 if (grep 'ignoring option' conftest.err ||
5569 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5570 am_cv_CC_dependencies_compiler_type=$depmode
5571 break
5574 done
5576 cd ..
5577 rm -rf conftest.dir
5578 else
5579 am_cv_CC_dependencies_compiler_type=none
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5584 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5585 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5588 test "x$enable_dependency_tracking" != xno \
5589 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5590 am__fastdepCC_TRUE=
5591 am__fastdepCC_FALSE='#'
5592 else
5593 am__fastdepCC_TRUE='#'
5594 am__fastdepCC_FALSE=
5598 if test "x$CC" != xcc; then
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5600 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5601 else
5602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5603 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5605 set dummy $CC; ac_cc=`$as_echo "$2" |
5606 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5607 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5608 $as_echo_n "(cached) " >&6
5609 else
5610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5611 /* end confdefs.h. */
5614 main ()
5618 return 0;
5620 _ACEOF
5621 # Make sure it works both with $CC and with simple cc.
5622 # We do the test twice because some compilers refuse to overwrite an
5623 # existing .o file with -o, though they will create one.
5624 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5625 rm -f conftest2.*
5626 if { { case "(($ac_try" in
5627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5628 *) ac_try_echo=$ac_try;;
5629 esac
5630 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5631 $as_echo "$ac_try_echo"; } >&5
5632 (eval "$ac_try") 2>&5
5633 ac_status=$?
5634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5635 test $ac_status = 0; } &&
5636 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5638 *) ac_try_echo=$ac_try;;
5639 esac
5640 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5641 $as_echo "$ac_try_echo"; } >&5
5642 (eval "$ac_try") 2>&5
5643 ac_status=$?
5644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5645 test $ac_status = 0; };
5646 then
5647 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5648 if test "x$CC" != xcc; then
5649 # Test first that cc exists at all.
5650 if { ac_try='cc -c conftest.$ac_ext >&5'
5651 { { case "(($ac_try" in
5652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5653 *) ac_try_echo=$ac_try;;
5654 esac
5655 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5656 $as_echo "$ac_try_echo"; } >&5
5657 (eval "$ac_try") 2>&5
5658 ac_status=$?
5659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5660 test $ac_status = 0; }; }; then
5661 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5662 rm -f conftest2.*
5663 if { { case "(($ac_try" in
5664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5665 *) ac_try_echo=$ac_try;;
5666 esac
5667 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5668 $as_echo "$ac_try_echo"; } >&5
5669 (eval "$ac_try") 2>&5
5670 ac_status=$?
5671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5672 test $ac_status = 0; } &&
5673 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5675 *) ac_try_echo=$ac_try;;
5676 esac
5677 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5678 $as_echo "$ac_try_echo"; } >&5
5679 (eval "$ac_try") 2>&5
5680 ac_status=$?
5681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5682 test $ac_status = 0; };
5683 then
5684 # cc works too.
5686 else
5687 # cc exists but doesn't like -o.
5688 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5692 else
5693 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5695 rm -f core conftest*
5698 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5700 $as_echo "yes" >&6; }
5701 else
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5703 $as_echo "no" >&6; }
5705 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5709 # FIXME: we rely on the cache variable name because
5710 # there is no other way.
5711 set dummy $CC
5712 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5713 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5714 if test "$am_t" != yes; then
5715 # Losing compiler, so override with the script.
5716 # FIXME: It is wrong to rewrite CC.
5717 # But if we don't then we get into trouble of one sort or another.
5718 # A longer-term fix would be to have automake use am__CC in this case,
5719 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5720 CC="$am_aux_dir/compile $CC"
5725 # Initialize gnulib right after verifying that the C compiler works.
5727 ac_ext=c
5728 ac_cpp='$CPP $CPPFLAGS'
5729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5733 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5734 # On Suns, sometimes $CPP names a directory.
5735 if test -n "$CPP" && test -d "$CPP"; then
5736 CPP=
5738 if test -z "$CPP"; then
5739 if test "${ac_cv_prog_CPP+set}" = set; then :
5740 $as_echo_n "(cached) " >&6
5741 else
5742 # Double quotes because CPP needs to be expanded
5743 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5745 ac_preproc_ok=false
5746 for ac_c_preproc_warn_flag in '' yes
5748 # Use a header file that comes with gcc, so configuring glibc
5749 # with a fresh cross-compiler works.
5750 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5751 # <limits.h> exists even on freestanding compilers.
5752 # On the NeXT, cc -E runs the code through the compiler's parser,
5753 # not just through cpp. "Syntax error" is here to catch this case.
5754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5755 /* end confdefs.h. */
5756 #ifdef __STDC__
5757 # include <limits.h>
5758 #else
5759 # include <assert.h>
5760 #endif
5761 Syntax error
5762 _ACEOF
5763 if ac_fn_c_try_cpp "$LINENO"; then :
5765 else
5766 # Broken: fails on valid input.
5767 continue
5769 rm -f conftest.err conftest.$ac_ext
5771 # OK, works on sane cases. Now check whether nonexistent headers
5772 # can be detected and how.
5773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5774 /* end confdefs.h. */
5775 #include <ac_nonexistent.h>
5776 _ACEOF
5777 if ac_fn_c_try_cpp "$LINENO"; then :
5778 # Broken: success on invalid input.
5779 continue
5780 else
5781 # Passes both tests.
5782 ac_preproc_ok=:
5783 break
5785 rm -f conftest.err conftest.$ac_ext
5787 done
5788 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5789 rm -f conftest.err conftest.$ac_ext
5790 if $ac_preproc_ok; then :
5791 break
5794 done
5795 ac_cv_prog_CPP=$CPP
5798 CPP=$ac_cv_prog_CPP
5799 else
5800 ac_cv_prog_CPP=$CPP
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5803 $as_echo "$CPP" >&6; }
5804 ac_preproc_ok=false
5805 for ac_c_preproc_warn_flag in '' yes
5807 # Use a header file that comes with gcc, so configuring glibc
5808 # with a fresh cross-compiler works.
5809 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5810 # <limits.h> exists even on freestanding compilers.
5811 # On the NeXT, cc -E runs the code through the compiler's parser,
5812 # not just through cpp. "Syntax error" is here to catch this case.
5813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5814 /* end confdefs.h. */
5815 #ifdef __STDC__
5816 # include <limits.h>
5817 #else
5818 # include <assert.h>
5819 #endif
5820 Syntax error
5821 _ACEOF
5822 if ac_fn_c_try_cpp "$LINENO"; then :
5824 else
5825 # Broken: fails on valid input.
5826 continue
5828 rm -f conftest.err conftest.$ac_ext
5830 # OK, works on sane cases. Now check whether nonexistent headers
5831 # can be detected and how.
5832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5833 /* end confdefs.h. */
5834 #include <ac_nonexistent.h>
5835 _ACEOF
5836 if ac_fn_c_try_cpp "$LINENO"; then :
5837 # Broken: success on invalid input.
5838 continue
5839 else
5840 # Passes both tests.
5841 ac_preproc_ok=:
5842 break
5844 rm -f conftest.err conftest.$ac_ext
5846 done
5847 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5848 rm -f conftest.err conftest.$ac_ext
5849 if $ac_preproc_ok; then :
5851 else
5852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5853 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5854 as_fn_error "C preprocessor \"$CPP\" fails sanity check
5855 See \`config.log' for more details." "$LINENO" 5; }
5858 ac_ext=c
5859 ac_cpp='$CPP $CPPFLAGS'
5860 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5861 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5862 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5866 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5867 if test "${ac_cv_path_GREP+set}" = set; then :
5868 $as_echo_n "(cached) " >&6
5869 else
5870 if test -z "$GREP"; then
5871 ac_path_GREP_found=false
5872 # Loop through the user's path and test for each of PROGNAME-LIST
5873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5876 IFS=$as_save_IFS
5877 test -z "$as_dir" && as_dir=.
5878 for ac_prog in grep ggrep; do
5879 for ac_exec_ext in '' $ac_executable_extensions; do
5880 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5881 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5882 # Check for GNU ac_path_GREP and select it if it is found.
5883 # Check for GNU $ac_path_GREP
5884 case `"$ac_path_GREP" --version 2>&1` in
5885 *GNU*)
5886 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5888 ac_count=0
5889 $as_echo_n 0123456789 >"conftest.in"
5890 while :
5892 cat "conftest.in" "conftest.in" >"conftest.tmp"
5893 mv "conftest.tmp" "conftest.in"
5894 cp "conftest.in" "conftest.nl"
5895 $as_echo 'GREP' >> "conftest.nl"
5896 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5897 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5898 as_fn_arith $ac_count + 1 && ac_count=$as_val
5899 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5900 # Best one so far, save it but keep looking for a better one
5901 ac_cv_path_GREP="$ac_path_GREP"
5902 ac_path_GREP_max=$ac_count
5904 # 10*(2^10) chars as input seems more than enough
5905 test $ac_count -gt 10 && break
5906 done
5907 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5908 esac
5910 $ac_path_GREP_found && break 3
5911 done
5912 done
5913 done
5914 IFS=$as_save_IFS
5915 if test -z "$ac_cv_path_GREP"; then
5916 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5918 else
5919 ac_cv_path_GREP=$GREP
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5924 $as_echo "$ac_cv_path_GREP" >&6; }
5925 GREP="$ac_cv_path_GREP"
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5929 $as_echo_n "checking for egrep... " >&6; }
5930 if test "${ac_cv_path_EGREP+set}" = set; then :
5931 $as_echo_n "(cached) " >&6
5932 else
5933 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5934 then ac_cv_path_EGREP="$GREP -E"
5935 else
5936 if test -z "$EGREP"; then
5937 ac_path_EGREP_found=false
5938 # Loop through the user's path and test for each of PROGNAME-LIST
5939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5942 IFS=$as_save_IFS
5943 test -z "$as_dir" && as_dir=.
5944 for ac_prog in egrep; do
5945 for ac_exec_ext in '' $ac_executable_extensions; do
5946 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5947 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5948 # Check for GNU ac_path_EGREP and select it if it is found.
5949 # Check for GNU $ac_path_EGREP
5950 case `"$ac_path_EGREP" --version 2>&1` in
5951 *GNU*)
5952 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5954 ac_count=0
5955 $as_echo_n 0123456789 >"conftest.in"
5956 while :
5958 cat "conftest.in" "conftest.in" >"conftest.tmp"
5959 mv "conftest.tmp" "conftest.in"
5960 cp "conftest.in" "conftest.nl"
5961 $as_echo 'EGREP' >> "conftest.nl"
5962 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5963 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5964 as_fn_arith $ac_count + 1 && ac_count=$as_val
5965 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5966 # Best one so far, save it but keep looking for a better one
5967 ac_cv_path_EGREP="$ac_path_EGREP"
5968 ac_path_EGREP_max=$ac_count
5970 # 10*(2^10) chars as input seems more than enough
5971 test $ac_count -gt 10 && break
5972 done
5973 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5974 esac
5976 $ac_path_EGREP_found && break 3
5977 done
5978 done
5979 done
5980 IFS=$as_save_IFS
5981 if test -z "$ac_cv_path_EGREP"; then
5982 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5984 else
5985 ac_cv_path_EGREP=$EGREP
5990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5991 $as_echo "$ac_cv_path_EGREP" >&6; }
5992 EGREP="$ac_cv_path_EGREP"
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5998 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5999 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6000 $as_echo_n "(cached) " >&6
6001 else
6003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6004 /* end confdefs.h. */
6006 #ifdef __ACK__
6007 Amsterdam
6008 #endif
6010 _ACEOF
6011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6012 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6013 gl_cv_c_amsterdam_compiler=yes
6014 else
6015 gl_cv_c_amsterdam_compiler=no
6017 rm -f conftest*
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6022 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6023 if test -z "$AR"; then
6024 if test $gl_cv_c_amsterdam_compiler = yes; then
6025 AR='cc -c.a'
6026 if test -z "$ARFLAGS"; then
6027 ARFLAGS='-o'
6029 else
6030 if test -n "$ac_tool_prefix"; then
6031 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6032 set dummy ${ac_tool_prefix}ar; ac_word=$2
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034 $as_echo_n "checking for $ac_word... " >&6; }
6035 if test "${ac_cv_prog_AR+set}" = set; then :
6036 $as_echo_n "(cached) " >&6
6037 else
6038 if test -n "$AR"; then
6039 ac_cv_prog_AR="$AR" # Let the user override the test.
6040 else
6041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042 for as_dir in $PATH
6044 IFS=$as_save_IFS
6045 test -z "$as_dir" && as_dir=.
6046 for ac_exec_ext in '' $ac_executable_extensions; do
6047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6048 ac_cv_prog_AR="${ac_tool_prefix}ar"
6049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050 break 2
6052 done
6053 done
6054 IFS=$as_save_IFS
6058 AR=$ac_cv_prog_AR
6059 if test -n "$AR"; then
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6061 $as_echo "$AR" >&6; }
6062 else
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064 $as_echo "no" >&6; }
6069 if test -z "$ac_cv_prog_AR"; then
6070 ac_ct_AR=$AR
6071 # Extract the first word of "ar", so it can be a program name with args.
6072 set dummy ar; ac_word=$2
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074 $as_echo_n "checking for $ac_word... " >&6; }
6075 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6076 $as_echo_n "(cached) " >&6
6077 else
6078 if test -n "$ac_ct_AR"; then
6079 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6080 else
6081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082 for as_dir in $PATH
6084 IFS=$as_save_IFS
6085 test -z "$as_dir" && as_dir=.
6086 for ac_exec_ext in '' $ac_executable_extensions; do
6087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6088 ac_cv_prog_ac_ct_AR="ar"
6089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6090 break 2
6092 done
6093 done
6094 IFS=$as_save_IFS
6098 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6099 if test -n "$ac_ct_AR"; then
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6101 $as_echo "$ac_ct_AR" >&6; }
6102 else
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104 $as_echo "no" >&6; }
6107 if test "x$ac_ct_AR" = x; then
6108 AR="ar"
6109 else
6110 case $cross_compiling:$ac_tool_warned in
6111 yes:)
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6113 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6114 ac_tool_warned=yes ;;
6115 esac
6116 AR=$ac_ct_AR
6118 else
6119 AR="$ac_cv_prog_AR"
6122 if test -z "$ARFLAGS"; then
6123 ARFLAGS='cru'
6126 else
6127 if test -z "$ARFLAGS"; then
6128 ARFLAGS='cru'
6133 if test -z "$RANLIB"; then
6134 if test $gl_cv_c_amsterdam_compiler = yes; then
6135 RANLIB=':'
6136 else
6137 if test -n "$ac_tool_prefix"; then
6138 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6139 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6141 $as_echo_n "checking for $ac_word... " >&6; }
6142 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6143 $as_echo_n "(cached) " >&6
6144 else
6145 if test -n "$RANLIB"; then
6146 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6147 else
6148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6149 for as_dir in $PATH
6151 IFS=$as_save_IFS
6152 test -z "$as_dir" && as_dir=.
6153 for ac_exec_ext in '' $ac_executable_extensions; do
6154 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6155 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6157 break 2
6159 done
6160 done
6161 IFS=$as_save_IFS
6165 RANLIB=$ac_cv_prog_RANLIB
6166 if test -n "$RANLIB"; then
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6168 $as_echo "$RANLIB" >&6; }
6169 else
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171 $as_echo "no" >&6; }
6176 if test -z "$ac_cv_prog_RANLIB"; then
6177 ac_ct_RANLIB=$RANLIB
6178 # Extract the first word of "ranlib", so it can be a program name with args.
6179 set dummy ranlib; ac_word=$2
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6181 $as_echo_n "checking for $ac_word... " >&6; }
6182 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6183 $as_echo_n "(cached) " >&6
6184 else
6185 if test -n "$ac_ct_RANLIB"; then
6186 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6187 else
6188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189 for as_dir in $PATH
6191 IFS=$as_save_IFS
6192 test -z "$as_dir" && as_dir=.
6193 for ac_exec_ext in '' $ac_executable_extensions; do
6194 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6195 ac_cv_prog_ac_ct_RANLIB="ranlib"
6196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6197 break 2
6199 done
6200 done
6201 IFS=$as_save_IFS
6205 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6206 if test -n "$ac_ct_RANLIB"; then
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6208 $as_echo "$ac_ct_RANLIB" >&6; }
6209 else
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211 $as_echo "no" >&6; }
6214 if test "x$ac_ct_RANLIB" = x; then
6215 RANLIB=":"
6216 else
6217 case $cross_compiling:$ac_tool_warned in
6218 yes:)
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6220 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6221 ac_tool_warned=yes ;;
6222 esac
6223 RANLIB=$ac_ct_RANLIB
6225 else
6226 RANLIB="$ac_cv_prog_RANLIB"
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6234 $as_echo_n "checking for ANSI C header files... " >&6; }
6235 if test "${ac_cv_header_stdc+set}" = set; then :
6236 $as_echo_n "(cached) " >&6
6237 else
6238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6239 /* end confdefs.h. */
6240 #include <stdlib.h>
6241 #include <stdarg.h>
6242 #include <string.h>
6243 #include <float.h>
6246 main ()
6250 return 0;
6252 _ACEOF
6253 if ac_fn_c_try_compile "$LINENO"; then :
6254 ac_cv_header_stdc=yes
6255 else
6256 ac_cv_header_stdc=no
6258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6260 if test $ac_cv_header_stdc = yes; then
6261 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6263 /* end confdefs.h. */
6264 #include <string.h>
6266 _ACEOF
6267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6268 $EGREP "memchr" >/dev/null 2>&1; then :
6270 else
6271 ac_cv_header_stdc=no
6273 rm -f conftest*
6277 if test $ac_cv_header_stdc = yes; then
6278 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6280 /* end confdefs.h. */
6281 #include <stdlib.h>
6283 _ACEOF
6284 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6285 $EGREP "free" >/dev/null 2>&1; then :
6287 else
6288 ac_cv_header_stdc=no
6290 rm -f conftest*
6294 if test $ac_cv_header_stdc = yes; then
6295 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6296 if test "$cross_compiling" = yes; then :
6298 else
6299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6300 /* end confdefs.h. */
6301 #include <ctype.h>
6302 #include <stdlib.h>
6303 #if ((' ' & 0x0FF) == 0x020)
6304 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6305 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6306 #else
6307 # define ISLOWER(c) \
6308 (('a' <= (c) && (c) <= 'i') \
6309 || ('j' <= (c) && (c) <= 'r') \
6310 || ('s' <= (c) && (c) <= 'z'))
6311 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6312 #endif
6314 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6316 main ()
6318 int i;
6319 for (i = 0; i < 256; i++)
6320 if (XOR (islower (i), ISLOWER (i))
6321 || toupper (i) != TOUPPER (i))
6322 return 2;
6323 return 0;
6325 _ACEOF
6326 if ac_fn_c_try_run "$LINENO"; then :
6328 else
6329 ac_cv_header_stdc=no
6331 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6332 conftest.$ac_objext conftest.beam conftest.$ac_ext
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6338 $as_echo "$ac_cv_header_stdc" >&6; }
6339 if test $ac_cv_header_stdc = yes; then
6341 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6345 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6346 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6347 inttypes.h stdint.h unistd.h
6348 do :
6349 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6350 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6352 eval as_val=\$$as_ac_Header
6353 if test "x$as_val" = x""yes; then :
6354 cat >>confdefs.h <<_ACEOF
6355 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6356 _ACEOF
6360 done
6366 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6367 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6368 MINIX=yes
6369 else
6370 MINIX=
6374 if test "$MINIX" = yes; then
6376 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6379 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6382 $as_echo "#define _MINIX 1" >>confdefs.h
6386 case "$host_os" in
6387 hpux*)
6389 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6392 esac
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6396 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6397 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6398 $as_echo_n "(cached) " >&6
6399 else
6400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6401 /* end confdefs.h. */
6403 # define __EXTENSIONS__ 1
6404 $ac_includes_default
6406 main ()
6410 return 0;
6412 _ACEOF
6413 if ac_fn_c_try_compile "$LINENO"; then :
6414 ac_cv_safe_to_define___extensions__=yes
6415 else
6416 ac_cv_safe_to_define___extensions__=no
6418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6421 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6422 test $ac_cv_safe_to_define___extensions__ = yes &&
6423 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6425 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6427 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6429 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6431 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6433 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6442 # Check whether --enable-largefile was given.
6443 if test "${enable_largefile+set}" = set; then :
6444 enableval=$enable_largefile;
6447 if test "$enable_largefile" != no; then
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6450 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6451 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6452 $as_echo_n "(cached) " >&6
6453 else
6454 ac_cv_sys_largefile_CC=no
6455 if test "$GCC" != yes; then
6456 ac_save_CC=$CC
6457 while :; do
6458 # IRIX 6.2 and later do not support large files by default,
6459 # so use the C compiler's -n32 option if that helps.
6460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6461 /* end confdefs.h. */
6462 #include <sys/types.h>
6463 /* Check that off_t can represent 2**63 - 1 correctly.
6464 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6465 since some C++ compilers masquerading as C compilers
6466 incorrectly reject 9223372036854775807. */
6467 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6468 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6469 && LARGE_OFF_T % 2147483647 == 1)
6470 ? 1 : -1];
6472 main ()
6476 return 0;
6478 _ACEOF
6479 if ac_fn_c_try_compile "$LINENO"; then :
6480 break
6482 rm -f core conftest.err conftest.$ac_objext
6483 CC="$CC -n32"
6484 if ac_fn_c_try_compile "$LINENO"; then :
6485 ac_cv_sys_largefile_CC=' -n32'; break
6487 rm -f core conftest.err conftest.$ac_objext
6488 break
6489 done
6490 CC=$ac_save_CC
6491 rm -f conftest.$ac_ext
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6495 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6496 if test "$ac_cv_sys_largefile_CC" != no; then
6497 CC=$CC$ac_cv_sys_largefile_CC
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6501 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6502 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6503 $as_echo_n "(cached) " >&6
6504 else
6505 while :; do
6506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6507 /* end confdefs.h. */
6508 #include <sys/types.h>
6509 /* Check that off_t can represent 2**63 - 1 correctly.
6510 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6511 since some C++ compilers masquerading as C compilers
6512 incorrectly reject 9223372036854775807. */
6513 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6514 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6515 && LARGE_OFF_T % 2147483647 == 1)
6516 ? 1 : -1];
6518 main ()
6522 return 0;
6524 _ACEOF
6525 if ac_fn_c_try_compile "$LINENO"; then :
6526 ac_cv_sys_file_offset_bits=no; break
6528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6530 /* end confdefs.h. */
6531 #define _FILE_OFFSET_BITS 64
6532 #include <sys/types.h>
6533 /* Check that off_t can represent 2**63 - 1 correctly.
6534 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6535 since some C++ compilers masquerading as C compilers
6536 incorrectly reject 9223372036854775807. */
6537 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6538 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6539 && LARGE_OFF_T % 2147483647 == 1)
6540 ? 1 : -1];
6542 main ()
6546 return 0;
6548 _ACEOF
6549 if ac_fn_c_try_compile "$LINENO"; then :
6550 ac_cv_sys_file_offset_bits=64; break
6552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6553 ac_cv_sys_file_offset_bits=unknown
6554 break
6555 done
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6558 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6559 case $ac_cv_sys_file_offset_bits in #(
6560 no | unknown) ;;
6562 cat >>confdefs.h <<_ACEOF
6563 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6564 _ACEOF
6566 esac
6567 rm -rf conftest*
6568 if test $ac_cv_sys_file_offset_bits = unknown; then
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6570 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6571 if test "${ac_cv_sys_large_files+set}" = set; then :
6572 $as_echo_n "(cached) " >&6
6573 else
6574 while :; do
6575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6576 /* end confdefs.h. */
6577 #include <sys/types.h>
6578 /* Check that off_t can represent 2**63 - 1 correctly.
6579 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6580 since some C++ compilers masquerading as C compilers
6581 incorrectly reject 9223372036854775807. */
6582 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6583 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6584 && LARGE_OFF_T % 2147483647 == 1)
6585 ? 1 : -1];
6587 main ()
6591 return 0;
6593 _ACEOF
6594 if ac_fn_c_try_compile "$LINENO"; then :
6595 ac_cv_sys_large_files=no; break
6597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6599 /* end confdefs.h. */
6600 #define _LARGE_FILES 1
6601 #include <sys/types.h>
6602 /* Check that off_t can represent 2**63 - 1 correctly.
6603 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6604 since some C++ compilers masquerading as C compilers
6605 incorrectly reject 9223372036854775807. */
6606 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6607 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6608 && LARGE_OFF_T % 2147483647 == 1)
6609 ? 1 : -1];
6611 main ()
6615 return 0;
6617 _ACEOF
6618 if ac_fn_c_try_compile "$LINENO"; then :
6619 ac_cv_sys_large_files=1; break
6621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6622 ac_cv_sys_large_files=unknown
6623 break
6624 done
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6627 $as_echo "$ac_cv_sys_large_files" >&6; }
6628 case $ac_cv_sys_large_files in #(
6629 no | unknown) ;;
6631 cat >>confdefs.h <<_ACEOF
6632 #define _LARGE_FILES $ac_cv_sys_large_files
6633 _ACEOF
6635 esac
6636 rm -rf conftest*
6642 case $ac_cv_prog_cc_stdc in #(
6643 no) :
6644 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6645 *) :
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6647 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6648 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6649 $as_echo_n "(cached) " >&6
6650 else
6651 ac_cv_prog_cc_c99=no
6652 ac_save_CC=$CC
6653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6654 /* end confdefs.h. */
6655 #include <stdarg.h>
6656 #include <stdbool.h>
6657 #include <stdlib.h>
6658 #include <wchar.h>
6659 #include <stdio.h>
6661 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6662 #define debug(...) fprintf (stderr, __VA_ARGS__)
6663 #define showlist(...) puts (#__VA_ARGS__)
6664 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6665 static void
6666 test_varargs_macros (void)
6668 int x = 1234;
6669 int y = 5678;
6670 debug ("Flag");
6671 debug ("X = %d\n", x);
6672 showlist (The first, second, and third items.);
6673 report (x>y, "x is %d but y is %d", x, y);
6676 // Check long long types.
6677 #define BIG64 18446744073709551615ull
6678 #define BIG32 4294967295ul
6679 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6680 #if !BIG_OK
6681 your preprocessor is broken;
6682 #endif
6683 #if BIG_OK
6684 #else
6685 your preprocessor is broken;
6686 #endif
6687 static long long int bignum = -9223372036854775807LL;
6688 static unsigned long long int ubignum = BIG64;
6690 struct incomplete_array
6692 int datasize;
6693 double data[];
6696 struct named_init {
6697 int number;
6698 const wchar_t *name;
6699 double average;
6702 typedef const char *ccp;
6704 static inline int
6705 test_restrict (ccp restrict text)
6707 // See if C++-style comments work.
6708 // Iterate through items via the restricted pointer.
6709 // Also check for declarations in for loops.
6710 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6711 continue;
6712 return 0;
6715 // Check varargs and va_copy.
6716 static void
6717 test_varargs (const char *format, ...)
6719 va_list args;
6720 va_start (args, format);
6721 va_list args_copy;
6722 va_copy (args_copy, args);
6724 const char *str;
6725 int number;
6726 float fnumber;
6728 while (*format)
6730 switch (*format++)
6732 case 's': // string
6733 str = va_arg (args_copy, const char *);
6734 break;
6735 case 'd': // int
6736 number = va_arg (args_copy, int);
6737 break;
6738 case 'f': // float
6739 fnumber = va_arg (args_copy, double);
6740 break;
6741 default:
6742 break;
6745 va_end (args_copy);
6746 va_end (args);
6750 main ()
6753 // Check bool.
6754 _Bool success = false;
6756 // Check restrict.
6757 if (test_restrict ("String literal") == 0)
6758 success = true;
6759 char *restrict newvar = "Another string";
6761 // Check varargs.
6762 test_varargs ("s, d' f .", "string", 65, 34.234);
6763 test_varargs_macros ();
6765 // Check flexible array members.
6766 struct incomplete_array *ia =
6767 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6768 ia->datasize = 10;
6769 for (int i = 0; i < ia->datasize; ++i)
6770 ia->data[i] = i * 1.234;
6772 // Check named initializers.
6773 struct named_init ni = {
6774 .number = 34,
6775 .name = L"Test wide string",
6776 .average = 543.34343,
6779 ni.number = 58;
6781 int dynamic_array[ni.number];
6782 dynamic_array[ni.number - 1] = 543;
6784 // work around unused variable warnings
6785 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6786 || dynamic_array[ni.number - 1] != 543);
6789 return 0;
6791 _ACEOF
6792 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6794 CC="$ac_save_CC $ac_arg"
6795 if ac_fn_c_try_compile "$LINENO"; then :
6796 ac_cv_prog_cc_c99=$ac_arg
6798 rm -f core conftest.err conftest.$ac_objext
6799 test "x$ac_cv_prog_cc_c99" != "xno" && break
6800 done
6801 rm -f conftest.$ac_ext
6802 CC=$ac_save_CC
6805 # AC_CACHE_VAL
6806 case "x$ac_cv_prog_cc_c99" in
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6809 $as_echo "none needed" >&6; } ;;
6810 xno)
6811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6812 $as_echo "unsupported" >&6; } ;;
6814 CC="$CC $ac_cv_prog_cc_c99"
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6816 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6817 esac
6818 if test "x$ac_cv_prog_cc_c99" != xno; then :
6819 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6820 else
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6822 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6823 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6824 $as_echo_n "(cached) " >&6
6825 else
6826 ac_cv_prog_cc_c89=no
6827 ac_save_CC=$CC
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829 /* end confdefs.h. */
6830 #include <stdarg.h>
6831 #include <stdio.h>
6832 #include <sys/types.h>
6833 #include <sys/stat.h>
6834 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6835 struct buf { int x; };
6836 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6837 static char *e (p, i)
6838 char **p;
6839 int i;
6841 return p[i];
6843 static char *f (char * (*g) (char **, int), char **p, ...)
6845 char *s;
6846 va_list v;
6847 va_start (v,p);
6848 s = g (p, va_arg (v,int));
6849 va_end (v);
6850 return s;
6853 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6854 function prototypes and stuff, but not '\xHH' hex character constants.
6855 These don't provoke an error unfortunately, instead are silently treated
6856 as 'x'. The following induces an error, until -std is added to get
6857 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6858 array size at least. It's necessary to write '\x00'==0 to get something
6859 that's true only with -std. */
6860 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6862 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6863 inside strings and character constants. */
6864 #define FOO(x) 'x'
6865 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6867 int test (int i, double x);
6868 struct s1 {int (*f) (int a);};
6869 struct s2 {int (*f) (double a);};
6870 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6871 int argc;
6872 char **argv;
6874 main ()
6876 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6878 return 0;
6880 _ACEOF
6881 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6882 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6884 CC="$ac_save_CC $ac_arg"
6885 if ac_fn_c_try_compile "$LINENO"; then :
6886 ac_cv_prog_cc_c89=$ac_arg
6888 rm -f core conftest.err conftest.$ac_objext
6889 test "x$ac_cv_prog_cc_c89" != "xno" && break
6890 done
6891 rm -f conftest.$ac_ext
6892 CC=$ac_save_CC
6895 # AC_CACHE_VAL
6896 case "x$ac_cv_prog_cc_c89" in
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6899 $as_echo "none needed" >&6; } ;;
6900 xno)
6901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6902 $as_echo "unsupported" >&6; } ;;
6904 CC="$CC $ac_cv_prog_cc_c89"
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6906 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6907 esac
6908 if test "x$ac_cv_prog_cc_c89" != xno; then :
6909 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6910 else
6911 ac_cv_prog_cc_stdc=no
6916 esac
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6918 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6919 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6920 $as_echo_n "(cached) " >&6
6923 case $ac_cv_prog_cc_stdc in #(
6924 no) :
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6926 $as_echo "unsupported" >&6; } ;; #(
6927 '') :
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6929 $as_echo "none needed" >&6; } ;; #(
6930 *) :
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6932 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6933 esac
6937 # Code from module alloca-opt:
6938 # Code from module allocator:
6939 # Code from module careadlinkat:
6940 # Code from module crypto/md5:
6941 # Code from module crypto/sha1:
6942 # Code from module crypto/sha256:
6943 # Code from module crypto/sha512:
6944 # Code from module dosname:
6945 # Code from module dtoastr:
6946 # Code from module dup2:
6947 # Code from module extensions:
6949 # Code from module filemode:
6950 # Code from module getloadavg:
6951 # Code from module getopt-gnu:
6952 # Code from module getopt-posix:
6953 # Code from module gettext-h:
6954 # Code from module ignore-value:
6955 # Code from module include_next:
6956 # Code from module intprops:
6957 # Code from module inttypes-incomplete:
6958 # Code from module largefile:
6960 # Code from module lstat:
6961 # Code from module mktime:
6962 # Code from module multiarch:
6963 # Code from module nocrash:
6964 # Code from module pathmax:
6965 # Code from module pthread_sigmask:
6966 # Code from module readlink:
6967 # Code from module signal-h:
6968 # Code from module sigprocmask:
6969 # Code from module snippet/_Noreturn:
6970 # Code from module snippet/arg-nonnull:
6971 # Code from module snippet/c++defs:
6972 # Code from module snippet/warn-on-use:
6973 # Code from module socklen:
6974 # Code from module ssize_t:
6975 # Code from module stat:
6976 # Code from module stdarg:
6980 # Code from module stdbool:
6981 # Code from module stddef:
6982 # Code from module stdint:
6983 # Code from module stdio:
6984 # Code from module stdlib:
6985 # Code from module strftime:
6986 # Code from module strtoimax:
6987 # Code from module strtoll:
6988 # Code from module strtoull:
6989 # Code from module strtoumax:
6990 # Code from module symlink:
6991 # Code from module sys_stat:
6992 # Code from module time:
6993 # Code from module time_r:
6994 # Code from module u64:
6995 # Code from module unistd:
6996 # Code from module verify:
6999 # On Suns, sometimes $CPP names a directory.
7000 if test -n "$CPP" && test -d "$CPP"; then
7001 CPP=
7004 ## If not using gcc, and on Solaris, and no CPP specified, see if
7005 ## using a Sun compiler, which needs -Xs to prevent whitespace.
7006 if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
7007 test x"$CPP" = x; then
7008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
7009 $as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
7010 if test "${emacs_cv_sunpro_c+set}" = set; then :
7011 $as_echo_n "(cached) " >&6
7012 else
7013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7014 /* end confdefs.h. */
7017 main ()
7019 #ifndef __SUNPRO_C
7020 fail;
7021 #endif
7024 return 0;
7026 _ACEOF
7027 if ac_fn_c_try_link "$LINENO"; then :
7028 emacs_cv_sunpro_c=yes
7029 else
7030 emacs_cv_sunpro_c=no
7032 rm -f core conftest.err conftest.$ac_objext \
7033 conftest$ac_exeext conftest.$ac_ext
7036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
7037 $as_echo "$emacs_cv_sunpro_c" >&6; }
7039 if test x"$emacs_cv_sunpro_c" = xyes; then
7040 NON_GNU_CPP="$CC -E -Xs"
7044 #### Some systems specify a CPP to use unless we are using GCC.
7045 #### Now that we know whether we are using GCC, we can decide whether
7046 #### to use that one.
7047 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
7048 then
7049 CPP="$NON_GNU_CPP"
7052 #### Some systems specify a CC to use unless we are using GCC.
7053 #### Now that we know whether we are using GCC, we can decide whether
7054 #### to use that one.
7055 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
7056 test x$cc_specified != xyes
7057 then
7058 CC="$NON_GNU_CC"
7061 if test x$GCC = xyes; then
7062 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
7063 else
7064 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
7067 ### Use -Wdeclaration-after-statement if the compiler supports it
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
7069 $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
7070 SAVE_CFLAGS="$CFLAGS"
7071 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
7072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7073 /* end confdefs.h. */
7076 main ()
7080 return 0;
7082 _ACEOF
7083 if ac_fn_c_try_compile "$LINENO"; then :
7084 has_option=yes
7085 else
7086 has_option=no
7088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7089 if test $has_option = yes; then
7090 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
7093 $as_echo "$has_option" >&6; }
7094 CFLAGS="$SAVE_CFLAGS"
7095 unset has_option
7096 unset SAVE_CFLAGS
7098 ### Use -Wold-style-definition if the compiler supports it
7099 # This can be removed when conversion to standard C is finished.
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5
7101 $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; }
7102 SAVE_CFLAGS="$CFLAGS"
7103 CFLAGS="$CFLAGS -Wold-style-definition"
7104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105 /* end confdefs.h. */
7108 main ()
7112 return 0;
7114 _ACEOF
7115 if ac_fn_c_try_compile "$LINENO"; then :
7116 has_option=yes
7117 else
7118 has_option=no
7120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7121 if test $has_option = yes; then
7122 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
7125 $as_echo "$has_option" >&6; }
7126 CFLAGS="$SAVE_CFLAGS"
7127 unset has_option
7128 unset SAVE_CFLAGS
7130 ### Use -Wimplicit-function-declaration if the compiler supports it
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5
7132 $as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; }
7133 SAVE_CFLAGS="$CFLAGS"
7134 CFLAGS="$CFLAGS -Wimplicit-function-declaration"
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136 /* end confdefs.h. */
7139 main ()
7143 return 0;
7145 _ACEOF
7146 if ac_fn_c_try_compile "$LINENO"; then :
7147 has_option=yes
7148 else
7149 has_option=no
7151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152 if test $has_option = yes; then
7153 C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
7156 $as_echo "$has_option" >&6; }
7157 CFLAGS="$SAVE_CFLAGS"
7158 unset has_option
7159 unset SAVE_CFLAGS
7164 #### Some other nice autoconf tests.
7166 ac_ext=c
7167 ac_cpp='$CPP $CPPFLAGS'
7168 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7169 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7172 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7173 # On Suns, sometimes $CPP names a directory.
7174 if test -n "$CPP" && test -d "$CPP"; then
7175 CPP=
7177 if test -z "$CPP"; then
7178 if test "${ac_cv_prog_CPP+set}" = set; then :
7179 $as_echo_n "(cached) " >&6
7180 else
7181 # Double quotes because CPP needs to be expanded
7182 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7184 ac_preproc_ok=false
7185 for ac_c_preproc_warn_flag in '' yes
7187 # Use a header file that comes with gcc, so configuring glibc
7188 # with a fresh cross-compiler works.
7189 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7190 # <limits.h> exists even on freestanding compilers.
7191 # On the NeXT, cc -E runs the code through the compiler's parser,
7192 # not just through cpp. "Syntax error" is here to catch this case.
7193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7194 /* end confdefs.h. */
7195 #ifdef __STDC__
7196 # include <limits.h>
7197 #else
7198 # include <assert.h>
7199 #endif
7200 Syntax error
7201 _ACEOF
7202 if ac_fn_c_try_cpp "$LINENO"; then :
7204 else
7205 # Broken: fails on valid input.
7206 continue
7208 rm -f conftest.err conftest.$ac_ext
7210 # OK, works on sane cases. Now check whether nonexistent headers
7211 # can be detected and how.
7212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7213 /* end confdefs.h. */
7214 #include <ac_nonexistent.h>
7215 _ACEOF
7216 if ac_fn_c_try_cpp "$LINENO"; then :
7217 # Broken: success on invalid input.
7218 continue
7219 else
7220 # Passes both tests.
7221 ac_preproc_ok=:
7222 break
7224 rm -f conftest.err conftest.$ac_ext
7226 done
7227 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7228 rm -f conftest.err conftest.$ac_ext
7229 if $ac_preproc_ok; then :
7230 break
7233 done
7234 ac_cv_prog_CPP=$CPP
7237 CPP=$ac_cv_prog_CPP
7238 else
7239 ac_cv_prog_CPP=$CPP
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7242 $as_echo "$CPP" >&6; }
7243 ac_preproc_ok=false
7244 for ac_c_preproc_warn_flag in '' yes
7246 # Use a header file that comes with gcc, so configuring glibc
7247 # with a fresh cross-compiler works.
7248 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7249 # <limits.h> exists even on freestanding compilers.
7250 # On the NeXT, cc -E runs the code through the compiler's parser,
7251 # not just through cpp. "Syntax error" is here to catch this case.
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253 /* end confdefs.h. */
7254 #ifdef __STDC__
7255 # include <limits.h>
7256 #else
7257 # include <assert.h>
7258 #endif
7259 Syntax error
7260 _ACEOF
7261 if ac_fn_c_try_cpp "$LINENO"; then :
7263 else
7264 # Broken: fails on valid input.
7265 continue
7267 rm -f conftest.err conftest.$ac_ext
7269 # OK, works on sane cases. Now check whether nonexistent headers
7270 # can be detected and how.
7271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272 /* end confdefs.h. */
7273 #include <ac_nonexistent.h>
7274 _ACEOF
7275 if ac_fn_c_try_cpp "$LINENO"; then :
7276 # Broken: success on invalid input.
7277 continue
7278 else
7279 # Passes both tests.
7280 ac_preproc_ok=:
7281 break
7283 rm -f conftest.err conftest.$ac_ext
7285 done
7286 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7287 rm -f conftest.err conftest.$ac_ext
7288 if $ac_preproc_ok; then :
7290 else
7291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7293 as_fn_error "C preprocessor \"$CPP\" fails sanity check
7294 See \`config.log' for more details." "$LINENO" 5; }
7297 ac_ext=c
7298 ac_cpp='$CPP $CPPFLAGS'
7299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7304 if test "x$RANLIB" = x; then
7305 if test -n "$ac_tool_prefix"; then
7306 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7307 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7309 $as_echo_n "checking for $ac_word... " >&6; }
7310 if test "${ac_cv_prog_RANLIB+set}" = set; then :
7311 $as_echo_n "(cached) " >&6
7312 else
7313 if test -n "$RANLIB"; then
7314 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7315 else
7316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7317 for as_dir in $PATH
7319 IFS=$as_save_IFS
7320 test -z "$as_dir" && as_dir=.
7321 for ac_exec_ext in '' $ac_executable_extensions; do
7322 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7323 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7325 break 2
7327 done
7328 done
7329 IFS=$as_save_IFS
7333 RANLIB=$ac_cv_prog_RANLIB
7334 if test -n "$RANLIB"; then
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7336 $as_echo "$RANLIB" >&6; }
7337 else
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7339 $as_echo "no" >&6; }
7344 if test -z "$ac_cv_prog_RANLIB"; then
7345 ac_ct_RANLIB=$RANLIB
7346 # Extract the first word of "ranlib", so it can be a program name with args.
7347 set dummy ranlib; ac_word=$2
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7349 $as_echo_n "checking for $ac_word... " >&6; }
7350 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7351 $as_echo_n "(cached) " >&6
7352 else
7353 if test -n "$ac_ct_RANLIB"; then
7354 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7355 else
7356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357 for as_dir in $PATH
7359 IFS=$as_save_IFS
7360 test -z "$as_dir" && as_dir=.
7361 for ac_exec_ext in '' $ac_executable_extensions; do
7362 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7363 ac_cv_prog_ac_ct_RANLIB="ranlib"
7364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7365 break 2
7367 done
7368 done
7369 IFS=$as_save_IFS
7373 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7374 if test -n "$ac_ct_RANLIB"; then
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7376 $as_echo "$ac_ct_RANLIB" >&6; }
7377 else
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379 $as_echo "no" >&6; }
7382 if test "x$ac_ct_RANLIB" = x; then
7383 RANLIB=":"
7384 else
7385 case $cross_compiling:$ac_tool_warned in
7386 yes:)
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7388 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7389 ac_tool_warned=yes ;;
7390 esac
7391 RANLIB=$ac_ct_RANLIB
7393 else
7394 RANLIB="$ac_cv_prog_RANLIB"
7399 ## Although we're running on an amd64 kernel, we're actually compiling for
7400 ## the x86 architecture. The user should probably have provided an
7401 ## explicit --build to `configure', but if everything else than the kernel
7402 ## is running in i386 mode, we can help them out.
7403 if test "$machine" = "amdx86-64"; then
7404 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
7405 if test "x$ac_cv_have_decl_i386" = x""yes; then :
7409 if test "$ac_cv_have_decl_i386" = "yes"; then
7410 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
7411 machine=intel386
7412 machfile="m/${machine}.h"
7414 ac_fn_c_check_decl "$LINENO" "__ILP32__" "ac_cv_have_decl___ILP32__" "$ac_includes_default"
7415 if test "x$ac_cv_have_decl___ILP32__" = x""yes; then :
7416 machfile="m/intel386.h"
7421 # Extract the first word of "install-info", so it can be a program name with args.
7422 set dummy install-info; ac_word=$2
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7424 $as_echo_n "checking for $ac_word... " >&6; }
7425 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
7426 $as_echo_n "(cached) " >&6
7427 else
7428 case $INSTALL_INFO in
7429 [\\/]* | ?:[\\/]*)
7430 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7434 for as_dir in $PATH
7436 IFS=$as_save_IFS
7437 test -z "$as_dir" && as_dir=.
7438 for ac_exec_ext in '' $ac_executable_extensions; do
7439 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7440 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7441 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7442 break 2
7444 done
7445 done
7446 IFS=$as_save_IFS
7449 esac
7451 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7452 if test -n "$INSTALL_INFO"; then
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7454 $as_echo "$INSTALL_INFO" >&6; }
7455 else
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7457 $as_echo "no" >&6; }
7461 # Extract the first word of "install-info", so it can be a program name with args.
7462 set dummy install-info; ac_word=$2
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7464 $as_echo_n "checking for $ac_word... " >&6; }
7465 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
7466 $as_echo_n "(cached) " >&6
7467 else
7468 case $INSTALL_INFO in
7469 [\\/]* | ?:[\\/]*)
7470 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7474 for as_dir in /usr/sbin
7476 IFS=$as_save_IFS
7477 test -z "$as_dir" && as_dir=.
7478 for ac_exec_ext in '' $ac_executable_extensions; do
7479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7480 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7482 break 2
7484 done
7485 done
7486 IFS=$as_save_IFS
7489 esac
7491 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7492 if test -n "$INSTALL_INFO"; then
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7494 $as_echo "$INSTALL_INFO" >&6; }
7495 else
7496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7497 $as_echo "no" >&6; }
7501 # Extract the first word of "install-info", so it can be a program name with args.
7502 set dummy install-info; ac_word=$2
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504 $as_echo_n "checking for $ac_word... " >&6; }
7505 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
7506 $as_echo_n "(cached) " >&6
7507 else
7508 case $INSTALL_INFO in
7509 [\\/]* | ?:[\\/]*)
7510 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7514 for as_dir in /sbin
7516 IFS=$as_save_IFS
7517 test -z "$as_dir" && as_dir=.
7518 for ac_exec_ext in '' $ac_executable_extensions; do
7519 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7520 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7522 break 2
7524 done
7525 done
7526 IFS=$as_save_IFS
7528 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
7530 esac
7532 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7533 if test -n "$INSTALL_INFO"; then
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7535 $as_echo "$INSTALL_INFO" >&6; }
7536 else
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7538 $as_echo "no" >&6; }
7542 # Extract the first word of "gzip", so it can be a program name with args.
7543 set dummy gzip; ac_word=$2
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7545 $as_echo_n "checking for $ac_word... " >&6; }
7546 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
7547 $as_echo_n "(cached) " >&6
7548 else
7549 case $GZIP_PROG in
7550 [\\/]* | ?:[\\/]*)
7551 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
7554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7555 for as_dir in $PATH
7557 IFS=$as_save_IFS
7558 test -z "$as_dir" && as_dir=.
7559 for ac_exec_ext in '' $ac_executable_extensions; do
7560 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7561 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
7562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7563 break 2
7565 done
7566 done
7567 IFS=$as_save_IFS
7570 esac
7572 GZIP_PROG=$ac_cv_path_GZIP_PROG
7573 if test -n "$GZIP_PROG"; then
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
7575 $as_echo "$GZIP_PROG" >&6; }
7576 else
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7578 $as_echo "no" >&6; }
7584 ## Need makeinfo >= 4.6 (?) to build the manuals.
7585 # Extract the first word of "makeinfo", so it can be a program name with args.
7586 set dummy makeinfo; ac_word=$2
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588 $as_echo_n "checking for $ac_word... " >&6; }
7589 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
7590 $as_echo_n "(cached) " >&6
7591 else
7592 case $MAKEINFO in
7593 [\\/]* | ?:[\\/]*)
7594 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
7597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598 for as_dir in $PATH
7600 IFS=$as_save_IFS
7601 test -z "$as_dir" && as_dir=.
7602 for ac_exec_ext in '' $ac_executable_extensions; do
7603 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7604 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
7605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606 break 2
7608 done
7609 done
7610 IFS=$as_save_IFS
7612 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
7614 esac
7616 MAKEINFO=$ac_cv_path_MAKEINFO
7617 if test -n "$MAKEINFO"; then
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7619 $as_echo "$MAKEINFO" >&6; }
7620 else
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7622 $as_echo "no" >&6; }
7626 if test "$MAKEINFO" != "no" && \
7627 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then
7628 MAKEINFO=no
7631 ## Makeinfo is unusual. For a released Emacs, the manuals are
7632 ## pre-built, and not deleted by the normal clean rules. makeinfo is
7633 ## therefore in the category of "special tools" not normally required, which
7634 ## configure does not have to check for (eg autoconf itself).
7635 ## In a Bazaar checkout on the other hand, the manuals are not included.
7636 ## So makeinfo is a requirement to build from Bazaar, and configure
7637 ## should test for it as it does for any other build requirement.
7638 ## We use the presence of $srcdir/info/emacs to distinguish a release,
7639 ## with pre-built manuals, from a Bazaar checkout.
7640 HAVE_MAKEINFO=yes
7642 if test "$MAKEINFO" = "no"; then
7643 MAKEINFO=makeinfo
7644 if test "x${with_makeinfo}" = "xno"; then
7645 HAVE_MAKEINFO=no
7646 elif test ! -e $srcdir/info/emacs; then
7647 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
7648 source tree does not seem to have pre-built manuals in the \`info' directory.
7649 Either install a suitable version of makeinfo, or re-run configure
7650 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
7656 if test x$GCC = xyes; then
7657 test "x$GCC_LINK_TEST_OPTIONS" != x && \
7658 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
7659 else
7660 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
7661 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
7665 late_LDFLAGS=$LDFLAGS
7666 if test x$GCC = xyes; then
7667 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
7668 else
7669 LDFLAGS="$LDFLAGS -znocombreloc"
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
7673 $as_echo_n "checking for -znocombreloc... " >&6; }
7674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7675 /* end confdefs.h. */
7678 main ()
7682 return 0;
7684 _ACEOF
7685 if ac_fn_c_try_link "$LINENO"; then :
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7687 $as_echo "yes" >&6; }
7688 else
7689 LDFLAGS=$late_LDFLAGS
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691 $as_echo "no" >&6; }
7693 rm -f core conftest.err conftest.$ac_objext \
7694 conftest$ac_exeext conftest.$ac_ext
7697 # The value of CPP is a quoted variable reference, so we need to do this
7698 # to get its actual value...
7699 CPP=`eval "echo $CPP"`
7702 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
7703 case "$opsys" in
7704 your-opsys-here) CANNOT_DUMP=yes ;;
7705 esac
7707 test "$CANNOT_DUMP" = "yes" && \
7709 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
7715 UNEXEC_OBJ=unexelf.o
7716 case "$opsys" in
7717 # MSDOS uses unexcoff.o
7718 # MSWindows uses unexw32.o
7719 aix4-2)
7720 UNEXEC_OBJ=unexaix.o
7722 cygwin)
7723 UNEXEC_OBJ=unexcw.o
7725 darwin)
7726 UNEXEC_OBJ=unexmacosx.o
7728 hpux10-20 | hpux11)
7729 UNEXEC_OBJ=unexhp9k800.o
7731 sol2-10)
7732 # Use the Solaris dldump() function, called from unexsol.c, to dump
7733 # emacs, instead of the generic ELF dump code found in unexelf.c.
7734 # The resulting binary has a complete symbol table, and is better
7735 # for debugging and other observability tools (debuggers, pstack, etc).
7737 # If you encounter a problem using dldump(), please consider sending
7738 # a message to the OpenSolaris tools-linking mailing list:
7739 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
7741 # It is likely that dldump() works with older Solaris too, but this has
7742 # not been tested, so for now this change is for Solaris 10 or newer.
7743 UNEXEC_OBJ=unexsol.o
7745 esac
7747 LD_SWITCH_SYSTEM=
7748 case "$opsys" in
7749 freebsd)
7750 ## Let `ld' find image libs and similar things in /usr/local/lib.
7751 ## The system compiler, GCC, has apparently been modified to not
7752 ## look there, contrary to what a stock GCC would do.
7753 LD_SWITCH_SYSTEM=-L/usr/local/lib
7756 gnu-linux)
7757 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
7758 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
7761 netbsd)
7762 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
7765 openbsd)
7766 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
7767 ## otherwise Emacs dumps core on elf systems.
7768 LD_SWITCH_SYSTEM="-Z"
7770 esac
7773 ac_link="$ac_link $LD_SWITCH_SYSTEM"
7775 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
7776 ## which has not been defined yet. When this was handled with cpp,
7777 ## it was expanded to null when configure sourced the s/*.h file.
7778 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
7779 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
7780 ## (or somesuch), but because it is supposed to go at the _front_
7781 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
7782 ## Compare with the gnu-linux case below, which added to the end
7783 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
7784 ## LD_SWITCH_SYSTEM_TEMACS.
7785 case "$opsys" in
7786 netbsd|openbsd)
7787 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
7788 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
7789 esac
7792 C_SWITCH_MACHINE=
7793 if test "$machine" = "alpha"; then
7794 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
7795 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
7799 if test "$ac_cv_have_decl___ELF__" = "yes"; then
7800 ## With ELF, make sure that all common symbols get allocated to in the
7801 ## data section. Otherwise, the dump of temacs may miss variables in
7802 ## the shared library that have been initialized. For example, with
7803 ## GNU libc, __malloc_initialized would normally be resolved to the
7804 ## shared library's .bss section, which is fatal.
7805 if test "x$GCC" = "xyes"; then
7806 C_SWITCH_MACHINE="-fno-common"
7807 else
7808 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
7810 else
7811 UNEXEC_OBJ=unexalpha.o
7818 C_SWITCH_SYSTEM=
7819 ## Some programs in src produce warnings saying certain subprograms
7820 ## are too complex and need a MAXMEM value greater than 2000 for
7821 ## additional optimization. --nils@exp-math.uni-essen.de
7822 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
7823 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
7824 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
7825 ## It is redundant in glibc2, since we define _GNU_SOURCE.
7829 LIBS_SYSTEM=
7830 case "$opsys" in
7831 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
7832 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
7834 freebsd) LIBS_SYSTEM="-lutil" ;;
7836 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
7838 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
7840 ## Motif needs -lgen.
7841 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
7842 esac
7846 ### Make sure subsequent tests use flags consistent with the build flags.
7848 if test x"${OVERRIDE_CPPFLAGS}" != x; then
7849 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
7850 else
7851 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
7854 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
7856 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
7859 # Check whether --enable-largefile was given.
7860 if test "${enable_largefile+set}" = set; then :
7861 enableval=$enable_largefile;
7864 if test "$enable_largefile" != no; then
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7867 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7868 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
7869 $as_echo_n "(cached) " >&6
7870 else
7871 ac_cv_sys_largefile_CC=no
7872 if test "$GCC" != yes; then
7873 ac_save_CC=$CC
7874 while :; do
7875 # IRIX 6.2 and later do not support large files by default,
7876 # so use the C compiler's -n32 option if that helps.
7877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7878 /* end confdefs.h. */
7879 #include <sys/types.h>
7880 /* Check that off_t can represent 2**63 - 1 correctly.
7881 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7882 since some C++ compilers masquerading as C compilers
7883 incorrectly reject 9223372036854775807. */
7884 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7885 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7886 && LARGE_OFF_T % 2147483647 == 1)
7887 ? 1 : -1];
7889 main ()
7893 return 0;
7895 _ACEOF
7896 if ac_fn_c_try_compile "$LINENO"; then :
7897 break
7899 rm -f core conftest.err conftest.$ac_objext
7900 CC="$CC -n32"
7901 if ac_fn_c_try_compile "$LINENO"; then :
7902 ac_cv_sys_largefile_CC=' -n32'; break
7904 rm -f core conftest.err conftest.$ac_objext
7905 break
7906 done
7907 CC=$ac_save_CC
7908 rm -f conftest.$ac_ext
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7912 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7913 if test "$ac_cv_sys_largefile_CC" != no; then
7914 CC=$CC$ac_cv_sys_largefile_CC
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7918 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7919 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
7920 $as_echo_n "(cached) " >&6
7921 else
7922 while :; do
7923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7924 /* end confdefs.h. */
7925 #include <sys/types.h>
7926 /* Check that off_t can represent 2**63 - 1 correctly.
7927 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7928 since some C++ compilers masquerading as C compilers
7929 incorrectly reject 9223372036854775807. */
7930 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7931 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7932 && LARGE_OFF_T % 2147483647 == 1)
7933 ? 1 : -1];
7935 main ()
7939 return 0;
7941 _ACEOF
7942 if ac_fn_c_try_compile "$LINENO"; then :
7943 ac_cv_sys_file_offset_bits=no; break
7945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7947 /* end confdefs.h. */
7948 #define _FILE_OFFSET_BITS 64
7949 #include <sys/types.h>
7950 /* Check that off_t can represent 2**63 - 1 correctly.
7951 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7952 since some C++ compilers masquerading as C compilers
7953 incorrectly reject 9223372036854775807. */
7954 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7955 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7956 && LARGE_OFF_T % 2147483647 == 1)
7957 ? 1 : -1];
7959 main ()
7963 return 0;
7965 _ACEOF
7966 if ac_fn_c_try_compile "$LINENO"; then :
7967 ac_cv_sys_file_offset_bits=64; break
7969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7970 ac_cv_sys_file_offset_bits=unknown
7971 break
7972 done
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7975 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7976 case $ac_cv_sys_file_offset_bits in #(
7977 no | unknown) ;;
7979 cat >>confdefs.h <<_ACEOF
7980 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7981 _ACEOF
7983 esac
7984 rm -rf conftest*
7985 if test $ac_cv_sys_file_offset_bits = unknown; then
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7987 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7988 if test "${ac_cv_sys_large_files+set}" = set; then :
7989 $as_echo_n "(cached) " >&6
7990 else
7991 while :; do
7992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993 /* end confdefs.h. */
7994 #include <sys/types.h>
7995 /* Check that off_t can represent 2**63 - 1 correctly.
7996 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7997 since some C++ compilers masquerading as C compilers
7998 incorrectly reject 9223372036854775807. */
7999 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8000 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8001 && LARGE_OFF_T % 2147483647 == 1)
8002 ? 1 : -1];
8004 main ()
8008 return 0;
8010 _ACEOF
8011 if ac_fn_c_try_compile "$LINENO"; then :
8012 ac_cv_sys_large_files=no; break
8014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8016 /* end confdefs.h. */
8017 #define _LARGE_FILES 1
8018 #include <sys/types.h>
8019 /* Check that off_t can represent 2**63 - 1 correctly.
8020 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8021 since some C++ compilers masquerading as C compilers
8022 incorrectly reject 9223372036854775807. */
8023 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8024 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8025 && LARGE_OFF_T % 2147483647 == 1)
8026 ? 1 : -1];
8028 main ()
8032 return 0;
8034 _ACEOF
8035 if ac_fn_c_try_compile "$LINENO"; then :
8036 ac_cv_sys_large_files=1; break
8038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8039 ac_cv_sys_large_files=unknown
8040 break
8041 done
8043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
8044 $as_echo "$ac_cv_sys_large_files" >&6; }
8045 case $ac_cv_sys_large_files in #(
8046 no | unknown) ;;
8048 cat >>confdefs.h <<_ACEOF
8049 #define _LARGE_FILES $ac_cv_sys_large_files
8050 _ACEOF
8052 esac
8053 rm -rf conftest*
8061 LIB_MATH=-lm
8062 LIB_STANDARD=
8063 START_FILES=
8065 case $opsys in
8066 cygwin )
8067 LIB_MATH=
8068 START_FILES='pre-crt0.o'
8070 darwin )
8071 ## Adding -lm confuses the dynamic linker, so omit it.
8072 LIB_MATH=
8073 START_FILES='pre-crt0.o'
8075 freebsd )
8076 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8077 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8079 gnu-linux | gnu-kfreebsd )
8080 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8081 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8083 hpux10-20 | hpux11 )
8084 LIB_STANDARD=-lc
8085 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8087 netbsd | openbsd )
8088 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8089 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
8091 esac
8096 crt_files=
8098 for file in x $LIB_STANDARD $START_FILES; do
8099 case "$file" in
8100 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
8101 esac
8102 done
8104 if test "x$crt_files" != x; then
8106 ## If user specified a crt-dir, use that unconditionally.
8107 crt_gcc=no
8109 if test "X$CRT_DIR" = "X"; then
8111 CRT_DIR=/usr/lib # default
8113 case "$canonical" in
8114 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
8115 ## On x86-64 and s390x GNU/Linux distributions, the standard library
8116 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
8117 ## For anything else (eg /usr/lib32), it is up the user to specify
8118 ## the location (bug#5655).
8119 ## Test for crtn.o, not just the directory, because sometimes the
8120 ## directory exists but does not have the relevant files (bug#1287).
8121 ## FIXME better to test for binary compatibility somehow.
8122 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
8125 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
8126 esac
8128 case "$opsys" in
8129 hpux10-20) CRT_DIR=/lib ;;
8130 esac
8132 test "x${GCC}" = xyes && crt_gcc=yes
8134 fi # CRT_DIR = ""
8136 crt_missing=
8138 for file in $crt_files; do
8140 ## If we're using gcc, try to determine it automatically by asking
8141 ## gcc. [If this doesn't work, CRT_DIR will remain at the
8142 ## system-dependent default from above.]
8143 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
8145 crt_file=`$CC --print-file-name=$file 2>/dev/null`
8146 case "$crt_file" in
8147 */*)
8148 CRT_DIR=`$as_dirname -- "$crt_file" ||
8149 $as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8150 X"$crt_file" : 'X\(//\)[^/]' \| \
8151 X"$crt_file" : 'X\(//\)$' \| \
8152 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
8153 $as_echo X"$crt_file" |
8154 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8155 s//\1/
8158 /^X\(\/\/\)[^/].*/{
8159 s//\1/
8162 /^X\(\/\/\)$/{
8163 s//\1/
8166 /^X\(\/\).*/{
8167 s//\1/
8170 s/.*/./; q'`
8172 esac
8175 crt_gcc=no
8177 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
8178 done # $crt_files
8180 test "x$crt_missing" = x || \
8181 as_fn_error "Required file(s) not found:$crt_missing
8182 Try using the --with-crt-dir option." "$LINENO" 5
8184 fi # crt_files != ""
8188 case $opsys in
8189 netbsd | openbsd )
8190 if test -f $CRT_DIR/crti.o; then
8192 test -f $CRT_DIR/crtn.o || \
8193 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8195 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8196 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8199 esac
8205 if test "${with_sound}" != "no"; then
8206 # Sound support for GNU/Linux and the free BSDs.
8207 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8208 do :
8209 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8210 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8211 eval as_val=\$$as_ac_Header
8212 if test "x$as_val" = x""yes; then :
8213 cat >>confdefs.h <<_ACEOF
8214 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8215 _ACEOF
8216 have_sound_header=yes
8219 done
8221 # Emulation library used on NetBSD.
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8223 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8224 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
8225 $as_echo_n "(cached) " >&6
8226 else
8227 ac_check_lib_save_LIBS=$LIBS
8228 LIBS="-lossaudio $LIBS"
8229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8230 /* end confdefs.h. */
8232 /* Override any GCC internal prototype to avoid an error.
8233 Use char because int might match the return type of a GCC
8234 builtin and then its argument prototype would still apply. */
8235 #ifdef __cplusplus
8236 extern "C"
8237 #endif
8238 char _oss_ioctl ();
8240 main ()
8242 return _oss_ioctl ();
8244 return 0;
8246 _ACEOF
8247 if ac_fn_c_try_link "$LINENO"; then :
8248 ac_cv_lib_ossaudio__oss_ioctl=yes
8249 else
8250 ac_cv_lib_ossaudio__oss_ioctl=no
8252 rm -f core conftest.err conftest.$ac_objext \
8253 conftest$ac_exeext conftest.$ac_ext
8254 LIBS=$ac_check_lib_save_LIBS
8256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8257 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8258 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8259 LIBSOUND=-lossaudio
8260 else
8261 LIBSOUND=
8266 ALSA_REQUIRED=1.0.0
8267 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8269 succeeded=no
8271 # Extract the first word of "pkg-config", so it can be a program name with args.
8272 set dummy pkg-config; ac_word=$2
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8274 $as_echo_n "checking for $ac_word... " >&6; }
8275 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8276 $as_echo_n "(cached) " >&6
8277 else
8278 case $PKG_CONFIG in
8279 [\\/]* | ?:[\\/]*)
8280 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8284 for as_dir in $PATH
8286 IFS=$as_save_IFS
8287 test -z "$as_dir" && as_dir=.
8288 for ac_exec_ext in '' $ac_executable_extensions; do
8289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8290 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8292 break 2
8294 done
8295 done
8296 IFS=$as_save_IFS
8298 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8300 esac
8302 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8303 if test -n "$PKG_CONFIG"; then
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8305 $as_echo "$PKG_CONFIG" >&6; }
8306 else
8307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8308 $as_echo "no" >&6; }
8313 if test "$PKG_CONFIG" = "no" ; then
8314 HAVE_ALSA=no
8315 else
8316 PKG_CONFIG_MIN_VERSION=0.9.0
8317 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8319 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
8321 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8323 $as_echo "yes" >&6; }
8324 succeeded=yes
8326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
8327 $as_echo_n "checking ALSA_CFLAGS... " >&6; }
8328 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
8329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
8330 $as_echo "$ALSA_CFLAGS" >&6; }
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
8333 $as_echo_n "checking ALSA_LIBS... " >&6; }
8334 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
8336 $as_echo "$ALSA_LIBS" >&6; }
8337 else
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8339 $as_echo "no" >&6; }
8340 ALSA_CFLAGS=""
8341 ALSA_LIBS=""
8342 ## If we have a custom action on failure, don't print errors, but
8343 ## do set a variable so people can do so.
8344 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
8350 else
8351 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8352 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8356 if test $succeeded = yes; then
8357 HAVE_ALSA=yes
8358 else
8359 HAVE_ALSA=no
8362 if test $HAVE_ALSA = yes; then
8363 SAVE_CFLAGS="$CFLAGS"
8364 SAVE_LIBS="$LIBS"
8365 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8366 LIBS="$ALSA_LIBS $LIBS"
8367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8368 /* end confdefs.h. */
8369 #include <asoundlib.h>
8371 main ()
8373 snd_lib_error_set_handler (0);
8375 return 0;
8377 _ACEOF
8378 if ac_fn_c_try_compile "$LINENO"; then :
8379 emacs_alsa_normal=yes
8380 else
8381 emacs_alsa_normal=no
8383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8384 if test "$emacs_alsa_normal" != yes; then
8385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8386 /* end confdefs.h. */
8387 #include <alsa/asoundlib.h>
8389 main ()
8391 snd_lib_error_set_handler (0);
8393 return 0;
8395 _ACEOF
8396 if ac_fn_c_try_compile "$LINENO"; then :
8397 emacs_alsa_subdir=yes
8398 else
8399 emacs_alsa_subdir=no
8401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8402 if test "$emacs_alsa_subdir" != yes; then
8403 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8405 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8408 CFLAGS="$SAVE_CFLAGS"
8409 LIBS="$SAVE_LIBS"
8410 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8411 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
8413 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
8417 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8418 case "$opsys" in
8419 gnu-linux|freebsd|netbsd)
8421 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
8424 esac
8430 for ac_header in sys/select.h sys/time.h unistd.h utime.h \
8431 linux/version.h sys/systeminfo.h \
8432 stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \
8433 sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
8434 sys/utsname.h pwd.h utmp.h dirent.h util.h
8435 do :
8436 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8437 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8438 eval as_val=\$$as_ac_Header
8439 if test "x$as_val" = x""yes; then :
8440 cat >>confdefs.h <<_ACEOF
8441 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8442 _ACEOF
8446 done
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8450 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8452 /* end confdefs.h. */
8453 #include <sys/personality.h>
8455 main ()
8457 personality (PER_LINUX32)
8459 return 0;
8461 _ACEOF
8462 if ac_fn_c_try_compile "$LINENO"; then :
8463 emacs_cv_personality_linux32=yes
8464 else
8465 emacs_cv_personality_linux32=no
8467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8469 $as_echo "$emacs_cv_personality_linux32" >&6; }
8471 if test $emacs_cv_personality_linux32 = yes; then
8473 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8477 for ac_header in term.h
8478 do :
8479 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8480 if test "x$ac_cv_header_term_h" = x""yes; then :
8481 cat >>confdefs.h <<_ACEOF
8482 #define HAVE_TERM_H 1
8483 _ACEOF
8487 done
8489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8490 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8491 if test "${ac_cv_header_time+set}" = set; then :
8492 $as_echo_n "(cached) " >&6
8493 else
8494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8495 /* end confdefs.h. */
8496 #include <sys/types.h>
8497 #include <sys/time.h>
8498 #include <time.h>
8501 main ()
8503 if ((struct tm *) 0)
8504 return 0;
8506 return 0;
8508 _ACEOF
8509 if ac_fn_c_try_compile "$LINENO"; then :
8510 ac_cv_header_time=yes
8511 else
8512 ac_cv_header_time=no
8514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8517 $as_echo "$ac_cv_header_time" >&6; }
8518 if test $ac_cv_header_time = yes; then
8520 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8524 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
8525 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8526 ac_have_decl=1
8527 else
8528 ac_have_decl=0
8531 cat >>confdefs.h <<_ACEOF
8532 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
8533 _ACEOF
8535 if test $ac_cv_have_decl_sys_siglist != yes; then
8536 # For Tru64, at least:
8537 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
8538 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8539 ac_have_decl=1
8540 else
8541 ac_have_decl=0
8544 cat >>confdefs.h <<_ACEOF
8545 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8546 _ACEOF
8548 if test $ac_cv_have_decl___sys_siglist = yes; then
8550 $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8555 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8556 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8557 $as_echo_n "(cached) " >&6
8558 else
8559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8560 /* end confdefs.h. */
8561 #include <sys/types.h>
8562 #include <sys/wait.h>
8563 #ifndef WEXITSTATUS
8564 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8565 #endif
8566 #ifndef WIFEXITED
8567 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8568 #endif
8571 main ()
8573 int s;
8574 wait (&s);
8575 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8577 return 0;
8579 _ACEOF
8580 if ac_fn_c_try_compile "$LINENO"; then :
8581 ac_cv_header_sys_wait_h=yes
8582 else
8583 ac_cv_header_sys_wait_h=no
8585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8588 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
8589 if test $ac_cv_header_sys_wait_h = yes; then
8591 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
8597 $as_echo_n "checking for struct utimbuf... " >&6; }
8598 if test "${emacs_cv_struct_utimbuf+set}" = set; then :
8599 $as_echo_n "(cached) " >&6
8600 else
8601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8602 /* end confdefs.h. */
8603 #ifdef TIME_WITH_SYS_TIME
8604 #include <sys/time.h>
8605 #include <time.h>
8606 #else
8607 #ifdef HAVE_SYS_TIME_H
8608 #include <sys/time.h>
8609 #else
8610 #include <time.h>
8611 #endif
8612 #endif
8613 #ifdef HAVE_UTIME_H
8614 #include <utime.h>
8615 #endif
8617 main ()
8619 static struct utimbuf x; x.actime = x.modtime;
8621 return 0;
8623 _ACEOF
8624 if ac_fn_c_try_compile "$LINENO"; then :
8625 emacs_cv_struct_utimbuf=yes
8626 else
8627 emacs_cv_struct_utimbuf=no
8629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
8632 $as_echo "$emacs_cv_struct_utimbuf" >&6; }
8633 if test $emacs_cv_struct_utimbuf = yes; then
8635 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8640 $as_echo_n "checking for speed_t... " >&6; }
8641 if test "${emacs_cv_speed_t+set}" = set; then :
8642 $as_echo_n "(cached) " >&6
8643 else
8644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8645 /* end confdefs.h. */
8646 #include <termios.h>
8648 main ()
8650 speed_t x = 1;
8652 return 0;
8654 _ACEOF
8655 if ac_fn_c_try_compile "$LINENO"; then :
8656 emacs_cv_speed_t=yes
8657 else
8658 emacs_cv_speed_t=no
8660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
8663 $as_echo "$emacs_cv_speed_t" >&6; }
8664 if test $emacs_cv_speed_t = yes; then
8666 $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8671 $as_echo_n "checking for struct timeval... " >&6; }
8672 if test "${emacs_cv_struct_timeval+set}" = set; then :
8673 $as_echo_n "(cached) " >&6
8674 else
8675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8676 /* end confdefs.h. */
8677 #ifdef TIME_WITH_SYS_TIME
8678 #include <sys/time.h>
8679 #include <time.h>
8680 #else
8681 #ifdef HAVE_SYS_TIME_H
8682 #include <sys/time.h>
8683 #else
8684 #include <time.h>
8685 #endif
8686 #endif
8688 main ()
8690 static struct timeval x; x.tv_sec = x.tv_usec;
8692 return 0;
8694 _ACEOF
8695 if ac_fn_c_try_compile "$LINENO"; then :
8696 emacs_cv_struct_timeval=yes
8697 else
8698 emacs_cv_struct_timeval=no
8700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
8703 $as_echo "$emacs_cv_struct_timeval" >&6; }
8704 HAVE_TIMEVAL=$emacs_cv_struct_timeval
8705 if test $emacs_cv_struct_timeval = yes; then
8707 $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
8711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
8712 $as_echo_n "checking for struct exception... " >&6; }
8713 if test "${emacs_cv_struct_exception+set}" = set; then :
8714 $as_echo_n "(cached) " >&6
8715 else
8716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8717 /* end confdefs.h. */
8718 #include <math.h>
8720 main ()
8722 static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
8724 return 0;
8726 _ACEOF
8727 if ac_fn_c_try_compile "$LINENO"; then :
8728 emacs_cv_struct_exception=yes
8729 else
8730 emacs_cv_struct_exception=no
8732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
8735 $as_echo "$emacs_cv_struct_exception" >&6; }
8736 HAVE_EXCEPTION=$emacs_cv_struct_exception
8737 if test $emacs_cv_struct_exception != yes; then
8739 $as_echo "#define NO_MATHERR 1" >>confdefs.h
8743 for ac_header in sys/socket.h
8744 do :
8745 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
8746 if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
8747 cat >>confdefs.h <<_ACEOF
8748 #define HAVE_SYS_SOCKET_H 1
8749 _ACEOF
8753 done
8755 for ac_header in net/if.h
8756 do :
8757 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
8758 #if HAVE_SYS_SOCKET_H
8759 #include <sys/socket.h>
8760 #endif
8762 if test "x$ac_cv_header_net_if_h" = x""yes; then :
8763 cat >>confdefs.h <<_ACEOF
8764 #define HAVE_NET_IF_H 1
8765 _ACEOF
8769 done
8771 for ac_header in ifaddrs.h
8772 do :
8773 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
8774 #if HAVE_SYS_SOCKET_H
8775 #include <sys/socket.h>
8776 #endif
8778 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
8779 cat >>confdefs.h <<_ACEOF
8780 #define HAVE_IFADDRS_H 1
8781 _ACEOF
8785 done
8787 for ac_header in net/if_dl.h
8788 do :
8789 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
8790 #if HAVE_SYS_SOCKET_H
8791 #include <sys/socket.h>
8792 #endif
8794 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
8795 cat >>confdefs.h <<_ACEOF
8796 #define HAVE_NET_IF_DL_H 1
8797 _ACEOF
8801 done
8803 for ac_func in getifaddrs freeifaddrs
8804 do :
8805 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8806 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8807 eval as_val=\$$as_ac_var
8808 if test "x$as_val" = x""yes; then :
8809 cat >>confdefs.h <<_ACEOF
8810 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8811 _ACEOF
8814 done
8817 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
8818 #if HAVE_SYS_SOCKET_H
8819 #include <sys/socket.h>
8820 #endif
8821 #if HAVE_NET_IF_H
8822 #include <net/if.h>
8823 #endif
8825 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
8827 cat >>confdefs.h <<_ACEOF
8828 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8829 _ACEOF
8833 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
8834 #if HAVE_SYS_SOCKET_H
8835 #include <sys/socket.h>
8836 #endif
8837 #if HAVE_NET_IF_H
8838 #include <net/if.h>
8839 #endif
8841 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
8843 cat >>confdefs.h <<_ACEOF
8844 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8845 _ACEOF
8849 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
8850 #if HAVE_SYS_SOCKET_H
8851 #include <sys/socket.h>
8852 #endif
8853 #if HAVE_NET_IF_H
8854 #include <net/if.h>
8855 #endif
8857 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
8859 cat >>confdefs.h <<_ACEOF
8860 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8861 _ACEOF
8865 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
8866 #if HAVE_SYS_SOCKET_H
8867 #include <sys/socket.h>
8868 #endif
8869 #if HAVE_NET_IF_H
8870 #include <net/if.h>
8871 #endif
8873 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
8875 cat >>confdefs.h <<_ACEOF
8876 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8877 _ACEOF
8881 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
8882 #if HAVE_SYS_SOCKET_H
8883 #include <sys/socket.h>
8884 #endif
8885 #if HAVE_NET_IF_H
8886 #include <net/if.h>
8887 #endif
8889 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
8891 cat >>confdefs.h <<_ACEOF
8892 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8893 _ACEOF
8897 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
8898 #if HAVE_SYS_SOCKET_H
8899 #include <sys/socket.h>
8900 #endif
8901 #if HAVE_NET_IF_H
8902 #include <net/if.h>
8903 #endif
8905 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
8907 cat >>confdefs.h <<_ACEOF
8908 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
8909 _ACEOF
8916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
8917 $as_echo_n "checking for function prototypes... " >&6; }
8918 if test "$ac_cv_prog_cc_c89" != no; then
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8920 $as_echo "yes" >&6; }
8922 $as_echo "#define PROTOTYPES 1" >>confdefs.h
8925 $as_echo "#define __PROTOTYPES 1" >>confdefs.h
8927 else
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8929 $as_echo "no" >&6; }
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
8933 $as_echo_n "checking for working volatile... " >&6; }
8934 if test "${ac_cv_c_volatile+set}" = set; then :
8935 $as_echo_n "(cached) " >&6
8936 else
8937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8938 /* end confdefs.h. */
8941 main ()
8944 volatile int x;
8945 int * volatile y = (int *) 0;
8946 return !x && !y;
8948 return 0;
8950 _ACEOF
8951 if ac_fn_c_try_compile "$LINENO"; then :
8952 ac_cv_c_volatile=yes
8953 else
8954 ac_cv_c_volatile=no
8956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
8959 $as_echo "$ac_cv_c_volatile" >&6; }
8960 if test $ac_cv_c_volatile = no; then
8962 $as_echo "#define volatile /**/" >>confdefs.h
8966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8967 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8968 if test "${ac_cv_c_const+set}" = set; then :
8969 $as_echo_n "(cached) " >&6
8970 else
8971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8972 /* end confdefs.h. */
8975 main ()
8977 /* FIXME: Include the comments suggested by Paul. */
8978 #ifndef __cplusplus
8979 /* Ultrix mips cc rejects this. */
8980 typedef int charset[2];
8981 const charset cs;
8982 /* SunOS 4.1.1 cc rejects this. */
8983 char const *const *pcpcc;
8984 char **ppc;
8985 /* NEC SVR4.0.2 mips cc rejects this. */
8986 struct point {int x, y;};
8987 static struct point const zero = {0,0};
8988 /* AIX XL C 1.02.0.0 rejects this.
8989 It does not let you subtract one const X* pointer from another in
8990 an arm of an if-expression whose if-part is not a constant
8991 expression */
8992 const char *g = "string";
8993 pcpcc = &g + (g ? g-g : 0);
8994 /* HPUX 7.0 cc rejects these. */
8995 ++pcpcc;
8996 ppc = (char**) pcpcc;
8997 pcpcc = (char const *const *) ppc;
8998 { /* SCO 3.2v4 cc rejects this. */
8999 char *t;
9000 char const *s = 0 ? (char *) 0 : (char const *) 0;
9002 *t++ = 0;
9003 if (s) return 0;
9005 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9006 int x[] = {25, 17};
9007 const int *foo = &x[0];
9008 ++foo;
9010 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9011 typedef const int *iptr;
9012 iptr p = 0;
9013 ++p;
9015 { /* AIX XL C 1.02.0.0 rejects this saying
9016 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9017 struct s { int j; const int *ap[3]; };
9018 struct s *b; b->j = 5;
9020 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9021 const int foo = 10;
9022 if (!foo) return 0;
9024 return !cs[0] && !zero.x;
9025 #endif
9028 return 0;
9030 _ACEOF
9031 if ac_fn_c_try_compile "$LINENO"; then :
9032 ac_cv_c_const=yes
9033 else
9034 ac_cv_c_const=no
9036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9039 $as_echo "$ac_cv_c_const" >&6; }
9040 if test $ac_cv_c_const = no; then
9042 $as_echo "#define const /**/" >>confdefs.h
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
9047 $as_echo_n "checking for void * support... " >&6; }
9048 if test "${emacs_cv_void_star+set}" = set; then :
9049 $as_echo_n "(cached) " >&6
9050 else
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052 /* end confdefs.h. */
9055 main ()
9057 void * foo;
9059 return 0;
9061 _ACEOF
9062 if ac_fn_c_try_compile "$LINENO"; then :
9063 emacs_cv_void_star=yes
9064 else
9065 emacs_cv_void_star=no
9067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
9070 $as_echo "$emacs_cv_void_star" >&6; }
9071 if test $emacs_cv_void_star = yes; then
9072 $as_echo "#define POINTER_TYPE void" >>confdefs.h
9074 else
9075 $as_echo "#define POINTER_TYPE char" >>confdefs.h
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9080 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9081 if test "${ac_cv_c_bigendian+set}" = set; then :
9082 $as_echo_n "(cached) " >&6
9083 else
9084 ac_cv_c_bigendian=unknown
9085 # See if we're dealing with a universal compiler.
9086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9087 /* end confdefs.h. */
9088 #ifndef __APPLE_CC__
9089 not a universal capable compiler
9090 #endif
9091 typedef int dummy;
9093 _ACEOF
9094 if ac_fn_c_try_compile "$LINENO"; then :
9096 # Check for potential -arch flags. It is not universal unless
9097 # there are at least two -arch flags with different values.
9098 ac_arch=
9099 ac_prev=
9100 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9101 if test -n "$ac_prev"; then
9102 case $ac_word in
9103 i?86 | x86_64 | ppc | ppc64)
9104 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9105 ac_arch=$ac_word
9106 else
9107 ac_cv_c_bigendian=universal
9108 break
9111 esac
9112 ac_prev=
9113 elif test "x$ac_word" = "x-arch"; then
9114 ac_prev=arch
9116 done
9118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9119 if test $ac_cv_c_bigendian = unknown; then
9120 # See if sys/param.h defines the BYTE_ORDER macro.
9121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9122 /* end confdefs.h. */
9123 #include <sys/types.h>
9124 #include <sys/param.h>
9127 main ()
9129 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9130 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9131 && LITTLE_ENDIAN)
9132 bogus endian macros
9133 #endif
9136 return 0;
9138 _ACEOF
9139 if ac_fn_c_try_compile "$LINENO"; then :
9140 # It does; now see whether it defined to BIG_ENDIAN or not.
9141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9142 /* end confdefs.h. */
9143 #include <sys/types.h>
9144 #include <sys/param.h>
9147 main ()
9149 #if BYTE_ORDER != BIG_ENDIAN
9150 not big endian
9151 #endif
9154 return 0;
9156 _ACEOF
9157 if ac_fn_c_try_compile "$LINENO"; then :
9158 ac_cv_c_bigendian=yes
9159 else
9160 ac_cv_c_bigendian=no
9162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9166 if test $ac_cv_c_bigendian = unknown; then
9167 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9169 /* end confdefs.h. */
9170 #include <limits.h>
9173 main ()
9175 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9176 bogus endian macros
9177 #endif
9180 return 0;
9182 _ACEOF
9183 if ac_fn_c_try_compile "$LINENO"; then :
9184 # It does; now see whether it defined to _BIG_ENDIAN or not.
9185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186 /* end confdefs.h. */
9187 #include <limits.h>
9190 main ()
9192 #ifndef _BIG_ENDIAN
9193 not big endian
9194 #endif
9197 return 0;
9199 _ACEOF
9200 if ac_fn_c_try_compile "$LINENO"; then :
9201 ac_cv_c_bigendian=yes
9202 else
9203 ac_cv_c_bigendian=no
9205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9209 if test $ac_cv_c_bigendian = unknown; then
9210 # Compile a test program.
9211 if test "$cross_compiling" = yes; then :
9212 # Try to guess by grepping values from an object file.
9213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9214 /* end confdefs.h. */
9215 short int ascii_mm[] =
9216 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9217 short int ascii_ii[] =
9218 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9219 int use_ascii (int i) {
9220 return ascii_mm[i] + ascii_ii[i];
9222 short int ebcdic_ii[] =
9223 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9224 short int ebcdic_mm[] =
9225 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9226 int use_ebcdic (int i) {
9227 return ebcdic_mm[i] + ebcdic_ii[i];
9229 extern int foo;
9232 main ()
9234 return use_ascii (foo) == use_ebcdic (foo);
9236 return 0;
9238 _ACEOF
9239 if ac_fn_c_try_compile "$LINENO"; then :
9240 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9241 ac_cv_c_bigendian=yes
9243 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9244 if test "$ac_cv_c_bigendian" = unknown; then
9245 ac_cv_c_bigendian=no
9246 else
9247 # finding both strings is unlikely to happen, but who knows?
9248 ac_cv_c_bigendian=unknown
9252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9253 else
9254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9255 /* end confdefs.h. */
9256 $ac_includes_default
9258 main ()
9261 /* Are we little or big endian? From Harbison&Steele. */
9262 union
9264 long int l;
9265 char c[sizeof (long int)];
9266 } u;
9267 u.l = 1;
9268 return u.c[sizeof (long int) - 1] == 1;
9271 return 0;
9273 _ACEOF
9274 if ac_fn_c_try_run "$LINENO"; then :
9275 ac_cv_c_bigendian=no
9276 else
9277 ac_cv_c_bigendian=yes
9279 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9280 conftest.$ac_objext conftest.beam conftest.$ac_ext
9285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9286 $as_echo "$ac_cv_c_bigendian" >&6; }
9287 case $ac_cv_c_bigendian in #(
9288 yes)
9289 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9290 ;; #(
9292 ;; #(
9293 universal)
9295 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9297 ;; #(
9299 as_fn_error "unknown endianness
9300 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9301 esac
9304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5
9305 $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; }
9306 if test "${emacs_cv_attribute_aligned+set}" = set; then :
9307 $as_echo_n "(cached) " >&6
9308 else
9309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9310 /* end confdefs.h. */
9311 char __attribute__ ((__aligned__ (1 << 3))) c;
9313 main ()
9317 return 0;
9319 _ACEOF
9320 if ac_fn_c_try_compile "$LINENO"; then :
9321 emacs_cv_attribute_aligned=yes
9322 else
9323 emacs_cv_attribute_aligned=no
9325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5
9328 $as_echo "$emacs_cv_attribute_aligned" >&6; }
9329 if test $emacs_cv_attribute_aligned = yes; then
9331 $as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
9335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9336 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
9337 set x ${MAKE-make}
9338 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9339 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
9340 $as_echo_n "(cached) " >&6
9341 else
9342 cat >conftest.make <<\_ACEOF
9343 SHELL = /bin/sh
9344 all:
9345 @echo '@@@%%%=$(MAKE)=@@@%%%'
9346 _ACEOF
9347 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9348 case `${MAKE-make} -f conftest.make 2>/dev/null` in
9349 *@@@%%%=?*=@@@%%%*)
9350 eval ac_cv_prog_make_${ac_make}_set=yes;;
9352 eval ac_cv_prog_make_${ac_make}_set=no;;
9353 esac
9354 rm -f conftest.make
9356 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9358 $as_echo "yes" >&6; }
9359 SET_MAKE=
9360 else
9361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362 $as_echo "no" >&6; }
9363 SET_MAKE="MAKE=${MAKE-make}"
9367 DEPFLAGS=
9368 MKDEPDIR=":"
9369 deps_frag=deps.mk
9370 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9372 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9373 HAVE_GNU_MAKE=no
9374 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9375 if test "x$testval" != x; then
9376 HAVE_GNU_MAKE=yes
9377 else
9378 ac_enable_autodepend=no
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9381 $as_echo "$HAVE_GNU_MAKE" >&6; }
9382 if test $HAVE_GNU_MAKE = yes; then
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9384 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9385 SAVE_CFLAGS="$CFLAGS"
9386 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9388 /* end confdefs.h. */
9391 main ()
9395 return 0;
9397 _ACEOF
9398 if ac_fn_c_try_compile "$LINENO"; then :
9400 else
9401 ac_enable_autodepend=no
9403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9404 CFLAGS="$SAVE_CFLAGS"
9405 test -f deps.d || ac_enable_autodepend=no
9406 rm -rf deps.d
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9408 $as_echo "$ac_enable_autodepend" >&6; }
9410 if test $ac_enable_autodepend = yes; then
9411 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9412 ## In parallel builds, another make might create depdir between
9413 ## the first test and mkdir, so stick another test on the end.
9414 ## Or use install-sh -d? mkdir -p is not portable.
9415 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
9416 deps_frag=autodeps.mk
9419 deps_frag=$srcdir/src/$deps_frag
9425 lisp_frag=$srcdir/src/lisp.mk
9429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9430 $as_echo_n "checking for long file names... " >&6; }
9431 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9432 $as_echo_n "(cached) " >&6
9433 else
9434 ac_cv_sys_long_file_names=yes
9435 # Test for long file names in all the places we know might matter:
9436 # . the current directory, where building will happen
9437 # $prefix/lib where we will be installing things
9438 # $exec_prefix/lib likewise
9439 # $TMPDIR if set, where it might want to write temporary files
9440 # /tmp where it might want to write temporary files
9441 # /var/tmp likewise
9442 # /usr/tmp likewise
9443 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9444 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9445 # in the usual case where exec_prefix is '${prefix}'.
9446 case $ac_dir in #(
9447 . | /* | ?:[\\/]*) ;; #(
9448 *) continue;;
9449 esac
9450 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9451 ac_xdir=$ac_dir/cf$$
9452 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9453 ac_tf1=$ac_xdir/conftest9012345
9454 ac_tf2=$ac_xdir/conftest9012346
9455 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9456 ac_cv_sys_long_file_names=no
9457 rm -f -r "$ac_xdir" 2>/dev/null
9458 test $ac_cv_sys_long_file_names = no && break
9459 done
9461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9462 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9463 if test $ac_cv_sys_long_file_names = yes; then
9465 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9470 #### Choose a window system.
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9473 $as_echo_n "checking for X... " >&6; }
9476 # Check whether --with-x was given.
9477 if test "${with_x+set}" = set; then :
9478 withval=$with_x;
9481 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9482 if test "x$with_x" = xno; then
9483 # The user explicitly disabled X.
9484 have_x=disabled
9485 else
9486 case $x_includes,$x_libraries in #(
9487 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9488 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9489 $as_echo_n "(cached) " >&6
9490 else
9491 # One or both of the vars are not set, and there is no cached value.
9492 ac_x_includes=no ac_x_libraries=no
9493 rm -f -r conftest.dir
9494 if mkdir conftest.dir; then
9495 cd conftest.dir
9496 cat >Imakefile <<'_ACEOF'
9497 incroot:
9498 @echo incroot='${INCROOT}'
9499 usrlibdir:
9500 @echo usrlibdir='${USRLIBDIR}'
9501 libdir:
9502 @echo libdir='${LIBDIR}'
9503 _ACEOF
9504 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9505 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9506 for ac_var in incroot usrlibdir libdir; do
9507 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9508 done
9509 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9510 for ac_extension in a so sl dylib la dll; do
9511 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9512 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9513 ac_im_usrlibdir=$ac_im_libdir; break
9515 done
9516 # Screen out bogus values from the imake configuration. They are
9517 # bogus both because they are the default anyway, and because
9518 # using them would break gcc on systems where it needs fixed includes.
9519 case $ac_im_incroot in
9520 /usr/include) ac_x_includes= ;;
9521 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9522 esac
9523 case $ac_im_usrlibdir in
9524 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9525 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9526 esac
9528 cd ..
9529 rm -f -r conftest.dir
9532 # Standard set of common directories for X headers.
9533 # Check X11 before X11Rn because it is often a symlink to the current release.
9534 ac_x_header_dirs='
9535 /usr/X11/include
9536 /usr/X11R7/include
9537 /usr/X11R6/include
9538 /usr/X11R5/include
9539 /usr/X11R4/include
9541 /usr/include/X11
9542 /usr/include/X11R7
9543 /usr/include/X11R6
9544 /usr/include/X11R5
9545 /usr/include/X11R4
9547 /usr/local/X11/include
9548 /usr/local/X11R7/include
9549 /usr/local/X11R6/include
9550 /usr/local/X11R5/include
9551 /usr/local/X11R4/include
9553 /usr/local/include/X11
9554 /usr/local/include/X11R7
9555 /usr/local/include/X11R6
9556 /usr/local/include/X11R5
9557 /usr/local/include/X11R4
9559 /usr/X386/include
9560 /usr/x386/include
9561 /usr/XFree86/include/X11
9563 /usr/include
9564 /usr/local/include
9565 /usr/unsupported/include
9566 /usr/athena/include
9567 /usr/local/x11r5/include
9568 /usr/lpp/Xamples/include
9570 /usr/openwin/include
9571 /usr/openwin/share/include'
9573 if test "$ac_x_includes" = no; then
9574 # Guess where to find include files, by looking for Xlib.h.
9575 # First, try using that file with no special directory specified.
9576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9577 /* end confdefs.h. */
9578 #include <X11/Xlib.h>
9579 _ACEOF
9580 if ac_fn_c_try_cpp "$LINENO"; then :
9581 # We can compile using X headers with no special include directory.
9582 ac_x_includes=
9583 else
9584 for ac_dir in $ac_x_header_dirs; do
9585 if test -r "$ac_dir/X11/Xlib.h"; then
9586 ac_x_includes=$ac_dir
9587 break
9589 done
9591 rm -f conftest.err conftest.$ac_ext
9592 fi # $ac_x_includes = no
9594 if test "$ac_x_libraries" = no; then
9595 # Check for the libraries.
9596 # See if we find them without any special options.
9597 # Don't add to $LIBS permanently.
9598 ac_save_LIBS=$LIBS
9599 LIBS="-lX11 $LIBS"
9600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9601 /* end confdefs.h. */
9602 #include <X11/Xlib.h>
9604 main ()
9606 XrmInitialize ()
9608 return 0;
9610 _ACEOF
9611 if ac_fn_c_try_link "$LINENO"; then :
9612 LIBS=$ac_save_LIBS
9613 # We can link X programs with no special library path.
9614 ac_x_libraries=
9615 else
9616 LIBS=$ac_save_LIBS
9617 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9619 # Don't even attempt the hair of trying to link an X program!
9620 for ac_extension in a so sl dylib la dll; do
9621 if test -r "$ac_dir/libX11.$ac_extension"; then
9622 ac_x_libraries=$ac_dir
9623 break 2
9625 done
9626 done
9628 rm -f core conftest.err conftest.$ac_objext \
9629 conftest$ac_exeext conftest.$ac_ext
9630 fi # $ac_x_libraries = no
9632 case $ac_x_includes,$ac_x_libraries in #(
9633 no,* | *,no | *\'*)
9634 # Didn't find X, or a directory has "'" in its name.
9635 ac_cv_have_x="have_x=no";; #(
9637 # Record where we found X for the cache.
9638 ac_cv_have_x="have_x=yes\
9639 ac_x_includes='$ac_x_includes'\
9640 ac_x_libraries='$ac_x_libraries'"
9641 esac
9643 ;; #(
9644 *) have_x=yes;;
9645 esac
9646 eval "$ac_cv_have_x"
9647 fi # $with_x != no
9649 if test "$have_x" != yes; then
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9651 $as_echo "$have_x" >&6; }
9652 no_x=yes
9653 else
9654 # If each of the values was on the command line, it overrides each guess.
9655 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9656 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9657 # Update the cache value to reflect the command line values.
9658 ac_cv_have_x="have_x=yes\
9659 ac_x_includes='$x_includes'\
9660 ac_x_libraries='$x_libraries'"
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9662 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9665 if test "$no_x" = yes; then
9666 window_system=none
9667 else
9668 window_system=x11
9671 ## Workaround for bug in autoconf <= 2.62.
9672 ## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9673 ## No need to do anything special for these standard directories.
9674 if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9676 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9680 LD_SWITCH_X_SITE_AUX=
9681 LD_SWITCH_X_SITE_AUX_RPATH=
9682 if test "${x_libraries}" != NONE; then
9683 if test -n "${x_libraries}"; then
9684 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9685 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9686 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
9688 x_default_search_path=""
9689 x_search_path=${x_libraries}
9690 if test -z "${x_search_path}"; then
9691 x_search_path=/usr/lib
9693 for x_library in `echo ${x_search_path}: | \
9694 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9695 x_search_path="\
9696 ${x_library}/X11/%L/%T/%N%C%S:\
9697 ${x_library}/X11/%l/%T/%N%C%S:\
9698 ${x_library}/X11/%T/%N%C%S:\
9699 ${x_library}/X11/%L/%T/%N%S:\
9700 ${x_library}/X11/%l/%T/%N%S:\
9701 ${x_library}/X11/%T/%N%S"
9702 if test x"${x_default_search_path}" = x; then
9703 x_default_search_path=${x_search_path}
9704 else
9705 x_default_search_path="${x_search_path}:${x_default_search_path}"
9707 done
9712 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9713 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9716 if test x"${x_includes}" = x; then
9717 bitmapdir=/usr/include/X11/bitmaps
9718 else
9719 # accumulate include directories that have X11 bitmap subdirectories
9720 bmd_acc="dummyval"
9721 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9722 if test -d "${bmd}/X11/bitmaps"; then
9723 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9725 if test -d "${bmd}/bitmaps"; then
9726 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9728 done
9729 if test ${bmd_acc} != "dummyval"; then
9730 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9734 HAVE_NS=no
9735 NS_IMPL_COCOA=no
9736 NS_IMPL_GNUSTEP=no
9737 tmp_CPPFLAGS="$CPPFLAGS"
9738 tmp_CFLAGS="$CFLAGS"
9739 CPPFLAGS="$CPPFLAGS -x objective-c"
9740 CFLAGS="$CFLAGS -x objective-c"
9741 TEMACS_LDFLAGS2="\${LDFLAGS}"
9742 GNU_OBJC_CFLAGS=
9743 if test "${with_ns}" != no; then
9744 if test "${opsys}" = darwin; then
9745 NS_IMPL_COCOA=yes
9746 ns_appdir=`pwd`/nextstep/Emacs.app
9747 ns_appbindir=${ns_appdir}/Contents/MacOS/
9748 ns_appresdir=${ns_appdir}/Contents/Resources
9749 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
9750 elif test -f $GNUSTEP_CONFIG_FILE; then
9751 NS_IMPL_GNUSTEP=yes
9752 ns_appdir=`pwd`/nextstep/Emacs.app
9753 ns_appbindir=${ns_appdir}/
9754 ns_appresdir=${ns_appdir}/Resources
9755 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
9756 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9757 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9758 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9759 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9760 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9761 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9762 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9763 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9764 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9765 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9766 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9767 LIB_STANDARD=
9768 START_FILES=
9769 TEMACS_LDFLAGS2=
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9771 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9772 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9773 $as_echo_n "(cached) " >&6
9774 else
9775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776 /* end confdefs.h. */
9777 #include <GNUstepBase/GSConfig.h>
9779 main ()
9781 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9783 #else
9784 fail;
9785 #endif
9787 return 0;
9789 _ACEOF
9790 if ac_fn_c_try_compile "$LINENO"; then :
9791 emacs_cv_objc_exceptions=yes
9792 else
9793 emacs_cv_objc_exceptions=no
9795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9798 $as_echo "$emacs_cv_objc_exceptions" >&6; }
9799 if test $emacs_cv_objc_exceptions = yes; then
9801 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9803 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9807 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9809 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9810 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9811 HAVE_NS=yes
9812 else
9813 as_fn_error "\`--with-ns' was specified, but the include
9814 files are missing or cannot be compiled." "$LINENO" 5
9818 NS_HAVE_NSINTEGER=yes
9819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9820 /* end confdefs.h. */
9821 #include <Foundation/NSObjCRuntime.h>
9823 main ()
9825 NSInteger i;
9827 return 0;
9829 _ACEOF
9830 if ac_fn_c_try_compile "$LINENO"; then :
9831 ns_have_nsinteger=yes
9832 else
9833 ns_have_nsinteger=no
9835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9836 if test $ns_have_nsinteger = no; then
9837 NS_HAVE_NSINTEGER=no
9842 ns_frag=/dev/null
9843 NS_OBJ=
9844 NS_OBJC_OBJ=
9845 if test "${HAVE_NS}" = yes; then
9846 if test "$with_toolkit_scroll_bars" = "no"; then
9847 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9850 window_system=nextstep
9851 with_xft=no
9852 # set up packaging dirs
9853 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9854 prefix=${ns_appresdir}
9855 exec_prefix=${ns_appbindir}
9856 libexecdir=${ns_appbindir}/libexec
9858 ns_frag=$srcdir/src/ns.mk
9859 NS_OBJ="fontset.o fringe.o image.o"
9860 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9862 CFLAGS="$tmp_CFLAGS"
9863 CPPFLAGS="$tmp_CPPFLAGS"
9869 case "${window_system}" in
9870 x11 )
9871 HAVE_X_WINDOWS=yes
9872 HAVE_X11=yes
9873 case "${with_x_toolkit}" in
9874 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9875 motif ) USE_X_TOOLKIT=MOTIF ;;
9876 gtk ) with_gtk=yes
9877 USE_X_TOOLKIT=none ;;
9878 gtk3 ) with_gtk3=yes
9879 USE_X_TOOLKIT=none ;;
9880 no ) USE_X_TOOLKIT=none ;;
9881 * ) USE_X_TOOLKIT=maybe ;;
9882 esac
9884 nextstep | none )
9885 HAVE_X_WINDOWS=no
9886 HAVE_X11=no
9887 USE_X_TOOLKIT=none
9889 esac
9891 if test "$window_system" = none && test "X$with_x" != "Xno"; then
9892 # Extract the first word of "X", so it can be a program name with args.
9893 set dummy X; ac_word=$2
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9895 $as_echo_n "checking for $ac_word... " >&6; }
9896 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9897 $as_echo_n "(cached) " >&6
9898 else
9899 if test -n "$HAVE_XSERVER"; then
9900 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9901 else
9902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9903 for as_dir in $PATH
9905 IFS=$as_save_IFS
9906 test -z "$as_dir" && as_dir=.
9907 for ac_exec_ext in '' $ac_executable_extensions; do
9908 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9909 ac_cv_prog_HAVE_XSERVER="true"
9910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9911 break 2
9913 done
9914 done
9915 IFS=$as_save_IFS
9917 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9920 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9921 if test -n "$HAVE_XSERVER"; then
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9923 $as_echo "$HAVE_XSERVER" >&6; }
9924 else
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926 $as_echo "no" >&6; }
9930 if test "$HAVE_XSERVER" = true ||
9931 test -n "$DISPLAY" ||
9932 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9933 as_fn_error "You seem to be running X, but no X development libraries
9934 were found. You should install the relevant development files for X
9935 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9936 sure you have development files for image handling, i.e.
9937 tiff, gif, jpeg, png and xpm.
9938 If you are sure you want Emacs compiled without X window support, pass
9939 --without-x
9940 to configure." "$LINENO" 5
9944 ### If we're using X11, we should use the X menu package.
9945 HAVE_MENUS=no
9946 case ${HAVE_X11} in
9947 yes ) HAVE_MENUS=yes ;;
9948 esac
9950 # Do the opsystem or machine files prohibit the use of the GNU malloc?
9951 # Assume not, until told otherwise.
9952 GNU_MALLOC=yes
9953 doug_lea_malloc=yes
9954 ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
9955 if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
9957 else
9958 doug_lea_malloc=no
9961 ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
9962 if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
9964 else
9965 doug_lea_malloc=no
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
9969 $as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
9970 if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
9971 $as_echo_n "(cached) " >&6
9972 else
9973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9974 /* end confdefs.h. */
9975 extern void (* __after_morecore_hook)();
9977 main ()
9979 __after_morecore_hook = 0
9981 return 0;
9983 _ACEOF
9984 if ac_fn_c_try_link "$LINENO"; then :
9985 emacs_cv_var___after_morecore_hook=yes
9986 else
9987 emacs_cv_var___after_morecore_hook=no
9989 rm -f core conftest.err conftest.$ac_objext \
9990 conftest$ac_exeext conftest.$ac_ext
9992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
9993 $as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
9994 if test $emacs_cv_var___after_morecore_hook = no; then
9995 doug_lea_malloc=no
9999 system_malloc=no
10000 case "$opsys" in
10001 ## darwin ld insists on the use of malloc routines in the System framework.
10002 darwin|sol2-10) system_malloc=yes ;;
10003 esac
10005 if test "${system_malloc}" = "yes"; then
10007 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10009 GNU_MALLOC=no
10010 GNU_MALLOC_reason="
10011 (The GNU allocators don't work with this system configuration.)"
10012 GMALLOC_OBJ=
10013 VMLIMIT_OBJ=
10014 else
10015 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10016 VMLIMIT_OBJ=vm-limit.o
10021 if test "$doug_lea_malloc" = "yes" ; then
10022 if test "$GNU_MALLOC" = yes ; then
10023 GNU_MALLOC_reason="
10024 (Using Doug Lea's new malloc from the GNU C Library.)"
10027 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10030 ## Use mmap directly for allocating larger buffers.
10031 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10032 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10033 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10034 case "$opsys" in
10035 gnu*) REL_ALLOC=no ;;
10036 esac
10039 if test x"${REL_ALLOC}" = x; then
10040 REL_ALLOC=${GNU_MALLOC}
10043 use_mmap_for_buffers=no
10044 case "$opsys" in
10045 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10046 esac
10051 for ac_header in $ac_header_list
10052 do :
10053 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10054 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10056 eval as_val=\$$as_ac_Header
10057 if test "x$as_val" = x""yes; then :
10058 cat >>confdefs.h <<_ACEOF
10059 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10060 _ACEOF
10064 done
10073 for ac_func in getpagesize
10074 do :
10075 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10076 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10077 cat >>confdefs.h <<_ACEOF
10078 #define HAVE_GETPAGESIZE 1
10079 _ACEOF
10082 done
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10085 $as_echo_n "checking for working mmap... " >&6; }
10086 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10087 $as_echo_n "(cached) " >&6
10088 else
10089 if test "$cross_compiling" = yes; then :
10090 ac_cv_func_mmap_fixed_mapped=no
10091 else
10092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10093 /* end confdefs.h. */
10094 $ac_includes_default
10095 /* malloc might have been renamed as rpl_malloc. */
10096 #undef malloc
10098 /* Thanks to Mike Haertel and Jim Avera for this test.
10099 Here is a matrix of mmap possibilities:
10100 mmap private not fixed
10101 mmap private fixed at somewhere currently unmapped
10102 mmap private fixed at somewhere already mapped
10103 mmap shared not fixed
10104 mmap shared fixed at somewhere currently unmapped
10105 mmap shared fixed at somewhere already mapped
10106 For private mappings, we should verify that changes cannot be read()
10107 back from the file, nor mmap's back from the file at a different
10108 address. (There have been systems where private was not correctly
10109 implemented like the infamous i386 svr4.0, and systems where the
10110 VM page cache was not coherent with the file system buffer cache
10111 like early versions of FreeBSD and possibly contemporary NetBSD.)
10112 For shared mappings, we should conversely verify that changes get
10113 propagated back to all the places they're supposed to be.
10115 Grep wants private fixed already mapped.
10116 The main things grep needs to know about mmap are:
10117 * does it exist and is it safe to write into the mmap'd area
10118 * how to use it (BSD variants) */
10120 #include <fcntl.h>
10121 #include <sys/mman.h>
10123 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10124 char *malloc ();
10125 #endif
10127 /* This mess was copied from the GNU getpagesize.h. */
10128 #ifndef HAVE_GETPAGESIZE
10129 # ifdef _SC_PAGESIZE
10130 # define getpagesize() sysconf(_SC_PAGESIZE)
10131 # else /* no _SC_PAGESIZE */
10132 # ifdef HAVE_SYS_PARAM_H
10133 # include <sys/param.h>
10134 # ifdef EXEC_PAGESIZE
10135 # define getpagesize() EXEC_PAGESIZE
10136 # else /* no EXEC_PAGESIZE */
10137 # ifdef NBPG
10138 # define getpagesize() NBPG * CLSIZE
10139 # ifndef CLSIZE
10140 # define CLSIZE 1
10141 # endif /* no CLSIZE */
10142 # else /* no NBPG */
10143 # ifdef NBPC
10144 # define getpagesize() NBPC
10145 # else /* no NBPC */
10146 # ifdef PAGESIZE
10147 # define getpagesize() PAGESIZE
10148 # endif /* PAGESIZE */
10149 # endif /* no NBPC */
10150 # endif /* no NBPG */
10151 # endif /* no EXEC_PAGESIZE */
10152 # else /* no HAVE_SYS_PARAM_H */
10153 # define getpagesize() 8192 /* punt totally */
10154 # endif /* no HAVE_SYS_PARAM_H */
10155 # endif /* no _SC_PAGESIZE */
10157 #endif /* no HAVE_GETPAGESIZE */
10160 main ()
10162 char *data, *data2, *data3;
10163 const char *cdata2;
10164 int i, pagesize;
10165 int fd, fd2;
10167 pagesize = getpagesize ();
10169 /* First, make a file with some known garbage in it. */
10170 data = (char *) malloc (pagesize);
10171 if (!data)
10172 return 1;
10173 for (i = 0; i < pagesize; ++i)
10174 *(data + i) = rand ();
10175 umask (0);
10176 fd = creat ("conftest.mmap", 0600);
10177 if (fd < 0)
10178 return 2;
10179 if (write (fd, data, pagesize) != pagesize)
10180 return 3;
10181 close (fd);
10183 /* Next, check that the tail of a page is zero-filled. File must have
10184 non-zero length, otherwise we risk SIGBUS for entire page. */
10185 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10186 if (fd2 < 0)
10187 return 4;
10188 cdata2 = "";
10189 if (write (fd2, cdata2, 1) != 1)
10190 return 5;
10191 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10192 if (data2 == MAP_FAILED)
10193 return 6;
10194 for (i = 0; i < pagesize; ++i)
10195 if (*(data2 + i))
10196 return 7;
10197 close (fd2);
10198 if (munmap (data2, pagesize))
10199 return 8;
10201 /* Next, try to mmap the file at a fixed address which already has
10202 something else allocated at it. If we can, also make sure that
10203 we see the same garbage. */
10204 fd = open ("conftest.mmap", O_RDWR);
10205 if (fd < 0)
10206 return 9;
10207 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10208 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10209 return 10;
10210 for (i = 0; i < pagesize; ++i)
10211 if (*(data + i) != *(data2 + i))
10212 return 11;
10214 /* Finally, make sure that changes to the mapped area do not
10215 percolate back to the file as seen by read(). (This is a bug on
10216 some variants of i386 svr4.0.) */
10217 for (i = 0; i < pagesize; ++i)
10218 *(data2 + i) = *(data2 + i) + 1;
10219 data3 = (char *) malloc (pagesize);
10220 if (!data3)
10221 return 12;
10222 if (read (fd, data3, pagesize) != pagesize)
10223 return 13;
10224 for (i = 0; i < pagesize; ++i)
10225 if (*(data + i) != *(data3 + i))
10226 return 14;
10227 close (fd);
10228 return 0;
10230 _ACEOF
10231 if ac_fn_c_try_run "$LINENO"; then :
10232 ac_cv_func_mmap_fixed_mapped=yes
10233 else
10234 ac_cv_func_mmap_fixed_mapped=no
10236 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10237 conftest.$ac_objext conftest.beam conftest.$ac_ext
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10242 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10243 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10245 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10248 rm -f conftest.mmap conftest.txt
10250 if test $use_mmap_for_buffers = yes; then
10252 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10254 REL_ALLOC=no
10257 LIBS="$LIBS_SYSTEM $LIBS"
10259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10260 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10261 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10262 $as_echo_n "(cached) " >&6
10263 else
10264 ac_check_lib_save_LIBS=$LIBS
10265 LIBS="-ldnet $LIBS"
10266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10267 /* end confdefs.h. */
10269 /* Override any GCC internal prototype to avoid an error.
10270 Use char because int might match the return type of a GCC
10271 builtin and then its argument prototype would still apply. */
10272 #ifdef __cplusplus
10273 extern "C"
10274 #endif
10275 char dnet_ntoa ();
10277 main ()
10279 return dnet_ntoa ();
10281 return 0;
10283 _ACEOF
10284 if ac_fn_c_try_link "$LINENO"; then :
10285 ac_cv_lib_dnet_dnet_ntoa=yes
10286 else
10287 ac_cv_lib_dnet_dnet_ntoa=no
10289 rm -f core conftest.err conftest.$ac_objext \
10290 conftest$ac_exeext conftest.$ac_ext
10291 LIBS=$ac_check_lib_save_LIBS
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10294 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10295 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10296 cat >>confdefs.h <<_ACEOF
10297 #define HAVE_LIBDNET 1
10298 _ACEOF
10300 LIBS="-ldnet $LIBS"
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10306 $as_echo_n "checking for main in -lXbsd... " >&6; }
10307 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10308 $as_echo_n "(cached) " >&6
10309 else
10310 ac_check_lib_save_LIBS=$LIBS
10311 LIBS="-lXbsd $LIBS"
10312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10313 /* end confdefs.h. */
10317 main ()
10319 return main ();
10321 return 0;
10323 _ACEOF
10324 if ac_fn_c_try_link "$LINENO"; then :
10325 ac_cv_lib_Xbsd_main=yes
10326 else
10327 ac_cv_lib_Xbsd_main=no
10329 rm -f core conftest.err conftest.$ac_objext \
10330 conftest$ac_exeext conftest.$ac_ext
10331 LIBS=$ac_check_lib_save_LIBS
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10334 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10335 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10336 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10340 LIB_PTHREAD=
10341 for ac_header in pthread.h
10342 do :
10343 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10344 if test "x$ac_cv_header_pthread_h" = x""yes; then :
10345 cat >>confdefs.h <<_ACEOF
10346 #define HAVE_PTHREAD_H 1
10347 _ACEOF
10351 done
10353 if test "$ac_cv_header_pthread_h"; then
10354 if test "$GMALLOC_OBJ" = gmalloc.o; then
10355 emacs_pthread_function=pthread_atfork
10356 else
10357 emacs_pthread_function=pthread_self
10359 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10361 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10362 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10363 $as_echo_n "(cached) " >&6
10364 else
10365 ac_check_lib_save_LIBS=$LIBS
10366 LIBS="-lpthread $LIBS"
10367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10368 /* end confdefs.h. */
10370 /* Override any GCC internal prototype to avoid an error.
10371 Use char because int might match the return type of a GCC
10372 builtin and then its argument prototype would still apply. */
10373 #ifdef __cplusplus
10374 extern "C"
10375 #endif
10376 char $emacs_pthread_function ();
10378 main ()
10380 return $emacs_pthread_function ();
10382 return 0;
10384 _ACEOF
10385 if ac_fn_c_try_link "$LINENO"; then :
10386 eval "$as_ac_Lib=yes"
10387 else
10388 eval "$as_ac_Lib=no"
10390 rm -f core conftest.err conftest.$ac_objext \
10391 conftest$ac_exeext conftest.$ac_ext
10392 LIBS=$ac_check_lib_save_LIBS
10394 eval ac_res=\$$as_ac_Lib
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10396 $as_echo "$ac_res" >&6; }
10397 eval as_val=\$$as_ac_Lib
10398 if test "x$as_val" = x""yes; then :
10399 HAVE_PTHREAD=yes
10403 if test "$HAVE_PTHREAD" = yes; then
10404 case "${canonical}" in
10405 *-hpux*) ;;
10406 *) LIB_PTHREAD="-lpthread"
10407 LIBS="$LIB_PTHREAD $LIBS" ;;
10408 esac
10410 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10416 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10417 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10418 $as_echo_n "(cached) " >&6
10419 else
10420 ac_check_lib_save_LIBS=$LIBS
10421 LIBS="-lpthreads $LIBS"
10422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10423 /* end confdefs.h. */
10425 /* Override any GCC internal prototype to avoid an error.
10426 Use char because int might match the return type of a GCC
10427 builtin and then its argument prototype would still apply. */
10428 #ifdef __cplusplus
10429 extern "C"
10430 #endif
10431 char cma_open ();
10433 main ()
10435 return cma_open ();
10437 return 0;
10439 _ACEOF
10440 if ac_fn_c_try_link "$LINENO"; then :
10441 ac_cv_lib_pthreads_cma_open=yes
10442 else
10443 ac_cv_lib_pthreads_cma_open=no
10445 rm -f core conftest.err conftest.$ac_objext \
10446 conftest$ac_exeext conftest.$ac_ext
10447 LIBS=$ac_check_lib_save_LIBS
10449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10450 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10451 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10452 cat >>confdefs.h <<_ACEOF
10453 #define HAVE_LIBPTHREADS 1
10454 _ACEOF
10456 LIBS="-lpthreads $LIBS"
10461 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10462 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10463 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10464 ## added to LIBS in configure would never contain the pthreads part,
10465 ## but the value used in Makefiles might. FIXME?
10467 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10468 ## be harmless on older versions of X where it happens to exist.
10469 test "$opsys" = "aix4-2" && \
10470 test $ac_cv_lib_pthreads_cma_open = yes && \
10471 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10474 case ${host_os} in
10475 aix*)
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10477 $as_echo_n "checking for -bbigtoc option... " >&6; }
10478 if test "${gdb_cv_bigtoc+set}" = set; then :
10479 $as_echo_n "(cached) " >&6
10480 else
10482 case $GCC in
10483 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10484 *) gdb_cv_bigtoc=-bbigtoc ;;
10485 esac
10487 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10489 /* end confdefs.h. */
10492 main ()
10494 int i;
10496 return 0;
10498 _ACEOF
10499 if ac_fn_c_try_link "$LINENO"; then :
10501 else
10502 gdb_cv_bigtoc=
10504 rm -f core conftest.err conftest.$ac_objext \
10505 conftest$ac_exeext conftest.$ac_ext
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10509 $as_echo "$gdb_cv_bigtoc" >&6; }
10511 esac
10513 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10514 # used for the tests that follow. We set them back to REAL_CFLAGS and
10515 # REAL_CPPFLAGS later on.
10517 REAL_CFLAGS="$CFLAGS"
10518 REAL_CPPFLAGS="$CPPFLAGS"
10520 if test "${HAVE_X11}" = "yes"; then
10521 DEFS="$C_SWITCH_X_SITE $DEFS"
10522 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10523 LIBS="-lX11 $LIBS"
10524 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10525 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10527 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10528 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10529 # but it's more convenient here to set LD_RUN_PATH
10530 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10531 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10532 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10533 export LD_RUN_PATH
10536 if test "${opsys}" = "gnu-linux"; then
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10538 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10540 /* end confdefs.h. */
10543 main ()
10545 XOpenDisplay ("foo");
10547 return 0;
10549 _ACEOF
10550 if ac_fn_c_try_link "$LINENO"; then :
10551 xgnu_linux_first_failure=no
10552 else
10553 xgnu_linux_first_failure=yes
10555 rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
10557 if test "${xgnu_linux_first_failure}" = "yes"; then
10558 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10559 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10560 OLD_CPPFLAGS="$CPPFLAGS"
10561 OLD_LIBS="$LIBS"
10562 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10563 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10564 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10565 LIBS="$LIBS -b i486-linuxaout"
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567 /* end confdefs.h. */
10570 main ()
10572 XOpenDisplay ("foo");
10574 return 0;
10576 _ACEOF
10577 if ac_fn_c_try_link "$LINENO"; then :
10578 xgnu_linux_second_failure=no
10579 else
10580 xgnu_linux_second_failure=yes
10582 rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
10584 if test "${xgnu_linux_second_failure}" = "yes"; then
10585 # If we get the same failure with -b, there is no use adding -b.
10586 # So take it out. This plays safe.
10587 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10588 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10589 CPPFLAGS="$OLD_CPPFLAGS"
10590 LIBS="$OLD_LIBS"
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592 $as_echo "no" >&6; }
10593 else
10594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10595 $as_echo "yes" >&6; }
10597 else
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10599 $as_echo "no" >&6; }
10603 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10604 # header files included from there.
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10606 $as_echo_n "checking for Xkb... " >&6; }
10607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10608 /* end confdefs.h. */
10609 #include <X11/Xlib.h>
10610 #include <X11/XKBlib.h>
10612 main ()
10614 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10616 return 0;
10618 _ACEOF
10619 if ac_fn_c_try_link "$LINENO"; then :
10620 emacs_xkb=yes
10621 else
10622 emacs_xkb=no
10624 rm -f core conftest.err conftest.$ac_objext \
10625 conftest$ac_exeext conftest.$ac_ext
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10627 $as_echo "$emacs_xkb" >&6; }
10628 if test $emacs_xkb = yes; then
10630 $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
10634 for ac_func in XrmSetDatabase XScreenResourceString \
10635 XScreenNumberOfScreen XSetWMProtocols
10636 do :
10637 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10638 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10639 eval as_val=\$$as_ac_var
10640 if test "x$as_val" = x""yes; then :
10641 cat >>confdefs.h <<_ACEOF
10642 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10643 _ACEOF
10646 done
10650 if test "${window_system}" = "x11"; then
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10652 $as_echo_n "checking X11 version 6... " >&6; }
10653 if test "${emacs_cv_x11_version_6+set}" = set; then :
10654 $as_echo_n "(cached) " >&6
10655 else
10656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10657 /* end confdefs.h. */
10658 #include <X11/Xlib.h>
10660 main ()
10662 #if XlibSpecificationRelease < 6
10663 fail;
10664 #endif
10667 return 0;
10669 _ACEOF
10670 if ac_fn_c_try_link "$LINENO"; then :
10671 emacs_cv_x11_version_6=yes
10672 else
10673 emacs_cv_x11_version_6=no
10675 rm -f core conftest.err conftest.$ac_objext \
10676 conftest$ac_exeext conftest.$ac_ext
10679 if test $emacs_cv_x11_version_6 = yes; then
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10681 $as_echo "6 or newer" >&6; }
10683 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
10686 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
10688 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10689 ## XIM support.
10690 case "$opsys" in
10691 sol2-*) : ;;
10693 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
10696 esac
10697 else
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10699 $as_echo "before 6" >&6; }
10704 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10705 HAVE_RSVG=no
10706 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10707 if test "${with_rsvg}" != "no"; then
10708 RSVG_REQUIRED=2.11.0
10709 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10712 succeeded=no
10714 # Extract the first word of "pkg-config", so it can be a program name with args.
10715 set dummy pkg-config; ac_word=$2
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10717 $as_echo_n "checking for $ac_word... " >&6; }
10718 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10719 $as_echo_n "(cached) " >&6
10720 else
10721 case $PKG_CONFIG in
10722 [\\/]* | ?:[\\/]*)
10723 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10727 for as_dir in $PATH
10729 IFS=$as_save_IFS
10730 test -z "$as_dir" && as_dir=.
10731 for ac_exec_ext in '' $ac_executable_extensions; do
10732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10733 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10735 break 2
10737 done
10738 done
10739 IFS=$as_save_IFS
10741 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10743 esac
10745 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10746 if test -n "$PKG_CONFIG"; then
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10748 $as_echo "$PKG_CONFIG" >&6; }
10749 else
10750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751 $as_echo "no" >&6; }
10756 if test "$PKG_CONFIG" = "no" ; then
10758 else
10759 PKG_CONFIG_MIN_VERSION=0.9.0
10760 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10762 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
10764 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10766 $as_echo "yes" >&6; }
10767 succeeded=yes
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
10770 $as_echo_n "checking RSVG_CFLAGS... " >&6; }
10771 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
10773 $as_echo "$RSVG_CFLAGS" >&6; }
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
10776 $as_echo_n "checking RSVG_LIBS... " >&6; }
10777 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
10779 $as_echo "$RSVG_LIBS" >&6; }
10780 else
10781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10782 $as_echo "no" >&6; }
10783 RSVG_CFLAGS=""
10784 RSVG_LIBS=""
10785 ## If we have a custom action on failure, don't print errors, but
10786 ## do set a variable so people can do so.
10787 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10793 else
10794 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10795 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10799 if test $succeeded = yes; then
10800 HAVE_RSVG=yes
10801 else
10808 if test $HAVE_RSVG = yes; then
10810 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
10812 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10813 LIBS="$RSVG_LIBS $LIBS"
10818 HAVE_IMAGEMAGICK=no
10819 if test "${HAVE_X11}" = "yes"; then
10820 if test "${with_imagemagick}" != "no"; then
10821 ## 6.2.8 is the earliest version known to work, but earlier versions
10822 ## might work - let us know if you find one.
10823 ## 6.0.7 does not work. See bug#7955.
10824 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
10826 succeeded=no
10828 # Extract the first word of "pkg-config", so it can be a program name with args.
10829 set dummy pkg-config; ac_word=$2
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10831 $as_echo_n "checking for $ac_word... " >&6; }
10832 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10833 $as_echo_n "(cached) " >&6
10834 else
10835 case $PKG_CONFIG in
10836 [\\/]* | ?:[\\/]*)
10837 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10841 for as_dir in $PATH
10843 IFS=$as_save_IFS
10844 test -z "$as_dir" && as_dir=.
10845 for ac_exec_ext in '' $ac_executable_extensions; do
10846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10847 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10849 break 2
10851 done
10852 done
10853 IFS=$as_save_IFS
10855 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10857 esac
10859 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10860 if test -n "$PKG_CONFIG"; then
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10862 $as_echo "$PKG_CONFIG" >&6; }
10863 else
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10865 $as_echo "no" >&6; }
10870 if test "$PKG_CONFIG" = "no" ; then
10872 else
10873 PKG_CONFIG_MIN_VERSION=0.9.0
10874 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10876 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
10878 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10880 $as_echo "yes" >&6; }
10881 succeeded=yes
10883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5
10884 $as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; }
10885 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5
10887 $as_echo "$IMAGEMAGICK_CFLAGS" >&6; }
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5
10890 $as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; }
10891 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
10892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5
10893 $as_echo "$IMAGEMAGICK_LIBS" >&6; }
10894 else
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10896 $as_echo "no" >&6; }
10897 IMAGEMAGICK_CFLAGS=""
10898 IMAGEMAGICK_LIBS=""
10899 ## If we have a custom action on failure, don't print errors, but
10900 ## do set a variable so people can do so.
10901 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
10907 else
10908 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10909 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10913 if test $succeeded = yes; then
10914 HAVE_IMAGEMAGICK=yes
10915 else
10922 if test $HAVE_IMAGEMAGICK = yes; then
10924 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
10926 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10927 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10928 for ac_func in MagickExportImagePixels
10929 do :
10930 ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels"
10931 if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then :
10932 cat >>confdefs.h <<_ACEOF
10933 #define HAVE_MAGICKEXPORTIMAGEPIXELS 1
10934 _ACEOF
10937 done
10944 HAVE_GTK=no
10945 GTK_OBJ=
10946 if test "${with_gtk3}" = "yes"; then
10947 GLIB_REQUIRED=2.28
10948 GTK_REQUIRED=3.0
10949 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10952 succeeded=no
10954 # Extract the first word of "pkg-config", so it can be a program name with args.
10955 set dummy pkg-config; ac_word=$2
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10957 $as_echo_n "checking for $ac_word... " >&6; }
10958 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10959 $as_echo_n "(cached) " >&6
10960 else
10961 case $PKG_CONFIG in
10962 [\\/]* | ?:[\\/]*)
10963 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10967 for as_dir in $PATH
10969 IFS=$as_save_IFS
10970 test -z "$as_dir" && as_dir=.
10971 for ac_exec_ext in '' $ac_executable_extensions; do
10972 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10973 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10975 break 2
10977 done
10978 done
10979 IFS=$as_save_IFS
10981 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10983 esac
10985 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10986 if test -n "$PKG_CONFIG"; then
10987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10988 $as_echo "$PKG_CONFIG" >&6; }
10989 else
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10991 $as_echo "no" >&6; }
10996 if test "$PKG_CONFIG" = "no" ; then
10997 pkg_check_gtk=no
10998 else
10999 PKG_CONFIG_MIN_VERSION=0.9.0
11000 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11002 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11004 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11006 $as_echo "yes" >&6; }
11007 succeeded=yes
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
11010 $as_echo_n "checking GTK_CFLAGS... " >&6; }
11011 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
11013 $as_echo "$GTK_CFLAGS" >&6; }
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
11016 $as_echo_n "checking GTK_LIBS... " >&6; }
11017 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
11019 $as_echo "$GTK_LIBS" >&6; }
11020 else
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022 $as_echo "no" >&6; }
11023 GTK_CFLAGS=""
11024 GTK_LIBS=""
11025 ## If we have a custom action on failure, don't print errors, but
11026 ## do set a variable so people can do so.
11027 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
11033 else
11034 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11035 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11039 if test $succeeded = yes; then
11040 pkg_check_gtk=yes
11041 else
11042 pkg_check_gtk=no
11045 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11046 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11049 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
11051 GTK_OBJ=emacsgtkfixed.o
11054 if test "$pkg_check_gtk" != "yes"; then
11055 HAVE_GTK=no
11056 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11057 GLIB_REQUIRED=2.10
11058 GTK_REQUIRED=2.10
11059 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11062 succeeded=no
11064 # Extract the first word of "pkg-config", so it can be a program name with args.
11065 set dummy pkg-config; ac_word=$2
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11067 $as_echo_n "checking for $ac_word... " >&6; }
11068 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11069 $as_echo_n "(cached) " >&6
11070 else
11071 case $PKG_CONFIG in
11072 [\\/]* | ?:[\\/]*)
11073 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11077 for as_dir in $PATH
11079 IFS=$as_save_IFS
11080 test -z "$as_dir" && as_dir=.
11081 for ac_exec_ext in '' $ac_executable_extensions; do
11082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11083 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11085 break 2
11087 done
11088 done
11089 IFS=$as_save_IFS
11091 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11093 esac
11095 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11096 if test -n "$PKG_CONFIG"; then
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11098 $as_echo "$PKG_CONFIG" >&6; }
11099 else
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11101 $as_echo "no" >&6; }
11106 if test "$PKG_CONFIG" = "no" ; then
11107 pkg_check_gtk=no
11108 else
11109 PKG_CONFIG_MIN_VERSION=0.9.0
11110 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11112 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11114 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11116 $as_echo "yes" >&6; }
11117 succeeded=yes
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
11120 $as_echo_n "checking GTK_CFLAGS... " >&6; }
11121 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
11123 $as_echo "$GTK_CFLAGS" >&6; }
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
11126 $as_echo_n "checking GTK_LIBS... " >&6; }
11127 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
11129 $as_echo "$GTK_LIBS" >&6; }
11130 else
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11132 $as_echo "no" >&6; }
11133 GTK_CFLAGS=""
11134 GTK_LIBS=""
11135 ## If we have a custom action on failure, don't print errors, but
11136 ## do set a variable so people can do so.
11137 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
11143 else
11144 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11145 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11149 if test $succeeded = yes; then
11150 pkg_check_gtk=yes
11151 else
11152 pkg_check_gtk=no
11155 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11156 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11161 if test x"$pkg_check_gtk" = xyes; then
11165 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11166 CFLAGS="$CFLAGS $GTK_CFLAGS"
11167 LIBS="$GTK_LIBS $LIBS"
11168 GTK_COMPILES=no
11169 for ac_func in gtk_main
11170 do :
11171 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
11172 if test "x$ac_cv_func_gtk_main" = x""yes; then :
11173 cat >>confdefs.h <<_ACEOF
11174 #define HAVE_GTK_MAIN 1
11175 _ACEOF
11176 GTK_COMPILES=yes
11178 done
11180 if test "${GTK_COMPILES}" != "yes"; then
11181 if test "$USE_X_TOOLKIT" != "maybe"; then
11182 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11184 else
11185 HAVE_GTK=yes
11187 $as_echo "#define USE_GTK 1" >>confdefs.h
11189 GTK_OBJ="gtkutil.o $GTK_OBJ"
11190 USE_X_TOOLKIT=none
11191 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11193 else
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11195 closing open displays. This is no problem if you just use
11196 one display, but if you use more than one and close one of them
11197 Emacs may crash." >&5
11198 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11199 closing open displays. This is no problem if you just use
11200 one display, but if you use more than one and close one of them
11201 Emacs may crash." >&2;}
11202 sleep 3
11210 if test "${HAVE_GTK}" = "yes"; then
11212 if test "$with_toolkit_scroll_bars" != no; then
11213 with_toolkit_scroll_bars=yes
11216 HAVE_GTK_FILE_SELECTION=no
11217 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11218 #include <gtk/gtk.h>
11220 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11221 HAVE_GTK_FILE_SELECTION=yes
11222 else
11223 HAVE_GTK_FILE_SELECTION=no
11226 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11227 for ac_func in gtk_file_selection_new
11228 do :
11229 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11230 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11231 cat >>confdefs.h <<_ACEOF
11232 #define HAVE_GTK_FILE_SELECTION_NEW 1
11233 _ACEOF
11236 done
11241 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11242 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11243 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11244 gtk_orientable_set_orientation \
11245 gtk_window_set_has_resize_grip
11246 do :
11247 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11248 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11249 eval as_val=\$$as_ac_var
11250 if test "x$as_val" = x""yes; then :
11251 cat >>confdefs.h <<_ACEOF
11252 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11253 _ACEOF
11256 done
11260 HAVE_DBUS=no
11261 DBUS_OBJ=
11262 if test "${with_dbus}" = "yes"; then
11264 succeeded=no
11266 # Extract the first word of "pkg-config", so it can be a program name with args.
11267 set dummy pkg-config; ac_word=$2
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11269 $as_echo_n "checking for $ac_word... " >&6; }
11270 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11271 $as_echo_n "(cached) " >&6
11272 else
11273 case $PKG_CONFIG in
11274 [\\/]* | ?:[\\/]*)
11275 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11279 for as_dir in $PATH
11281 IFS=$as_save_IFS
11282 test -z "$as_dir" && as_dir=.
11283 for ac_exec_ext in '' $ac_executable_extensions; do
11284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11285 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11287 break 2
11289 done
11290 done
11291 IFS=$as_save_IFS
11293 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11295 esac
11297 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11298 if test -n "$PKG_CONFIG"; then
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11300 $as_echo "$PKG_CONFIG" >&6; }
11301 else
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303 $as_echo "no" >&6; }
11308 if test "$PKG_CONFIG" = "no" ; then
11309 HAVE_DBUS=no
11310 else
11311 PKG_CONFIG_MIN_VERSION=0.9.0
11312 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11314 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11316 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11318 $as_echo "yes" >&6; }
11319 succeeded=yes
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
11322 $as_echo_n "checking DBUS_CFLAGS... " >&6; }
11323 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
11325 $as_echo "$DBUS_CFLAGS" >&6; }
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
11328 $as_echo_n "checking DBUS_LIBS... " >&6; }
11329 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
11331 $as_echo "$DBUS_LIBS" >&6; }
11332 else
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334 $as_echo "no" >&6; }
11335 DBUS_CFLAGS=""
11336 DBUS_LIBS=""
11337 ## If we have a custom action on failure, don't print errors, but
11338 ## do set a variable so people can do so.
11339 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11345 else
11346 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11347 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11351 if test $succeeded = yes; then
11352 HAVE_DBUS=yes
11353 else
11354 HAVE_DBUS=no
11357 if test "$HAVE_DBUS" = yes; then
11358 LIBS="$LIBS $DBUS_LIBS"
11360 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11362 for ac_func in dbus_watch_get_unix_fd
11363 do :
11364 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
11365 if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
11366 cat >>confdefs.h <<_ACEOF
11367 #define HAVE_DBUS_WATCH_GET_UNIX_FD 1
11368 _ACEOF
11371 done
11373 DBUS_OBJ=dbusbind.o
11378 HAVE_GSETTINGS=no
11379 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11381 succeeded=no
11383 # Extract the first word of "pkg-config", so it can be a program name with args.
11384 set dummy pkg-config; ac_word=$2
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11386 $as_echo_n "checking for $ac_word... " >&6; }
11387 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11388 $as_echo_n "(cached) " >&6
11389 else
11390 case $PKG_CONFIG in
11391 [\\/]* | ?:[\\/]*)
11392 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11396 for as_dir in $PATH
11398 IFS=$as_save_IFS
11399 test -z "$as_dir" && as_dir=.
11400 for ac_exec_ext in '' $ac_executable_extensions; do
11401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11402 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11404 break 2
11406 done
11407 done
11408 IFS=$as_save_IFS
11410 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11412 esac
11414 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11415 if test -n "$PKG_CONFIG"; then
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11417 $as_echo "$PKG_CONFIG" >&6; }
11418 else
11419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11420 $as_echo "no" >&6; }
11425 if test "$PKG_CONFIG" = "no" ; then
11426 HAVE_GSETTINGS=no
11427 else
11428 PKG_CONFIG_MIN_VERSION=0.9.0
11429 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11431 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11433 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5; then
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11435 $as_echo "yes" >&6; }
11436 succeeded=yes
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_CFLAGS" >&5
11439 $as_echo_n "checking GSETTINGS_CFLAGS... " >&6; }
11440 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'`
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_CFLAGS" >&5
11442 $as_echo "$GSETTINGS_CFLAGS" >&6; }
11444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_LIBS" >&5
11445 $as_echo_n "checking GSETTINGS_LIBS... " >&6; }
11446 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'`
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_LIBS" >&5
11448 $as_echo "$GSETTINGS_LIBS" >&6; }
11449 else
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451 $as_echo "no" >&6; }
11452 GSETTINGS_CFLAGS=""
11453 GSETTINGS_LIBS=""
11454 ## If we have a custom action on failure, don't print errors, but
11455 ## do set a variable so people can do so.
11456 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"`
11462 else
11463 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11464 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11468 if test $succeeded = yes; then
11469 HAVE_GSETTINGS=yes
11470 else
11471 HAVE_GSETTINGS=no
11474 if test "$HAVE_GSETTINGS" = "yes"; then
11476 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11478 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11479 SETTINGS_LIBS="$GSETTINGS_LIBS"
11483 HAVE_GCONF=no
11484 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11486 succeeded=no
11488 # Extract the first word of "pkg-config", so it can be a program name with args.
11489 set dummy pkg-config; ac_word=$2
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491 $as_echo_n "checking for $ac_word... " >&6; }
11492 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11493 $as_echo_n "(cached) " >&6
11494 else
11495 case $PKG_CONFIG in
11496 [\\/]* | ?:[\\/]*)
11497 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501 for as_dir in $PATH
11503 IFS=$as_save_IFS
11504 test -z "$as_dir" && as_dir=.
11505 for ac_exec_ext in '' $ac_executable_extensions; do
11506 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11507 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509 break 2
11511 done
11512 done
11513 IFS=$as_save_IFS
11515 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11517 esac
11519 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11520 if test -n "$PKG_CONFIG"; then
11521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11522 $as_echo "$PKG_CONFIG" >&6; }
11523 else
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525 $as_echo "no" >&6; }
11530 if test "$PKG_CONFIG" = "no" ; then
11531 HAVE_GCONF=no
11532 else
11533 PKG_CONFIG_MIN_VERSION=0.9.0
11534 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11536 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11538 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11540 $as_echo "yes" >&6; }
11541 succeeded=yes
11543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
11544 $as_echo_n "checking GCONF_CFLAGS... " >&6; }
11545 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
11547 $as_echo "$GCONF_CFLAGS" >&6; }
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
11550 $as_echo_n "checking GCONF_LIBS... " >&6; }
11551 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
11553 $as_echo "$GCONF_LIBS" >&6; }
11554 else
11555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11556 $as_echo "no" >&6; }
11557 GCONF_CFLAGS=""
11558 GCONF_LIBS=""
11559 ## If we have a custom action on failure, don't print errors, but
11560 ## do set a variable so people can do so.
11561 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
11567 else
11568 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11569 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11573 if test $succeeded = yes; then
11574 HAVE_GCONF=yes
11575 else
11576 HAVE_GCONF=no
11579 if test "$HAVE_GCONF" = yes; then
11581 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11583 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11584 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11588 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11589 SAVE_CFLAGS="$CFLAGS"
11590 SAVE_LIBS="$LIBS"
11591 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11592 LIBS="$SETTINGS_LIBS $LIBS"
11593 for ac_func in g_type_init
11594 do :
11595 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11596 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11597 cat >>confdefs.h <<_ACEOF
11598 #define HAVE_G_TYPE_INIT 1
11599 _ACEOF
11602 done
11604 CFLAGS="$SAVE_CFLAGS"
11605 LIBS="$SAVE_LIBS"
11611 HAVE_LIBSELINUX=no
11612 LIBSELINUX_LIBS=
11613 if test "${with_selinux}" = "yes"; then
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11615 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11616 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11617 $as_echo_n "(cached) " >&6
11618 else
11619 ac_check_lib_save_LIBS=$LIBS
11620 LIBS="-lselinux $LIBS"
11621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11622 /* end confdefs.h. */
11624 /* Override any GCC internal prototype to avoid an error.
11625 Use char because int might match the return type of a GCC
11626 builtin and then its argument prototype would still apply. */
11627 #ifdef __cplusplus
11628 extern "C"
11629 #endif
11630 char lgetfilecon ();
11632 main ()
11634 return lgetfilecon ();
11636 return 0;
11638 _ACEOF
11639 if ac_fn_c_try_link "$LINENO"; then :
11640 ac_cv_lib_selinux_lgetfilecon=yes
11641 else
11642 ac_cv_lib_selinux_lgetfilecon=no
11644 rm -f core conftest.err conftest.$ac_objext \
11645 conftest$ac_exeext conftest.$ac_ext
11646 LIBS=$ac_check_lib_save_LIBS
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11649 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11650 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11651 HAVE_LIBSELINUX=yes
11652 else
11653 HAVE_LIBSELINUX=no
11656 if test "$HAVE_LIBSELINUX" = yes; then
11658 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11660 LIBSELINUX_LIBS=-lselinux
11665 HAVE_GNUTLS=no
11666 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11667 if test "${with_gnutls}" = "yes" ; then
11669 succeeded=no
11671 # Extract the first word of "pkg-config", so it can be a program name with args.
11672 set dummy pkg-config; ac_word=$2
11673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11674 $as_echo_n "checking for $ac_word... " >&6; }
11675 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11676 $as_echo_n "(cached) " >&6
11677 else
11678 case $PKG_CONFIG in
11679 [\\/]* | ?:[\\/]*)
11680 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11684 for as_dir in $PATH
11686 IFS=$as_save_IFS
11687 test -z "$as_dir" && as_dir=.
11688 for ac_exec_ext in '' $ac_executable_extensions; do
11689 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11690 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11692 break 2
11694 done
11695 done
11696 IFS=$as_save_IFS
11698 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11700 esac
11702 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11703 if test -n "$PKG_CONFIG"; then
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11705 $as_echo "$PKG_CONFIG" >&6; }
11706 else
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708 $as_echo "no" >&6; }
11713 if test "$PKG_CONFIG" = "no" ; then
11714 HAVE_GNUTLS=no
11715 else
11716 PKG_CONFIG_MIN_VERSION=0.9.0
11717 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11719 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11721 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5; then
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11723 $as_echo "yes" >&6; }
11724 succeeded=yes
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5
11727 $as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; }
11728 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6"|sed -e 's,///*,/,g'`
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5
11730 $as_echo "$LIBGNUTLS_CFLAGS" >&6; }
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5
11733 $as_echo_n "checking LIBGNUTLS_LIBS... " >&6; }
11734 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6"|sed -e 's,///*,/,g'`
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5
11736 $as_echo "$LIBGNUTLS_LIBS" >&6; }
11737 else
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739 $as_echo "no" >&6; }
11740 LIBGNUTLS_CFLAGS=""
11741 LIBGNUTLS_LIBS=""
11742 ## If we have a custom action on failure, don't print errors, but
11743 ## do set a variable so people can do so.
11744 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"`
11750 else
11751 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11752 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11756 if test $succeeded = yes; then
11757 HAVE_GNUTLS=yes
11758 else
11759 HAVE_GNUTLS=no
11762 if test "${HAVE_GNUTLS}" = "yes"; then
11764 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11768 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11769 LIBS="$LIBGNUTLS_LIBS $LIBS"
11770 for ac_func in gnutls_certificate_set_verify_function
11771 do :
11772 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11773 if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11774 cat >>confdefs.h <<_ACEOF
11775 #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
11776 _ACEOF
11777 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11779 done
11782 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11784 $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
11792 HAVE_XAW3D=no
11793 LUCID_LIBW=
11794 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11795 if test "$with_xaw3d" != no; then
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11797 $as_echo_n "checking for xaw3d... " >&6; }
11798 if test "${emacs_cv_xaw3d+set}" = set; then :
11799 $as_echo_n "(cached) " >&6
11800 else
11801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11802 /* end confdefs.h. */
11804 #include <X11/Intrinsic.h>
11805 #include <X11/Xaw3d/Simple.h>
11807 main ()
11811 return 0;
11813 _ACEOF
11814 if ac_fn_c_try_link "$LINENO"; then :
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11816 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11817 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11818 $as_echo_n "(cached) " >&6
11819 else
11820 ac_check_lib_save_LIBS=$LIBS
11821 LIBS="-lXaw3d $LIBS"
11822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11823 /* end confdefs.h. */
11825 /* Override any GCC internal prototype to avoid an error.
11826 Use char because int might match the return type of a GCC
11827 builtin and then its argument prototype would still apply. */
11828 #ifdef __cplusplus
11829 extern "C"
11830 #endif
11831 char XawScrollbarSetThumb ();
11833 main ()
11835 return XawScrollbarSetThumb ();
11837 return 0;
11839 _ACEOF
11840 if ac_fn_c_try_link "$LINENO"; then :
11841 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
11842 else
11843 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
11845 rm -f core conftest.err conftest.$ac_objext \
11846 conftest$ac_exeext conftest.$ac_ext
11847 LIBS=$ac_check_lib_save_LIBS
11849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11850 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11851 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11852 emacs_cv_xaw3d=yes
11853 else
11854 emacs_cv_xaw3d=no
11857 else
11858 emacs_cv_xaw3d=no
11860 rm -f core conftest.err conftest.$ac_objext \
11861 conftest$ac_exeext conftest.$ac_ext
11864 else
11865 emacs_cv_xaw3d=no
11867 if test $emacs_cv_xaw3d = yes; then
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11869 $as_echo "yes; using Lucid toolkit" >&6; }
11870 USE_X_TOOLKIT=LUCID
11871 HAVE_XAW3D=yes
11872 LUCID_LIBW=-lXaw3d
11874 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
11876 else
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878 $as_echo "no" >&6; }
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11880 $as_echo_n "checking for libXaw... " >&6; }
11881 if test "${emacs_cv_xaw+set}" = set; then :
11882 $as_echo_n "(cached) " >&6
11883 else
11884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11885 /* end confdefs.h. */
11887 #include <X11/Intrinsic.h>
11888 #include <X11/Xaw/Simple.h>
11890 main ()
11894 return 0;
11896 _ACEOF
11897 if ac_fn_c_try_link "$LINENO"; then :
11898 emacs_cv_xaw=yes
11899 else
11900 emacs_cv_xaw=no
11902 rm -f core conftest.err conftest.$ac_objext \
11903 conftest$ac_exeext conftest.$ac_ext
11906 if test $emacs_cv_xaw = yes; then
11907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11908 $as_echo "yes; using Lucid toolkit" >&6; }
11909 USE_X_TOOLKIT=LUCID
11910 LUCID_LIBW=-lXaw
11911 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11912 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
11913 else
11914 as_fn_error "No X toolkit could be found.
11915 If you are sure you want Emacs compiled without an X toolkit, pass
11916 --with-x-toolkit=no
11917 to configure. Otherwise, install the development libraries for the toolkit
11918 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
11923 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11925 LIBXTR6=
11926 if test "${USE_X_TOOLKIT}" != "none"; then
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11928 $as_echo_n "checking X11 toolkit version... " >&6; }
11929 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
11930 $as_echo_n "(cached) " >&6
11931 else
11932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11933 /* end confdefs.h. */
11934 #include <X11/Intrinsic.h>
11936 main ()
11938 #if XtSpecificationRelease < 6
11939 fail;
11940 #endif
11943 return 0;
11945 _ACEOF
11946 if ac_fn_c_try_link "$LINENO"; then :
11947 emacs_cv_x11_toolkit_version_6=yes
11948 else
11949 emacs_cv_x11_toolkit_version_6=no
11951 rm -f core conftest.err conftest.$ac_objext \
11952 conftest$ac_exeext conftest.$ac_ext
11955 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11956 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11958 $as_echo "6 or newer" >&6; }
11960 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
11962 LIBXTR6="-lSM -lICE"
11963 case "$opsys" in
11964 ## Use libw.a along with X11R6 Xt.
11965 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11966 esac
11967 else
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11969 $as_echo "before 6" >&6; }
11972 OLDLIBS="$LIBS"
11973 if test x$HAVE_X11XTR6 = xyes; then
11974 LIBS="-lXt -lSM -lICE $LIBS"
11975 else
11976 LIBS="-lXt $LIBS"
11978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11979 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11980 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11981 $as_echo_n "(cached) " >&6
11982 else
11983 ac_check_lib_save_LIBS=$LIBS
11984 LIBS="-lXmu $LIBS"
11985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11986 /* end confdefs.h. */
11988 /* Override any GCC internal prototype to avoid an error.
11989 Use char because int might match the return type of a GCC
11990 builtin and then its argument prototype would still apply. */
11991 #ifdef __cplusplus
11992 extern "C"
11993 #endif
11994 char XmuConvertStandardSelection ();
11996 main ()
11998 return XmuConvertStandardSelection ();
12000 return 0;
12002 _ACEOF
12003 if ac_fn_c_try_link "$LINENO"; then :
12004 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12005 else
12006 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
12008 rm -f core conftest.err conftest.$ac_objext \
12009 conftest$ac_exeext conftest.$ac_ext
12010 LIBS=$ac_check_lib_save_LIBS
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12013 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12014 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12015 cat >>confdefs.h <<_ACEOF
12016 #define HAVE_LIBXMU 1
12017 _ACEOF
12019 LIBS="-lXmu $LIBS"
12023 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12027 LIBXMU=-lXmu
12028 case $opsys in
12029 ## These systems don't supply Xmu.
12030 hpux* | aix4-2 )
12031 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12033 esac
12036 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12037 if test "${HAVE_X11}" = "yes"; then
12038 if test "${USE_X_TOOLKIT}" != "none"; then
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12040 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12041 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
12042 $as_echo_n "(cached) " >&6
12043 else
12044 ac_check_lib_save_LIBS=$LIBS
12045 LIBS="-lXext $LIBS"
12046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12047 /* end confdefs.h. */
12049 /* Override any GCC internal prototype to avoid an error.
12050 Use char because int might match the return type of a GCC
12051 builtin and then its argument prototype would still apply. */
12052 #ifdef __cplusplus
12053 extern "C"
12054 #endif
12055 char XShapeQueryExtension ();
12057 main ()
12059 return XShapeQueryExtension ();
12061 return 0;
12063 _ACEOF
12064 if ac_fn_c_try_link "$LINENO"; then :
12065 ac_cv_lib_Xext_XShapeQueryExtension=yes
12066 else
12067 ac_cv_lib_Xext_XShapeQueryExtension=no
12069 rm -f core conftest.err conftest.$ac_objext \
12070 conftest$ac_exeext conftest.$ac_ext
12071 LIBS=$ac_check_lib_save_LIBS
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12074 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12075 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12076 cat >>confdefs.h <<_ACEOF
12077 #define HAVE_LIBXEXT 1
12078 _ACEOF
12080 LIBS="-lXext $LIBS"
12087 LIBXP=
12088 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
12090 $as_echo_n "checking for Motif version 2.1... " >&6; }
12091 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
12092 $as_echo_n "(cached) " >&6
12093 else
12094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12095 /* end confdefs.h. */
12096 #include <Xm/Xm.h>
12098 main ()
12100 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12101 int x = 5;
12102 #else
12103 Motif version prior to 2.1.
12104 #endif
12106 return 0;
12108 _ACEOF
12109 if ac_fn_c_try_compile "$LINENO"; then :
12110 emacs_cv_motif_version_2_1=yes
12111 else
12112 emacs_cv_motif_version_2_1=no
12114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12117 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
12118 if test $emacs_cv_motif_version_2_1 = yes; then
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12120 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12121 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12122 $as_echo_n "(cached) " >&6
12123 else
12124 ac_check_lib_save_LIBS=$LIBS
12125 LIBS="-lXp $LIBS"
12126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12127 /* end confdefs.h. */
12129 /* Override any GCC internal prototype to avoid an error.
12130 Use char because int might match the return type of a GCC
12131 builtin and then its argument prototype would still apply. */
12132 #ifdef __cplusplus
12133 extern "C"
12134 #endif
12135 char XpCreateContext ();
12137 main ()
12139 return XpCreateContext ();
12141 return 0;
12143 _ACEOF
12144 if ac_fn_c_try_link "$LINENO"; then :
12145 ac_cv_lib_Xp_XpCreateContext=yes
12146 else
12147 ac_cv_lib_Xp_XpCreateContext=no
12149 rm -f core conftest.err conftest.$ac_objext \
12150 conftest$ac_exeext conftest.$ac_ext
12151 LIBS=$ac_check_lib_save_LIBS
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12154 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12155 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12156 LIBXP=-lXp
12159 else
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12161 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
12162 if test "${emacs_cv_lesstif+set}" = set; then :
12163 $as_echo_n "(cached) " >&6
12164 else
12165 # We put this in CFLAGS temporarily to precede other -I options
12166 # that might be in CFLAGS temporarily.
12167 # We put this in CPPFLAGS where it precedes the other -I options.
12168 OLD_CPPFLAGS=$CPPFLAGS
12169 OLD_CFLAGS=$CFLAGS
12170 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12171 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173 /* end confdefs.h. */
12174 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12176 main ()
12178 int x = 5;
12180 return 0;
12182 _ACEOF
12183 if ac_fn_c_try_compile "$LINENO"; then :
12184 emacs_cv_lesstif=yes
12185 else
12186 emacs_cv_lesstif=no
12188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12191 $as_echo "$emacs_cv_lesstif" >&6; }
12192 if test $emacs_cv_lesstif = yes; then
12193 # Make sure this -I option remains in CPPFLAGS after it is set
12194 # back to REAL_CPPFLAGS.
12195 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12196 # have those other -I options anyway. Ultimately, having this
12197 # directory ultimately in CPPFLAGS will be enough.
12198 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12199 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12200 else
12201 CFLAGS=$OLD_CFLAGS
12202 CPPFLAGS=$OLD_CPPFLAGS
12205 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12206 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12208 else
12209 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12216 USE_TOOLKIT_SCROLL_BARS=no
12217 if test "${with_toolkit_scroll_bars}" != "no"; then
12218 if test "${USE_X_TOOLKIT}" != "none"; then
12219 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12220 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12222 HAVE_XAW3D=no
12223 USE_TOOLKIT_SCROLL_BARS=yes
12224 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12225 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12227 USE_TOOLKIT_SCROLL_BARS=yes
12229 elif test "${HAVE_GTK}" = "yes"; then
12230 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12232 USE_TOOLKIT_SCROLL_BARS=yes
12233 elif test "${HAVE_NS}" = "yes"; then
12234 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12236 USE_TOOLKIT_SCROLL_BARS=yes
12240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241 /* end confdefs.h. */
12243 #include <X11/Xlib.h>
12244 #include <X11/Xresource.h>
12246 main ()
12248 XIMProc callback;
12250 return 0;
12252 _ACEOF
12253 if ac_fn_c_try_compile "$LINENO"; then :
12254 HAVE_XIM=yes
12256 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12258 else
12259 HAVE_XIM=no
12261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12264 if test "${with_xim}" != "no"; then
12266 $as_echo "#define USE_XIM 1" >>confdefs.h
12271 if test "${HAVE_XIM}" != "no"; then
12272 late_CFLAGS=$CFLAGS
12273 if test "$GCC" = yes; then
12274 CFLAGS="$CFLAGS --pedantic-errors"
12276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12277 /* end confdefs.h. */
12279 #include <X11/Xlib.h>
12280 #include <X11/Xresource.h>
12282 main ()
12284 Display *display;
12285 XrmDatabase db;
12286 char *res_name;
12287 char *res_class;
12288 XIMProc callback;
12289 XPointer *client_data;
12290 #ifndef __GNUC__
12291 /* If we're not using GCC, it's probably not XFree86, and this is
12292 probably right, but we can't use something like --pedantic-errors. */
12293 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12294 char*, XIMProc, XPointer*);
12295 #endif
12296 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12297 client_data);
12299 return 0;
12301 _ACEOF
12302 if ac_fn_c_try_compile "$LINENO"; then :
12303 emacs_cv_arg6_star=yes
12305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12306 if test "$emacs_cv_arg6_star" = yes; then
12307 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12309 else
12310 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
12313 CFLAGS=$late_CFLAGS
12316 ### Start of font-backend (under any platform) section.
12317 # (nothing here yet -- this is a placeholder)
12318 ### End of font-backend (under any platform) section.
12320 ### Start of font-backend (under X11) section.
12321 if test "${HAVE_X11}" = "yes"; then
12323 succeeded=no
12325 # Extract the first word of "pkg-config", so it can be a program name with args.
12326 set dummy pkg-config; ac_word=$2
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12328 $as_echo_n "checking for $ac_word... " >&6; }
12329 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
12330 $as_echo_n "(cached) " >&6
12331 else
12332 case $PKG_CONFIG in
12333 [\\/]* | ?:[\\/]*)
12334 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12338 for as_dir in $PATH
12340 IFS=$as_save_IFS
12341 test -z "$as_dir" && as_dir=.
12342 for ac_exec_ext in '' $ac_executable_extensions; do
12343 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12344 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12346 break 2
12348 done
12349 done
12350 IFS=$as_save_IFS
12352 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12354 esac
12356 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12357 if test -n "$PKG_CONFIG"; then
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12359 $as_echo "$PKG_CONFIG" >&6; }
12360 else
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12362 $as_echo "no" >&6; }
12367 if test "$PKG_CONFIG" = "no" ; then
12368 HAVE_FC=no
12369 else
12370 PKG_CONFIG_MIN_VERSION=0.9.0
12371 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12373 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12375 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
12376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12377 $as_echo "yes" >&6; }
12378 succeeded=yes
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
12381 $as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
12382 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
12384 $as_echo "$FONTCONFIG_CFLAGS" >&6; }
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
12387 $as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
12388 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
12390 $as_echo "$FONTCONFIG_LIBS" >&6; }
12391 else
12392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12393 $as_echo "no" >&6; }
12394 FONTCONFIG_CFLAGS=""
12395 FONTCONFIG_LIBS=""
12396 ## If we have a custom action on failure, don't print errors, but
12397 ## do set a variable so people can do so.
12398 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
12404 else
12405 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12406 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12410 if test $succeeded = yes; then
12411 HAVE_FC=yes
12412 else
12413 HAVE_FC=no
12417 ## Use -lXft if available, unless `--with-xft=no'.
12418 HAVE_XFT=maybe
12419 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12420 with_xft="no";
12422 if test "x${with_xft}" != "xno"; then
12425 succeeded=no
12427 # Extract the first word of "pkg-config", so it can be a program name with args.
12428 set dummy pkg-config; ac_word=$2
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12430 $as_echo_n "checking for $ac_word... " >&6; }
12431 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
12432 $as_echo_n "(cached) " >&6
12433 else
12434 case $PKG_CONFIG in
12435 [\\/]* | ?:[\\/]*)
12436 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12440 for as_dir in $PATH
12442 IFS=$as_save_IFS
12443 test -z "$as_dir" && as_dir=.
12444 for ac_exec_ext in '' $ac_executable_extensions; do
12445 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12446 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12448 break 2
12450 done
12451 done
12452 IFS=$as_save_IFS
12454 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12456 esac
12458 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12459 if test -n "$PKG_CONFIG"; then
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12461 $as_echo "$PKG_CONFIG" >&6; }
12462 else
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12464 $as_echo "no" >&6; }
12469 if test "$PKG_CONFIG" = "no" ; then
12470 HAVE_XFT=no
12471 else
12472 PKG_CONFIG_MIN_VERSION=0.9.0
12473 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12475 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12477 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12479 $as_echo "yes" >&6; }
12480 succeeded=yes
12482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
12483 $as_echo_n "checking XFT_CFLAGS... " >&6; }
12484 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
12486 $as_echo "$XFT_CFLAGS" >&6; }
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
12489 $as_echo_n "checking XFT_LIBS... " >&6; }
12490 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
12492 $as_echo "$XFT_LIBS" >&6; }
12493 else
12494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12495 $as_echo "no" >&6; }
12496 XFT_CFLAGS=""
12497 XFT_LIBS=""
12498 ## If we have a custom action on failure, don't print errors, but
12499 ## do set a variable so people can do so.
12500 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12506 else
12507 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12508 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12512 if test $succeeded = yes; then
12514 else
12515 HAVE_XFT=no
12518 ## Because xftfont.c uses XRenderQueryExtension, we also
12519 ## need to link to -lXrender.
12520 HAVE_XRENDER=no
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12522 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12523 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12524 $as_echo_n "(cached) " >&6
12525 else
12526 ac_check_lib_save_LIBS=$LIBS
12527 LIBS="-lXrender $LIBS"
12528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12529 /* end confdefs.h. */
12531 /* Override any GCC internal prototype to avoid an error.
12532 Use char because int might match the return type of a GCC
12533 builtin and then its argument prototype would still apply. */
12534 #ifdef __cplusplus
12535 extern "C"
12536 #endif
12537 char XRenderQueryExtension ();
12539 main ()
12541 return XRenderQueryExtension ();
12543 return 0;
12545 _ACEOF
12546 if ac_fn_c_try_link "$LINENO"; then :
12547 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12548 else
12549 ac_cv_lib_Xrender_XRenderQueryExtension=no
12551 rm -f core conftest.err conftest.$ac_objext \
12552 conftest$ac_exeext conftest.$ac_ext
12553 LIBS=$ac_check_lib_save_LIBS
12555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12556 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12557 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12558 HAVE_XRENDER=yes
12561 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12562 OLD_CPPFLAGS="$CPPFLAGS"
12563 OLD_CFLAGS="$CFLAGS"
12564 OLD_LIBS="$LIBS"
12565 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12566 CFLAGS="$CFLAGS $XFT_CFLAGS"
12567 XFT_LIBS="-lXrender $XFT_LIBS"
12568 LIBS="$XFT_LIBS $LIBS"
12569 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12570 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12572 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12573 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12574 $as_echo_n "(cached) " >&6
12575 else
12576 ac_check_lib_save_LIBS=$LIBS
12577 LIBS="-lXft $XFT_LIBS $LIBS"
12578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12579 /* end confdefs.h. */
12581 /* Override any GCC internal prototype to avoid an error.
12582 Use char because int might match the return type of a GCC
12583 builtin and then its argument prototype would still apply. */
12584 #ifdef __cplusplus
12585 extern "C"
12586 #endif
12587 char XftFontOpen ();
12589 main ()
12591 return XftFontOpen ();
12593 return 0;
12595 _ACEOF
12596 if ac_fn_c_try_link "$LINENO"; then :
12597 ac_cv_lib_Xft_XftFontOpen=yes
12598 else
12599 ac_cv_lib_Xft_XftFontOpen=no
12601 rm -f core conftest.err conftest.$ac_objext \
12602 conftest$ac_exeext conftest.$ac_ext
12603 LIBS=$ac_check_lib_save_LIBS
12605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12606 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12607 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12608 HAVE_XFT=yes
12615 if test "${HAVE_XFT}" = "yes"; then
12617 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12620 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12621 else
12622 CPPFLAGS="$OLD_CPPFLAGS"
12623 CFLAGS="$OLD_CFLAGS"
12624 LIBS="$OLD_LIBS"
12625 fi # "${HAVE_XFT}" = "yes"
12626 fi # "$HAVE_XFT" != no
12627 fi # "x${with_xft}" != "xno"
12629 ## We used to allow building with FreeType and without Xft.
12630 ## However, the ftx font backend driver is not in good shape.
12631 if test "$HAVE_XFT" != "yes"; then
12632 HAVE_XFT=no
12633 HAVE_FREETYPE=no
12634 else
12636 succeeded=no
12638 # Extract the first word of "pkg-config", so it can be a program name with args.
12639 set dummy pkg-config; ac_word=$2
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12641 $as_echo_n "checking for $ac_word... " >&6; }
12642 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
12643 $as_echo_n "(cached) " >&6
12644 else
12645 case $PKG_CONFIG in
12646 [\\/]* | ?:[\\/]*)
12647 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12651 for as_dir in $PATH
12653 IFS=$as_save_IFS
12654 test -z "$as_dir" && as_dir=.
12655 for ac_exec_ext in '' $ac_executable_extensions; do
12656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12657 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12659 break 2
12661 done
12662 done
12663 IFS=$as_save_IFS
12665 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12667 esac
12669 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12670 if test -n "$PKG_CONFIG"; then
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12672 $as_echo "$PKG_CONFIG" >&6; }
12673 else
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12675 $as_echo "no" >&6; }
12680 if test "$PKG_CONFIG" = "no" ; then
12681 HAVE_FREETYPE=no
12682 else
12683 PKG_CONFIG_MIN_VERSION=0.9.0
12684 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12686 $as_echo_n "checking for freetype2... " >&6; }
12688 if $PKG_CONFIG --exists "freetype2" 2>&5; then
12689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12690 $as_echo "yes" >&6; }
12691 succeeded=yes
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_CFLAGS" >&5
12694 $as_echo_n "checking FREETYPE_CFLAGS... " >&6; }
12695 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
12696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CFLAGS" >&5
12697 $as_echo "$FREETYPE_CFLAGS" >&6; }
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_LIBS" >&5
12700 $as_echo_n "checking FREETYPE_LIBS... " >&6; }
12701 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
12702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIBS" >&5
12703 $as_echo "$FREETYPE_LIBS" >&6; }
12704 else
12705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12706 $as_echo "no" >&6; }
12707 FREETYPE_CFLAGS=""
12708 FREETYPE_LIBS=""
12709 ## If we have a custom action on failure, don't print errors, but
12710 ## do set a variable so people can do so.
12711 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
12717 else
12718 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12719 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12723 if test $succeeded = yes; then
12724 HAVE_FREETYPE=yes
12725 else
12726 HAVE_FREETYPE=no
12730 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12733 HAVE_LIBOTF=no
12734 if test "${HAVE_FREETYPE}" = "yes"; then
12736 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12738 if test "${with_libotf}" != "no"; then
12740 succeeded=no
12742 # Extract the first word of "pkg-config", so it can be a program name with args.
12743 set dummy pkg-config; ac_word=$2
12744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12745 $as_echo_n "checking for $ac_word... " >&6; }
12746 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
12747 $as_echo_n "(cached) " >&6
12748 else
12749 case $PKG_CONFIG in
12750 [\\/]* | ?:[\\/]*)
12751 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12755 for as_dir in $PATH
12757 IFS=$as_save_IFS
12758 test -z "$as_dir" && as_dir=.
12759 for ac_exec_ext in '' $ac_executable_extensions; do
12760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12761 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12763 break 2
12765 done
12766 done
12767 IFS=$as_save_IFS
12769 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12771 esac
12773 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12774 if test -n "$PKG_CONFIG"; then
12775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12776 $as_echo "$PKG_CONFIG" >&6; }
12777 else
12778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12779 $as_echo "no" >&6; }
12784 if test "$PKG_CONFIG" = "no" ; then
12785 HAVE_LIBOTF=no
12786 else
12787 PKG_CONFIG_MIN_VERSION=0.9.0
12788 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12790 $as_echo_n "checking for libotf... " >&6; }
12792 if $PKG_CONFIG --exists "libotf" 2>&5; then
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12794 $as_echo "yes" >&6; }
12795 succeeded=yes
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
12798 $as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
12799 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
12800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
12801 $as_echo "$LIBOTF_CFLAGS" >&6; }
12803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
12804 $as_echo_n "checking LIBOTF_LIBS... " >&6; }
12805 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
12806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
12807 $as_echo "$LIBOTF_LIBS" >&6; }
12808 else
12809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12810 $as_echo "no" >&6; }
12811 LIBOTF_CFLAGS=""
12812 LIBOTF_LIBS=""
12813 ## If we have a custom action on failure, don't print errors, but
12814 ## do set a variable so people can do so.
12815 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
12821 else
12822 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12823 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12827 if test $succeeded = yes; then
12828 HAVE_LIBOTF=yes
12829 else
12830 HAVE_LIBOTF=no
12833 if test "$HAVE_LIBOTF" = "yes"; then
12835 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
12837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12838 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12839 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
12840 $as_echo_n "(cached) " >&6
12841 else
12842 ac_check_lib_save_LIBS=$LIBS
12843 LIBS="-lotf $LIBS"
12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845 /* end confdefs.h. */
12847 /* Override any GCC internal prototype to avoid an error.
12848 Use char because int might match the return type of a GCC
12849 builtin and then its argument prototype would still apply. */
12850 #ifdef __cplusplus
12851 extern "C"
12852 #endif
12853 char OTF_get_variation_glyphs ();
12855 main ()
12857 return OTF_get_variation_glyphs ();
12859 return 0;
12861 _ACEOF
12862 if ac_fn_c_try_link "$LINENO"; then :
12863 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
12864 else
12865 ac_cv_lib_otf_OTF_get_variation_glyphs=no
12867 rm -f core conftest.err conftest.$ac_objext \
12868 conftest$ac_exeext conftest.$ac_ext
12869 LIBS=$ac_check_lib_save_LIBS
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12872 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12873 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12874 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12875 else
12876 HAVE_OTF_GET_VARIATION_GLYPHS=no
12879 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12881 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12888 HAVE_M17N_FLT=no
12889 if test "${HAVE_LIBOTF}" = yes; then
12890 if test "${with_m17n_flt}" != "no"; then
12892 succeeded=no
12894 # Extract the first word of "pkg-config", so it can be a program name with args.
12895 set dummy pkg-config; ac_word=$2
12896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12897 $as_echo_n "checking for $ac_word... " >&6; }
12898 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
12899 $as_echo_n "(cached) " >&6
12900 else
12901 case $PKG_CONFIG in
12902 [\\/]* | ?:[\\/]*)
12903 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12907 for as_dir in $PATH
12909 IFS=$as_save_IFS
12910 test -z "$as_dir" && as_dir=.
12911 for ac_exec_ext in '' $ac_executable_extensions; do
12912 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12913 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12915 break 2
12917 done
12918 done
12919 IFS=$as_save_IFS
12921 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12923 esac
12925 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12926 if test -n "$PKG_CONFIG"; then
12927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12928 $as_echo "$PKG_CONFIG" >&6; }
12929 else
12930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12931 $as_echo "no" >&6; }
12936 if test "$PKG_CONFIG" = "no" ; then
12937 HAVE_M17N_FLT=no
12938 else
12939 PKG_CONFIG_MIN_VERSION=0.9.0
12940 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12942 $as_echo_n "checking for m17n-flt... " >&6; }
12944 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
12945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12946 $as_echo "yes" >&6; }
12947 succeeded=yes
12949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
12950 $as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
12951 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
12953 $as_echo "$M17N_FLT_CFLAGS" >&6; }
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
12956 $as_echo_n "checking M17N_FLT_LIBS... " >&6; }
12957 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
12959 $as_echo "$M17N_FLT_LIBS" >&6; }
12960 else
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12962 $as_echo "no" >&6; }
12963 M17N_FLT_CFLAGS=""
12964 M17N_FLT_LIBS=""
12965 ## If we have a custom action on failure, don't print errors, but
12966 ## do set a variable so people can do so.
12967 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
12973 else
12974 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12975 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12979 if test $succeeded = yes; then
12980 HAVE_M17N_FLT=yes
12981 else
12982 HAVE_M17N_FLT=no
12985 if test "$HAVE_M17N_FLT" = "yes"; then
12987 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12992 else
12993 HAVE_XFT=no
12994 HAVE_FREETYPE=no
12995 HAVE_LIBOTF=no
12996 HAVE_M17N_FLT=no
12999 ### End of font-backend (under X11) section.
13010 ### Use -lXpm if available, unless `--with-xpm=no'.
13011 HAVE_XPM=no
13012 LIBXPM=
13013 if test "${HAVE_X11}" = "yes"; then
13014 if test "${with_xpm}" != "no"; then
13015 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13016 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13018 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13019 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
13020 $as_echo_n "(cached) " >&6
13021 else
13022 ac_check_lib_save_LIBS=$LIBS
13023 LIBS="-lXpm -lX11 $LIBS"
13024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13025 /* end confdefs.h. */
13027 /* Override any GCC internal prototype to avoid an error.
13028 Use char because int might match the return type of a GCC
13029 builtin and then its argument prototype would still apply. */
13030 #ifdef __cplusplus
13031 extern "C"
13032 #endif
13033 char XpmReadFileToPixmap ();
13035 main ()
13037 return XpmReadFileToPixmap ();
13039 return 0;
13041 _ACEOF
13042 if ac_fn_c_try_link "$LINENO"; then :
13043 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
13044 else
13045 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
13047 rm -f core conftest.err conftest.$ac_objext \
13048 conftest$ac_exeext conftest.$ac_ext
13049 LIBS=$ac_check_lib_save_LIBS
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13052 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13053 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13054 HAVE_XPM=yes
13060 if test "${HAVE_XPM}" = "yes"; then
13061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13062 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13064 /* end confdefs.h. */
13065 #include "X11/xpm.h"
13066 #ifndef XpmReturnAllocPixels
13067 no_return_alloc_pixels
13068 #endif
13070 _ACEOF
13071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13072 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13073 HAVE_XPM=no
13074 else
13075 HAVE_XPM=yes
13077 rm -f conftest*
13080 if test "${HAVE_XPM}" = "yes"; then
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13082 $as_echo "yes" >&6; }
13083 else
13084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13085 $as_echo "no" >&6; }
13090 if test "${HAVE_XPM}" = "yes"; then
13092 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13094 LIBXPM=-lXpm
13099 ### Use -ljpeg if available, unless `--with-jpeg=no'.
13100 HAVE_JPEG=no
13101 LIBJPEG=
13102 if test "${HAVE_X11}" = "yes"; then
13103 if test "${with_jpeg}" != "no"; then
13104 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13105 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13107 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13108 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
13109 $as_echo_n "(cached) " >&6
13110 else
13111 ac_check_lib_save_LIBS=$LIBS
13112 LIBS="-ljpeg $LIBS"
13113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13114 /* end confdefs.h. */
13116 /* Override any GCC internal prototype to avoid an error.
13117 Use char because int might match the return type of a GCC
13118 builtin and then its argument prototype would still apply. */
13119 #ifdef __cplusplus
13120 extern "C"
13121 #endif
13122 char jpeg_destroy_compress ();
13124 main ()
13126 return jpeg_destroy_compress ();
13128 return 0;
13130 _ACEOF
13131 if ac_fn_c_try_link "$LINENO"; then :
13132 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
13133 else
13134 ac_cv_lib_jpeg_jpeg_destroy_compress=no
13136 rm -f core conftest.err conftest.$ac_objext \
13137 conftest$ac_exeext conftest.$ac_ext
13138 LIBS=$ac_check_lib_save_LIBS
13140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13141 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13142 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13143 HAVE_JPEG=yes
13151 if test "${HAVE_JPEG}" = "yes"; then
13152 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13155 /* end confdefs.h. */
13156 #include <jpeglib.h>
13157 version=JPEG_LIB_VERSION
13159 _ACEOF
13160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13161 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13162 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13164 else
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13166 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13167 HAVE_JPEG=no
13169 rm -f conftest*
13172 if test "${HAVE_JPEG}" = "yes"; then
13173 LIBJPEG=-ljpeg
13178 ### Use -lpng if available, unless `--with-png=no'.
13179 HAVE_PNG=no
13180 LIBPNG=
13181 if test "${HAVE_X11}" = "yes"; then
13182 if test "${with_png}" != "no"; then
13183 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13184 # in /usr/include/libpng.
13185 for ac_header in png.h libpng/png.h
13186 do :
13187 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13188 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13189 eval as_val=\$$as_ac_Header
13190 if test "x$as_val" = x""yes; then :
13191 cat >>confdefs.h <<_ACEOF
13192 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13193 _ACEOF
13197 done
13199 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13201 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13202 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13203 $as_echo_n "(cached) " >&6
13204 else
13205 ac_check_lib_save_LIBS=$LIBS
13206 LIBS="-lpng -lz -lm $LIBS"
13207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13208 /* end confdefs.h. */
13210 /* Override any GCC internal prototype to avoid an error.
13211 Use char because int might match the return type of a GCC
13212 builtin and then its argument prototype would still apply. */
13213 #ifdef __cplusplus
13214 extern "C"
13215 #endif
13216 char png_get_channels ();
13218 main ()
13220 return png_get_channels ();
13222 return 0;
13224 _ACEOF
13225 if ac_fn_c_try_link "$LINENO"; then :
13226 ac_cv_lib_png_png_get_channels=yes
13227 else
13228 ac_cv_lib_png_png_get_channels=no
13230 rm -f core conftest.err conftest.$ac_objext \
13231 conftest$ac_exeext conftest.$ac_ext
13232 LIBS=$ac_check_lib_save_LIBS
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13235 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13236 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13237 HAVE_PNG=yes
13243 if test "${HAVE_PNG}" = "yes"; then
13245 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13247 LIBPNG="-lpng -lz -lm"
13252 ### Use -ltiff if available, unless `--with-tiff=no'.
13253 HAVE_TIFF=no
13254 LIBTIFF=
13255 if test "${HAVE_X11}" = "yes"; then
13256 if test "${with_tiff}" != "no"; then
13257 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13258 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13259 tifflibs="-lz -lm"
13260 # At least one tiff package requires the jpeg library.
13261 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13263 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13264 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
13265 $as_echo_n "(cached) " >&6
13266 else
13267 ac_check_lib_save_LIBS=$LIBS
13268 LIBS="-ltiff $tifflibs $LIBS"
13269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13270 /* end confdefs.h. */
13272 /* Override any GCC internal prototype to avoid an error.
13273 Use char because int might match the return type of a GCC
13274 builtin and then its argument prototype would still apply. */
13275 #ifdef __cplusplus
13276 extern "C"
13277 #endif
13278 char TIFFGetVersion ();
13280 main ()
13282 return TIFFGetVersion ();
13284 return 0;
13286 _ACEOF
13287 if ac_fn_c_try_link "$LINENO"; then :
13288 ac_cv_lib_tiff_TIFFGetVersion=yes
13289 else
13290 ac_cv_lib_tiff_TIFFGetVersion=no
13292 rm -f core conftest.err conftest.$ac_objext \
13293 conftest$ac_exeext conftest.$ac_ext
13294 LIBS=$ac_check_lib_save_LIBS
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13297 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13298 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13299 HAVE_TIFF=yes
13307 if test "${HAVE_TIFF}" = "yes"; then
13309 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13311 LIBTIFF=-ltiff
13316 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
13317 HAVE_GIF=no
13318 LIBGIF=
13319 if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
13320 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13321 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13322 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13323 # Earlier versions can crash Emacs.
13324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13325 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13326 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
13327 $as_echo_n "(cached) " >&6
13328 else
13329 ac_check_lib_save_LIBS=$LIBS
13330 LIBS="-lgif $LIBS"
13331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13332 /* end confdefs.h. */
13334 /* Override any GCC internal prototype to avoid an error.
13335 Use char because int might match the return type of a GCC
13336 builtin and then its argument prototype would still apply. */
13337 #ifdef __cplusplus
13338 extern "C"
13339 #endif
13340 char EGifPutExtensionLast ();
13342 main ()
13344 return EGifPutExtensionLast ();
13346 return 0;
13348 _ACEOF
13349 if ac_fn_c_try_link "$LINENO"; then :
13350 ac_cv_lib_gif_EGifPutExtensionLast=yes
13351 else
13352 ac_cv_lib_gif_EGifPutExtensionLast=no
13354 rm -f core conftest.err conftest.$ac_objext \
13355 conftest$ac_exeext conftest.$ac_ext
13356 LIBS=$ac_check_lib_save_LIBS
13358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13359 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13360 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13361 HAVE_GIF=yes
13362 else
13363 HAVE_GIF=maybe
13370 if test "$HAVE_GIF" = yes; then
13371 LIBGIF=-lgif
13372 elif test "$HAVE_GIF" = maybe; then
13373 # If gif_lib.h but no libgif, try libungif.
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13375 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13376 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
13377 $as_echo_n "(cached) " >&6
13378 else
13379 ac_check_lib_save_LIBS=$LIBS
13380 LIBS="-lungif $LIBS"
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382 /* end confdefs.h. */
13384 /* Override any GCC internal prototype to avoid an error.
13385 Use char because int might match the return type of a GCC
13386 builtin and then its argument prototype would still apply. */
13387 #ifdef __cplusplus
13388 extern "C"
13389 #endif
13390 char EGifPutExtensionLast ();
13392 main ()
13394 return EGifPutExtensionLast ();
13396 return 0;
13398 _ACEOF
13399 if ac_fn_c_try_link "$LINENO"; then :
13400 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13401 else
13402 ac_cv_lib_ungif_EGifPutExtensionLast=no
13404 rm -f core conftest.err conftest.$ac_objext \
13405 conftest$ac_exeext conftest.$ac_ext
13406 LIBS=$ac_check_lib_save_LIBS
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13409 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13410 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13411 HAVE_GIF=yes
13412 else
13413 HAVE_GIF=no
13416 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13419 if test "${HAVE_GIF}" = "yes"; then
13421 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13427 if test "${HAVE_X11}" = "yes"; then
13428 MISSING=""
13429 WITH_NO=""
13430 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13431 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13432 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13433 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13434 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13435 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13436 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13437 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13438 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13439 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13441 if test "X${MISSING}" != X; then
13442 as_fn_error "The following required libraries were not found:
13443 $MISSING
13444 Maybe some development libraries/packages are missing?
13445 If you don't want to link with them give
13446 $WITH_NO
13447 as options to configure" "$LINENO" 5
13451 ### Use -lgpm if available, unless `--with-gpm=no'.
13452 HAVE_GPM=no
13453 LIBGPM=
13454 if test "${with_gpm}" != "no"; then
13455 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13456 if test "x$ac_cv_header_gpm_h" = x""yes; then :
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13458 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13459 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
13460 $as_echo_n "(cached) " >&6
13461 else
13462 ac_check_lib_save_LIBS=$LIBS
13463 LIBS="-lgpm $LIBS"
13464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13465 /* end confdefs.h. */
13467 /* Override any GCC internal prototype to avoid an error.
13468 Use char because int might match the return type of a GCC
13469 builtin and then its argument prototype would still apply. */
13470 #ifdef __cplusplus
13471 extern "C"
13472 #endif
13473 char Gpm_Open ();
13475 main ()
13477 return Gpm_Open ();
13479 return 0;
13481 _ACEOF
13482 if ac_fn_c_try_link "$LINENO"; then :
13483 ac_cv_lib_gpm_Gpm_Open=yes
13484 else
13485 ac_cv_lib_gpm_Gpm_Open=no
13487 rm -f core conftest.err conftest.$ac_objext \
13488 conftest$ac_exeext conftest.$ac_ext
13489 LIBS=$ac_check_lib_save_LIBS
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13492 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13493 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13494 HAVE_GPM=yes
13501 if test "${HAVE_GPM}" = "yes"; then
13503 $as_echo "#define HAVE_GPM 1" >>confdefs.h
13505 LIBGPM=-lgpm
13510 ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
13511 if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
13513 $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
13519 C_SWITCH_X_SYSTEM=
13520 ### Use NeXTstep API to implement GUI.
13521 if test "${HAVE_NS}" = "yes"; then
13523 $as_echo "#define HAVE_NS 1" >>confdefs.h
13525 if test "${NS_IMPL_COCOA}" = "yes"; then
13527 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
13530 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
13532 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13534 # See also .m.o rule in Makefile.in */
13535 # FIXME: are all these flags really needed? Document here why. */
13536 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13537 ## Extra CFLAGS applied to src/*.m files.
13538 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"
13540 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
13542 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
13545 # We also have mouse menus.
13546 HAVE_MENUS=yes
13547 OTHER_FILES=ns-app
13551 ### Use session management (-lSM -lICE) if available
13552 HAVE_X_SM=no
13553 LIBXSM=
13554 if test "${HAVE_X11}" = "yes"; then
13555 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13556 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13558 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13559 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
13560 $as_echo_n "(cached) " >&6
13561 else
13562 ac_check_lib_save_LIBS=$LIBS
13563 LIBS="-lSM -lICE $LIBS"
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565 /* end confdefs.h. */
13567 /* Override any GCC internal prototype to avoid an error.
13568 Use char because int might match the return type of a GCC
13569 builtin and then its argument prototype would still apply. */
13570 #ifdef __cplusplus
13571 extern "C"
13572 #endif
13573 char SmcOpenConnection ();
13575 main ()
13577 return SmcOpenConnection ();
13579 return 0;
13581 _ACEOF
13582 if ac_fn_c_try_link "$LINENO"; then :
13583 ac_cv_lib_SM_SmcOpenConnection=yes
13584 else
13585 ac_cv_lib_SM_SmcOpenConnection=no
13587 rm -f core conftest.err conftest.$ac_objext \
13588 conftest$ac_exeext conftest.$ac_ext
13589 LIBS=$ac_check_lib_save_LIBS
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13592 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13593 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13594 HAVE_X_SM=yes
13601 if test "${HAVE_X_SM}" = "yes"; then
13603 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
13605 LIBXSM="-lSM -lICE"
13606 case "$LIBS" in
13607 *-lSM*) ;;
13608 *) LIBS="$LIBXSM $LIBS" ;;
13609 esac
13614 ### Use libxml (-lxml2) if available
13615 HAVE_LIBXML2=no
13616 if test "${with_xml2}" != "no"; then
13617 ### I'm not sure what the version number should be, so I just guessed.
13619 succeeded=no
13621 # Extract the first word of "pkg-config", so it can be a program name with args.
13622 set dummy pkg-config; ac_word=$2
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13624 $as_echo_n "checking for $ac_word... " >&6; }
13625 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
13626 $as_echo_n "(cached) " >&6
13627 else
13628 case $PKG_CONFIG in
13629 [\\/]* | ?:[\\/]*)
13630 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13634 for as_dir in $PATH
13636 IFS=$as_save_IFS
13637 test -z "$as_dir" && as_dir=.
13638 for ac_exec_ext in '' $ac_executable_extensions; do
13639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13640 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13642 break 2
13644 done
13645 done
13646 IFS=$as_save_IFS
13648 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13650 esac
13652 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13653 if test -n "$PKG_CONFIG"; then
13654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
13655 $as_echo "$PKG_CONFIG" >&6; }
13656 else
13657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13658 $as_echo "no" >&6; }
13663 if test "$PKG_CONFIG" = "no" ; then
13664 HAVE_LIBXML2=no
13665 else
13666 PKG_CONFIG_MIN_VERSION=0.9.0
13667 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13669 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
13671 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5; then
13672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13673 $as_echo "yes" >&6; }
13674 succeeded=yes
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5
13677 $as_echo_n "checking LIBXML2_CFLAGS... " >&6; }
13678 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'`
13679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5
13680 $as_echo "$LIBXML2_CFLAGS" >&6; }
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5
13683 $as_echo_n "checking LIBXML2_LIBS... " >&6; }
13684 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'`
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5
13686 $as_echo "$LIBXML2_LIBS" >&6; }
13687 else
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13689 $as_echo "no" >&6; }
13690 LIBXML2_CFLAGS=""
13691 LIBXML2_LIBS=""
13692 ## If we have a custom action on failure, don't print errors, but
13693 ## do set a variable so people can do so.
13694 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"`
13700 else
13701 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13702 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13706 if test $succeeded = yes; then
13707 HAVE_LIBXML2=yes
13708 else
13709 HAVE_LIBXML2=no
13712 if test "${HAVE_LIBXML2}" = "yes"; then
13713 LIBS="$LIBXML2_LIBS $LIBS"
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13715 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13716 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
13717 $as_echo_n "(cached) " >&6
13718 else
13719 ac_check_lib_save_LIBS=$LIBS
13720 LIBS="-lxml2 $LIBS"
13721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13722 /* end confdefs.h. */
13724 /* Override any GCC internal prototype to avoid an error.
13725 Use char because int might match the return type of a GCC
13726 builtin and then its argument prototype would still apply. */
13727 #ifdef __cplusplus
13728 extern "C"
13729 #endif
13730 char htmlReadMemory ();
13732 main ()
13734 return htmlReadMemory ();
13736 return 0;
13738 _ACEOF
13739 if ac_fn_c_try_link "$LINENO"; then :
13740 ac_cv_lib_xml2_htmlReadMemory=yes
13741 else
13742 ac_cv_lib_xml2_htmlReadMemory=no
13744 rm -f core conftest.err conftest.$ac_objext \
13745 conftest$ac_exeext conftest.$ac_ext
13746 LIBS=$ac_check_lib_save_LIBS
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13749 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13750 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13751 HAVE_LIBXML2=yes
13752 else
13753 HAVE_LIBXML2=no
13756 if test "${HAVE_LIBXML2}" = "yes"; then
13758 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
13760 else
13761 LIBXML2_LIBS=""
13762 LIBXML2_CFLAGS=""
13769 # If netdb.h doesn't declare h_errno, we must declare it by hand.
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13771 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
13772 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13773 $as_echo_n "(cached) " >&6
13774 else
13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776 /* end confdefs.h. */
13777 #include <netdb.h>
13779 main ()
13781 return h_errno;
13783 return 0;
13785 _ACEOF
13786 if ac_fn_c_try_link "$LINENO"; then :
13787 emacs_cv_netdb_declares_h_errno=yes
13788 else
13789 emacs_cv_netdb_declares_h_errno=no
13791 rm -f core conftest.err conftest.$ac_objext \
13792 conftest$ac_exeext conftest.$ac_ext
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13795 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13796 if test $emacs_cv_netdb_declares_h_errno = yes; then
13798 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
13802 # fmod, logb, and frexp are found in -lm on most systems.
13803 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13805 $as_echo_n "checking for sqrt in -lm... " >&6; }
13806 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13807 $as_echo_n "(cached) " >&6
13808 else
13809 ac_check_lib_save_LIBS=$LIBS
13810 LIBS="-lm $LIBS"
13811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13812 /* end confdefs.h. */
13814 /* Override any GCC internal prototype to avoid an error.
13815 Use char because int might match the return type of a GCC
13816 builtin and then its argument prototype would still apply. */
13817 #ifdef __cplusplus
13818 extern "C"
13819 #endif
13820 char sqrt ();
13822 main ()
13824 return sqrt ();
13826 return 0;
13828 _ACEOF
13829 if ac_fn_c_try_link "$LINENO"; then :
13830 ac_cv_lib_m_sqrt=yes
13831 else
13832 ac_cv_lib_m_sqrt=no
13834 rm -f core conftest.err conftest.$ac_objext \
13835 conftest$ac_exeext conftest.$ac_ext
13836 LIBS=$ac_check_lib_save_LIBS
13838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13839 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
13840 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13841 cat >>confdefs.h <<_ACEOF
13842 #define HAVE_LIBM 1
13843 _ACEOF
13845 LIBS="-lm $LIBS"
13850 # Check for mail-locking functions in a "mail" library. Probably this should
13851 # have the same check as for liblockfile below.
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13853 $as_echo_n "checking for maillock in -lmail... " >&6; }
13854 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
13855 $as_echo_n "(cached) " >&6
13856 else
13857 ac_check_lib_save_LIBS=$LIBS
13858 LIBS="-lmail $LIBS"
13859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13860 /* end confdefs.h. */
13862 /* Override any GCC internal prototype to avoid an error.
13863 Use char because int might match the return type of a GCC
13864 builtin and then its argument prototype would still apply. */
13865 #ifdef __cplusplus
13866 extern "C"
13867 #endif
13868 char maillock ();
13870 main ()
13872 return maillock ();
13874 return 0;
13876 _ACEOF
13877 if ac_fn_c_try_link "$LINENO"; then :
13878 ac_cv_lib_mail_maillock=yes
13879 else
13880 ac_cv_lib_mail_maillock=no
13882 rm -f core conftest.err conftest.$ac_objext \
13883 conftest$ac_exeext conftest.$ac_ext
13884 LIBS=$ac_check_lib_save_LIBS
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13887 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
13888 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13889 have_mail=yes
13890 else
13891 have_mail=no
13894 if test $have_mail = yes; then
13895 LIBS_MAIL=-lmail
13896 LIBS="$LIBS_MAIL $LIBS"
13898 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
13900 else
13901 LIBS_MAIL=
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13904 $as_echo_n "checking for maillock in -llockfile... " >&6; }
13905 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
13906 $as_echo_n "(cached) " >&6
13907 else
13908 ac_check_lib_save_LIBS=$LIBS
13909 LIBS="-llockfile $LIBS"
13910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13911 /* end confdefs.h. */
13913 /* Override any GCC internal prototype to avoid an error.
13914 Use char because int might match the return type of a GCC
13915 builtin and then its argument prototype would still apply. */
13916 #ifdef __cplusplus
13917 extern "C"
13918 #endif
13919 char maillock ();
13921 main ()
13923 return maillock ();
13925 return 0;
13927 _ACEOF
13928 if ac_fn_c_try_link "$LINENO"; then :
13929 ac_cv_lib_lockfile_maillock=yes
13930 else
13931 ac_cv_lib_lockfile_maillock=no
13933 rm -f core conftest.err conftest.$ac_objext \
13934 conftest$ac_exeext conftest.$ac_ext
13935 LIBS=$ac_check_lib_save_LIBS
13937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13938 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13939 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13940 have_lockfile=yes
13941 else
13942 have_lockfile=no
13945 if test $have_lockfile = yes; then
13946 LIBS_MAIL=-llockfile
13947 LIBS="$LIBS_MAIL $LIBS"
13949 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
13951 else
13952 # If we have the shared liblockfile, assume we must use it for mail
13953 # locking (e.g. Debian). If we couldn't link against liblockfile
13954 # (no liblockfile.a installed), ensure that we don't need to.
13955 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13956 set dummy liblockfile.so; ac_word=$2
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13958 $as_echo_n "checking for $ac_word... " >&6; }
13959 if test "${ac_cv_prog_liblockfile+set}" = set; then :
13960 $as_echo_n "(cached) " >&6
13961 else
13962 if test -n "$liblockfile"; then
13963 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13964 else
13965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13966 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13967 for as_dir in $as_dummy
13969 IFS=$as_save_IFS
13970 test -z "$as_dir" && as_dir=.
13971 for ac_exec_ext in '' $ac_executable_extensions; do
13972 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13973 ac_cv_prog_liblockfile="yes"
13974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13975 break 2
13977 done
13978 done
13979 IFS=$as_save_IFS
13981 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13984 liblockfile=$ac_cv_prog_liblockfile
13985 if test -n "$liblockfile"; then
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13987 $as_echo "$liblockfile" >&6; }
13988 else
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13990 $as_echo "no" >&6; }
13994 if test $ac_cv_prog_liblockfile = yes; then
13995 as_fn_error "Shared liblockfile found but can't link against it.
13996 This probably means that movemail could lose mail.
13997 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14000 for ac_func in touchlock
14001 do :
14002 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
14003 if test "x$ac_cv_func_touchlock" = x""yes; then :
14004 cat >>confdefs.h <<_ACEOF
14005 #define HAVE_TOUCHLOCK 1
14006 _ACEOF
14009 done
14011 for ac_header in maillock.h
14012 do :
14013 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
14014 if test "x$ac_cv_header_maillock_h" = x""yes; then :
14015 cat >>confdefs.h <<_ACEOF
14016 #define HAVE_MAILLOCK_H 1
14017 _ACEOF
14021 done
14025 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14026 ## interlock access to the mail spool. The alternative is a lock file named
14027 ## /usr/spool/mail/$USER.lock.
14028 mail_lock=no
14029 case "$opsys" in
14030 aix4-2) mail_lock="lockf" ;;
14032 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
14034 ## On GNU/Linux systems, both methods are used by various mail programs.
14035 ## I assume most people are using newer mailers that have heard of flock.
14036 ## Change this if you need to.
14037 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14038 ## configure gets the right answers, and that means *NOT* using flock.
14039 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14040 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14041 ## Debian maintainer hasn't provided a clean fix for Emacs.
14042 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14043 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14044 ## correct logic. -- fx
14045 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14046 ## liblockfile is a Free Software replacement for libmail, used on
14047 ## Debian systems and elsewhere. -rfr.
14048 gnu-*)
14049 mail_lock="flock"
14050 if test $have_mail = yes || test $have_lockfile = yes; then
14051 test $ac_cv_header_maillock_h = yes && mail_lock=no
14054 esac
14056 BLESSMAIL_TARGET=
14057 case "$mail_lock" in
14058 flock)
14059 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14062 lockf)
14063 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14066 *) BLESSMAIL_TARGET="need-blessmail" ;;
14067 esac
14071 for ac_func in gethostname getdomainname \
14072 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
14073 random lrand48 logb frexp fmod rint cbrt ftime setsid \
14074 strerror fpathconf select euidaccess getpagesize tzset setlocale \
14075 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
14076 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
14077 sendto recvfrom getsockopt setsockopt getsockname getpeername \
14078 gai_strerror mkstemp getline getdelim mremap fsync sync \
14079 difftime mempcpy mblen mbrlen posix_memalign \
14080 cfmakeraw cfsetspeed copysign __executable_start
14081 do :
14082 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14083 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14084 eval as_val=\$$as_ac_var
14085 if test "x$as_val" = x""yes; then :
14086 cat >>confdefs.h <<_ACEOF
14087 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14088 _ACEOF
14091 done
14094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14095 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
14096 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
14097 $as_echo_n "(cached) " >&6
14098 else
14099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14100 /* end confdefs.h. */
14103 main ()
14105 __builtin_unwind_init ();
14107 return 0;
14109 _ACEOF
14110 if ac_fn_c_try_link "$LINENO"; then :
14111 emacs_cv_func___builtin_unwind_init=yes
14112 else
14113 emacs_cv_func___builtin_unwind_init=no
14115 rm -f core conftest.err conftest.$ac_objext \
14116 conftest$ac_exeext conftest.$ac_ext
14118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14119 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14120 if test $emacs_cv_func___builtin_unwind_init = yes; then
14122 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
14126 for ac_header in sys/un.h
14127 do :
14128 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
14129 if test "x$ac_cv_header_sys_un_h" = x""yes; then :
14130 cat >>confdefs.h <<_ACEOF
14131 #define HAVE_SYS_UN_H 1
14132 _ACEOF
14136 done
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14140 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14141 if test "${ac_cv_sys_largefile_source+set}" = set; then :
14142 $as_echo_n "(cached) " >&6
14143 else
14144 while :; do
14145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14146 /* end confdefs.h. */
14147 #include <sys/types.h> /* for off_t */
14148 #include <stdio.h>
14150 main ()
14152 int (*fp) (FILE *, off_t, int) = fseeko;
14153 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14155 return 0;
14157 _ACEOF
14158 if ac_fn_c_try_link "$LINENO"; then :
14159 ac_cv_sys_largefile_source=no; break
14161 rm -f core conftest.err conftest.$ac_objext \
14162 conftest$ac_exeext conftest.$ac_ext
14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164 /* end confdefs.h. */
14165 #define _LARGEFILE_SOURCE 1
14166 #include <sys/types.h> /* for off_t */
14167 #include <stdio.h>
14169 main ()
14171 int (*fp) (FILE *, off_t, int) = fseeko;
14172 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14174 return 0;
14176 _ACEOF
14177 if ac_fn_c_try_link "$LINENO"; then :
14178 ac_cv_sys_largefile_source=1; break
14180 rm -f core conftest.err conftest.$ac_objext \
14181 conftest$ac_exeext conftest.$ac_ext
14182 ac_cv_sys_largefile_source=unknown
14183 break
14184 done
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14187 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14188 case $ac_cv_sys_largefile_source in #(
14189 no | unknown) ;;
14191 cat >>confdefs.h <<_ACEOF
14192 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14193 _ACEOF
14195 esac
14196 rm -rf conftest*
14198 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14199 # in glibc 2.1.3, but that breaks too many other things.
14200 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14201 if test $ac_cv_sys_largefile_source != unknown; then
14203 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
14209 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
14210 if test "${ac_cv_func_getpgrp_void+set}" = set; then :
14211 $as_echo_n "(cached) " >&6
14212 else
14213 # Use it with a single arg.
14214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14215 /* end confdefs.h. */
14216 $ac_includes_default
14218 main ()
14220 getpgrp (0);
14222 return 0;
14224 _ACEOF
14225 if ac_fn_c_try_compile "$LINENO"; then :
14226 ac_cv_func_getpgrp_void=no
14227 else
14228 ac_cv_func_getpgrp_void=yes
14230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
14234 $as_echo "$ac_cv_func_getpgrp_void" >&6; }
14235 if test $ac_cv_func_getpgrp_void = yes; then
14237 $as_echo "#define GETPGRP_VOID 1" >>confdefs.h
14242 # UNIX98 PTYs.
14243 for ac_func in grantpt
14244 do :
14245 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14246 if test "x$ac_cv_func_grantpt" = x""yes; then :
14247 cat >>confdefs.h <<_ACEOF
14248 #define HAVE_GRANTPT 1
14249 _ACEOF
14252 done
14255 # PTY-related GNU extensions.
14256 for ac_func in getpt
14257 do :
14258 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
14259 if test "x$ac_cv_func_getpt" = x""yes; then :
14260 cat >>confdefs.h <<_ACEOF
14261 #define HAVE_GETPT 1
14262 _ACEOF
14265 done
14268 # Check this now, so that we will NOT find the above functions in ncurses.
14269 # That is because we have not set up to link ncurses in lib-src.
14270 # It's better to believe a function is not available
14271 # than to expect to find it in ncurses.
14272 # Also we need tputs and friends to be able to build at all.
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
14274 $as_echo_n "checking for library containing tputs... " >&6; }
14275 # Run a test program that contains a call to tputs, a call that is
14276 # never executed. This tests whether a pre-'main' dynamic linker
14277 # works with the library. It's too much trouble to actually call
14278 # tputs in the test program, due to portability hassles. When
14279 # cross-compiling, assume the test program will run if it links.
14281 # Maybe curses should be tried earlier?
14282 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14283 for tputs_library in '' ncurses terminfo termcap curses; do
14284 OLIBS=$LIBS
14285 if test -z "$tputs_library"; then
14286 LIBS_TERMCAP=
14287 msg='none required'
14288 else
14289 LIBS_TERMCAP=-l$tputs_library
14290 msg=$LIBS_TERMCAP
14291 LIBS="$LIBS_TERMCAP $LIBS"
14293 if test "$cross_compiling" = yes; then :
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14295 /* end confdefs.h. */
14297 extern void tputs (const char *, int, int (*)(int));
14298 int main (int argc, char **argv)
14300 if (argc == 10000)
14301 tputs (argv[0], 0, 0);
14302 return 0;
14305 _ACEOF
14306 if ac_fn_c_try_link "$LINENO"; then :
14308 else
14309 msg=no
14311 rm -f core conftest.err conftest.$ac_objext \
14312 conftest$ac_exeext conftest.$ac_ext
14313 else
14314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14315 /* end confdefs.h. */
14317 extern void tputs (const char *, int, int (*)(int));
14318 int main (int argc, char **argv)
14320 if (argc == 10000)
14321 tputs (argv[0], 0, 0);
14322 return 0;
14325 _ACEOF
14326 if ac_fn_c_try_run "$LINENO"; then :
14328 else
14329 msg=no
14331 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14332 conftest.$ac_objext conftest.beam conftest.$ac_ext
14335 LIBS=$OLIBS
14336 if test "X$msg" != Xno; then
14337 break
14339 done
14340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14341 $as_echo "$msg" >&6; }
14342 if test "X$msg" = Xno; then
14343 as_fn_error "The required function \`tputs' was not found in any library.
14344 These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
14345 Please try installing whichever of these libraries is most appropriate
14346 for your system, together with its header files.
14347 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
14349 # Must define this when any termcap library is found.
14351 $as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
14353 ## FIXME This was the cpp logic, but I am not sure it is right.
14354 ## The above test has not necessarily found libncurses.
14355 HAVE_LIBNCURSES=yes
14357 ## Use terminfo instead of termcap?
14358 ## Note only system files NOT using terminfo are:
14359 ## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
14360 ## darwin|gnu without ncurses.
14361 TERMINFO=no
14362 case "$opsys" in
14363 ## cygwin: Fewer environment variables to go wrong, more terminal types.
14364 ## hpux10-20: Use the system provided termcap(3) library.
14365 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
14366 ## is necessary. Otherwise Emacs dumps core when run -nw.
14367 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
14369 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14370 ## The ncurses library has been moved out of the System framework in
14371 ## Mac OS X 10.2. So if configure detects it, set the command-line
14372 ## option to use it.
14373 darwin|gnu*)
14374 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
14375 if test "x$HAVE_LIBNCURSES" = "xyes"; then
14376 TERMINFO=yes
14377 LIBS_TERMCAP="-lncurses"
14381 freebsd)
14382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14383 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14384 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
14385 $as_echo_n "(cached) " >&6
14386 else
14387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14388 /* end confdefs.h. */
14389 #include <osreldate.h>
14391 main ()
14393 #if __FreeBSD_version < 400000
14394 fail;
14395 #endif
14398 return 0;
14400 _ACEOF
14401 if ac_fn_c_try_link "$LINENO"; then :
14402 emacs_cv_freebsd_terminfo=yes
14403 else
14404 emacs_cv_freebsd_terminfo=no
14406 rm -f core conftest.err conftest.$ac_objext \
14407 conftest$ac_exeext conftest.$ac_ext
14411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14412 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14414 if test $emacs_cv_freebsd_terminfo = yes; then
14415 TERMINFO=yes
14416 LIBS_TERMCAP="-lncurses"
14417 else
14418 LIBS_TERMCAP="-ltermcap"
14422 netbsd)
14423 if test "x$LIBS_TERMCAP" = "x-lterminfo"; then
14424 TERMINFO=yes
14425 else
14426 LIBS_TERMCAP="-ltermcap"
14430 esac
14432 case "$opsys" in
14433 ## hpux: Make sure we get select from libc rather than from libcurses
14434 ## because libcurses on HPUX 10.10 has a broken version of select.
14435 ## We used to use -lc -lcurses, but this may be cleaner.
14436 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14438 openbsd) LIBS_TERMCAP="-lncurses" ;;
14440 ## Must use system termcap, if we use any termcap. It does special things.
14441 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
14442 esac
14444 TERMCAP_OBJ=tparam.o
14445 if test $TERMINFO = yes; then
14447 $as_echo "#define TERMINFO 1" >>confdefs.h
14449 TERMCAP_OBJ=terminfo.o
14455 # Do we have res_init, for detecting changes in /etc/resolv.conf?
14456 resolv=no
14457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14458 /* end confdefs.h. */
14459 #include <netinet/in.h>
14460 #include <arpa/nameser.h>
14461 #include <resolv.h>
14463 main ()
14465 return res_init();
14467 return 0;
14469 _ACEOF
14470 if ac_fn_c_try_link "$LINENO"; then :
14471 have_res_init=yes
14472 else
14473 have_res_init=no
14475 rm -f core conftest.err conftest.$ac_objext \
14476 conftest$ac_exeext conftest.$ac_ext
14477 if test "$have_res_init" = no; then
14478 OLIBS="$LIBS"
14479 LIBS="$LIBS -lresolv"
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14481 $as_echo_n "checking for res_init with -lresolv... " >&6; }
14482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14483 /* end confdefs.h. */
14484 #include <netinet/in.h>
14485 #include <arpa/nameser.h>
14486 #include <resolv.h>
14488 main ()
14490 return res_init();
14492 return 0;
14494 _ACEOF
14495 if ac_fn_c_try_link "$LINENO"; then :
14496 have_res_init=yes
14497 else
14498 have_res_init=no
14500 rm -f core conftest.err conftest.$ac_objext \
14501 conftest$ac_exeext conftest.$ac_ext
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14503 $as_echo "$have_res_init" >&6; }
14504 if test "$have_res_init" = yes ; then
14505 resolv=yes
14507 LIBS="$OLIBS"
14510 if test "$have_res_init" = yes; then
14512 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
14516 # Do we need the Hesiod library to provide the support routines?
14517 LIBHESIOD=
14518 if test "$with_hesiod" != no ; then
14519 # Don't set $LIBS here -- see comments above. FIXME which comments?
14520 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14521 if test "x$ac_cv_func_res_send" = x""yes; then :
14523 else
14524 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14525 if test "x$ac_cv_func___res_send" = x""yes; then :
14527 else
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14529 $as_echo_n "checking for res_send in -lresolv... " >&6; }
14530 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
14531 $as_echo_n "(cached) " >&6
14532 else
14533 ac_check_lib_save_LIBS=$LIBS
14534 LIBS="-lresolv $LIBS"
14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14536 /* end confdefs.h. */
14538 /* Override any GCC internal prototype to avoid an error.
14539 Use char because int might match the return type of a GCC
14540 builtin and then its argument prototype would still apply. */
14541 #ifdef __cplusplus
14542 extern "C"
14543 #endif
14544 char res_send ();
14546 main ()
14548 return res_send ();
14550 return 0;
14552 _ACEOF
14553 if ac_fn_c_try_link "$LINENO"; then :
14554 ac_cv_lib_resolv_res_send=yes
14555 else
14556 ac_cv_lib_resolv_res_send=no
14558 rm -f core conftest.err conftest.$ac_objext \
14559 conftest$ac_exeext conftest.$ac_ext
14560 LIBS=$ac_check_lib_save_LIBS
14562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14563 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14564 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14565 resolv=yes
14566 else
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14568 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
14569 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
14570 $as_echo_n "(cached) " >&6
14571 else
14572 ac_check_lib_save_LIBS=$LIBS
14573 LIBS="-lresolv $LIBS"
14574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14575 /* end confdefs.h. */
14577 /* Override any GCC internal prototype to avoid an error.
14578 Use char because int might match the return type of a GCC
14579 builtin and then its argument prototype would still apply. */
14580 #ifdef __cplusplus
14581 extern "C"
14582 #endif
14583 char __res_send ();
14585 main ()
14587 return __res_send ();
14589 return 0;
14591 _ACEOF
14592 if ac_fn_c_try_link "$LINENO"; then :
14593 ac_cv_lib_resolv___res_send=yes
14594 else
14595 ac_cv_lib_resolv___res_send=no
14597 rm -f core conftest.err conftest.$ac_objext \
14598 conftest$ac_exeext conftest.$ac_ext
14599 LIBS=$ac_check_lib_save_LIBS
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14602 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14603 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14604 resolv=yes
14613 if test "$resolv" = yes ; then
14614 RESOLVLIB=-lresolv
14615 else
14616 RESOLVLIB=
14618 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14619 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14621 else
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14623 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14624 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14625 $as_echo_n "(cached) " >&6
14626 else
14627 ac_check_lib_save_LIBS=$LIBS
14628 LIBS="-lhesiod $RESOLVLIB $LIBS"
14629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14630 /* end confdefs.h. */
14632 /* Override any GCC internal prototype to avoid an error.
14633 Use char because int might match the return type of a GCC
14634 builtin and then its argument prototype would still apply. */
14635 #ifdef __cplusplus
14636 extern "C"
14637 #endif
14638 char hes_getmailhost ();
14640 main ()
14642 return hes_getmailhost ();
14644 return 0;
14646 _ACEOF
14647 if ac_fn_c_try_link "$LINENO"; then :
14648 ac_cv_lib_hesiod_hes_getmailhost=yes
14649 else
14650 ac_cv_lib_hesiod_hes_getmailhost=no
14652 rm -f core conftest.err conftest.$ac_objext \
14653 conftest$ac_exeext conftest.$ac_ext
14654 LIBS=$ac_check_lib_save_LIBS
14656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14657 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14658 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14659 hesiod=yes
14660 else
14667 if test x"$hesiod" = xyes; then
14669 $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
14671 LIBHESIOD=-lhesiod
14676 # Do we need libresolv (due to res_init or Hesiod)?
14677 if test "$resolv" = yes ; then
14679 $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
14681 LIBRESOLV=-lresolv
14682 else
14683 LIBRESOLV=
14687 # These tell us which Kerberos-related libraries to use.
14688 COM_ERRLIB=
14689 CRYPTOLIB=
14690 KRB5LIB=
14691 DESLIB=
14692 KRB4LIB=
14694 if test "${with_kerberos}" != no; then
14695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14696 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
14697 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14698 $as_echo_n "(cached) " >&6
14699 else
14700 ac_check_lib_save_LIBS=$LIBS
14701 LIBS="-lcom_err $LIBS"
14702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14703 /* end confdefs.h. */
14705 /* Override any GCC internal prototype to avoid an error.
14706 Use char because int might match the return type of a GCC
14707 builtin and then its argument prototype would still apply. */
14708 #ifdef __cplusplus
14709 extern "C"
14710 #endif
14711 char com_err ();
14713 main ()
14715 return com_err ();
14717 return 0;
14719 _ACEOF
14720 if ac_fn_c_try_link "$LINENO"; then :
14721 ac_cv_lib_com_err_com_err=yes
14722 else
14723 ac_cv_lib_com_err_com_err=no
14725 rm -f core conftest.err conftest.$ac_objext \
14726 conftest$ac_exeext conftest.$ac_ext
14727 LIBS=$ac_check_lib_save_LIBS
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14730 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14731 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14732 have_com_err=yes
14733 else
14734 have_com_err=no
14737 if test $have_com_err = yes; then
14738 COM_ERRLIB=-lcom_err
14739 LIBS="$COM_ERRLIB $LIBS"
14741 $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
14744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14745 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14746 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14747 $as_echo_n "(cached) " >&6
14748 else
14749 ac_check_lib_save_LIBS=$LIBS
14750 LIBS="-lcrypto $LIBS"
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752 /* end confdefs.h. */
14754 /* Override any GCC internal prototype to avoid an error.
14755 Use char because int might match the return type of a GCC
14756 builtin and then its argument prototype would still apply. */
14757 #ifdef __cplusplus
14758 extern "C"
14759 #endif
14760 char mit_des_cbc_encrypt ();
14762 main ()
14764 return mit_des_cbc_encrypt ();
14766 return 0;
14768 _ACEOF
14769 if ac_fn_c_try_link "$LINENO"; then :
14770 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14771 else
14772 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14774 rm -f core conftest.err conftest.$ac_objext \
14775 conftest$ac_exeext conftest.$ac_ext
14776 LIBS=$ac_check_lib_save_LIBS
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14779 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14780 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14781 have_crypto=yes
14782 else
14783 have_crypto=no
14786 if test $have_crypto = yes; then
14787 CRYPTOLIB=-lcrypto
14788 LIBS="$CRYPTOLIB $LIBS"
14790 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
14793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14794 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14795 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14796 $as_echo_n "(cached) " >&6
14797 else
14798 ac_check_lib_save_LIBS=$LIBS
14799 LIBS="-lk5crypto $LIBS"
14800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14801 /* end confdefs.h. */
14803 /* Override any GCC internal prototype to avoid an error.
14804 Use char because int might match the return type of a GCC
14805 builtin and then its argument prototype would still apply. */
14806 #ifdef __cplusplus
14807 extern "C"
14808 #endif
14809 char mit_des_cbc_encrypt ();
14811 main ()
14813 return mit_des_cbc_encrypt ();
14815 return 0;
14817 _ACEOF
14818 if ac_fn_c_try_link "$LINENO"; then :
14819 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14820 else
14821 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14823 rm -f core conftest.err conftest.$ac_objext \
14824 conftest$ac_exeext conftest.$ac_ext
14825 LIBS=$ac_check_lib_save_LIBS
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14828 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14829 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14830 have_k5crypto=yes
14831 else
14832 have_k5crypto=no
14835 if test $have_k5crypto = yes; then
14836 CRYPTOLIB=-lk5crypto
14837 LIBS="$CRYPTOLIB $LIBS"
14839 $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14843 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14844 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14845 $as_echo_n "(cached) " >&6
14846 else
14847 ac_check_lib_save_LIBS=$LIBS
14848 LIBS="-lkrb5 $LIBS"
14849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14850 /* end confdefs.h. */
14852 /* Override any GCC internal prototype to avoid an error.
14853 Use char because int might match the return type of a GCC
14854 builtin and then its argument prototype would still apply. */
14855 #ifdef __cplusplus
14856 extern "C"
14857 #endif
14858 char krb5_init_context ();
14860 main ()
14862 return krb5_init_context ();
14864 return 0;
14866 _ACEOF
14867 if ac_fn_c_try_link "$LINENO"; then :
14868 ac_cv_lib_krb5_krb5_init_context=yes
14869 else
14870 ac_cv_lib_krb5_krb5_init_context=no
14872 rm -f core conftest.err conftest.$ac_objext \
14873 conftest$ac_exeext conftest.$ac_ext
14874 LIBS=$ac_check_lib_save_LIBS
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14877 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14878 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14879 have_krb5=yes
14880 else
14881 have_krb5=no
14884 if test $have_krb5=yes; then
14885 KRB5LIB=-lkrb5
14886 LIBS="$KRB5LIB $LIBS"
14888 $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
14891 if test "${with_kerberos5}" = no; then
14892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14893 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14894 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
14895 $as_echo_n "(cached) " >&6
14896 else
14897 ac_check_lib_save_LIBS=$LIBS
14898 LIBS="-ldes425 $LIBS"
14899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14900 /* end confdefs.h. */
14902 /* Override any GCC internal prototype to avoid an error.
14903 Use char because int might match the return type of a GCC
14904 builtin and then its argument prototype would still apply. */
14905 #ifdef __cplusplus
14906 extern "C"
14907 #endif
14908 char des_cbc_encrypt ();
14910 main ()
14912 return des_cbc_encrypt ();
14914 return 0;
14916 _ACEOF
14917 if ac_fn_c_try_link "$LINENO"; then :
14918 ac_cv_lib_des425_des_cbc_encrypt=yes
14919 else
14920 ac_cv_lib_des425_des_cbc_encrypt=no
14922 rm -f core conftest.err conftest.$ac_objext \
14923 conftest$ac_exeext conftest.$ac_ext
14924 LIBS=$ac_check_lib_save_LIBS
14926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14927 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14928 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14929 have_des425=yes
14930 else
14931 have_des425=no
14934 if test $have_des425 = yes; then
14935 DESLIB=-ldes425
14936 LIBS="$DESLIB $LIBS"
14938 $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
14940 else
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14942 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14943 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14944 $as_echo_n "(cached) " >&6
14945 else
14946 ac_check_lib_save_LIBS=$LIBS
14947 LIBS="-ldes $LIBS"
14948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949 /* end confdefs.h. */
14951 /* Override any GCC internal prototype to avoid an error.
14952 Use char because int might match the return type of a GCC
14953 builtin and then its argument prototype would still apply. */
14954 #ifdef __cplusplus
14955 extern "C"
14956 #endif
14957 char des_cbc_encrypt ();
14959 main ()
14961 return des_cbc_encrypt ();
14963 return 0;
14965 _ACEOF
14966 if ac_fn_c_try_link "$LINENO"; then :
14967 ac_cv_lib_des_des_cbc_encrypt=yes
14968 else
14969 ac_cv_lib_des_des_cbc_encrypt=no
14971 rm -f core conftest.err conftest.$ac_objext \
14972 conftest$ac_exeext conftest.$ac_ext
14973 LIBS=$ac_check_lib_save_LIBS
14975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14976 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14977 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14978 have_des=yes
14979 else
14980 have_des=no
14983 if test $have_des = yes; then
14984 DESLIB=-ldes
14985 LIBS="$DESLIB $LIBS"
14987 $as_echo "#define HAVE_LIBDES 1" >>confdefs.h
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14992 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14993 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
14994 $as_echo_n "(cached) " >&6
14995 else
14996 ac_check_lib_save_LIBS=$LIBS
14997 LIBS="-lkrb4 $LIBS"
14998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14999 /* end confdefs.h. */
15001 /* Override any GCC internal prototype to avoid an error.
15002 Use char because int might match the return type of a GCC
15003 builtin and then its argument prototype would still apply. */
15004 #ifdef __cplusplus
15005 extern "C"
15006 #endif
15007 char krb_get_cred ();
15009 main ()
15011 return krb_get_cred ();
15013 return 0;
15015 _ACEOF
15016 if ac_fn_c_try_link "$LINENO"; then :
15017 ac_cv_lib_krb4_krb_get_cred=yes
15018 else
15019 ac_cv_lib_krb4_krb_get_cred=no
15021 rm -f core conftest.err conftest.$ac_objext \
15022 conftest$ac_exeext conftest.$ac_ext
15023 LIBS=$ac_check_lib_save_LIBS
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15026 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15027 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15028 have_krb4=yes
15029 else
15030 have_krb4=no
15033 if test $have_krb4 = yes; then
15034 KRB4LIB=-lkrb4
15035 LIBS="$KRB4LIB $LIBS"
15037 $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
15039 else
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15041 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15042 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15043 $as_echo_n "(cached) " >&6
15044 else
15045 ac_check_lib_save_LIBS=$LIBS
15046 LIBS="-lkrb $LIBS"
15047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15048 /* end confdefs.h. */
15050 /* Override any GCC internal prototype to avoid an error.
15051 Use char because int might match the return type of a GCC
15052 builtin and then its argument prototype would still apply. */
15053 #ifdef __cplusplus
15054 extern "C"
15055 #endif
15056 char krb_get_cred ();
15058 main ()
15060 return krb_get_cred ();
15062 return 0;
15064 _ACEOF
15065 if ac_fn_c_try_link "$LINENO"; then :
15066 ac_cv_lib_krb_krb_get_cred=yes
15067 else
15068 ac_cv_lib_krb_krb_get_cred=no
15070 rm -f core conftest.err conftest.$ac_objext \
15071 conftest$ac_exeext conftest.$ac_ext
15072 LIBS=$ac_check_lib_save_LIBS
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15075 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15076 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15077 have_krb=yes
15078 else
15079 have_krb=no
15082 if test $have_krb = yes; then
15083 KRB4LIB=-lkrb
15084 LIBS="$KRB4LIB $LIBS"
15086 $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
15092 if test "${with_kerberos5}" != no; then
15093 for ac_header in krb5.h
15094 do :
15095 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15096 if test "x$ac_cv_header_krb5_h" = x""yes; then :
15097 cat >>confdefs.h <<_ACEOF
15098 #define HAVE_KRB5_H 1
15099 _ACEOF
15100 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15102 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15104 cat >>confdefs.h <<_ACEOF
15105 #define HAVE_KRB5_ERROR_TEXT 1
15106 _ACEOF
15110 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15112 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
15114 cat >>confdefs.h <<_ACEOF
15115 #define HAVE_KRB5_ERROR_E_TEXT 1
15116 _ACEOF
15123 done
15125 else
15126 for ac_header in des.h
15127 do :
15128 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
15129 if test "x$ac_cv_header_des_h" = x""yes; then :
15130 cat >>confdefs.h <<_ACEOF
15131 #define HAVE_DES_H 1
15132 _ACEOF
15134 else
15135 for ac_header in kerberosIV/des.h
15136 do :
15137 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
15138 if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
15139 cat >>confdefs.h <<_ACEOF
15140 #define HAVE_KERBEROSIV_DES_H 1
15141 _ACEOF
15143 else
15144 for ac_header in kerberos/des.h
15145 do :
15146 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
15147 if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
15148 cat >>confdefs.h <<_ACEOF
15149 #define HAVE_KERBEROS_DES_H 1
15150 _ACEOF
15154 done
15158 done
15162 done
15164 for ac_header in krb.h
15165 do :
15166 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15167 if test "x$ac_cv_header_krb_h" = x""yes; then :
15168 cat >>confdefs.h <<_ACEOF
15169 #define HAVE_KRB_H 1
15170 _ACEOF
15172 else
15173 for ac_header in kerberosIV/krb.h
15174 do :
15175 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15176 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15177 cat >>confdefs.h <<_ACEOF
15178 #define HAVE_KERBEROSIV_KRB_H 1
15179 _ACEOF
15181 else
15182 for ac_header in kerberos/krb.h
15183 do :
15184 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15185 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15186 cat >>confdefs.h <<_ACEOF
15187 #define HAVE_KERBEROS_KRB_H 1
15188 _ACEOF
15192 done
15196 done
15200 done
15203 for ac_header in com_err.h
15204 do :
15205 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15206 if test "x$ac_cv_header_com_err_h" = x""yes; then :
15207 cat >>confdefs.h <<_ACEOF
15208 #define HAVE_COM_ERR_H 1
15209 _ACEOF
15213 done
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15224 $as_echo_n "checking whether localtime caches TZ... " >&6; }
15225 if test "${emacs_cv_localtime_cache+set}" = set; then :
15226 $as_echo_n "(cached) " >&6
15227 else
15228 if test x$ac_cv_func_tzset = xyes; then
15229 if test "$cross_compiling" = yes; then :
15230 # If we have tzset, assume the worst when cross-compiling.
15231 emacs_cv_localtime_cache=yes
15232 else
15233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15234 /* end confdefs.h. */
15235 #include <time.h>
15236 char TZ_GMT0[] = "TZ=GMT0";
15237 char TZ_PST8[] = "TZ=PST8";
15238 main()
15240 time_t now = time ((time_t *) 0);
15241 int hour_GMT0, hour_unset;
15242 if (putenv (TZ_GMT0) != 0)
15243 exit (1);
15244 hour_GMT0 = localtime (&now)->tm_hour;
15245 unsetenv("TZ");
15246 hour_unset = localtime (&now)->tm_hour;
15247 if (putenv (TZ_PST8) != 0)
15248 exit (1);
15249 if (localtime (&now)->tm_hour == hour_GMT0)
15250 exit (1);
15251 unsetenv("TZ");
15252 if (localtime (&now)->tm_hour != hour_unset)
15253 exit (1);
15254 exit (0);
15256 _ACEOF
15257 if ac_fn_c_try_run "$LINENO"; then :
15258 emacs_cv_localtime_cache=no
15259 else
15260 emacs_cv_localtime_cache=yes
15262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15263 conftest.$ac_objext conftest.beam conftest.$ac_ext
15266 else
15267 # If we lack tzset, report that localtime does not cache TZ,
15268 # since we can't invalidate the cache if we don't have tzset.
15269 emacs_cv_localtime_cache=no
15272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15273 $as_echo "$emacs_cv_localtime_cache" >&6; }
15274 if test $emacs_cv_localtime_cache = yes; then
15276 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
15280 if test "x$HAVE_TIMEVAL" = xyes; then
15281 for ac_func in gettimeofday
15282 do :
15283 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15284 if test "x$ac_cv_func_gettimeofday" = x""yes; then :
15285 cat >>confdefs.h <<_ACEOF
15286 #define HAVE_GETTIMEOFDAY 1
15287 _ACEOF
15290 done
15292 if test $ac_cv_func_gettimeofday = yes; then
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
15294 $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
15295 if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
15296 $as_echo_n "(cached) " >&6
15297 else
15298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15299 /* end confdefs.h. */
15301 #ifdef TIME_WITH_SYS_TIME
15302 #include <sys/time.h>
15303 #include <time.h>
15304 #else
15305 #ifdef HAVE_SYS_TIME_H
15306 #include <sys/time.h>
15307 #else
15308 #include <time.h>
15309 #endif
15310 #endif
15312 main ()
15314 struct timeval time;
15315 gettimeofday (&time, 0);
15317 return 0;
15319 _ACEOF
15320 if ac_fn_c_try_compile "$LINENO"; then :
15321 emacs_cv_gettimeofday_two_arguments=yes
15322 else
15323 emacs_cv_gettimeofday_two_arguments=no
15325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
15328 $as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
15329 if test $emacs_cv_gettimeofday_two_arguments = no; then
15331 $as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
15337 ok_so_far=yes
15338 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15339 if test "x$ac_cv_func_socket" = x""yes; then :
15341 else
15342 ok_so_far=no
15345 if test $ok_so_far = yes; then
15346 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15347 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
15349 else
15350 ok_so_far=no
15355 if test $ok_so_far = yes; then
15356 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15357 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
15359 else
15360 ok_so_far=no
15365 if test $ok_so_far = yes; then
15367 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
15371 if test -f /usr/lpp/X11/bin/smt.exp; then
15373 $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15378 $as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15379 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15381 $as_echo "yes" >&6; }
15383 $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
15385 else
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15387 $as_echo "no" >&6; }
15390 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15391 if test "x$ac_cv_type_pid_t" = x""yes; then :
15393 else
15395 cat >>confdefs.h <<_ACEOF
15396 #define pid_t int
15397 _ACEOF
15401 for ac_header in vfork.h
15402 do :
15403 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15404 if test "x$ac_cv_header_vfork_h" = x""yes; then :
15405 cat >>confdefs.h <<_ACEOF
15406 #define HAVE_VFORK_H 1
15407 _ACEOF
15411 done
15413 for ac_func in fork vfork
15414 do :
15415 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15416 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15417 eval as_val=\$$as_ac_var
15418 if test "x$as_val" = x""yes; then :
15419 cat >>confdefs.h <<_ACEOF
15420 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15421 _ACEOF
15424 done
15426 if test "x$ac_cv_func_fork" = xyes; then
15427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15428 $as_echo_n "checking for working fork... " >&6; }
15429 if test "${ac_cv_func_fork_works+set}" = set; then :
15430 $as_echo_n "(cached) " >&6
15431 else
15432 if test "$cross_compiling" = yes; then :
15433 ac_cv_func_fork_works=cross
15434 else
15435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15436 /* end confdefs.h. */
15437 $ac_includes_default
15439 main ()
15442 /* By Ruediger Kuhlmann. */
15443 return fork () < 0;
15446 return 0;
15448 _ACEOF
15449 if ac_fn_c_try_run "$LINENO"; then :
15450 ac_cv_func_fork_works=yes
15451 else
15452 ac_cv_func_fork_works=no
15454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15455 conftest.$ac_objext conftest.beam conftest.$ac_ext
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15460 $as_echo "$ac_cv_func_fork_works" >&6; }
15462 else
15463 ac_cv_func_fork_works=$ac_cv_func_fork
15465 if test "x$ac_cv_func_fork_works" = xcross; then
15466 case $host in
15467 *-*-amigaos* | *-*-msdosdjgpp*)
15468 # Override, as these systems have only a dummy fork() stub
15469 ac_cv_func_fork_works=no
15472 ac_cv_func_fork_works=yes
15474 esac
15475 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15476 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15478 ac_cv_func_vfork_works=$ac_cv_func_vfork
15479 if test "x$ac_cv_func_vfork" = xyes; then
15480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15481 $as_echo_n "checking for working vfork... " >&6; }
15482 if test "${ac_cv_func_vfork_works+set}" = set; then :
15483 $as_echo_n "(cached) " >&6
15484 else
15485 if test "$cross_compiling" = yes; then :
15486 ac_cv_func_vfork_works=cross
15487 else
15488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15489 /* end confdefs.h. */
15490 /* Thanks to Paul Eggert for this test. */
15491 $ac_includes_default
15492 #include <sys/wait.h>
15493 #ifdef HAVE_VFORK_H
15494 # include <vfork.h>
15495 #endif
15496 /* On some sparc systems, changes by the child to local and incoming
15497 argument registers are propagated back to the parent. The compiler
15498 is told about this with #include <vfork.h>, but some compilers
15499 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15500 static variable whose address is put into a register that is
15501 clobbered by the vfork. */
15502 static void
15503 #ifdef __cplusplus
15504 sparc_address_test (int arg)
15505 # else
15506 sparc_address_test (arg) int arg;
15507 #endif
15509 static pid_t child;
15510 if (!child) {
15511 child = vfork ();
15512 if (child < 0) {
15513 perror ("vfork");
15514 _exit(2);
15516 if (!child) {
15517 arg = getpid();
15518 write(-1, "", 0);
15519 _exit (arg);
15525 main ()
15527 pid_t parent = getpid ();
15528 pid_t child;
15530 sparc_address_test (0);
15532 child = vfork ();
15534 if (child == 0) {
15535 /* Here is another test for sparc vfork register problems. This
15536 test uses lots of local variables, at least as many local
15537 variables as main has allocated so far including compiler
15538 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15539 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15540 reuse the register of parent for one of the local variables,
15541 since it will think that parent can't possibly be used any more
15542 in this routine. Assigning to the local variable will thus
15543 munge parent in the parent process. */
15544 pid_t
15545 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15546 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15547 /* Convince the compiler that p..p7 are live; otherwise, it might
15548 use the same hardware register for all 8 local variables. */
15549 if (p != p1 || p != p2 || p != p3 || p != p4
15550 || p != p5 || p != p6 || p != p7)
15551 _exit(1);
15553 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15554 from child file descriptors. If the child closes a descriptor
15555 before it execs or exits, this munges the parent's descriptor
15556 as well. Test for this by closing stdout in the child. */
15557 _exit(close(fileno(stdout)) != 0);
15558 } else {
15559 int status;
15560 struct stat st;
15562 while (wait(&status) != child)
15564 return (
15565 /* Was there some problem with vforking? */
15566 child < 0
15568 /* Did the child fail? (This shouldn't happen.) */
15569 || status
15571 /* Did the vfork/compiler bug occur? */
15572 || parent != getpid()
15574 /* Did the file descriptor bug occur? */
15575 || fstat(fileno(stdout), &st) != 0
15579 _ACEOF
15580 if ac_fn_c_try_run "$LINENO"; then :
15581 ac_cv_func_vfork_works=yes
15582 else
15583 ac_cv_func_vfork_works=no
15585 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15586 conftest.$ac_objext conftest.beam conftest.$ac_ext
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15591 $as_echo "$ac_cv_func_vfork_works" >&6; }
15594 if test "x$ac_cv_func_fork_works" = xcross; then
15595 ac_cv_func_vfork_works=$ac_cv_func_vfork
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15597 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15600 if test "x$ac_cv_func_vfork_works" = xyes; then
15602 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15604 else
15606 $as_echo "#define vfork fork" >>confdefs.h
15609 if test "x$ac_cv_func_fork_works" = xyes; then
15611 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15616 for ac_func in snprintf
15617 do :
15618 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15619 if test "x$ac_cv_func_snprintf" = x""yes; then :
15620 cat >>confdefs.h <<_ACEOF
15621 #define HAVE_SNPRINTF 1
15622 _ACEOF
15625 done
15628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15629 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15630 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15631 $as_echo_n "(cached) " >&6
15632 else
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634 /* end confdefs.h. */
15635 #include <langinfo.h>
15637 main ()
15639 char* cs = nl_langinfo(CODESET);
15641 return 0;
15643 _ACEOF
15644 if ac_fn_c_try_link "$LINENO"; then :
15645 emacs_cv_langinfo_codeset=yes
15646 else
15647 emacs_cv_langinfo_codeset=no
15649 rm -f core conftest.err conftest.$ac_objext \
15650 conftest$ac_exeext conftest.$ac_ext
15653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15654 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
15655 if test $emacs_cv_langinfo_codeset = yes; then
15657 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
15661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15662 $as_echo_n "checking for mbstate_t... " >&6; }
15663 if test "${ac_cv_type_mbstate_t+set}" = set; then :
15664 $as_echo_n "(cached) " >&6
15665 else
15666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15667 /* end confdefs.h. */
15668 $ac_includes_default
15669 # include <wchar.h>
15671 main ()
15673 mbstate_t x; return sizeof x;
15675 return 0;
15677 _ACEOF
15678 if ac_fn_c_try_compile "$LINENO"; then :
15679 ac_cv_type_mbstate_t=yes
15680 else
15681 ac_cv_type_mbstate_t=no
15683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15686 $as_echo "$ac_cv_type_mbstate_t" >&6; }
15687 if test $ac_cv_type_mbstate_t = yes; then
15689 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15691 else
15693 $as_echo "#define mbstate_t int" >>confdefs.h
15697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15698 $as_echo_n "checking for C restricted array declarations... " >&6; }
15699 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15700 $as_echo_n "(cached) " >&6
15701 else
15702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15703 /* end confdefs.h. */
15704 void fred (int x[__restrict]);
15706 main ()
15710 return 0;
15712 _ACEOF
15713 if ac_fn_c_try_compile "$LINENO"; then :
15714 emacs_cv_c_restrict_arr=yes
15715 else
15716 emacs_cv_c_restrict_arr=no
15718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15721 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
15722 if test "$emacs_cv_c_restrict_arr" = yes; then
15724 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
15729 # Set up the CFLAGS for real compilation, so we can substitute it.
15730 CFLAGS="$REAL_CFLAGS"
15731 CPPFLAGS="$REAL_CPPFLAGS"
15733 ## Hack to detect a buggy GCC version.
15734 if test "x$GCC" = xyes \
15735 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
15736 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
15737 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
15738 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
15741 version=$PACKAGE_VERSION
15743 ### Specify what sort of things we'll be editing into Makefile and config.h.
15744 ### Use configuration here uncanonicalized to avoid exceeding size limits.
15747 ## Unused?
15768 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
15769 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
15770 ## end of LIBX_BASE, but nothing ever set it.
15775 ## Used in lwlib/Makefile.in.
15777 if test -n "${machfile}"; then
15778 M_FILE="\$(srcdir)/${machfile}"
15779 else
15780 M_FILE=
15782 S_FILE="\$(srcdir)/${opsysfile}"
15793 cat >>confdefs.h <<_ACEOF
15794 #define EMACS_CONFIGURATION "${canonical}"
15795 _ACEOF
15798 cat >>confdefs.h <<_ACEOF
15799 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
15800 _ACEOF
15802 if test -n "$machfile"; then
15804 cat >>confdefs.h <<_ACEOF
15805 #define config_machfile "${machfile}"
15806 _ACEOF
15810 cat >>confdefs.h <<_ACEOF
15811 #define config_opsysfile "${opsysfile}"
15812 _ACEOF
15815 XMENU_OBJ=
15816 XOBJ=
15817 FONT_OBJ=
15818 if test "${HAVE_X_WINDOWS}" = "yes" ; then
15820 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
15822 XMENU_OBJ=xmenu.o
15823 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
15824 FONT_OBJ=xfont.o
15825 if test "$HAVE_XFT" = "yes"; then
15826 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
15827 elif test "$HAVE_FREETYPE" = "yes"; then
15828 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
15836 WIDGET_OBJ=
15837 MOTIF_LIBW=
15838 if test "${USE_X_TOOLKIT}" != "none" ; then
15839 WIDGET_OBJ=widget.o
15841 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
15843 if test "${USE_X_TOOLKIT}" = "LUCID"; then
15845 $as_echo "#define USE_LUCID 1" >>confdefs.h
15847 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
15849 $as_echo "#define USE_MOTIF 1" >>confdefs.h
15851 MOTIF_LIBW=-lXm
15852 case "$opsys" in
15853 gnu-linux)
15854 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
15855 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
15858 unixware)
15859 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
15860 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
15861 MOTIF_LIBW="MOTIF_LIBW -lXimp"
15864 aix4-2)
15865 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
15866 MOTIF_LIBW="$MOTIF_LIBW -li18n"
15868 esac
15869 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
15874 TOOLKIT_LIBW=
15875 case "$USE_X_TOOLKIT" in
15876 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
15877 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
15878 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
15879 esac
15882 if test "$USE_X_TOOLKIT" = "none"; then
15883 LIBXT_OTHER="\$(LIBXSM)"
15884 OLDXMENU_TARGET="really-oldXMenu"
15885 else
15886 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
15887 OLDXMENU_TARGET="really-lwlib"
15891 ## The X Menu stuff is present in the X10 distribution, but missing
15892 ## from X11. If we have X10, just use the installed library;
15893 ## otherwise, use our own copy.
15894 if test "${HAVE_X11}" = "yes" ; then
15896 $as_echo "#define HAVE_X11 1" >>confdefs.h
15899 if test "$USE_X_TOOLKIT" = "none"; then
15900 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
15901 else
15902 OLDXMENU="\${lwlibdir}/liblw.a"
15904 LIBXMENU="\$(OLDXMENU)"
15905 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
15906 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
15907 else
15908 ## For a syntactically valid Makefile; not actually used for anything.
15909 ## See comments in src/Makefile.in.
15910 OLDXMENU=nothing
15911 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
15912 if test "${HAVE_X_WINDOWS}" = "yes"; then
15913 LIBXMENU="-lXMenu"
15914 else
15915 LIBXMENU=
15917 LIBX_OTHER=
15918 OLDXMENU_DEPS=
15921 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
15922 OLDXMENU_TARGET=
15923 OLDXMENU=nothing
15924 LIBXMENU=
15925 OLDXMENU_DEPS=
15934 if test "${HAVE_MENUS}" = "yes" ; then
15936 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
15940 if test "${GNU_MALLOC}" = "yes" ; then
15942 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
15946 RALLOC_OBJ=
15947 if test "${REL_ALLOC}" = "yes" ; then
15949 $as_echo "#define REL_ALLOC 1" >>confdefs.h
15952 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
15956 if test "$opsys" = "cygwin"; then
15957 CYGWIN_OBJ="sheap.o"
15958 ## Cygwin differs because of its unexec().
15959 PRE_ALLOC_OBJ=
15960 POST_ALLOC_OBJ=lastfile.o
15961 else
15962 CYGWIN_OBJ=
15963 PRE_ALLOC_OBJ=lastfile.o
15964 POST_ALLOC_OBJ=
15970 # Configure gnulib here, now that we know LIBS.
15982 LIBC_FATAL_STDERR_=1
15983 export LIBC_FATAL_STDERR_
15985 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15986 # for constant arguments. Useless!
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
15988 $as_echo_n "checking for working alloca.h... " >&6; }
15989 if test "${ac_cv_working_alloca_h+set}" = set; then :
15990 $as_echo_n "(cached) " >&6
15991 else
15992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15993 /* end confdefs.h. */
15994 #include <alloca.h>
15996 main ()
15998 char *p = (char *) alloca (2 * sizeof (int));
15999 if (p) return 0;
16001 return 0;
16003 _ACEOF
16004 if ac_fn_c_try_link "$LINENO"; then :
16005 ac_cv_working_alloca_h=yes
16006 else
16007 ac_cv_working_alloca_h=no
16009 rm -f core conftest.err conftest.$ac_objext \
16010 conftest$ac_exeext conftest.$ac_ext
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16013 $as_echo "$ac_cv_working_alloca_h" >&6; }
16014 if test $ac_cv_working_alloca_h = yes; then
16016 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16021 $as_echo_n "checking for alloca... " >&6; }
16022 if test "${ac_cv_func_alloca_works+set}" = set; then :
16023 $as_echo_n "(cached) " >&6
16024 else
16025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16026 /* end confdefs.h. */
16027 #ifdef __GNUC__
16028 # define alloca __builtin_alloca
16029 #else
16030 # ifdef _MSC_VER
16031 # include <malloc.h>
16032 # define alloca _alloca
16033 # else
16034 # ifdef HAVE_ALLOCA_H
16035 # include <alloca.h>
16036 # else
16037 # ifdef _AIX
16038 #pragma alloca
16039 # else
16040 # ifndef alloca /* predefined by HP cc +Olibcalls */
16041 char *alloca ();
16042 # endif
16043 # endif
16044 # endif
16045 # endif
16046 #endif
16049 main ()
16051 char *p = (char *) alloca (1);
16052 if (p) return 0;
16054 return 0;
16056 _ACEOF
16057 if ac_fn_c_try_link "$LINENO"; then :
16058 ac_cv_func_alloca_works=yes
16059 else
16060 ac_cv_func_alloca_works=no
16062 rm -f core conftest.err conftest.$ac_objext \
16063 conftest$ac_exeext conftest.$ac_ext
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16066 $as_echo "$ac_cv_func_alloca_works" >&6; }
16068 if test $ac_cv_func_alloca_works = yes; then
16070 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16072 else
16073 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16074 # that cause trouble. Some versions do not even contain alloca or
16075 # contain a buggy version. If you still want to use their alloca,
16076 # use ar to extract alloca.o from them instead of compiling alloca.c.
16082 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
16084 $as_echo "#define C_ALLOCA 1" >>confdefs.h
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
16088 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
16089 if test "${ac_cv_os_cray+set}" = set; then :
16090 $as_echo_n "(cached) " >&6
16091 else
16092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093 /* end confdefs.h. */
16094 #if defined CRAY && ! defined CRAY2
16095 webecray
16096 #else
16097 wenotbecray
16098 #endif
16100 _ACEOF
16101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16102 $EGREP "webecray" >/dev/null 2>&1; then :
16103 ac_cv_os_cray=yes
16104 else
16105 ac_cv_os_cray=no
16107 rm -f conftest*
16110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16111 $as_echo "$ac_cv_os_cray" >&6; }
16112 if test $ac_cv_os_cray = yes; then
16113 for ac_func in _getb67 GETB67 getb67; do
16114 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16115 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16116 eval as_val=\$$as_ac_var
16117 if test "x$as_val" = x""yes; then :
16119 cat >>confdefs.h <<_ACEOF
16120 #define CRAY_STACKSEG_END $ac_func
16121 _ACEOF
16123 break
16126 done
16129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16130 $as_echo_n "checking stack direction for C alloca... " >&6; }
16131 if test "${ac_cv_c_stack_direction+set}" = set; then :
16132 $as_echo_n "(cached) " >&6
16133 else
16134 if test "$cross_compiling" = yes; then :
16135 ac_cv_c_stack_direction=0
16136 else
16137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16138 /* end confdefs.h. */
16139 $ac_includes_default
16141 find_stack_direction (int *addr, int depth)
16143 int dir, dummy = 0;
16144 if (! addr)
16145 addr = &dummy;
16146 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16147 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16148 return dir + dummy;
16152 main (int argc, char **argv)
16154 return find_stack_direction (0, argc + !argv + 20) < 0;
16156 _ACEOF
16157 if ac_fn_c_try_run "$LINENO"; then :
16158 ac_cv_c_stack_direction=1
16159 else
16160 ac_cv_c_stack_direction=-1
16162 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16163 conftest.$ac_objext conftest.beam conftest.$ac_ext
16167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16168 $as_echo "$ac_cv_c_stack_direction" >&6; }
16169 cat >>confdefs.h <<_ACEOF
16170 #define STACK_DIRECTION $ac_cv_c_stack_direction
16171 _ACEOF
16179 for ac_func in $ac_func_list
16180 do :
16181 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16182 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16183 eval as_val=\$$as_ac_var
16184 if test "x$as_val" = x""yes; then :
16185 cat >>confdefs.h <<_ACEOF
16186 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16187 _ACEOF
16190 done
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16196 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16197 if test "${ac_cv_c_bigendian+set}" = set; then :
16198 $as_echo_n "(cached) " >&6
16199 else
16200 ac_cv_c_bigendian=unknown
16201 # See if we're dealing with a universal compiler.
16202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16203 /* end confdefs.h. */
16204 #ifndef __APPLE_CC__
16205 not a universal capable compiler
16206 #endif
16207 typedef int dummy;
16209 _ACEOF
16210 if ac_fn_c_try_compile "$LINENO"; then :
16212 # Check for potential -arch flags. It is not universal unless
16213 # there are at least two -arch flags with different values.
16214 ac_arch=
16215 ac_prev=
16216 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16217 if test -n "$ac_prev"; then
16218 case $ac_word in
16219 i?86 | x86_64 | ppc | ppc64)
16220 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16221 ac_arch=$ac_word
16222 else
16223 ac_cv_c_bigendian=universal
16224 break
16227 esac
16228 ac_prev=
16229 elif test "x$ac_word" = "x-arch"; then
16230 ac_prev=arch
16232 done
16234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16235 if test $ac_cv_c_bigendian = unknown; then
16236 # See if sys/param.h defines the BYTE_ORDER macro.
16237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238 /* end confdefs.h. */
16239 #include <sys/types.h>
16240 #include <sys/param.h>
16243 main ()
16245 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16246 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16247 && LITTLE_ENDIAN)
16248 bogus endian macros
16249 #endif
16252 return 0;
16254 _ACEOF
16255 if ac_fn_c_try_compile "$LINENO"; then :
16256 # It does; now see whether it defined to BIG_ENDIAN or not.
16257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16258 /* end confdefs.h. */
16259 #include <sys/types.h>
16260 #include <sys/param.h>
16263 main ()
16265 #if BYTE_ORDER != BIG_ENDIAN
16266 not big endian
16267 #endif
16270 return 0;
16272 _ACEOF
16273 if ac_fn_c_try_compile "$LINENO"; then :
16274 ac_cv_c_bigendian=yes
16275 else
16276 ac_cv_c_bigendian=no
16278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16282 if test $ac_cv_c_bigendian = unknown; then
16283 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16285 /* end confdefs.h. */
16286 #include <limits.h>
16289 main ()
16291 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16292 bogus endian macros
16293 #endif
16296 return 0;
16298 _ACEOF
16299 if ac_fn_c_try_compile "$LINENO"; then :
16300 # It does; now see whether it defined to _BIG_ENDIAN or not.
16301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16302 /* end confdefs.h. */
16303 #include <limits.h>
16306 main ()
16308 #ifndef _BIG_ENDIAN
16309 not big endian
16310 #endif
16313 return 0;
16315 _ACEOF
16316 if ac_fn_c_try_compile "$LINENO"; then :
16317 ac_cv_c_bigendian=yes
16318 else
16319 ac_cv_c_bigendian=no
16321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16325 if test $ac_cv_c_bigendian = unknown; then
16326 # Compile a test program.
16327 if test "$cross_compiling" = yes; then :
16328 # Try to guess by grepping values from an object file.
16329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16330 /* end confdefs.h. */
16331 short int ascii_mm[] =
16332 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16333 short int ascii_ii[] =
16334 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16335 int use_ascii (int i) {
16336 return ascii_mm[i] + ascii_ii[i];
16338 short int ebcdic_ii[] =
16339 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16340 short int ebcdic_mm[] =
16341 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16342 int use_ebcdic (int i) {
16343 return ebcdic_mm[i] + ebcdic_ii[i];
16345 extern int foo;
16348 main ()
16350 return use_ascii (foo) == use_ebcdic (foo);
16352 return 0;
16354 _ACEOF
16355 if ac_fn_c_try_compile "$LINENO"; then :
16356 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16357 ac_cv_c_bigendian=yes
16359 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16360 if test "$ac_cv_c_bigendian" = unknown; then
16361 ac_cv_c_bigendian=no
16362 else
16363 # finding both strings is unlikely to happen, but who knows?
16364 ac_cv_c_bigendian=unknown
16368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16369 else
16370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16371 /* end confdefs.h. */
16372 $ac_includes_default
16374 main ()
16377 /* Are we little or big endian? From Harbison&Steele. */
16378 union
16380 long int l;
16381 char c[sizeof (long int)];
16382 } u;
16383 u.l = 1;
16384 return u.c[sizeof (long int) - 1] == 1;
16387 return 0;
16389 _ACEOF
16390 if ac_fn_c_try_run "$LINENO"; then :
16391 ac_cv_c_bigendian=no
16392 else
16393 ac_cv_c_bigendian=yes
16395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16396 conftest.$ac_objext conftest.beam conftest.$ac_ext
16401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16402 $as_echo "$ac_cv_c_bigendian" >&6; }
16403 case $ac_cv_c_bigendian in #(
16404 yes)
16405 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16406 ;; #(
16408 ;; #(
16409 universal)
16411 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16413 ;; #(
16415 as_fn_error "unknown endianness
16416 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16417 esac
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16421 $as_echo_n "checking for inline... " >&6; }
16422 if test "${ac_cv_c_inline+set}" = set; then :
16423 $as_echo_n "(cached) " >&6
16424 else
16425 ac_cv_c_inline=no
16426 for ac_kw in inline __inline__ __inline; do
16427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16428 /* end confdefs.h. */
16429 #ifndef __cplusplus
16430 typedef int foo_t;
16431 static $ac_kw foo_t static_foo () {return 0; }
16432 $ac_kw foo_t foo () {return 0; }
16433 #endif
16435 _ACEOF
16436 if ac_fn_c_try_compile "$LINENO"; then :
16437 ac_cv_c_inline=$ac_kw
16439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16440 test "$ac_cv_c_inline" != no && break
16441 done
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16445 $as_echo "$ac_cv_c_inline" >&6; }
16447 case $ac_cv_c_inline in
16448 inline | yes) ;;
16450 case $ac_cv_c_inline in
16451 no) ac_val=;;
16452 *) ac_val=$ac_cv_c_inline;;
16453 esac
16454 cat >>confdefs.h <<_ACEOF
16455 #ifndef __cplusplus
16456 #define inline $ac_val
16457 #endif
16458 _ACEOF
16460 esac
16463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
16464 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
16465 if test "${gl_cv_func_c99_strtold+set}" = set; then :
16466 $as_echo_n "(cached) " >&6
16467 else
16468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16469 /* end confdefs.h. */
16470 /* On HP-UX before 11.23, strtold returns a struct instead of
16471 long double. Reject implementations like that, by requiring
16472 compatibility with the C99 prototype. */
16473 #include <stdlib.h>
16474 static long double (*p) (char const *, char **) = strtold;
16475 static long double
16476 test (char const *nptr, char **endptr)
16478 long double r;
16479 r = strtold (nptr, endptr);
16480 return r;
16483 main ()
16485 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
16487 return 0;
16489 _ACEOF
16490 if ac_fn_c_try_link "$LINENO"; then :
16491 gl_cv_func_c99_strtold=yes
16492 else
16493 gl_cv_func_c99_strtold=no
16495 rm -f core conftest.err conftest.$ac_objext \
16496 conftest$ac_exeext conftest.$ac_ext
16498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
16499 $as_echo "$gl_cv_func_c99_strtold" >&6; }
16500 if test $gl_cv_func_c99_strtold = yes; then
16502 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
16507 GNULIB_CHDIR=0;
16508 GNULIB_CHOWN=0;
16509 GNULIB_CLOSE=0;
16510 GNULIB_DUP=0;
16511 GNULIB_DUP2=0;
16512 GNULIB_DUP3=0;
16513 GNULIB_ENVIRON=0;
16514 GNULIB_EUIDACCESS=0;
16515 GNULIB_FACCESSAT=0;
16516 GNULIB_FCHDIR=0;
16517 GNULIB_FCHOWNAT=0;
16518 GNULIB_FDATASYNC=0;
16519 GNULIB_FSYNC=0;
16520 GNULIB_FTRUNCATE=0;
16521 GNULIB_GETCWD=0;
16522 GNULIB_GETDOMAINNAME=0;
16523 GNULIB_GETDTABLESIZE=0;
16524 GNULIB_GETGROUPS=0;
16525 GNULIB_GETHOSTNAME=0;
16526 GNULIB_GETLOGIN=0;
16527 GNULIB_GETLOGIN_R=0;
16528 GNULIB_GETPAGESIZE=0;
16529 GNULIB_GETUSERSHELL=0;
16530 GNULIB_GROUP_MEMBER=0;
16531 GNULIB_LCHOWN=0;
16532 GNULIB_LINK=0;
16533 GNULIB_LINKAT=0;
16534 GNULIB_LSEEK=0;
16535 GNULIB_PIPE=0;
16536 GNULIB_PIPE2=0;
16537 GNULIB_PREAD=0;
16538 GNULIB_PWRITE=0;
16539 GNULIB_READ=0;
16540 GNULIB_READLINK=0;
16541 GNULIB_READLINKAT=0;
16542 GNULIB_RMDIR=0;
16543 GNULIB_SLEEP=0;
16544 GNULIB_SYMLINK=0;
16545 GNULIB_SYMLINKAT=0;
16546 GNULIB_TTYNAME_R=0;
16547 GNULIB_UNISTD_H_GETOPT=0;
16548 GNULIB_UNISTD_H_NONBLOCKING=0;
16549 GNULIB_UNISTD_H_SIGPIPE=0;
16550 GNULIB_UNLINK=0;
16551 GNULIB_UNLINKAT=0;
16552 GNULIB_USLEEP=0;
16553 GNULIB_WRITE=0;
16554 HAVE_CHOWN=1;
16555 HAVE_DUP2=1;
16556 HAVE_DUP3=1;
16557 HAVE_EUIDACCESS=1;
16558 HAVE_FACCESSAT=1;
16559 HAVE_FCHDIR=1;
16560 HAVE_FCHOWNAT=1;
16561 HAVE_FDATASYNC=1;
16562 HAVE_FSYNC=1;
16563 HAVE_FTRUNCATE=1;
16564 HAVE_GETDTABLESIZE=1;
16565 HAVE_GETGROUPS=1;
16566 HAVE_GETHOSTNAME=1;
16567 HAVE_GETLOGIN=1;
16568 HAVE_GETPAGESIZE=1;
16569 HAVE_GROUP_MEMBER=1;
16570 HAVE_LCHOWN=1;
16571 HAVE_LINK=1;
16572 HAVE_LINKAT=1;
16573 HAVE_PIPE=1;
16574 HAVE_PIPE2=1;
16575 HAVE_PREAD=1;
16576 HAVE_PWRITE=1;
16577 HAVE_READLINK=1;
16578 HAVE_READLINKAT=1;
16579 HAVE_SLEEP=1;
16580 HAVE_SYMLINK=1;
16581 HAVE_SYMLINKAT=1;
16582 HAVE_UNLINKAT=1;
16583 HAVE_USLEEP=1;
16584 HAVE_DECL_ENVIRON=1;
16585 HAVE_DECL_FCHDIR=1;
16586 HAVE_DECL_FDATASYNC=1;
16587 HAVE_DECL_GETDOMAINNAME=1;
16588 HAVE_DECL_GETLOGIN_R=1;
16589 HAVE_DECL_GETPAGESIZE=1;
16590 HAVE_DECL_GETUSERSHELL=1;
16591 HAVE_DECL_TTYNAME_R=1;
16592 HAVE_OS_H=0;
16593 HAVE_SYS_PARAM_H=0;
16594 REPLACE_CHOWN=0;
16595 REPLACE_CLOSE=0;
16596 REPLACE_DUP=0;
16597 REPLACE_DUP2=0;
16598 REPLACE_FCHOWNAT=0;
16599 REPLACE_GETCWD=0;
16600 REPLACE_GETDOMAINNAME=0;
16601 REPLACE_GETLOGIN_R=0;
16602 REPLACE_GETGROUPS=0;
16603 REPLACE_GETPAGESIZE=0;
16604 REPLACE_LCHOWN=0;
16605 REPLACE_LINK=0;
16606 REPLACE_LINKAT=0;
16607 REPLACE_LSEEK=0;
16608 REPLACE_PREAD=0;
16609 REPLACE_PWRITE=0;
16610 REPLACE_READ=0;
16611 REPLACE_READLINK=0;
16612 REPLACE_RMDIR=0;
16613 REPLACE_SLEEP=0;
16614 REPLACE_SYMLINK=0;
16615 REPLACE_TTYNAME_R=0;
16616 REPLACE_UNLINK=0;
16617 REPLACE_UNLINKAT=0;
16618 REPLACE_USLEEP=0;
16619 REPLACE_WRITE=0;
16620 UNISTD_H_HAVE_WINSOCK2_H=0;
16621 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
16625 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
16626 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
16627 $as_echo_n "(cached) " >&6
16628 else
16629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16630 /* end confdefs.h. */
16632 #include <sys/types.h>
16633 #include <sys/stat.h>
16635 main ()
16637 struct stat s; s.st_dm_mode;
16639 return 0;
16641 _ACEOF
16642 if ac_fn_c_try_compile "$LINENO"; then :
16643 ac_cv_struct_st_dm_mode=yes
16644 else
16645 ac_cv_struct_st_dm_mode=no
16647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
16650 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
16652 if test $ac_cv_struct_st_dm_mode = yes; then
16654 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
16659 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
16660 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
16661 ac_have_decl=1
16662 else
16663 ac_have_decl=0
16666 cat >>confdefs.h <<_ACEOF
16667 #define HAVE_DECL_STRMODE $ac_have_decl
16668 _ACEOF
16671 GNULIB__EXIT=0;
16672 GNULIB_ATOLL=0;
16673 GNULIB_CALLOC_POSIX=0;
16674 GNULIB_CANONICALIZE_FILE_NAME=0;
16675 GNULIB_GETLOADAVG=0;
16676 GNULIB_GETSUBOPT=0;
16677 GNULIB_GRANTPT=0;
16678 GNULIB_MALLOC_POSIX=0;
16679 GNULIB_MBTOWC=0;
16680 GNULIB_MKDTEMP=0;
16681 GNULIB_MKOSTEMP=0;
16682 GNULIB_MKOSTEMPS=0;
16683 GNULIB_MKSTEMP=0;
16684 GNULIB_MKSTEMPS=0;
16685 GNULIB_PTSNAME=0;
16686 GNULIB_PUTENV=0;
16687 GNULIB_RANDOM_R=0;
16688 GNULIB_REALLOC_POSIX=0;
16689 GNULIB_REALPATH=0;
16690 GNULIB_RPMATCH=0;
16691 GNULIB_SETENV=0;
16692 GNULIB_STRTOD=0;
16693 GNULIB_STRTOLL=0;
16694 GNULIB_STRTOULL=0;
16695 GNULIB_SYSTEM_POSIX=0;
16696 GNULIB_UNLOCKPT=0;
16697 GNULIB_UNSETENV=0;
16698 GNULIB_WCTOMB=0;
16699 HAVE__EXIT=1;
16700 HAVE_ATOLL=1;
16701 HAVE_CANONICALIZE_FILE_NAME=1;
16702 HAVE_DECL_GETLOADAVG=1;
16703 HAVE_GETSUBOPT=1;
16704 HAVE_GRANTPT=1;
16705 HAVE_MKDTEMP=1;
16706 HAVE_MKOSTEMP=1;
16707 HAVE_MKOSTEMPS=1;
16708 HAVE_MKSTEMP=1;
16709 HAVE_MKSTEMPS=1;
16710 HAVE_PTSNAME=1;
16711 HAVE_RANDOM_H=1;
16712 HAVE_RANDOM_R=1;
16713 HAVE_REALPATH=1;
16714 HAVE_RPMATCH=1;
16715 HAVE_SETENV=1;
16716 HAVE_DECL_SETENV=1;
16717 HAVE_STRTOD=1;
16718 HAVE_STRTOLL=1;
16719 HAVE_STRTOULL=1;
16720 HAVE_STRUCT_RANDOM_DATA=1;
16721 HAVE_SYS_LOADAVG_H=0;
16722 HAVE_UNLOCKPT=1;
16723 HAVE_DECL_UNSETENV=1;
16724 REPLACE_CALLOC=0;
16725 REPLACE_CANONICALIZE_FILE_NAME=0;
16726 REPLACE_MALLOC=0;
16727 REPLACE_MBTOWC=0;
16728 REPLACE_MKSTEMP=0;
16729 REPLACE_PUTENV=0;
16730 REPLACE_REALLOC=0;
16731 REPLACE_REALPATH=0;
16732 REPLACE_SETENV=0;
16733 REPLACE_STRTOD=0;
16734 REPLACE_UNSETENV=0;
16735 REPLACE_WCTOMB=0;
16739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16740 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
16741 if test "${gl_cv_have_include_next+set}" = set; then :
16742 $as_echo_n "(cached) " >&6
16743 else
16744 rm -rf conftestd1a conftestd1b conftestd2
16745 mkdir conftestd1a conftestd1b conftestd2
16746 cat <<EOF > conftestd1a/conftest.h
16747 #define DEFINED_IN_CONFTESTD1
16748 #include_next <conftest.h>
16749 #ifdef DEFINED_IN_CONFTESTD2
16750 int foo;
16751 #else
16752 #error "include_next doesn't work"
16753 #endif
16755 cat <<EOF > conftestd1b/conftest.h
16756 #define DEFINED_IN_CONFTESTD1
16757 #include <stdio.h>
16758 #include_next <conftest.h>
16759 #ifdef DEFINED_IN_CONFTESTD2
16760 int foo;
16761 #else
16762 #error "include_next doesn't work"
16763 #endif
16765 cat <<EOF > conftestd2/conftest.h
16766 #ifndef DEFINED_IN_CONFTESTD1
16767 #error "include_next test doesn't work"
16768 #endif
16769 #define DEFINED_IN_CONFTESTD2
16771 gl_save_CPPFLAGS="$CPPFLAGS"
16772 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
16773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774 /* end confdefs.h. */
16775 #include <conftest.h>
16776 _ACEOF
16777 if ac_fn_c_try_compile "$LINENO"; then :
16778 gl_cv_have_include_next=yes
16779 else
16780 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
16781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16782 /* end confdefs.h. */
16783 #include <conftest.h>
16784 _ACEOF
16785 if ac_fn_c_try_compile "$LINENO"; then :
16786 gl_cv_have_include_next=buggy
16787 else
16788 gl_cv_have_include_next=no
16790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16794 CPPFLAGS="$gl_save_CPPFLAGS"
16795 rm -rf conftestd1a conftestd1b conftestd2
16798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
16799 $as_echo "$gl_cv_have_include_next" >&6; }
16800 PRAGMA_SYSTEM_HEADER=
16801 if test $gl_cv_have_include_next = yes; then
16802 INCLUDE_NEXT=include_next
16803 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16804 if test -n "$GCC"; then
16805 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
16807 else
16808 if test $gl_cv_have_include_next = buggy; then
16809 INCLUDE_NEXT=include
16810 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16811 else
16812 INCLUDE_NEXT=include
16813 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
16820 $as_echo_n "checking whether system header files limit the line length... " >&6; }
16821 if test "${gl_cv_pragma_columns+set}" = set; then :
16822 $as_echo_n "(cached) " >&6
16823 else
16824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16825 /* end confdefs.h. */
16827 #ifdef __TANDEM
16828 choke me
16829 #endif
16831 _ACEOF
16832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16833 $EGREP "choke me" >/dev/null 2>&1; then :
16834 gl_cv_pragma_columns=yes
16835 else
16836 gl_cv_pragma_columns=no
16838 rm -f conftest*
16842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
16843 $as_echo "$gl_cv_pragma_columns" >&6; }
16844 if test $gl_cv_pragma_columns = yes; then
16845 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
16846 else
16847 PRAGMA_COLUMNS=
16866 if test $gl_cv_have_include_next = yes; then
16867 gl_cv_next_getopt_h='<'getopt.h'>'
16868 else
16869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
16870 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
16871 if test "${gl_cv_next_getopt_h+set}" = set; then :
16872 $as_echo_n "(cached) " >&6
16873 else
16875 if test $ac_cv_header_getopt_h = yes; then
16878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16879 /* end confdefs.h. */
16880 #include <getopt.h>
16882 _ACEOF
16883 case "$host_os" in
16884 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16885 *) gl_absname_cpp="$ac_cpp" ;;
16886 esac
16888 case "$host_os" in
16889 mingw*)
16890 gl_dirsep_regex='[/\\]'
16893 gl_dirsep_regex='/'
16895 esac
16897 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'getopt.h|{
16898 s|.*"\(.*'"${gl_dirsep_regex}"'getopt.h\)".*|\1|
16899 s|^/[^/]|//&|
16903 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16904 sed -n "$gl_absolute_header_sed"`'"'
16905 else
16906 gl_cv_next_getopt_h='<'getopt.h'>'
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
16912 $as_echo "$gl_cv_next_getopt_h" >&6; }
16914 NEXT_GETOPT_H=$gl_cv_next_getopt_h
16916 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16917 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16918 gl_next_as_first_directive='<'getopt.h'>'
16919 else
16920 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16921 gl_next_as_first_directive=$gl_cv_next_getopt_h
16923 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
16928 if test $ac_cv_header_getopt_h = yes; then
16929 HAVE_GETOPT_H=1
16930 else
16931 HAVE_GETOPT_H=0
16935 gl_replace_getopt=
16937 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16938 for ac_header in getopt.h
16939 do :
16940 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
16941 if test "x$ac_cv_header_getopt_h" = x""yes; then :
16942 cat >>confdefs.h <<_ACEOF
16943 #define HAVE_GETOPT_H 1
16944 _ACEOF
16946 else
16947 gl_replace_getopt=yes
16950 done
16954 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16955 for ac_func in getopt_long_only
16956 do :
16957 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
16958 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
16959 cat >>confdefs.h <<_ACEOF
16960 #define HAVE_GETOPT_LONG_ONLY 1
16961 _ACEOF
16963 else
16964 gl_replace_getopt=yes
16966 done
16970 if test -z "$gl_replace_getopt"; then
16971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
16972 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
16973 if test "${gl_cv_func_getopt_posix+set}" = set; then :
16974 $as_echo_n "(cached) " >&6
16975 else
16977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16978 /* end confdefs.h. */
16979 #include <unistd.h>
16981 main ()
16983 int *p = &optreset; return optreset;
16985 return 0;
16987 _ACEOF
16988 if ac_fn_c_try_link "$LINENO"; then :
16989 gl_optind_min=1
16990 else
16991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16992 /* end confdefs.h. */
16993 #include <getopt.h>
16995 main ()
16997 return !getopt_clip;
16999 return 0;
17001 _ACEOF
17002 if ac_fn_c_try_compile "$LINENO"; then :
17003 gl_optind_min=1
17004 else
17005 gl_optind_min=0
17007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17009 rm -f core conftest.err conftest.$ac_objext \
17010 conftest$ac_exeext conftest.$ac_ext
17012 gl_save_CPPFLAGS=$CPPFLAGS
17013 CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
17014 if test "$cross_compiling" = yes; then :
17015 case "$host_os" in
17016 mingw*) gl_cv_func_getopt_posix="guessing no";;
17017 darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
17018 *) gl_cv_func_getopt_posix="guessing yes";;
17019 esac
17021 else
17022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17023 /* end confdefs.h. */
17025 #include <unistd.h>
17026 #include <stdlib.h>
17027 #include <string.h>
17030 main ()
17033 static char program[] = "program";
17034 static char a[] = "-a";
17035 static char foo[] = "foo";
17036 static char bar[] = "bar";
17037 char *argv[] = { program, a, foo, bar, NULL };
17038 int c;
17040 optind = OPTIND_MIN;
17041 opterr = 0;
17043 c = getopt (4, argv, "ab");
17044 if (!(c == 'a'))
17045 return 1;
17046 c = getopt (4, argv, "ab");
17047 if (!(c == -1))
17048 return 2;
17049 if (!(optind == 2))
17050 return 3;
17052 /* Some internal state exists at this point. */
17054 static char program[] = "program";
17055 static char donald[] = "donald";
17056 static char p[] = "-p";
17057 static char billy[] = "billy";
17058 static char duck[] = "duck";
17059 static char a[] = "-a";
17060 static char bar[] = "bar";
17061 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
17062 int c;
17064 optind = OPTIND_MIN;
17065 opterr = 0;
17067 c = getopt (7, argv, "+abp:q:");
17068 if (!(c == -1))
17069 return 4;
17070 if (!(strcmp (argv[0], "program") == 0))
17071 return 5;
17072 if (!(strcmp (argv[1], "donald") == 0))
17073 return 6;
17074 if (!(strcmp (argv[2], "-p") == 0))
17075 return 7;
17076 if (!(strcmp (argv[3], "billy") == 0))
17077 return 8;
17078 if (!(strcmp (argv[4], "duck") == 0))
17079 return 9;
17080 if (!(strcmp (argv[5], "-a") == 0))
17081 return 10;
17082 if (!(strcmp (argv[6], "bar") == 0))
17083 return 11;
17084 if (!(optind == 1))
17085 return 12;
17087 /* Detect MacOS 10.5, AIX 7.1 bug. */
17089 static char program[] = "program";
17090 static char ab[] = "-ab";
17091 char *argv[3] = { program, ab, NULL };
17092 optind = OPTIND_MIN;
17093 opterr = 0;
17094 if (getopt (2, argv, "ab:") != 'a')
17095 return 13;
17096 if (getopt (2, argv, "ab:") != '?')
17097 return 14;
17098 if (optopt != 'b')
17099 return 15;
17100 if (optind != 2)
17101 return 16;
17104 return 0;
17107 _ACEOF
17108 if ac_fn_c_try_run "$LINENO"; then :
17109 gl_cv_func_getopt_posix=yes
17110 else
17111 gl_cv_func_getopt_posix=no
17113 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17114 conftest.$ac_objext conftest.beam conftest.$ac_ext
17117 CPPFLAGS=$gl_save_CPPFLAGS
17120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17121 $as_echo "$gl_cv_func_getopt_posix" >&6; }
17122 case "$gl_cv_func_getopt_posix" in
17123 *no) gl_replace_getopt=yes ;;
17124 esac
17127 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17129 $as_echo_n "checking for working GNU getopt function... " >&6; }
17130 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17131 $as_echo_n "(cached) " >&6
17132 else
17133 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17134 # optstring is necessary for programs like m4 that have POSIX-mandated
17135 # semantics for supporting options interspersed with files.
17136 # Also, since getopt_long is a GNU extension, we require optind=0.
17137 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17138 # so take care to revert to the correct (non-)export state.
17139 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17140 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17141 xx) gl_had_POSIXLY_CORRECT=exported ;;
17142 x) gl_had_POSIXLY_CORRECT=yes ;;
17143 *) gl_had_POSIXLY_CORRECT= ;;
17144 esac
17145 POSIXLY_CORRECT=1
17146 export POSIXLY_CORRECT
17147 if test "$cross_compiling" = yes; then :
17148 case $host_os:$ac_cv_have_decl_optreset in
17149 *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
17150 *:yes) gl_cv_func_getopt_gnu=no;;
17151 *) gl_cv_func_getopt_gnu=yes;;
17152 esac
17154 else
17155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17156 /* end confdefs.h. */
17157 #include <getopt.h>
17158 #include <stddef.h>
17159 #include <string.h>
17161 #include <stdlib.h>
17162 #if defined __MACH__ && defined __APPLE__
17163 /* Avoid a crash on MacOS X. */
17164 #include <mach/mach.h>
17165 #include <mach/mach_error.h>
17166 #include <mach/thread_status.h>
17167 #include <mach/exception.h>
17168 #include <mach/task.h>
17169 #include <pthread.h>
17170 /* The exception port on which our thread listens. */
17171 static mach_port_t our_exception_port;
17172 /* The main function of the thread listening for exceptions of type
17173 EXC_BAD_ACCESS. */
17174 static void *
17175 mach_exception_thread (void *arg)
17177 /* Buffer for a message to be received. */
17178 struct {
17179 mach_msg_header_t head;
17180 mach_msg_body_t msgh_body;
17181 char data[1024];
17182 } msg;
17183 mach_msg_return_t retval;
17184 /* Wait for a message on the exception port. */
17185 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17186 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17187 if (retval != MACH_MSG_SUCCESS)
17188 abort ();
17189 exit (1);
17191 static void
17192 nocrash_init (void)
17194 mach_port_t self = mach_task_self ();
17195 /* Allocate a port on which the thread shall listen for exceptions. */
17196 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17197 == KERN_SUCCESS) {
17198 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17199 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17200 MACH_MSG_TYPE_MAKE_SEND)
17201 == KERN_SUCCESS) {
17202 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17203 for us. */
17204 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17205 /* Create the thread listening on the exception port. */
17206 pthread_attr_t attr;
17207 pthread_t thread;
17208 if (pthread_attr_init (&attr) == 0
17209 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17210 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17211 pthread_attr_destroy (&attr);
17212 /* Replace the exception port info for these exceptions with our own.
17213 Note that we replace the exception port for the entire task, not only
17214 for a particular thread. This has the effect that when our exception
17215 port gets the message, the thread specific exception port has already
17216 been asked, and we don't need to bother about it.
17217 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17218 task_set_exception_ports (self, mask, our_exception_port,
17219 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17224 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17225 /* Avoid a crash on native Windows. */
17226 #define WIN32_LEAN_AND_MEAN
17227 #include <windows.h>
17228 #include <winerror.h>
17229 static LONG WINAPI
17230 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17232 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17234 case EXCEPTION_ACCESS_VIOLATION:
17235 case EXCEPTION_IN_PAGE_ERROR:
17236 case EXCEPTION_STACK_OVERFLOW:
17237 case EXCEPTION_GUARD_PAGE:
17238 case EXCEPTION_PRIV_INSTRUCTION:
17239 case EXCEPTION_ILLEGAL_INSTRUCTION:
17240 case EXCEPTION_DATATYPE_MISALIGNMENT:
17241 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17242 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17243 exit (1);
17245 return EXCEPTION_CONTINUE_SEARCH;
17247 static void
17248 nocrash_init (void)
17250 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17252 #else
17253 /* Avoid a crash on POSIX systems. */
17254 #include <signal.h>
17255 /* A POSIX signal handler. */
17256 static void
17257 exception_handler (int sig)
17259 exit (1);
17261 static void
17262 nocrash_init (void)
17264 #ifdef SIGSEGV
17265 signal (SIGSEGV, exception_handler);
17266 #endif
17267 #ifdef SIGBUS
17268 signal (SIGBUS, exception_handler);
17269 #endif
17271 #endif
17275 main ()
17278 int result = 0;
17280 nocrash_init();
17282 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17283 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17284 OSF/1 5.1, Solaris 10. */
17286 static char conftest[] = "conftest";
17287 static char plus[] = "-+";
17288 char *argv[3] = { conftest, plus, NULL };
17289 opterr = 0;
17290 if (getopt (2, argv, "+a") != '?')
17291 result |= 1;
17293 /* This code succeeds on glibc 2.8, mingw,
17294 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17295 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17297 static char program[] = "program";
17298 static char p[] = "-p";
17299 static char foo[] = "foo";
17300 static char bar[] = "bar";
17301 char *argv[] = { program, p, foo, bar, NULL };
17303 optind = 1;
17304 if (getopt (4, argv, "p::") != 'p')
17305 result |= 2;
17306 else if (optarg != NULL)
17307 result |= 4;
17308 else if (getopt (4, argv, "p::") != -1)
17309 result |= 6;
17310 else if (optind != 2)
17311 result |= 8;
17313 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17315 static char program[] = "program";
17316 static char foo[] = "foo";
17317 static char p[] = "-p";
17318 char *argv[] = { program, foo, p, NULL };
17319 optind = 0;
17320 if (getopt (3, argv, "-p") != 1)
17321 result |= 16;
17322 else if (getopt (3, argv, "-p") != 'p')
17323 result |= 32;
17325 /* This code fails on glibc 2.11. */
17327 static char program[] = "program";
17328 static char b[] = "-b";
17329 static char a[] = "-a";
17330 char *argv[] = { program, b, a, NULL };
17331 optind = opterr = 0;
17332 if (getopt (3, argv, "+:a:b") != 'b')
17333 result |= 64;
17334 else if (getopt (3, argv, "+:a:b") != ':')
17335 result |= 64;
17337 /* This code dumps core on glibc 2.14. */
17339 static char program[] = "program";
17340 static char w[] = "-W";
17341 static char dummy[] = "dummy";
17342 char *argv[] = { program, w, dummy, NULL };
17343 optind = opterr = 1;
17344 if (getopt (3, argv, "W;") != 'W')
17345 result |= 128;
17347 return result;
17350 return 0;
17352 _ACEOF
17353 if ac_fn_c_try_run "$LINENO"; then :
17354 gl_cv_func_getopt_gnu=yes
17355 else
17356 gl_cv_func_getopt_gnu=no
17358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17359 conftest.$ac_objext conftest.beam conftest.$ac_ext
17362 case $gl_had_POSIXLY_CORRECT in
17363 exported) ;;
17364 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17365 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17366 esac
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17370 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
17371 if test "$gl_cv_func_getopt_gnu" = "no"; then
17372 gl_replace_getopt=yes
17380 REPLACE_GETOPT=0
17383 if test -n "$gl_replace_getopt"; then :
17385 REPLACE_GETOPT=1
17390 if test $REPLACE_GETOPT = 1; then
17392 GETOPT_H=getopt.h
17394 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
17398 GNULIB_UNISTD_H_GETOPT=1
17401 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
17402 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
17403 ac_have_decl=1
17404 else
17405 ac_have_decl=0
17408 cat >>confdefs.h <<_ACEOF
17409 #define HAVE_DECL_GETENV $ac_have_decl
17410 _ACEOF
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17414 $as_echo_n "checking for unsigned long long int... " >&6; }
17415 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
17416 $as_echo_n "(cached) " >&6
17417 else
17418 ac_cv_type_unsigned_long_long_int=yes
17419 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17421 /* end confdefs.h. */
17423 /* For now, do not test the preprocessor; as of 2007 there are too many
17424 implementations with broken preprocessors. Perhaps this can
17425 be revisited in 2012. In the meantime, code should not expect
17426 #if to work with literals wider than 32 bits. */
17427 /* Test literals. */
17428 long long int ll = 9223372036854775807ll;
17429 long long int nll = -9223372036854775807LL;
17430 unsigned long long int ull = 18446744073709551615ULL;
17431 /* Test constant expressions. */
17432 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17433 ? 1 : -1)];
17434 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17435 ? 1 : -1)];
17436 int i = 63;
17438 main ()
17440 /* Test availability of runtime routines for shift and division. */
17441 long long int llmax = 9223372036854775807ll;
17442 unsigned long long int ullmax = 18446744073709551615ull;
17443 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17444 | (llmax / ll) | (llmax % ll)
17445 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17446 | (ullmax / ull) | (ullmax % ull));
17448 return 0;
17451 _ACEOF
17452 if ac_fn_c_try_link "$LINENO"; then :
17454 else
17455 ac_cv_type_unsigned_long_long_int=no
17457 rm -f core conftest.err conftest.$ac_objext \
17458 conftest$ac_exeext conftest.$ac_ext
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17462 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17463 if test $ac_cv_type_unsigned_long_long_int = yes; then
17465 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17472 $as_echo_n "checking for long long int... " >&6; }
17473 if test "${ac_cv_type_long_long_int+set}" = set; then :
17474 $as_echo_n "(cached) " >&6
17475 else
17476 ac_cv_type_long_long_int=yes
17477 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17478 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17479 if test $ac_cv_type_long_long_int = yes; then
17480 if test "$cross_compiling" = yes; then :
17482 else
17483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17484 /* end confdefs.h. */
17485 #include <limits.h>
17486 #ifndef LLONG_MAX
17487 # define HALF \
17488 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17489 # define LLONG_MAX (HALF - 1 + HALF)
17490 #endif
17492 main ()
17494 long long int n = 1;
17495 int i;
17496 for (i = 0; ; i++)
17498 long long int m = n << i;
17499 if (m >> i != n)
17500 return 1;
17501 if (LLONG_MAX / 2 < m)
17502 break;
17504 return 0;
17506 return 0;
17508 _ACEOF
17509 if ac_fn_c_try_run "$LINENO"; then :
17511 else
17512 ac_cv_type_long_long_int=no
17514 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17515 conftest.$ac_objext conftest.beam conftest.$ac_ext
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17522 $as_echo "$ac_cv_type_long_long_int" >&6; }
17523 if test $ac_cv_type_long_long_int = yes; then
17525 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
17534 gl_cv_c_multiarch=no
17535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17536 /* end confdefs.h. */
17537 #ifndef __APPLE_CC__
17538 not a universal capable compiler
17539 #endif
17540 typedef int dummy;
17542 _ACEOF
17543 if ac_fn_c_try_compile "$LINENO"; then :
17545 arch=
17546 prev=
17547 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17548 if test -n "$prev"; then
17549 case $word in
17550 i?86 | x86_64 | ppc | ppc64)
17551 if test -z "$arch" || test "$arch" = "$word"; then
17552 arch="$word"
17553 else
17554 gl_cv_c_multiarch=yes
17557 esac
17558 prev=
17559 else
17560 if test "x$word" = "x-arch"; then
17561 prev=arch
17564 done
17567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17568 if test $gl_cv_c_multiarch = yes; then
17569 APPLE_UNIVERSAL_BUILD=1
17570 else
17571 APPLE_UNIVERSAL_BUILD=0
17578 if test $ac_cv_type_long_long_int = yes; then
17579 HAVE_LONG_LONG_INT=1
17580 else
17581 HAVE_LONG_LONG_INT=0
17585 if test $ac_cv_type_unsigned_long_long_int = yes; then
17586 HAVE_UNSIGNED_LONG_LONG_INT=1
17587 else
17588 HAVE_UNSIGNED_LONG_LONG_INT=0
17593 if test $ac_cv_header_wchar_h = yes; then
17594 HAVE_WCHAR_H=1
17595 else
17596 HAVE_WCHAR_H=0
17600 if test $ac_cv_header_inttypes_h = yes; then
17601 HAVE_INTTYPES_H=1
17602 else
17603 HAVE_INTTYPES_H=0
17607 if test $ac_cv_header_sys_types_h = yes; then
17608 HAVE_SYS_TYPES_H=1
17609 else
17610 HAVE_SYS_TYPES_H=0
17623 if test $gl_cv_have_include_next = yes; then
17624 gl_cv_next_stdint_h='<'stdint.h'>'
17625 else
17626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17627 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
17628 if test "${gl_cv_next_stdint_h+set}" = set; then :
17629 $as_echo_n "(cached) " >&6
17630 else
17632 if test $ac_cv_header_stdint_h = yes; then
17635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17636 /* end confdefs.h. */
17637 #include <stdint.h>
17639 _ACEOF
17640 case "$host_os" in
17641 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17642 *) gl_absname_cpp="$ac_cpp" ;;
17643 esac
17645 case "$host_os" in
17646 mingw*)
17647 gl_dirsep_regex='[/\\]'
17650 gl_dirsep_regex='/'
17652 esac
17654 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdint.h|{
17655 s|.*"\(.*'"${gl_dirsep_regex}"'stdint.h\)".*|\1|
17656 s|^/[^/]|//&|
17660 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17661 sed -n "$gl_absolute_header_sed"`'"'
17662 else
17663 gl_cv_next_stdint_h='<'stdint.h'>'
17668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17669 $as_echo "$gl_cv_next_stdint_h" >&6; }
17671 NEXT_STDINT_H=$gl_cv_next_stdint_h
17673 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17674 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17675 gl_next_as_first_directive='<'stdint.h'>'
17676 else
17677 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17678 gl_next_as_first_directive=$gl_cv_next_stdint_h
17680 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17685 if test $ac_cv_header_stdint_h = yes; then
17686 HAVE_STDINT_H=1
17687 else
17688 HAVE_STDINT_H=0
17692 if test $ac_cv_header_stdint_h = yes; then
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17694 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
17695 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
17696 $as_echo_n "(cached) " >&6
17697 else
17698 gl_cv_header_working_stdint_h=no
17699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17700 /* end confdefs.h. */
17703 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
17704 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
17705 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17706 #include <stdint.h>
17707 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17708 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
17709 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17710 #endif
17713 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17714 included before <wchar.h>. */
17715 #include <stddef.h>
17716 #include <signal.h>
17717 #if HAVE_WCHAR_H
17718 # include <stdio.h>
17719 # include <time.h>
17720 # include <wchar.h>
17721 #endif
17724 #ifdef INT8_MAX
17725 int8_t a1 = INT8_MAX;
17726 int8_t a1min = INT8_MIN;
17727 #endif
17728 #ifdef INT16_MAX
17729 int16_t a2 = INT16_MAX;
17730 int16_t a2min = INT16_MIN;
17731 #endif
17732 #ifdef INT32_MAX
17733 int32_t a3 = INT32_MAX;
17734 int32_t a3min = INT32_MIN;
17735 #endif
17736 #ifdef INT64_MAX
17737 int64_t a4 = INT64_MAX;
17738 int64_t a4min = INT64_MIN;
17739 #endif
17740 #ifdef UINT8_MAX
17741 uint8_t b1 = UINT8_MAX;
17742 #else
17743 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17744 #endif
17745 #ifdef UINT16_MAX
17746 uint16_t b2 = UINT16_MAX;
17747 #endif
17748 #ifdef UINT32_MAX
17749 uint32_t b3 = UINT32_MAX;
17750 #endif
17751 #ifdef UINT64_MAX
17752 uint64_t b4 = UINT64_MAX;
17753 #endif
17754 int_least8_t c1 = INT8_C (0x7f);
17755 int_least8_t c1max = INT_LEAST8_MAX;
17756 int_least8_t c1min = INT_LEAST8_MIN;
17757 int_least16_t c2 = INT16_C (0x7fff);
17758 int_least16_t c2max = INT_LEAST16_MAX;
17759 int_least16_t c2min = INT_LEAST16_MIN;
17760 int_least32_t c3 = INT32_C (0x7fffffff);
17761 int_least32_t c3max = INT_LEAST32_MAX;
17762 int_least32_t c3min = INT_LEAST32_MIN;
17763 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17764 int_least64_t c4max = INT_LEAST64_MAX;
17765 int_least64_t c4min = INT_LEAST64_MIN;
17766 uint_least8_t d1 = UINT8_C (0xff);
17767 uint_least8_t d1max = UINT_LEAST8_MAX;
17768 uint_least16_t d2 = UINT16_C (0xffff);
17769 uint_least16_t d2max = UINT_LEAST16_MAX;
17770 uint_least32_t d3 = UINT32_C (0xffffffff);
17771 uint_least32_t d3max = UINT_LEAST32_MAX;
17772 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17773 uint_least64_t d4max = UINT_LEAST64_MAX;
17774 int_fast8_t e1 = INT_FAST8_MAX;
17775 int_fast8_t e1min = INT_FAST8_MIN;
17776 int_fast16_t e2 = INT_FAST16_MAX;
17777 int_fast16_t e2min = INT_FAST16_MIN;
17778 int_fast32_t e3 = INT_FAST32_MAX;
17779 int_fast32_t e3min = INT_FAST32_MIN;
17780 int_fast64_t e4 = INT_FAST64_MAX;
17781 int_fast64_t e4min = INT_FAST64_MIN;
17782 uint_fast8_t f1 = UINT_FAST8_MAX;
17783 uint_fast16_t f2 = UINT_FAST16_MAX;
17784 uint_fast32_t f3 = UINT_FAST32_MAX;
17785 uint_fast64_t f4 = UINT_FAST64_MAX;
17786 #ifdef INTPTR_MAX
17787 intptr_t g = INTPTR_MAX;
17788 intptr_t gmin = INTPTR_MIN;
17789 #endif
17790 #ifdef UINTPTR_MAX
17791 uintptr_t h = UINTPTR_MAX;
17792 #endif
17793 intmax_t i = INTMAX_MAX;
17794 uintmax_t j = UINTMAX_MAX;
17796 #include <limits.h> /* for CHAR_BIT */
17797 #define TYPE_MINIMUM(t) \
17798 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17799 #define TYPE_MAXIMUM(t) \
17800 ((t) ((t) 0 < (t) -1 \
17801 ? (t) -1 \
17802 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17803 struct s {
17804 int check_PTRDIFF:
17805 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17806 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17807 ? 1 : -1;
17808 /* Detect bug in FreeBSD 6.0 / ia64. */
17809 int check_SIG_ATOMIC:
17810 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17811 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17812 ? 1 : -1;
17813 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17814 int check_WCHAR:
17815 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17816 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17817 ? 1 : -1;
17818 /* Detect bug in mingw. */
17819 int check_WINT:
17820 WINT_MIN == TYPE_MINIMUM (wint_t)
17821 && WINT_MAX == TYPE_MAXIMUM (wint_t)
17822 ? 1 : -1;
17824 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
17825 int check_UINT8_C:
17826 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17827 int check_UINT16_C:
17828 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17830 /* Detect bugs in OpenBSD 3.9 stdint.h. */
17831 #ifdef UINT8_MAX
17832 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17833 #endif
17834 #ifdef UINT16_MAX
17835 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17836 #endif
17837 #ifdef UINT32_MAX
17838 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17839 #endif
17840 #ifdef UINT64_MAX
17841 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17842 #endif
17843 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17844 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17845 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17846 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17847 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17848 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17849 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17850 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17851 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17852 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17853 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17857 main ()
17861 return 0;
17863 _ACEOF
17864 if ac_fn_c_try_compile "$LINENO"; then :
17865 if test "$cross_compiling" = yes; then :
17866 gl_cv_header_working_stdint_h=yes
17868 else
17869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17870 /* end confdefs.h. */
17873 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
17874 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
17875 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17876 #include <stdint.h>
17879 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17880 included before <wchar.h>. */
17881 #include <stddef.h>
17882 #include <signal.h>
17883 #if HAVE_WCHAR_H
17884 # include <stdio.h>
17885 # include <time.h>
17886 # include <wchar.h>
17887 #endif
17890 #include <stdio.h>
17891 #include <string.h>
17892 #define MVAL(macro) MVAL1(macro)
17893 #define MVAL1(expression) #expression
17894 static const char *macro_values[] =
17896 #ifdef INT8_MAX
17897 MVAL (INT8_MAX),
17898 #endif
17899 #ifdef INT16_MAX
17900 MVAL (INT16_MAX),
17901 #endif
17902 #ifdef INT32_MAX
17903 MVAL (INT32_MAX),
17904 #endif
17905 #ifdef INT64_MAX
17906 MVAL (INT64_MAX),
17907 #endif
17908 #ifdef UINT8_MAX
17909 MVAL (UINT8_MAX),
17910 #endif
17911 #ifdef UINT16_MAX
17912 MVAL (UINT16_MAX),
17913 #endif
17914 #ifdef UINT32_MAX
17915 MVAL (UINT32_MAX),
17916 #endif
17917 #ifdef UINT64_MAX
17918 MVAL (UINT64_MAX),
17919 #endif
17920 NULL
17924 main ()
17927 const char **mv;
17928 for (mv = macro_values; *mv != NULL; mv++)
17930 const char *value = *mv;
17931 /* Test whether it looks like a cast expression. */
17932 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17933 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17934 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17935 || strncmp (value, "((int)"/*)*/, 6) == 0
17936 || strncmp (value, "((signed short)"/*)*/, 15) == 0
17937 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17938 return mv - macro_values + 1;
17940 return 0;
17943 return 0;
17945 _ACEOF
17946 if ac_fn_c_try_run "$LINENO"; then :
17947 gl_cv_header_working_stdint_h=yes
17949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17950 conftest.$ac_objext conftest.beam conftest.$ac_ext
17955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17959 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
17961 if test "$gl_cv_header_working_stdint_h" = yes; then
17962 STDINT_H=
17963 else
17964 for ac_header in sys/inttypes.h sys/bitypes.h
17965 do :
17966 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17967 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17968 eval as_val=\$$as_ac_Header
17969 if test "x$as_val" = x""yes; then :
17970 cat >>confdefs.h <<_ACEOF
17971 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17972 _ACEOF
17976 done
17978 if test $ac_cv_header_sys_inttypes_h = yes; then
17979 HAVE_SYS_INTTYPES_H=1
17980 else
17981 HAVE_SYS_INTTYPES_H=0
17984 if test $ac_cv_header_sys_bitypes_h = yes; then
17985 HAVE_SYS_BITYPES_H=1
17986 else
17987 HAVE_SYS_BITYPES_H=0
17993 if test $APPLE_UNIVERSAL_BUILD = 0; then
17996 for gltype in ptrdiff_t size_t ; do
17997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17998 $as_echo_n "checking for bit size of $gltype... " >&6; }
17999 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18000 $as_echo_n "(cached) " >&6
18001 else
18002 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18003 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18004 included before <wchar.h>. */
18005 #include <stddef.h>
18006 #include <signal.h>
18007 #if HAVE_WCHAR_H
18008 # include <stdio.h>
18009 # include <time.h>
18010 # include <wchar.h>
18011 #endif
18013 #include <limits.h>"; then :
18015 else
18016 result=unknown
18019 eval gl_cv_bitsizeof_${gltype}=\$result
18022 eval ac_res=\$gl_cv_bitsizeof_${gltype}
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18024 $as_echo "$ac_res" >&6; }
18025 eval result=\$gl_cv_bitsizeof_${gltype}
18026 if test $result = unknown; then
18027 result=0
18029 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18030 cat >>confdefs.h <<_ACEOF
18031 #define BITSIZEOF_${GLTYPE} $result
18032 _ACEOF
18034 eval BITSIZEOF_${GLTYPE}=\$result
18035 done
18041 for gltype in sig_atomic_t wchar_t wint_t ; do
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18043 $as_echo_n "checking for bit size of $gltype... " >&6; }
18044 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18045 $as_echo_n "(cached) " >&6
18046 else
18047 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18048 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18049 included before <wchar.h>. */
18050 #include <stddef.h>
18051 #include <signal.h>
18052 #if HAVE_WCHAR_H
18053 # include <stdio.h>
18054 # include <time.h>
18055 # include <wchar.h>
18056 #endif
18058 #include <limits.h>"; then :
18060 else
18061 result=unknown
18064 eval gl_cv_bitsizeof_${gltype}=\$result
18067 eval ac_res=\$gl_cv_bitsizeof_${gltype}
18068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18069 $as_echo "$ac_res" >&6; }
18070 eval result=\$gl_cv_bitsizeof_${gltype}
18071 if test $result = unknown; then
18072 result=0
18074 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18075 cat >>confdefs.h <<_ACEOF
18076 #define BITSIZEOF_${GLTYPE} $result
18077 _ACEOF
18079 eval BITSIZEOF_${GLTYPE}=\$result
18080 done
18085 for gltype in sig_atomic_t wchar_t wint_t ; do
18086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18087 $as_echo_n "checking whether $gltype is signed... " >&6; }
18088 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
18089 $as_echo_n "(cached) " >&6
18090 else
18091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18092 /* end confdefs.h. */
18094 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18095 included before <wchar.h>. */
18096 #include <stddef.h>
18097 #include <signal.h>
18098 #if HAVE_WCHAR_H
18099 # include <stdio.h>
18100 # include <time.h>
18101 # include <wchar.h>
18102 #endif
18104 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
18106 main ()
18110 return 0;
18112 _ACEOF
18113 if ac_fn_c_try_compile "$LINENO"; then :
18114 result=yes
18115 else
18116 result=no
18118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18119 eval gl_cv_type_${gltype}_signed=\$result
18122 eval ac_res=\$gl_cv_type_${gltype}_signed
18123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18124 $as_echo "$ac_res" >&6; }
18125 eval result=\$gl_cv_type_${gltype}_signed
18126 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18127 if test "$result" = yes; then
18128 cat >>confdefs.h <<_ACEOF
18129 #define HAVE_SIGNED_${GLTYPE} 1
18130 _ACEOF
18132 eval HAVE_SIGNED_${GLTYPE}=1
18133 else
18134 eval HAVE_SIGNED_${GLTYPE}=0
18136 done
18139 gl_cv_type_ptrdiff_t_signed=yes
18140 gl_cv_type_size_t_signed=no
18141 if test $APPLE_UNIVERSAL_BUILD = 0; then
18144 for gltype in ptrdiff_t size_t ; do
18145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18146 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18147 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
18148 $as_echo_n "(cached) " >&6
18149 else
18150 eval gl_cv_type_${gltype}_suffix=no
18151 eval result=\$gl_cv_type_${gltype}_signed
18152 if test "$result" = yes; then
18153 glsufu=
18154 else
18155 glsufu=u
18157 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18158 case $glsuf in
18159 '') gltype1='int';;
18160 l) gltype1='long int';;
18161 ll) gltype1='long long int';;
18162 i64) gltype1='__int64';;
18163 u) gltype1='unsigned int';;
18164 ul) gltype1='unsigned long int';;
18165 ull) gltype1='unsigned long long int';;
18166 ui64)gltype1='unsigned __int64';;
18167 esac
18168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18169 /* end confdefs.h. */
18171 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18172 included before <wchar.h>. */
18173 #include <stddef.h>
18174 #include <signal.h>
18175 #if HAVE_WCHAR_H
18176 # include <stdio.h>
18177 # include <time.h>
18178 # include <wchar.h>
18179 #endif
18181 extern $gltype foo;
18182 extern $gltype1 foo;
18184 main ()
18188 return 0;
18190 _ACEOF
18191 if ac_fn_c_try_compile "$LINENO"; then :
18192 eval gl_cv_type_${gltype}_suffix=\$glsuf
18194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18195 eval result=\$gl_cv_type_${gltype}_suffix
18196 test "$result" != no && break
18197 done
18199 eval ac_res=\$gl_cv_type_${gltype}_suffix
18200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18201 $as_echo "$ac_res" >&6; }
18202 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18203 eval result=\$gl_cv_type_${gltype}_suffix
18204 test "$result" = no && result=
18205 eval ${GLTYPE}_SUFFIX=\$result
18206 cat >>confdefs.h <<_ACEOF
18207 #define ${GLTYPE}_SUFFIX $result
18208 _ACEOF
18210 done
18216 for gltype in sig_atomic_t wchar_t wint_t ; do
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18218 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18219 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
18220 $as_echo_n "(cached) " >&6
18221 else
18222 eval gl_cv_type_${gltype}_suffix=no
18223 eval result=\$gl_cv_type_${gltype}_signed
18224 if test "$result" = yes; then
18225 glsufu=
18226 else
18227 glsufu=u
18229 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18230 case $glsuf in
18231 '') gltype1='int';;
18232 l) gltype1='long int';;
18233 ll) gltype1='long long int';;
18234 i64) gltype1='__int64';;
18235 u) gltype1='unsigned int';;
18236 ul) gltype1='unsigned long int';;
18237 ull) gltype1='unsigned long long int';;
18238 ui64)gltype1='unsigned __int64';;
18239 esac
18240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18241 /* end confdefs.h. */
18243 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18244 included before <wchar.h>. */
18245 #include <stddef.h>
18246 #include <signal.h>
18247 #if HAVE_WCHAR_H
18248 # include <stdio.h>
18249 # include <time.h>
18250 # include <wchar.h>
18251 #endif
18253 extern $gltype foo;
18254 extern $gltype1 foo;
18256 main ()
18260 return 0;
18262 _ACEOF
18263 if ac_fn_c_try_compile "$LINENO"; then :
18264 eval gl_cv_type_${gltype}_suffix=\$glsuf
18266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18267 eval result=\$gl_cv_type_${gltype}_suffix
18268 test "$result" != no && break
18269 done
18271 eval ac_res=\$gl_cv_type_${gltype}_suffix
18272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18273 $as_echo "$ac_res" >&6; }
18274 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18275 eval result=\$gl_cv_type_${gltype}_suffix
18276 test "$result" = no && result=
18277 eval ${GLTYPE}_SUFFIX=\$result
18278 cat >>confdefs.h <<_ACEOF
18279 #define ${GLTYPE}_SUFFIX $result
18280 _ACEOF
18282 done
18286 if test $BITSIZEOF_WINT_T -lt 32; then
18287 BITSIZEOF_WINT_T=32
18290 STDINT_H=stdint.h
18293 if test -n "$STDINT_H"; then
18294 GL_GENERATE_STDINT_H_TRUE=
18295 GL_GENERATE_STDINT_H_FALSE='#'
18296 else
18297 GL_GENERATE_STDINT_H_TRUE='#'
18298 GL_GENERATE_STDINT_H_FALSE=
18305 GNULIB_IMAXABS=0;
18306 GNULIB_IMAXDIV=0;
18307 GNULIB_STRTOIMAX=0;
18308 GNULIB_STRTOUMAX=0;
18309 HAVE_DECL_IMAXABS=1;
18310 HAVE_DECL_IMAXDIV=1;
18311 HAVE_DECL_STRTOIMAX=1;
18312 HAVE_DECL_STRTOUMAX=1;
18313 INT32_MAX_LT_INTMAX_MAX=1;
18314 INT64_MAX_EQ_LONG_MAX='defined _LP64';
18315 PRI_MACROS_BROKEN=0;
18316 PRIPTR_PREFIX=__PRIPTR_PREFIX;
18317 UINT32_MAX_LT_UINTMAX_MAX=1;
18318 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
18334 if test $gl_cv_have_include_next = yes; then
18335 gl_cv_next_inttypes_h='<'inttypes.h'>'
18336 else
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
18338 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
18339 if test "${gl_cv_next_inttypes_h+set}" = set; then :
18340 $as_echo_n "(cached) " >&6
18341 else
18343 if test $ac_cv_header_inttypes_h = yes; then
18346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18347 /* end confdefs.h. */
18348 #include <inttypes.h>
18350 _ACEOF
18351 case "$host_os" in
18352 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18353 *) gl_absname_cpp="$ac_cpp" ;;
18354 esac
18356 case "$host_os" in
18357 mingw*)
18358 gl_dirsep_regex='[/\\]'
18361 gl_dirsep_regex='/'
18363 esac
18365 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'inttypes.h|{
18366 s|.*"\(.*'"${gl_dirsep_regex}"'inttypes.h\)".*|\1|
18367 s|^/[^/]|//&|
18371 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18372 sed -n "$gl_absolute_header_sed"`'"'
18373 else
18374 gl_cv_next_inttypes_h='<'inttypes.h'>'
18379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
18380 $as_echo "$gl_cv_next_inttypes_h" >&6; }
18382 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
18384 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18385 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18386 gl_next_as_first_directive='<'inttypes.h'>'
18387 else
18388 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18389 gl_next_as_first_directive=$gl_cv_next_inttypes_h
18391 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
18400 $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
18407 GNULIB_FCHMODAT=0;
18408 GNULIB_FSTAT=0;
18409 GNULIB_FSTATAT=0;
18410 GNULIB_FUTIMENS=0;
18411 GNULIB_LCHMOD=0;
18412 GNULIB_LSTAT=0;
18413 GNULIB_MKDIRAT=0;
18414 GNULIB_MKFIFO=0;
18415 GNULIB_MKFIFOAT=0;
18416 GNULIB_MKNOD=0;
18417 GNULIB_MKNODAT=0;
18418 GNULIB_STAT=0;
18419 GNULIB_UTIMENSAT=0;
18420 HAVE_FCHMODAT=1;
18421 HAVE_FSTATAT=1;
18422 HAVE_FUTIMENS=1;
18423 HAVE_LCHMOD=1;
18424 HAVE_LSTAT=1;
18425 HAVE_MKDIRAT=1;
18426 HAVE_MKFIFO=1;
18427 HAVE_MKFIFOAT=1;
18428 HAVE_MKNOD=1;
18429 HAVE_MKNODAT=1;
18430 HAVE_UTIMENSAT=1;
18431 REPLACE_FSTAT=0;
18432 REPLACE_FSTATAT=0;
18433 REPLACE_FUTIMENS=0;
18434 REPLACE_LSTAT=0;
18435 REPLACE_MKDIR=0;
18436 REPLACE_MKFIFO=0;
18437 REPLACE_MKNOD=0;
18438 REPLACE_STAT=0;
18439 REPLACE_UTIMENSAT=0;
18444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18445 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18446 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18447 $as_echo_n "(cached) " >&6
18448 else
18449 rm -f conftest.sym conftest.file
18450 echo >conftest.file
18451 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18452 if test "$cross_compiling" = yes; then :
18453 # When cross-compiling, be pessimistic so we will end up using the
18454 # replacement version of lstat that checks for trailing slashes and
18455 # calls lstat a second time when necessary.
18456 gl_cv_func_lstat_dereferences_slashed_symlink=no
18458 else
18459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18460 /* end confdefs.h. */
18461 $ac_includes_default
18463 main ()
18465 struct stat sbuf;
18466 /* Linux will dereference the symlink and fail, as required by
18467 POSIX. That is better in the sense that it means we will not
18468 have to compile and use the lstat wrapper. */
18469 return lstat ("conftest.sym/", &sbuf) == 0;
18472 return 0;
18474 _ACEOF
18475 if ac_fn_c_try_run "$LINENO"; then :
18476 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18477 else
18478 gl_cv_func_lstat_dereferences_slashed_symlink=no
18480 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18481 conftest.$ac_objext conftest.beam conftest.$ac_ext
18484 else
18485 # If the 'ln -s' command failed, then we probably don't even
18486 # have an lstat function.
18487 gl_cv_func_lstat_dereferences_slashed_symlink=no
18489 rm -f conftest.sym conftest.file
18492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18493 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18494 test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
18496 cat >>confdefs.h <<_ACEOF
18497 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18498 _ACEOF
18502 GNULIB_MKTIME=0;
18503 GNULIB_NANOSLEEP=0;
18504 GNULIB_STRPTIME=0;
18505 GNULIB_TIMEGM=0;
18506 GNULIB_TIME_R=0;
18507 HAVE_DECL_LOCALTIME_R=1;
18508 HAVE_NANOSLEEP=1;
18509 HAVE_STRPTIME=1;
18510 HAVE_TIMEGM=1;
18511 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
18512 REPLACE_MKTIME=GNULIB_PORTCHECK;
18513 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
18514 REPLACE_TIMEGM=GNULIB_PORTCHECK;
18521 GNULIB_PTHREAD_SIGMASK=0;
18522 GNULIB_RAISE=0;
18523 GNULIB_SIGNAL_H_SIGPIPE=0;
18524 GNULIB_SIGPROCMASK=0;
18525 GNULIB_SIGACTION=0;
18526 HAVE_POSIX_SIGNALBLOCKING=1;
18527 HAVE_PTHREAD_SIGMASK=1;
18528 HAVE_RAISE=1;
18529 HAVE_SIGSET_T=1;
18530 HAVE_SIGINFO_T=1;
18531 HAVE_SIGACTION=1;
18532 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
18534 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
18536 HAVE_SIGHANDLER_T=1;
18537 REPLACE_PTHREAD_SIGMASK=0;
18538 REPLACE_RAISE=0;
18543 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
18544 #include <signal.h>
18545 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
18546 #include <sys/types.h>
18549 if test "x$ac_cv_type_sigset_t" = x""yes; then :
18551 cat >>confdefs.h <<_ACEOF
18552 #define HAVE_SIGSET_T 1
18553 _ACEOF
18555 gl_cv_type_sigset_t=yes
18556 else
18557 gl_cv_type_sigset_t=no
18560 if test $gl_cv_type_sigset_t != yes; then
18561 HAVE_SIGSET_T=0
18568 if test $ac_cv_header_sys_socket_h = no; then
18569 for ac_header in ws2tcpip.h
18570 do :
18571 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
18572 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
18573 cat >>confdefs.h <<_ACEOF
18574 #define HAVE_WS2TCPIP_H 1
18575 _ACEOF
18579 done
18583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
18584 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
18585 if test "${ac_cv_header_stdbool_h+set}" = set; then :
18586 $as_echo_n "(cached) " >&6
18587 else
18588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18589 /* end confdefs.h. */
18591 #include <stdbool.h>
18592 #ifndef bool
18593 "error: bool is not defined"
18594 #endif
18595 #ifndef false
18596 "error: false is not defined"
18597 #endif
18598 #if false
18599 "error: false is not 0"
18600 #endif
18601 #ifndef true
18602 "error: true is not defined"
18603 #endif
18604 #if true != 1
18605 "error: true is not 1"
18606 #endif
18607 #ifndef __bool_true_false_are_defined
18608 "error: __bool_true_false_are_defined is not defined"
18609 #endif
18611 struct s { _Bool s: 1; _Bool t; } s;
18613 char a[true == 1 ? 1 : -1];
18614 char b[false == 0 ? 1 : -1];
18615 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
18616 char d[(bool) 0.5 == true ? 1 : -1];
18617 /* See body of main program for 'e'. */
18618 char f[(_Bool) 0.0 == false ? 1 : -1];
18619 char g[true];
18620 char h[sizeof (_Bool)];
18621 char i[sizeof s.t];
18622 enum { j = false, k = true, l = false * true, m = true * 256 };
18623 /* The following fails for
18624 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
18625 _Bool n[m];
18626 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
18627 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
18628 /* Catch a bug in an HP-UX C compiler. See
18629 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
18630 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
18632 _Bool q = true;
18633 _Bool *pq = &q;
18636 main ()
18639 bool e = &s;
18640 *pq |= q;
18641 *pq |= ! q;
18642 /* Refer to every declared value, to avoid compiler optimizations. */
18643 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
18644 + !m + !n + !o + !p + !q + !pq);
18647 return 0;
18649 _ACEOF
18650 if ac_fn_c_try_compile "$LINENO"; then :
18651 ac_cv_header_stdbool_h=yes
18652 else
18653 ac_cv_header_stdbool_h=no
18655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
18658 $as_echo "$ac_cv_header_stdbool_h" >&6; }
18659 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
18660 if test "x$ac_cv_type__Bool" = x""yes; then :
18662 cat >>confdefs.h <<_ACEOF
18663 #define HAVE__BOOL 1
18664 _ACEOF
18671 REPLACE_NULL=0;
18672 HAVE_WCHAR_T=1;
18675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
18676 $as_echo_n "checking for wchar_t... " >&6; }
18677 if test "${gt_cv_c_wchar_t+set}" = set; then :
18678 $as_echo_n "(cached) " >&6
18679 else
18680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18681 /* end confdefs.h. */
18682 #include <stddef.h>
18683 wchar_t foo = (wchar_t)'\0';
18685 main ()
18689 return 0;
18691 _ACEOF
18692 if ac_fn_c_try_compile "$LINENO"; then :
18693 gt_cv_c_wchar_t=yes
18694 else
18695 gt_cv_c_wchar_t=no
18697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
18700 $as_echo "$gt_cv_c_wchar_t" >&6; }
18701 if test $gt_cv_c_wchar_t = yes; then
18703 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
18708 GNULIB_DPRINTF=0;
18709 GNULIB_FCLOSE=0;
18710 GNULIB_FDOPEN=0;
18711 GNULIB_FFLUSH=0;
18712 GNULIB_FGETC=0;
18713 GNULIB_FGETS=0;
18714 GNULIB_FOPEN=0;
18715 GNULIB_FPRINTF=0;
18716 GNULIB_FPRINTF_POSIX=0;
18717 GNULIB_FPURGE=0;
18718 GNULIB_FPUTC=0;
18719 GNULIB_FPUTS=0;
18720 GNULIB_FREAD=0;
18721 GNULIB_FREOPEN=0;
18722 GNULIB_FSCANF=0;
18723 GNULIB_FSEEK=0;
18724 GNULIB_FSEEKO=0;
18725 GNULIB_FTELL=0;
18726 GNULIB_FTELLO=0;
18727 GNULIB_FWRITE=0;
18728 GNULIB_GETC=0;
18729 GNULIB_GETCHAR=0;
18730 GNULIB_GETDELIM=0;
18731 GNULIB_GETLINE=0;
18732 GNULIB_GETS=0;
18733 GNULIB_OBSTACK_PRINTF=0;
18734 GNULIB_OBSTACK_PRINTF_POSIX=0;
18735 GNULIB_PCLOSE=0;
18736 GNULIB_PERROR=0;
18737 GNULIB_POPEN=0;
18738 GNULIB_PRINTF=0;
18739 GNULIB_PRINTF_POSIX=0;
18740 GNULIB_PUTC=0;
18741 GNULIB_PUTCHAR=0;
18742 GNULIB_PUTS=0;
18743 GNULIB_REMOVE=0;
18744 GNULIB_RENAME=0;
18745 GNULIB_RENAMEAT=0;
18746 GNULIB_SCANF=0;
18747 GNULIB_SNPRINTF=0;
18748 GNULIB_SPRINTF_POSIX=0;
18749 GNULIB_STDIO_H_NONBLOCKING=0;
18750 GNULIB_STDIO_H_SIGPIPE=0;
18751 GNULIB_TMPFILE=0;
18752 GNULIB_VASPRINTF=0;
18753 GNULIB_VFSCANF=0;
18754 GNULIB_VSCANF=0;
18755 GNULIB_VDPRINTF=0;
18756 GNULIB_VFPRINTF=0;
18757 GNULIB_VFPRINTF_POSIX=0;
18758 GNULIB_VPRINTF=0;
18759 GNULIB_VPRINTF_POSIX=0;
18760 GNULIB_VSNPRINTF=0;
18761 GNULIB_VSPRINTF_POSIX=0;
18762 HAVE_DECL_FPURGE=1;
18763 HAVE_DECL_FSEEKO=1;
18764 HAVE_DECL_FTELLO=1;
18765 HAVE_DECL_GETDELIM=1;
18766 HAVE_DECL_GETLINE=1;
18767 HAVE_DECL_OBSTACK_PRINTF=1;
18768 HAVE_DECL_SNPRINTF=1;
18769 HAVE_DECL_VSNPRINTF=1;
18770 HAVE_DPRINTF=1;
18771 HAVE_FSEEKO=1;
18772 HAVE_FTELLO=1;
18773 HAVE_PCLOSE=1;
18774 HAVE_POPEN=1;
18775 HAVE_RENAMEAT=1;
18776 HAVE_VASPRINTF=1;
18777 HAVE_VDPRINTF=1;
18778 REPLACE_DPRINTF=0;
18779 REPLACE_FCLOSE=0;
18780 REPLACE_FDOPEN=0;
18781 REPLACE_FFLUSH=0;
18782 REPLACE_FOPEN=0;
18783 REPLACE_FPRINTF=0;
18784 REPLACE_FPURGE=0;
18785 REPLACE_FREOPEN=0;
18786 REPLACE_FSEEK=0;
18787 REPLACE_FSEEKO=0;
18788 REPLACE_FTELL=0;
18789 REPLACE_FTELLO=0;
18790 REPLACE_GETDELIM=0;
18791 REPLACE_GETLINE=0;
18792 REPLACE_OBSTACK_PRINTF=0;
18793 REPLACE_PERROR=0;
18794 REPLACE_POPEN=0;
18795 REPLACE_PRINTF=0;
18796 REPLACE_REMOVE=0;
18797 REPLACE_RENAME=0;
18798 REPLACE_RENAMEAT=0;
18799 REPLACE_SNPRINTF=0;
18800 REPLACE_SPRINTF=0;
18801 REPLACE_STDIO_READ_FUNCS=0;
18802 REPLACE_STDIO_WRITE_FUNCS=0;
18803 REPLACE_TMPFILE=0;
18804 REPLACE_VASPRINTF=0;
18805 REPLACE_VDPRINTF=0;
18806 REPLACE_VFPRINTF=0;
18807 REPLACE_VPRINTF=0;
18808 REPLACE_VSNPRINTF=0;
18809 REPLACE_VSPRINTF=0;
18811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
18812 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
18813 if test "${ac_cv_struct_tm+set}" = set; then :
18814 $as_echo_n "(cached) " >&6
18815 else
18816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18817 /* end confdefs.h. */
18818 #include <sys/types.h>
18819 #include <time.h>
18822 main ()
18824 struct tm tm;
18825 int *p = &tm.tm_sec;
18826 return !p;
18828 return 0;
18830 _ACEOF
18831 if ac_fn_c_try_compile "$LINENO"; then :
18832 ac_cv_struct_tm=time.h
18833 else
18834 ac_cv_struct_tm=sys/time.h
18836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
18839 $as_echo "$ac_cv_struct_tm" >&6; }
18840 if test $ac_cv_struct_tm = sys/time.h; then
18842 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
18846 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
18847 #include <$ac_cv_struct_tm>
18850 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
18852 cat >>confdefs.h <<_ACEOF
18853 #define HAVE_STRUCT_TM_TM_ZONE 1
18854 _ACEOF
18859 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18861 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
18863 else
18864 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
18866 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
18867 ac_have_decl=1
18868 else
18869 ac_have_decl=0
18872 cat >>confdefs.h <<_ACEOF
18873 #define HAVE_DECL_TZNAME $ac_have_decl
18874 _ACEOF
18876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
18877 $as_echo_n "checking for tzname... " >&6; }
18878 if test "${ac_cv_var_tzname+set}" = set; then :
18879 $as_echo_n "(cached) " >&6
18880 else
18881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18882 /* end confdefs.h. */
18883 #include <time.h>
18884 #if !HAVE_DECL_TZNAME
18885 extern char *tzname[];
18886 #endif
18889 main ()
18891 return tzname[0][0];
18893 return 0;
18895 _ACEOF
18896 if ac_fn_c_try_link "$LINENO"; then :
18897 ac_cv_var_tzname=yes
18898 else
18899 ac_cv_var_tzname=no
18901 rm -f core conftest.err conftest.$ac_objext \
18902 conftest$ac_exeext conftest.$ac_ext
18904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
18905 $as_echo "$ac_cv_var_tzname" >&6; }
18906 if test $ac_cv_var_tzname = yes; then
18908 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
18914 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
18916 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
18918 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
18927 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
18928 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
18929 ac_have_decl=1
18930 else
18931 ac_have_decl=0
18934 cat >>confdefs.h <<_ACEOF
18935 #define HAVE_DECL_STRTOIMAX $ac_have_decl
18936 _ACEOF
18940 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
18941 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
18942 ac_have_decl=1
18943 else
18944 ac_have_decl=0
18947 cat >>confdefs.h <<_ACEOF
18948 #define HAVE_DECL_STRTOUMAX $ac_have_decl
18949 _ACEOF
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
18954 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
18955 if test "${ac_cv_header_stat_broken+set}" = set; then :
18956 $as_echo_n "(cached) " >&6
18957 else
18958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18959 /* end confdefs.h. */
18960 #include <sys/types.h>
18961 #include <sys/stat.h>
18963 #if defined S_ISBLK && defined S_IFDIR
18964 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
18965 #endif
18967 #if defined S_ISBLK && defined S_IFCHR
18968 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
18969 #endif
18971 #if defined S_ISLNK && defined S_IFREG
18972 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
18973 #endif
18975 #if defined S_ISSOCK && defined S_IFREG
18976 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
18977 #endif
18979 _ACEOF
18980 if ac_fn_c_try_compile "$LINENO"; then :
18981 ac_cv_header_stat_broken=no
18982 else
18983 ac_cv_header_stat_broken=yes
18985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
18988 $as_echo "$ac_cv_header_stat_broken" >&6; }
18989 if test $ac_cv_header_stat_broken = yes; then
18991 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
18997 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18998 if test "x$ac_cv_type_mode_t" = x""yes; then :
19000 else
19002 cat >>confdefs.h <<_ACEOF
19003 #define mode_t int
19004 _ACEOF
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19009 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19010 if test "${ac_cv_c_restrict+set}" = set; then :
19011 $as_echo_n "(cached) " >&6
19012 else
19013 ac_cv_c_restrict=no
19014 # The order here caters to the fact that C++ does not require restrict.
19015 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19017 /* end confdefs.h. */
19018 typedef int * int_ptr;
19019 int foo (int_ptr $ac_kw ip) {
19020 return ip[0];
19023 main ()
19025 int s[1];
19026 int * $ac_kw t = s;
19027 t[0] = 0;
19028 return foo(t)
19030 return 0;
19032 _ACEOF
19033 if ac_fn_c_try_compile "$LINENO"; then :
19034 ac_cv_c_restrict=$ac_kw
19036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19037 test "$ac_cv_c_restrict" != no && break
19038 done
19041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19042 $as_echo "$ac_cv_c_restrict" >&6; }
19044 case $ac_cv_c_restrict in
19045 restrict) ;;
19046 no) $as_echo "#define restrict /**/" >>confdefs.h
19048 *) cat >>confdefs.h <<_ACEOF
19049 #define restrict $ac_cv_c_restrict
19050 _ACEOF
19052 esac
19058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19059 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19060 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
19061 $as_echo_n "(cached) " >&6
19062 else
19063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19064 /* end confdefs.h. */
19065 #include <time.h>
19068 main ()
19070 static struct timespec x; x.tv_sec = x.tv_nsec;
19072 return 0;
19074 _ACEOF
19075 if ac_fn_c_try_compile "$LINENO"; then :
19076 gl_cv_sys_struct_timespec_in_time_h=yes
19077 else
19078 gl_cv_sys_struct_timespec_in_time_h=no
19080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19083 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
19085 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19086 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19087 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19088 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19089 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19090 else
19091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19092 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
19093 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
19094 $as_echo_n "(cached) " >&6
19095 else
19096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19097 /* end confdefs.h. */
19098 #include <sys/time.h>
19101 main ()
19103 static struct timespec x; x.tv_sec = x.tv_nsec;
19105 return 0;
19107 _ACEOF
19108 if ac_fn_c_try_compile "$LINENO"; then :
19109 gl_cv_sys_struct_timespec_in_sys_time_h=yes
19110 else
19111 gl_cv_sys_struct_timespec_in_sys_time_h=no
19113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19116 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19117 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19118 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19119 else
19120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19121 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
19122 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
19123 $as_echo_n "(cached) " >&6
19124 else
19125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19126 /* end confdefs.h. */
19127 #include <pthread.h>
19130 main ()
19132 static struct timespec x; x.tv_sec = x.tv_nsec;
19134 return 0;
19136 _ACEOF
19137 if ac_fn_c_try_compile "$LINENO"; then :
19138 gl_cv_sys_struct_timespec_in_pthread_h=yes
19139 else
19140 gl_cv_sys_struct_timespec_in_pthread_h=no
19142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
19145 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
19146 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
19147 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
19166 if test $gl_cv_have_include_next = yes; then
19167 gl_cv_next_time_h='<'time.h'>'
19168 else
19169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
19170 $as_echo_n "checking absolute name of <time.h>... " >&6; }
19171 if test "${gl_cv_next_time_h+set}" = set; then :
19172 $as_echo_n "(cached) " >&6
19173 else
19175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19176 /* end confdefs.h. */
19177 #include <time.h>
19179 _ACEOF
19180 case "$host_os" in
19181 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19182 *) gl_absname_cpp="$ac_cpp" ;;
19183 esac
19185 case "$host_os" in
19186 mingw*)
19187 gl_dirsep_regex='[/\\]'
19190 gl_dirsep_regex='/'
19192 esac
19194 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'time.h|{
19195 s|.*"\(.*'"${gl_dirsep_regex}"'time.h\)".*|\1|
19196 s|^/[^/]|//&|
19200 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19201 sed -n "$gl_absolute_header_sed"`'"'
19205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
19206 $as_echo "$gl_cv_next_time_h" >&6; }
19208 NEXT_TIME_H=$gl_cv_next_time_h
19210 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19212 gl_next_as_first_directive='<'time.h'>'
19213 else
19214 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19215 gl_next_as_first_directive=$gl_cv_next_time_h
19217 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
19224 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
19225 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
19226 ac_have_decl=1
19227 else
19228 ac_have_decl=0
19231 cat >>confdefs.h <<_ACEOF
19232 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
19233 _ACEOF
19238 if false; then
19239 GL_COND_LIBTOOL_TRUE=
19240 GL_COND_LIBTOOL_FALSE='#'
19241 else
19242 GL_COND_LIBTOOL_TRUE='#'
19243 GL_COND_LIBTOOL_FALSE=
19246 gl_cond_libtool=false
19247 gl_libdeps=
19248 gl_ltlibdeps=
19249 gl_m4_base='m4'
19259 gl_source_base='lib'
19262 if test $ac_cv_func_alloca_works = no; then
19266 # Define an additional variable used in the Makefile substitution.
19267 if test $ac_cv_working_alloca_h = yes; then
19268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
19269 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
19270 if test "${gl_cv_rpl_alloca+set}" = set; then :
19271 $as_echo_n "(cached) " >&6
19272 else
19274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19275 /* end confdefs.h. */
19277 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
19278 Need own alloca
19279 #endif
19281 _ACEOF
19282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19283 $EGREP "Need own alloca" >/dev/null 2>&1; then :
19284 gl_cv_rpl_alloca=yes
19285 else
19286 gl_cv_rpl_alloca=no
19288 rm -f conftest*
19292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
19293 $as_echo "$gl_cv_rpl_alloca" >&6; }
19294 if test $gl_cv_rpl_alloca = yes; then
19296 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
19298 ALLOCA_H=alloca.h
19299 else
19300 ALLOCA_H=
19302 else
19303 ALLOCA_H=alloca.h
19306 if test -n "$ALLOCA_H"; then
19307 GL_GENERATE_ALLOCA_H_TRUE=
19308 GL_GENERATE_ALLOCA_H_FALSE='#'
19309 else
19310 GL_GENERATE_ALLOCA_H_TRUE='#'
19311 GL_GENERATE_ALLOCA_H_FALSE=
19340 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
19343 if test $HAVE_DUP2 = 1; then
19344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19345 $as_echo_n "checking whether dup2 works... " >&6; }
19346 if test "${gl_cv_func_dup2_works+set}" = set; then :
19347 $as_echo_n "(cached) " >&6
19348 else
19349 if test "$cross_compiling" = yes; then :
19350 case "$host_os" in
19351 mingw*) # on this platform, dup2 always returns 0 for success
19352 gl_cv_func_dup2_works=no;;
19353 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19354 gl_cv_func_dup2_works=no;;
19355 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
19356 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
19357 gl_cv_func_dup2_works=no;;
19358 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
19359 gl_cv_func_dup2_works=no;;
19360 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19361 gl_cv_func_dup2_works=no;;
19362 *) gl_cv_func_dup2_works=yes;;
19363 esac
19364 else
19365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19366 /* end confdefs.h. */
19368 #include <unistd.h>
19369 #include <fcntl.h>
19370 #include <errno.h>
19372 main ()
19374 int result = 0;
19375 #ifdef FD_CLOEXEC
19376 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19377 result |= 1;
19378 #endif
19379 if (dup2 (1, 1) == 0)
19380 result |= 2;
19381 #ifdef FD_CLOEXEC
19382 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19383 result |= 4;
19384 #endif
19385 close (0);
19386 if (dup2 (0, 0) != -1)
19387 result |= 8;
19388 /* Many gnulib modules require POSIX conformance of EBADF. */
19389 if (dup2 (2, 1000000) == -1 && errno != EBADF)
19390 result |= 16;
19391 return result;
19394 return 0;
19397 _ACEOF
19398 if ac_fn_c_try_run "$LINENO"; then :
19399 gl_cv_func_dup2_works=yes
19400 else
19401 gl_cv_func_dup2_works=no
19403 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19404 conftest.$ac_objext conftest.beam conftest.$ac_ext
19409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19410 $as_echo "$gl_cv_func_dup2_works" >&6; }
19411 if test "$gl_cv_func_dup2_works" = no; then
19412 REPLACE_DUP2=1
19417 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
19426 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19435 GNULIB_DUP2=1
19447 # Persuade glibc <stdlib.h> to declare getloadavg().
19450 gl_save_LIBS=$LIBS
19452 # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
19453 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
19454 HAVE_GETLOADAVG=1
19455 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
19456 if test "x$ac_cv_func_getloadavg" = x""yes; then :
19458 else
19459 gl_func_getloadavg_done=no
19461 # Some systems with -lutil have (and need) -lkvm as well, some do not.
19462 # On Solaris, -lkvm requires nlist from -lelf, so check that first
19463 # to get the right answer into the cache.
19464 # For kstat on solaris, we need to test for libelf and libkvm to force the
19465 # definition of SVR4 below.
19466 if test $gl_func_getloadavg_done = no; then
19467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
19468 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
19469 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
19470 $as_echo_n "(cached) " >&6
19471 else
19472 ac_check_lib_save_LIBS=$LIBS
19473 LIBS="-lelf $LIBS"
19474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19475 /* end confdefs.h. */
19477 /* Override any GCC internal prototype to avoid an error.
19478 Use char because int might match the return type of a GCC
19479 builtin and then its argument prototype would still apply. */
19480 #ifdef __cplusplus
19481 extern "C"
19482 #endif
19483 char elf_begin ();
19485 main ()
19487 return elf_begin ();
19489 return 0;
19491 _ACEOF
19492 if ac_fn_c_try_link "$LINENO"; then :
19493 ac_cv_lib_elf_elf_begin=yes
19494 else
19495 ac_cv_lib_elf_elf_begin=no
19497 rm -f core conftest.err conftest.$ac_objext \
19498 conftest$ac_exeext conftest.$ac_ext
19499 LIBS=$ac_check_lib_save_LIBS
19501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
19502 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
19503 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
19504 LIBS="-lelf $LIBS"
19507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
19508 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
19509 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
19510 $as_echo_n "(cached) " >&6
19511 else
19512 ac_check_lib_save_LIBS=$LIBS
19513 LIBS="-lkvm $LIBS"
19514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19515 /* end confdefs.h. */
19517 /* Override any GCC internal prototype to avoid an error.
19518 Use char because int might match the return type of a GCC
19519 builtin and then its argument prototype would still apply. */
19520 #ifdef __cplusplus
19521 extern "C"
19522 #endif
19523 char kvm_open ();
19525 main ()
19527 return kvm_open ();
19529 return 0;
19531 _ACEOF
19532 if ac_fn_c_try_link "$LINENO"; then :
19533 ac_cv_lib_kvm_kvm_open=yes
19534 else
19535 ac_cv_lib_kvm_kvm_open=no
19537 rm -f core conftest.err conftest.$ac_objext \
19538 conftest$ac_exeext conftest.$ac_ext
19539 LIBS=$ac_check_lib_save_LIBS
19541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
19542 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
19543 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
19544 LIBS="-lkvm $LIBS"
19547 # Check for the 4.4BSD definition of getloadavg.
19548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
19549 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
19550 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
19551 $as_echo_n "(cached) " >&6
19552 else
19553 ac_check_lib_save_LIBS=$LIBS
19554 LIBS="-lutil $LIBS"
19555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19556 /* end confdefs.h. */
19558 /* Override any GCC internal prototype to avoid an error.
19559 Use char because int might match the return type of a GCC
19560 builtin and then its argument prototype would still apply. */
19561 #ifdef __cplusplus
19562 extern "C"
19563 #endif
19564 char getloadavg ();
19566 main ()
19568 return getloadavg ();
19570 return 0;
19572 _ACEOF
19573 if ac_fn_c_try_link "$LINENO"; then :
19574 ac_cv_lib_util_getloadavg=yes
19575 else
19576 ac_cv_lib_util_getloadavg=no
19578 rm -f core conftest.err conftest.$ac_objext \
19579 conftest$ac_exeext conftest.$ac_ext
19580 LIBS=$ac_check_lib_save_LIBS
19582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
19583 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
19584 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
19585 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
19590 if test $gl_func_getloadavg_done = no; then
19591 # There is a commonly available library for RS/6000 AIX.
19592 # Since it is not a standard part of AIX, it might be installed locally.
19593 gl_getloadavg_LIBS=$LIBS
19594 LIBS="-L/usr/local/lib $LIBS"
19595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
19596 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
19597 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
19598 $as_echo_n "(cached) " >&6
19599 else
19600 ac_check_lib_save_LIBS=$LIBS
19601 LIBS="-lgetloadavg $LIBS"
19602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19603 /* end confdefs.h. */
19605 /* Override any GCC internal prototype to avoid an error.
19606 Use char because int might match the return type of a GCC
19607 builtin and then its argument prototype would still apply. */
19608 #ifdef __cplusplus
19609 extern "C"
19610 #endif
19611 char getloadavg ();
19613 main ()
19615 return getloadavg ();
19617 return 0;
19619 _ACEOF
19620 if ac_fn_c_try_link "$LINENO"; then :
19621 ac_cv_lib_getloadavg_getloadavg=yes
19622 else
19623 ac_cv_lib_getloadavg_getloadavg=no
19625 rm -f core conftest.err conftest.$ac_objext \
19626 conftest$ac_exeext conftest.$ac_ext
19627 LIBS=$ac_check_lib_save_LIBS
19629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
19630 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
19631 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
19632 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
19633 else
19634 LIBS=$gl_getloadavg_LIBS
19639 # Set up the replacement function if necessary.
19640 if test $gl_func_getloadavg_done = no; then
19641 HAVE_GETLOADAVG=0
19643 # Solaris has libkstat which does not require root.
19644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
19645 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
19646 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
19647 $as_echo_n "(cached) " >&6
19648 else
19649 ac_check_lib_save_LIBS=$LIBS
19650 LIBS="-lkstat $LIBS"
19651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19652 /* end confdefs.h. */
19654 /* Override any GCC internal prototype to avoid an error.
19655 Use char because int might match the return type of a GCC
19656 builtin and then its argument prototype would still apply. */
19657 #ifdef __cplusplus
19658 extern "C"
19659 #endif
19660 char kstat_open ();
19662 main ()
19664 return kstat_open ();
19666 return 0;
19668 _ACEOF
19669 if ac_fn_c_try_link "$LINENO"; then :
19670 ac_cv_lib_kstat_kstat_open=yes
19671 else
19672 ac_cv_lib_kstat_kstat_open=no
19674 rm -f core conftest.err conftest.$ac_objext \
19675 conftest$ac_exeext conftest.$ac_ext
19676 LIBS=$ac_check_lib_save_LIBS
19678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
19679 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
19680 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
19681 cat >>confdefs.h <<_ACEOF
19682 #define HAVE_LIBKSTAT 1
19683 _ACEOF
19685 LIBS="-lkstat $LIBS"
19689 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
19691 # AIX has libperfstat which does not require root
19692 if test $gl_func_getloadavg_done = no; then
19693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
19694 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
19695 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
19696 $as_echo_n "(cached) " >&6
19697 else
19698 ac_check_lib_save_LIBS=$LIBS
19699 LIBS="-lperfstat $LIBS"
19700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19701 /* end confdefs.h. */
19703 /* Override any GCC internal prototype to avoid an error.
19704 Use char because int might match the return type of a GCC
19705 builtin and then its argument prototype would still apply. */
19706 #ifdef __cplusplus
19707 extern "C"
19708 #endif
19709 char perfstat_cpu_total ();
19711 main ()
19713 return perfstat_cpu_total ();
19715 return 0;
19717 _ACEOF
19718 if ac_fn_c_try_link "$LINENO"; then :
19719 ac_cv_lib_perfstat_perfstat_cpu_total=yes
19720 else
19721 ac_cv_lib_perfstat_perfstat_cpu_total=no
19723 rm -f core conftest.err conftest.$ac_objext \
19724 conftest$ac_exeext conftest.$ac_ext
19725 LIBS=$ac_check_lib_save_LIBS
19727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
19728 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
19729 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
19730 cat >>confdefs.h <<_ACEOF
19731 #define HAVE_LIBPERFSTAT 1
19732 _ACEOF
19734 LIBS="-lperfstat $LIBS"
19738 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
19741 if test $gl_func_getloadavg_done = no; then
19742 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
19743 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
19744 gl_func_getloadavg_done=yes
19746 $as_echo "#define DGUX 1" >>confdefs.h
19748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
19749 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
19750 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
19751 $as_echo_n "(cached) " >&6
19752 else
19753 ac_check_lib_save_LIBS=$LIBS
19754 LIBS="-ldgc $LIBS"
19755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19756 /* end confdefs.h. */
19758 /* Override any GCC internal prototype to avoid an error.
19759 Use char because int might match the return type of a GCC
19760 builtin and then its argument prototype would still apply. */
19761 #ifdef __cplusplus
19762 extern "C"
19763 #endif
19764 char dg_sys_info ();
19766 main ()
19768 return dg_sys_info ();
19770 return 0;
19772 _ACEOF
19773 if ac_fn_c_try_link "$LINENO"; then :
19774 ac_cv_lib_dgc_dg_sys_info=yes
19775 else
19776 ac_cv_lib_dgc_dg_sys_info=no
19778 rm -f core conftest.err conftest.$ac_objext \
19779 conftest$ac_exeext conftest.$ac_ext
19780 LIBS=$ac_check_lib_save_LIBS
19782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
19783 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
19784 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
19785 cat >>confdefs.h <<_ACEOF
19786 #define HAVE_LIBDGC 1
19787 _ACEOF
19789 LIBS="-ldgc $LIBS"
19801 if test "x$gl_save_LIBS" = x; then
19802 GETLOADAVG_LIBS=$LIBS
19803 else
19804 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
19806 LIBS=$gl_save_LIBS
19809 # Test whether the system declares getloadavg. Solaris has the function
19810 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
19811 for ac_header in sys/loadavg.h
19812 do :
19813 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
19814 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
19815 cat >>confdefs.h <<_ACEOF
19816 #define HAVE_SYS_LOADAVG_H 1
19817 _ACEOF
19821 done
19823 if test $ac_cv_header_sys_loadavg_h = yes; then
19824 HAVE_SYS_LOADAVG_H=1
19825 else
19826 HAVE_SYS_LOADAVG_H=0
19828 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
19829 # include <sys/loadavg.h>
19830 #endif
19831 #include <stdlib.h>
19833 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
19835 else
19836 HAVE_DECL_GETLOADAVG=0
19840 if test $HAVE_GETLOADAVG = 0; then
19849 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
19852 # Figure out what our getloadavg.c needs.
19854 # On HPUX9, an unprivileged user can get load averages this way.
19855 if test $gl_func_getloadavg_done = no; then
19856 for ac_func in pstat_getdynamic
19857 do :
19858 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
19859 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
19860 cat >>confdefs.h <<_ACEOF
19861 #define HAVE_PSTAT_GETDYNAMIC 1
19862 _ACEOF
19863 gl_func_getloadavg_done=yes
19865 done
19869 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
19870 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
19871 # Irix 4.0.5F has the header but not the library.
19872 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
19873 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
19874 gl_func_getloadavg_done=yes
19876 $as_echo "#define SVR4 1" >>confdefs.h
19880 if test $gl_func_getloadavg_done = no; then
19881 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
19882 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
19883 gl_func_getloadavg_done=yes
19885 $as_echo "#define UMAX 1" >>confdefs.h
19888 $as_echo "#define UMAX4_3 1" >>confdefs.h
19895 if test $gl_func_getloadavg_done = no; then
19896 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
19897 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
19898 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
19905 if test $gl_func_getloadavg_done = no; then
19906 for ac_header in mach/mach.h
19907 do :
19908 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
19909 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
19910 cat >>confdefs.h <<_ACEOF
19911 #define HAVE_MACH_MACH_H 1
19912 _ACEOF
19916 done
19920 for ac_header in nlist.h
19921 do :
19922 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
19923 if test "x$ac_cv_header_nlist_h" = x""yes; then :
19924 cat >>confdefs.h <<_ACEOF
19925 #define HAVE_NLIST_H 1
19926 _ACEOF
19927 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
19929 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
19931 cat >>confdefs.h <<_ACEOF
19932 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
19933 _ACEOF
19938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19939 /* end confdefs.h. */
19940 #include <nlist.h>
19942 main ()
19944 struct nlist x;
19945 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
19946 x.n_un.n_name = "";
19947 #else
19948 x.n_name = "";
19949 #endif
19951 return 0;
19953 _ACEOF
19954 if ac_fn_c_try_link "$LINENO"; then :
19956 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
19959 rm -f core conftest.err conftest.$ac_objext \
19960 conftest$ac_exeext conftest.$ac_ext
19964 done
19972 GNULIB_GETLOADAVG=1
19983 if test $REPLACE_GETOPT = 1; then
19992 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20002 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20013 REPLACE_GETOPT=0
20016 if test -n "$gl_replace_getopt"; then :
20018 REPLACE_GETOPT=1
20023 if test $REPLACE_GETOPT = 1; then
20025 GETOPT_H=getopt.h
20027 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20031 GNULIB_UNISTD_H_GETOPT=1
20034 if test $REPLACE_GETOPT = 1; then
20043 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20053 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20064 if test $ac_cv_func_lstat = yes; then
20066 if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
20067 REPLACE_LSTAT=1
20069 else
20070 HAVE_LSTAT=0
20073 if test $REPLACE_LSTAT = 1; then
20082 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
20094 GNULIB_LSTAT=1
20106 if test $APPLE_UNIVERSAL_BUILD = 1; then
20107 # A universal build on Apple MacOS X platforms.
20108 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
20109 # But we need a configuration result that is valid in both modes.
20110 gl_cv_func_working_mktime=no
20112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
20113 $as_echo_n "checking for working mktime... " >&6; }
20114 if test "${gl_cv_func_working_mktime+set}" = set; then :
20115 $as_echo_n "(cached) " >&6
20116 else
20117 if test "$cross_compiling" = yes; then :
20118 gl_cv_func_working_mktime=no
20119 else
20120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20121 /* end confdefs.h. */
20122 /* Test program from Paul Eggert and Tony Leneis. */
20123 #include <limits.h>
20124 #include <stdlib.h>
20125 #include <time.h>
20127 #ifdef HAVE_UNISTD_H
20128 # include <unistd.h>
20129 #endif
20131 #ifndef HAVE_ALARM
20132 # define alarm(X) /* empty */
20133 #endif
20135 /* Work around redefinition to rpl_putenv by other config tests. */
20136 #undef putenv
20138 static time_t time_t_max;
20139 static time_t time_t_min;
20141 /* Values we'll use to set the TZ environment variable. */
20142 static char *tz_strings[] = {
20143 (char *) 0, "TZ=GMT0", "TZ=JST-9",
20144 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
20146 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
20148 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
20149 Based on a problem report from Andreas Jaeger. */
20150 static int
20151 spring_forward_gap ()
20153 /* glibc (up to about 1998-10-07) failed this test. */
20154 struct tm tm;
20156 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20157 instead of "TZ=America/Vancouver" in order to detect the bug even
20158 on systems that don't support the Olson extension, or don't have the
20159 full zoneinfo tables installed. */
20160 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
20162 tm.tm_year = 98;
20163 tm.tm_mon = 3;
20164 tm.tm_mday = 5;
20165 tm.tm_hour = 2;
20166 tm.tm_min = 0;
20167 tm.tm_sec = 0;
20168 tm.tm_isdst = -1;
20169 return mktime (&tm) != (time_t) -1;
20172 static int
20173 mktime_test1 (time_t now)
20175 struct tm *lt;
20176 return ! (lt = localtime (&now)) || mktime (lt) == now;
20179 static int
20180 mktime_test (time_t now)
20182 return (mktime_test1 (now)
20183 && mktime_test1 ((time_t) (time_t_max - now))
20184 && mktime_test1 ((time_t) (time_t_min + now)));
20187 static int
20188 irix_6_4_bug ()
20190 /* Based on code from Ariel Faigon. */
20191 struct tm tm;
20192 tm.tm_year = 96;
20193 tm.tm_mon = 3;
20194 tm.tm_mday = 0;
20195 tm.tm_hour = 0;
20196 tm.tm_min = 0;
20197 tm.tm_sec = 0;
20198 tm.tm_isdst = -1;
20199 mktime (&tm);
20200 return tm.tm_mon == 2 && tm.tm_mday == 31;
20203 static int
20204 bigtime_test (int j)
20206 struct tm tm;
20207 time_t now;
20208 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
20209 now = mktime (&tm);
20210 if (now != (time_t) -1)
20212 struct tm *lt = localtime (&now);
20213 if (! (lt
20214 && lt->tm_year == tm.tm_year
20215 && lt->tm_mon == tm.tm_mon
20216 && lt->tm_mday == tm.tm_mday
20217 && lt->tm_hour == tm.tm_hour
20218 && lt->tm_min == tm.tm_min
20219 && lt->tm_sec == tm.tm_sec
20220 && lt->tm_yday == tm.tm_yday
20221 && lt->tm_wday == tm.tm_wday
20222 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
20223 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
20224 return 0;
20226 return 1;
20229 static int
20230 year_2050_test ()
20232 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
20233 ignoring leap seconds. */
20234 unsigned long int answer = 2527315200UL;
20236 struct tm tm;
20237 time_t t;
20238 tm.tm_year = 2050 - 1900;
20239 tm.tm_mon = 2 - 1;
20240 tm.tm_mday = 1;
20241 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
20242 tm.tm_isdst = -1;
20244 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20245 instead of "TZ=America/Vancouver" in order to detect the bug even
20246 on systems that don't support the Olson extension, or don't have the
20247 full zoneinfo tables installed. */
20248 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
20250 t = mktime (&tm);
20252 /* Check that the result is either a failure, or close enough
20253 to the correct answer that we can assume the discrepancy is
20254 due to leap seconds. */
20255 return (t == (time_t) -1
20256 || (0 < t && answer - 120 <= t && t <= answer + 120));
20260 main ()
20262 int result = 0;
20263 time_t t, delta;
20264 int i, j;
20265 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
20266 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
20268 /* This test makes some buggy mktime implementations loop.
20269 Give up after 60 seconds; a mktime slower than that
20270 isn't worth using anyway. */
20271 alarm (60);
20273 time_t_max = (! time_t_signed
20274 ? (time_t) -1
20275 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
20276 * 2 + 1));
20277 time_t_min = (! time_t_signed
20278 ? (time_t) 0
20279 : time_t_signed_magnitude
20280 ? ~ (time_t) 0
20281 : ~ time_t_max);
20283 delta = time_t_max / 997; /* a suitable prime number */
20284 for (i = 0; i < N_STRINGS; i++)
20286 if (tz_strings[i])
20287 putenv (tz_strings[i]);
20289 for (t = 0; t <= time_t_max - delta; t += delta)
20290 if (! mktime_test (t))
20291 result |= 1;
20292 if (! (mktime_test ((time_t) 1)
20293 && mktime_test ((time_t) (60 * 60))
20294 && mktime_test ((time_t) (60 * 60 * 24))))
20295 result |= 2;
20297 for (j = 1; ; j <<= 1)
20298 if (! bigtime_test (j))
20299 result |= 4;
20300 else if (INT_MAX / 2 < j)
20301 break;
20302 if (! bigtime_test (INT_MAX))
20303 result |= 8;
20305 if (! irix_6_4_bug ())
20306 result |= 16;
20307 if (! spring_forward_gap ())
20308 result |= 32;
20309 if (! year_2050_test ())
20310 result |= 64;
20311 return result;
20313 _ACEOF
20314 if ac_fn_c_try_run "$LINENO"; then :
20315 gl_cv_func_working_mktime=yes
20316 else
20317 gl_cv_func_working_mktime=no
20319 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20320 conftest.$ac_objext conftest.beam conftest.$ac_ext
20325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
20326 $as_echo "$gl_cv_func_working_mktime" >&6; }
20328 if test $gl_cv_func_working_mktime = no; then
20329 REPLACE_MKTIME=1
20330 else
20331 REPLACE_MKTIME=0
20334 if test $REPLACE_MKTIME = 1; then
20343 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
20354 GNULIB_MKTIME=1
20363 LIB_PTHREAD_SIGMASK=
20366 if test $ac_cv_func_pthread_sigmask = yes; then
20368 else
20369 HAVE_PTHREAD_SIGMASK=0
20370 REPLACE_PTHREAD_SIGMASK=1
20376 if test $HAVE_PTHREAD_SIGMASK = 1; then
20379 if test -z "$LIB_PTHREAD_SIGMASK"; then
20380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
20381 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
20382 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
20383 $as_echo_n "(cached) " >&6
20384 else
20386 if test "$cross_compiling" = yes; then :
20388 case "$host_os" in
20389 freebsd* | hpux* | solaris | solaris2.[2-9]*)
20390 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
20392 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
20393 esac
20395 else
20396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20397 /* end confdefs.h. */
20399 #include <pthread.h>
20400 #include <signal.h>
20401 #include <stddef.h>
20402 int main ()
20404 sigset_t set;
20405 sigemptyset (&set);
20406 return pthread_sigmask (1729, &set, NULL) != 0;
20408 _ACEOF
20409 if ac_fn_c_try_run "$LINENO"; then :
20410 gl_cv_func_pthread_sigmask_in_libc_works=no
20411 else
20412 gl_cv_func_pthread_sigmask_in_libc_works=yes
20414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20415 conftest.$ac_objext conftest.beam conftest.$ac_ext
20420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
20421 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
20422 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
20423 *no)
20424 REPLACE_PTHREAD_SIGMASK=1
20426 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
20429 esac
20432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
20433 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
20434 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
20435 $as_echo_n "(cached) " >&6
20436 else
20438 gl_save_LIBS="$LIBS"
20439 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
20440 if test "$cross_compiling" = yes; then :
20441 case "$host_os" in
20442 cygwin*)
20443 gl_cv_func_pthread_sigmask_return_works="guessing no";;
20445 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
20446 esac
20448 else
20449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20450 /* end confdefs.h. */
20452 #include <pthread.h>
20453 #include <signal.h>
20454 #include <stddef.h>
20455 int main ()
20457 sigset_t set;
20458 sigemptyset (&set);
20459 if (pthread_sigmask (1729, &set, NULL) == -1)
20460 return 1;
20461 return 0;
20463 _ACEOF
20464 if ac_fn_c_try_run "$LINENO"; then :
20465 gl_cv_func_pthread_sigmask_return_works=yes
20466 else
20467 gl_cv_func_pthread_sigmask_return_works=no
20469 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20470 conftest.$ac_objext conftest.beam conftest.$ac_ext
20473 LIBS="$gl_save_LIBS"
20476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
20477 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
20478 case "$gl_cv_func_pthread_sigmask_return_works" in
20479 *no)
20480 REPLACE_PTHREAD_SIGMASK=1
20482 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
20485 esac
20487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
20488 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
20489 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
20490 $as_echo_n "(cached) " >&6
20491 else
20493 case "$host_os" in
20494 irix*)
20495 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
20497 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
20498 esac
20499 gl_save_LIBS="$LIBS"
20500 LIBS="$LIBS $LIBMULTITHREAD"
20501 if test "$cross_compiling" = yes; then :
20503 else
20504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20505 /* end confdefs.h. */
20507 #include <pthread.h>
20508 #include <signal.h>
20509 #include <stdio.h>
20510 #include <stdlib.h>
20511 #include <unistd.h>
20512 static volatile int sigint_occurred;
20513 static void
20514 sigint_handler (int sig)
20516 sigint_occurred++;
20518 int main ()
20520 sigset_t set;
20521 int pid = getpid ();
20522 char command[80];
20523 signal (SIGINT, sigint_handler);
20524 sigemptyset (&set);
20525 sigaddset (&set, SIGINT);
20526 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
20527 return 1;
20528 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
20529 if (!(system (command) == 0))
20530 return 2;
20531 sleep (2);
20532 if (!(sigint_occurred == 0))
20533 return 3;
20534 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
20535 return 4;
20536 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
20537 return 5;
20538 return 0;
20540 _ACEOF
20541 if ac_fn_c_try_run "$LINENO"; then :
20543 else
20544 gl_cv_func_pthread_sigmask_unblock_works=no
20546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20547 conftest.$ac_objext conftest.beam conftest.$ac_ext
20550 LIBS="$gl_save_LIBS"
20553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
20554 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
20555 case "$gl_cv_func_pthread_sigmask_unblock_works" in
20556 *no)
20557 REPLACE_PTHREAD_SIGMASK=1
20559 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
20562 esac
20565 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
20574 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
20577 if test $HAVE_PTHREAD_SIGMASK = 1; then
20579 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
20589 GNULIB_PTHREAD_SIGMASK=1
20598 if test $ac_cv_func_readlink = no; then
20599 HAVE_READLINK=0
20600 else
20601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
20602 $as_echo_n "checking whether readlink signature is correct... " >&6; }
20603 if test "${gl_cv_decl_readlink_works+set}" = set; then :
20604 $as_echo_n "(cached) " >&6
20605 else
20606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20607 /* end confdefs.h. */
20608 #include <unistd.h>
20609 /* Cause compilation failure if original declaration has wrong type. */
20610 ssize_t readlink (const char *, char *, size_t);
20612 main ()
20616 return 0;
20618 _ACEOF
20619 if ac_fn_c_try_compile "$LINENO"; then :
20620 gl_cv_decl_readlink_works=yes
20621 else
20622 gl_cv_decl_readlink_works=no
20624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
20627 $as_echo "$gl_cv_decl_readlink_works" >&6; }
20628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
20629 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
20630 if test "${gl_cv_func_readlink_works+set}" = set; then :
20631 $as_echo_n "(cached) " >&6
20632 else
20633 # We have readlink, so assume ln -s works.
20634 ln -s conftest.no-such conftest.link
20635 ln -s conftest.link conftest.lnk2
20636 if test "$cross_compiling" = yes; then :
20637 gl_cv_func_readlink_works="guessing no"
20638 else
20639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20640 /* end confdefs.h. */
20641 #include <unistd.h>
20644 main ()
20646 char buf[20];
20647 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
20649 return 0;
20651 _ACEOF
20652 if ac_fn_c_try_run "$LINENO"; then :
20653 gl_cv_func_readlink_works=yes
20654 else
20655 gl_cv_func_readlink_works=no
20657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20658 conftest.$ac_objext conftest.beam conftest.$ac_ext
20661 rm -f conftest.link conftest.lnk2
20663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
20664 $as_echo "$gl_cv_func_readlink_works" >&6; }
20665 if test "$gl_cv_func_readlink_works" != yes; then
20667 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
20669 REPLACE_READLINK=1
20670 elif test "$gl_cv_decl_readlink_works" != yes; then
20671 REPLACE_READLINK=1
20675 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
20684 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
20695 GNULIB_READLINK=1
20712 if test $gl_cv_have_include_next = yes; then
20713 gl_cv_next_signal_h='<'signal.h'>'
20714 else
20715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
20716 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
20717 if test "${gl_cv_next_signal_h+set}" = set; then :
20718 $as_echo_n "(cached) " >&6
20719 else
20721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722 /* end confdefs.h. */
20723 #include <signal.h>
20725 _ACEOF
20726 case "$host_os" in
20727 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20728 *) gl_absname_cpp="$ac_cpp" ;;
20729 esac
20731 case "$host_os" in
20732 mingw*)
20733 gl_dirsep_regex='[/\\]'
20736 gl_dirsep_regex='/'
20738 esac
20740 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'signal.h|{
20741 s|.*"\(.*'"${gl_dirsep_regex}"'signal.h\)".*|\1|
20742 s|^/[^/]|//&|
20746 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20747 sed -n "$gl_absolute_header_sed"`'"'
20751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20752 $as_echo "$gl_cv_next_signal_h" >&6; }
20754 NEXT_SIGNAL_H=$gl_cv_next_signal_h
20756 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20758 gl_next_as_first_directive='<'signal.h'>'
20759 else
20760 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20761 gl_next_as_first_directive=$gl_cv_next_signal_h
20763 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
20769 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
20770 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
20771 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
20772 #include <signal.h>
20775 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
20777 else
20778 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20787 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20788 #include <signal.h>
20791 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
20793 else
20794 HAVE_SIGHANDLER_T=0
20800 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
20801 /* <sys/types.h> is not needed according to POSIX, but the
20802 <sys/socket.h> in i386-unknown-freebsd4.10 and
20803 powerpc-apple-darwin5.5 required it. */
20804 #include <sys/types.h>
20805 #if HAVE_SYS_SOCKET_H
20806 # include <sys/socket.h>
20807 #elif HAVE_WS2TCPIP_H
20808 # include <ws2tcpip.h>
20809 #endif
20812 if test "x$ac_cv_type_socklen_t" = x""yes; then :
20814 else
20815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
20816 $as_echo_n "checking for socklen_t equivalent... " >&6; }
20817 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
20818 $as_echo_n "(cached) " >&6
20819 else
20820 # Systems have either "struct sockaddr *" or
20821 # "void *" as the second argument to getpeername
20822 gl_cv_socklen_t_equiv=
20823 for arg2 in "struct sockaddr" void; do
20824 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
20825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20826 /* end confdefs.h. */
20827 #include <sys/types.h>
20828 #include <sys/socket.h>
20830 int getpeername (int, $arg2 *, $t *);
20832 main ()
20834 $t len;
20835 getpeername (0, 0, &len);
20837 return 0;
20839 _ACEOF
20840 if ac_fn_c_try_compile "$LINENO"; then :
20841 gl_cv_socklen_t_equiv="$t"
20843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20844 test "$gl_cv_socklen_t_equiv" != "" && break
20845 done
20846 test "$gl_cv_socklen_t_equiv" != "" && break
20847 done
20851 if test "$gl_cv_socklen_t_equiv" = ""; then
20852 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
20854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
20855 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
20857 cat >>confdefs.h <<_ACEOF
20858 #define socklen_t $gl_cv_socklen_t_equiv
20859 _ACEOF
20864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
20865 $as_echo_n "checking for ssize_t... " >&6; }
20866 if test "${gt_cv_ssize_t+set}" = set; then :
20867 $as_echo_n "(cached) " >&6
20868 else
20869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20870 /* end confdefs.h. */
20871 #include <sys/types.h>
20873 main ()
20875 int x = sizeof (ssize_t *) + sizeof (ssize_t);
20876 return !x;
20878 return 0;
20880 _ACEOF
20881 if ac_fn_c_try_compile "$LINENO"; then :
20882 gt_cv_ssize_t=yes
20883 else
20884 gt_cv_ssize_t=no
20886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
20889 $as_echo "$gt_cv_ssize_t" >&6; }
20890 if test $gt_cv_ssize_t = no; then
20892 $as_echo "#define ssize_t int" >>confdefs.h
20897 STDARG_H=''
20898 NEXT_STDARG_H='<stdarg.h>'
20899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
20900 $as_echo_n "checking for va_copy... " >&6; }
20901 if test "${gl_cv_func_va_copy+set}" = set; then :
20902 $as_echo_n "(cached) " >&6
20903 else
20905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20906 /* end confdefs.h. */
20907 #include <stdarg.h>
20909 main ()
20912 #ifndef va_copy
20913 void (*func) (va_list, va_list) = va_copy;
20914 #endif
20917 return 0;
20919 _ACEOF
20920 if ac_fn_c_try_compile "$LINENO"; then :
20921 gl_cv_func_va_copy=yes
20922 else
20923 gl_cv_func_va_copy=no
20925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
20929 $as_echo "$gl_cv_func_va_copy" >&6; }
20930 if test $gl_cv_func_va_copy = no; then
20931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20932 /* end confdefs.h. */
20933 #if defined _AIX && !defined __GNUC__
20934 AIX vaccine
20935 #endif
20937 _ACEOF
20938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20939 $EGREP "vaccine" >/dev/null 2>&1; then :
20940 gl_aixcc=yes
20941 else
20942 gl_aixcc=no
20944 rm -f conftest*
20946 if test $gl_aixcc = yes; then
20947 STDARG_H=stdarg.h
20956 if test $gl_cv_have_include_next = yes; then
20957 gl_cv_next_stdarg_h='<'stdarg.h'>'
20958 else
20959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
20960 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
20961 if test "${gl_cv_next_stdarg_h+set}" = set; then :
20962 $as_echo_n "(cached) " >&6
20963 else
20965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20966 /* end confdefs.h. */
20967 #include <stdarg.h>
20969 _ACEOF
20970 case "$host_os" in
20971 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20972 *) gl_absname_cpp="$ac_cpp" ;;
20973 esac
20975 case "$host_os" in
20976 mingw*)
20977 gl_dirsep_regex='[/\\]'
20980 gl_dirsep_regex='/'
20982 esac
20984 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdarg.h|{
20985 s|.*"\(.*'"${gl_dirsep_regex}"'stdarg.h\)".*|\1|
20986 s|^/[^/]|//&|
20990 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20991 sed -n "$gl_absolute_header_sed"`'"'
20995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
20996 $as_echo "$gl_cv_next_stdarg_h" >&6; }
20998 NEXT_STDARG_H=$gl_cv_next_stdarg_h
21000 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21001 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21002 gl_next_as_first_directive='<'stdarg.h'>'
21003 else
21004 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21005 gl_next_as_first_directive=$gl_cv_next_stdarg_h
21007 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
21012 if test "$gl_cv_next_stdarg_h" = '""'; then
21013 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
21014 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
21016 else
21018 saved_as_echo_n="$as_echo_n"
21019 as_echo_n=':'
21020 if test "${gl_cv_func___va_copy+set}" = set; then :
21021 $as_echo_n "(cached) " >&6
21022 else
21024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21025 /* end confdefs.h. */
21026 #include <stdarg.h>
21028 main ()
21031 #ifndef __va_copy
21032 error, bail out
21033 #endif
21036 return 0;
21038 _ACEOF
21039 if ac_fn_c_try_compile "$LINENO"; then :
21040 gl_cv_func___va_copy=yes
21041 else
21042 gl_cv_func___va_copy=no
21044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21047 as_echo_n="$saved_as_echo_n"
21049 if test $gl_cv_func___va_copy = yes; then
21051 $as_echo "#define va_copy __va_copy" >>confdefs.h
21053 else
21056 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
21062 if test -n "$STDARG_H"; then
21063 GL_GENERATE_STDARG_H_TRUE=
21064 GL_GENERATE_STDARG_H_FALSE='#'
21065 else
21066 GL_GENERATE_STDARG_H_TRUE='#'
21067 GL_GENERATE_STDARG_H_FALSE=
21075 # Define two additional variables used in the Makefile substitution.
21077 if test "$ac_cv_header_stdbool_h" = yes; then
21078 STDBOOL_H=''
21079 else
21080 STDBOOL_H='stdbool.h'
21083 if test -n "$STDBOOL_H"; then
21084 GL_GENERATE_STDBOOL_H_TRUE=
21085 GL_GENERATE_STDBOOL_H_FALSE='#'
21086 else
21087 GL_GENERATE_STDBOOL_H_TRUE='#'
21088 GL_GENERATE_STDBOOL_H_FALSE=
21092 if test "$ac_cv_type__Bool" = yes; then
21093 HAVE__BOOL=1
21094 else
21095 HAVE__BOOL=0
21102 STDDEF_H=
21103 if test $gt_cv_c_wchar_t = no; then
21104 HAVE_WCHAR_T=0
21105 STDDEF_H=stddef.h
21107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21108 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
21109 if test "${gl_cv_decl_null_works+set}" = set; then :
21110 $as_echo_n "(cached) " >&6
21111 else
21112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21113 /* end confdefs.h. */
21114 #include <stddef.h>
21115 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21118 main ()
21122 return 0;
21124 _ACEOF
21125 if ac_fn_c_try_compile "$LINENO"; then :
21126 gl_cv_decl_null_works=yes
21127 else
21128 gl_cv_decl_null_works=no
21130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21133 $as_echo "$gl_cv_decl_null_works" >&6; }
21134 if test $gl_cv_decl_null_works = no; then
21135 REPLACE_NULL=1
21136 STDDEF_H=stddef.h
21139 if test -n "$STDDEF_H"; then
21140 GL_GENERATE_STDDEF_H_TRUE=
21141 GL_GENERATE_STDDEF_H_FALSE='#'
21142 else
21143 GL_GENERATE_STDDEF_H_TRUE='#'
21144 GL_GENERATE_STDDEF_H_FALSE=
21147 if test -n "$STDDEF_H"; then
21156 if test $gl_cv_have_include_next = yes; then
21157 gl_cv_next_stddef_h='<'stddef.h'>'
21158 else
21159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21160 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
21161 if test "${gl_cv_next_stddef_h+set}" = set; then :
21162 $as_echo_n "(cached) " >&6
21163 else
21165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21166 /* end confdefs.h. */
21167 #include <stddef.h>
21169 _ACEOF
21170 case "$host_os" in
21171 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21172 *) gl_absname_cpp="$ac_cpp" ;;
21173 esac
21175 case "$host_os" in
21176 mingw*)
21177 gl_dirsep_regex='[/\\]'
21180 gl_dirsep_regex='/'
21182 esac
21184 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stddef.h|{
21185 s|.*"\(.*'"${gl_dirsep_regex}"'stddef.h\)".*|\1|
21186 s|^/[^/]|//&|
21190 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21191 sed -n "$gl_absolute_header_sed"`'"'
21195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21196 $as_echo "$gl_cv_next_stddef_h" >&6; }
21198 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21200 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21201 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21202 gl_next_as_first_directive='<'stddef.h'>'
21203 else
21204 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21205 gl_next_as_first_directive=$gl_cv_next_stddef_h
21207 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21226 if test $gl_cv_have_include_next = yes; then
21227 gl_cv_next_stdio_h='<'stdio.h'>'
21228 else
21229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
21230 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
21231 if test "${gl_cv_next_stdio_h+set}" = set; then :
21232 $as_echo_n "(cached) " >&6
21233 else
21235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21236 /* end confdefs.h. */
21237 #include <stdio.h>
21239 _ACEOF
21240 case "$host_os" in
21241 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21242 *) gl_absname_cpp="$ac_cpp" ;;
21243 esac
21245 case "$host_os" in
21246 mingw*)
21247 gl_dirsep_regex='[/\\]'
21250 gl_dirsep_regex='/'
21252 esac
21254 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdio.h|{
21255 s|.*"\(.*'"${gl_dirsep_regex}"'stdio.h\)".*|\1|
21256 s|^/[^/]|//&|
21260 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21261 sed -n "$gl_absolute_header_sed"`'"'
21265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
21266 $as_echo "$gl_cv_next_stdio_h" >&6; }
21268 NEXT_STDIO_H=$gl_cv_next_stdio_h
21270 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21271 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21272 gl_next_as_first_directive='<'stdio.h'>'
21273 else
21274 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21275 gl_next_as_first_directive=$gl_cv_next_stdio_h
21277 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
21283 GNULIB_FSCANF=1
21284 GNULIB_SCANF=1
21285 GNULIB_FGETC=1
21286 GNULIB_GETC=1
21287 GNULIB_GETCHAR=1
21288 GNULIB_FGETS=1
21289 GNULIB_GETS=1
21290 GNULIB_FREAD=1
21293 GNULIB_FPRINTF=1
21294 GNULIB_PRINTF=1
21295 GNULIB_VFPRINTF=1
21296 GNULIB_VPRINTF=1
21297 GNULIB_FPUTC=1
21298 GNULIB_PUTC=1
21299 GNULIB_PUTCHAR=1
21300 GNULIB_FPUTS=1
21301 GNULIB_PUTS=1
21302 GNULIB_FWRITE=1
21318 if test $gl_cv_have_include_next = yes; then
21319 gl_cv_next_stdlib_h='<'stdlib.h'>'
21320 else
21321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
21322 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
21323 if test "${gl_cv_next_stdlib_h+set}" = set; then :
21324 $as_echo_n "(cached) " >&6
21325 else
21327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21328 /* end confdefs.h. */
21329 #include <stdlib.h>
21331 _ACEOF
21332 case "$host_os" in
21333 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21334 *) gl_absname_cpp="$ac_cpp" ;;
21335 esac
21337 case "$host_os" in
21338 mingw*)
21339 gl_dirsep_regex='[/\\]'
21342 gl_dirsep_regex='/'
21344 esac
21346 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdlib.h|{
21347 s|.*"\(.*'"${gl_dirsep_regex}"'stdlib.h\)".*|\1|
21348 s|^/[^/]|//&|
21352 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21353 sed -n "$gl_absolute_header_sed"`'"'
21357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21358 $as_echo "$gl_cv_next_stdlib_h" >&6; }
21360 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21362 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21363 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21364 gl_next_as_first_directive='<'stdlib.h'>'
21365 else
21366 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21367 gl_next_as_first_directive=$gl_cv_next_stdlib_h
21369 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21379 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
21387 $as_echo "#define my_strftime nstrftime" >>confdefs.h
21396 if test "$ac_cv_have_decl_strtoimax" != yes; then
21397 HAVE_DECL_STRTOIMAX=0
21400 if test $ac_cv_func_strtoimax = no; then
21409 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
21412 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
21413 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
21414 ac_have_decl=1
21415 else
21416 ac_have_decl=0
21419 cat >>confdefs.h <<_ACEOF
21420 #define HAVE_DECL_STRTOLL $ac_have_decl
21421 _ACEOF
21431 GNULIB_STRTOIMAX=1
21441 if test "$ac_cv_have_decl_strtoumax" != yes; then
21442 HAVE_DECL_STRTOUMAX=0
21445 if test $ac_cv_func_strtoumax = no; then
21454 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
21457 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
21458 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
21459 ac_have_decl=1
21460 else
21461 ac_have_decl=0
21464 cat >>confdefs.h <<_ACEOF
21465 #define HAVE_DECL_STRTOULL $ac_have_decl
21466 _ACEOF
21476 GNULIB_STRTOUMAX=1
21484 if test $ac_cv_func_symlink = no; then
21485 HAVE_SYMLINK=0
21486 else
21487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
21488 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
21489 if test "${gl_cv_func_symlink_works+set}" = set; then :
21490 $as_echo_n "(cached) " >&6
21491 else
21492 if test "$cross_compiling" = yes; then :
21493 gl_cv_func_symlink_works="guessing no"
21494 else
21495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21496 /* end confdefs.h. */
21497 #include <unistd.h>
21500 main ()
21502 int result = 0;
21503 if (!symlink ("a", "conftest.link/"))
21504 result |= 1;
21505 if (symlink ("conftest.f", "conftest.lnk2"))
21506 result |= 2;
21507 else if (!symlink ("a", "conftest.lnk2/"))
21508 result |= 4;
21509 return result;
21512 return 0;
21514 _ACEOF
21515 if ac_fn_c_try_run "$LINENO"; then :
21516 gl_cv_func_symlink_works=yes
21517 else
21518 gl_cv_func_symlink_works=no
21520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21521 conftest.$ac_objext conftest.beam conftest.$ac_ext
21524 rm -f conftest.f conftest.link conftest.lnk2
21526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
21527 $as_echo "$gl_cv_func_symlink_works" >&6; }
21528 if test "$gl_cv_func_symlink_works" != yes; then
21529 REPLACE_SYMLINK=1
21533 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
21542 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
21550 GNULIB_SYMLINK=1
21572 if test $gl_cv_have_include_next = yes; then
21573 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
21574 else
21575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
21576 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
21577 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
21578 $as_echo_n "(cached) " >&6
21579 else
21581 if test $ac_cv_header_sys_stat_h = yes; then
21584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21585 /* end confdefs.h. */
21586 #include <sys/stat.h>
21588 _ACEOF
21589 case "$host_os" in
21590 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21591 *) gl_absname_cpp="$ac_cpp" ;;
21592 esac
21594 case "$host_os" in
21595 mingw*)
21596 gl_dirsep_regex='[/\\]'
21599 gl_dirsep_regex='/'
21601 esac
21603 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'sys/stat.h|{
21604 s|.*"\(.*'"${gl_dirsep_regex}"'sys/stat.h\)".*|\1|
21605 s|^/[^/]|//&|
21609 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21610 sed -n "$gl_absolute_header_sed"`'"'
21611 else
21612 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
21617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
21618 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
21620 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
21622 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21623 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21624 gl_next_as_first_directive='<'sys/stat.h'>'
21625 else
21626 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21627 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
21629 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
21637 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
21638 #include <sys/stat.h>
21640 if test "x$ac_cv_type_nlink_t" = x""yes; then :
21642 else
21644 $as_echo "#define nlink_t int" >>confdefs.h
21662 if test $ac_cv_have_decl_localtime_r = no; then
21663 HAVE_DECL_LOCALTIME_R=0
21667 if test $ac_cv_func_localtime_r = yes; then
21668 HAVE_LOCALTIME_R=1
21669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
21670 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
21671 if test "${gl_cv_time_r_posix+set}" = set; then :
21672 $as_echo_n "(cached) " >&6
21673 else
21674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21675 /* end confdefs.h. */
21676 #include <time.h>
21678 main ()
21680 /* We don't need to append 'restrict's to the argument types,
21681 even though the POSIX signature has the 'restrict's,
21682 since C99 says they can't affect type compatibility. */
21683 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
21684 if (ptr) return 0;
21685 /* Check the return type is a pointer.
21686 On HP-UX 10 it is 'int'. */
21687 *localtime_r (0, 0);
21689 return 0;
21692 _ACEOF
21693 if ac_fn_c_try_compile "$LINENO"; then :
21694 gl_cv_time_r_posix=yes
21695 else
21696 gl_cv_time_r_posix=no
21698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
21702 $as_echo "$gl_cv_time_r_posix" >&6; }
21703 if test $gl_cv_time_r_posix = yes; then
21704 REPLACE_LOCALTIME_R=0
21705 else
21706 REPLACE_LOCALTIME_R=1
21708 else
21709 HAVE_LOCALTIME_R=0
21712 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
21721 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
21732 GNULIB_TIME_R=1
21752 if test $gl_cv_have_include_next = yes; then
21753 gl_cv_next_unistd_h='<'unistd.h'>'
21754 else
21755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
21756 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
21757 if test "${gl_cv_next_unistd_h+set}" = set; then :
21758 $as_echo_n "(cached) " >&6
21759 else
21761 if test $ac_cv_header_unistd_h = yes; then
21764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21765 /* end confdefs.h. */
21766 #include <unistd.h>
21768 _ACEOF
21769 case "$host_os" in
21770 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21771 *) gl_absname_cpp="$ac_cpp" ;;
21772 esac
21774 case "$host_os" in
21775 mingw*)
21776 gl_dirsep_regex='[/\\]'
21779 gl_dirsep_regex='/'
21781 esac
21783 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'unistd.h|{
21784 s|.*"\(.*'"${gl_dirsep_regex}"'unistd.h\)".*|\1|
21785 s|^/[^/]|//&|
21789 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21790 sed -n "$gl_absolute_header_sed"`'"'
21791 else
21792 gl_cv_next_unistd_h='<'unistd.h'>'
21797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
21798 $as_echo "$gl_cv_next_unistd_h" >&6; }
21800 NEXT_UNISTD_H=$gl_cv_next_unistd_h
21802 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21803 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21804 gl_next_as_first_directive='<'unistd.h'>'
21805 else
21806 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21807 gl_next_as_first_directive=$gl_cv_next_unistd_h
21809 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
21814 if test $ac_cv_header_unistd_h = yes; then
21815 HAVE_UNISTD_H=1
21816 else
21817 HAVE_UNISTD_H=0
21825 gl_gnulib_enabled_dosname=false
21826 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
21827 gl_gnulib_enabled_pathmax=false
21828 gl_gnulib_enabled_sigprocmask=false
21829 gl_gnulib_enabled_stat=false
21830 gl_gnulib_enabled_strtoll=false
21831 gl_gnulib_enabled_strtoull=false
21832 gl_gnulib_enabled_verify=false
21833 func_gl_gnulib_m4code_dosname ()
21835 if ! $gl_gnulib_enabled_dosname; then
21836 gl_gnulib_enabled_dosname=true
21839 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
21841 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
21844 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
21847 func_gl_gnulib_m4code_pathmax ()
21849 if ! $gl_gnulib_enabled_pathmax; then
21853 gl_gnulib_enabled_pathmax=true
21856 func_gl_gnulib_m4code_sigprocmask ()
21858 if ! $gl_gnulib_enabled_sigprocmask; then
21862 if test $gl_cv_type_sigset_t = yes; then
21863 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
21864 if test "x$ac_cv_func_sigprocmask" = x""yes; then :
21865 gl_cv_func_sigprocmask=1
21869 if test -z "$gl_cv_func_sigprocmask"; then
21870 HAVE_POSIX_SIGNALBLOCKING=0
21873 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
21882 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
21893 GNULIB_SIGPROCMASK=1
21899 gl_gnulib_enabled_sigprocmask=true
21902 func_gl_gnulib_m4code_stat ()
21904 if ! $gl_gnulib_enabled_stat; then
21908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
21909 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
21910 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
21911 $as_echo_n "(cached) " >&6
21912 else
21913 if test "$cross_compiling" = yes; then :
21914 case $host_os in
21915 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
21916 *) gl_cv_func_stat_dir_slash="guessing yes";;
21917 esac
21918 else
21919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21920 /* end confdefs.h. */
21921 #include <sys/stat.h>
21924 main ()
21926 struct stat st; return stat (".", &st) != stat ("./", &st);
21928 return 0;
21930 _ACEOF
21931 if ac_fn_c_try_run "$LINENO"; then :
21932 gl_cv_func_stat_dir_slash=yes
21933 else
21934 gl_cv_func_stat_dir_slash=no
21936 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21937 conftest.$ac_objext conftest.beam conftest.$ac_ext
21941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
21942 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
21943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
21944 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
21945 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
21946 $as_echo_n "(cached) " >&6
21947 else
21948 touch conftest.tmp
21949 # Assume that if we have lstat, we can also check symlinks.
21950 if test $ac_cv_func_lstat = yes; then
21951 ln -s conftest.tmp conftest.lnk
21953 if test "$cross_compiling" = yes; then :
21954 gl_cv_func_stat_file_slash="guessing no"
21955 else
21956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21957 /* end confdefs.h. */
21958 #include <sys/stat.h>
21961 main ()
21963 int result = 0;
21964 struct stat st;
21965 if (!stat ("conftest.tmp/", &st))
21966 result |= 1;
21967 #if HAVE_LSTAT
21968 if (!stat ("conftest.lnk/", &st))
21969 result |= 2;
21970 #endif
21971 return result;
21974 return 0;
21976 _ACEOF
21977 if ac_fn_c_try_run "$LINENO"; then :
21978 gl_cv_func_stat_file_slash=yes
21979 else
21980 gl_cv_func_stat_file_slash=no
21982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21983 conftest.$ac_objext conftest.beam conftest.$ac_ext
21986 rm -f conftest.tmp conftest.lnk
21988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
21989 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
21990 case $gl_cv_func_stat_dir_slash in
21991 *no) REPLACE_STAT=1
21993 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
21995 esac
21996 case $gl_cv_func_stat_file_slash in
21997 *no) REPLACE_STAT=1
21999 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
22001 esac
22003 if test $REPLACE_STAT = 1; then
22012 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
22024 GNULIB_STAT=1
22030 gl_gnulib_enabled_stat=true
22031 if test $REPLACE_STAT = 1; then
22032 func_gl_gnulib_m4code_dosname
22034 if test $REPLACE_STAT = 1; then
22035 func_gl_gnulib_m4code_pathmax
22037 if test $REPLACE_STAT = 1; then
22038 func_gl_gnulib_m4code_verify
22042 func_gl_gnulib_m4code_strtoll ()
22044 if ! $gl_gnulib_enabled_strtoll; then
22048 if test "$ac_cv_type_long_long_int" = yes; then
22049 for ac_func in strtoll
22050 do :
22051 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
22052 if test "x$ac_cv_func_strtoll" = x""yes; then :
22053 cat >>confdefs.h <<_ACEOF
22054 #define HAVE_STRTOLL 1
22055 _ACEOF
22058 done
22060 if test $ac_cv_func_strtoll = no; then
22061 HAVE_STRTOLL=0
22065 if test $HAVE_STRTOLL = 0; then
22074 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
22085 GNULIB_STRTOLL=1
22091 gl_gnulib_enabled_strtoll=true
22094 func_gl_gnulib_m4code_strtoull ()
22096 if ! $gl_gnulib_enabled_strtoull; then
22100 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
22101 for ac_func in strtoull
22102 do :
22103 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
22104 if test "x$ac_cv_func_strtoull" = x""yes; then :
22105 cat >>confdefs.h <<_ACEOF
22106 #define HAVE_STRTOULL 1
22107 _ACEOF
22110 done
22112 if test $ac_cv_func_strtoull = no; then
22113 HAVE_STRTOULL=0
22117 if test $HAVE_STRTOULL = 0; then
22126 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
22137 GNULIB_STRTOULL=1
22143 gl_gnulib_enabled_strtoull=true
22146 func_gl_gnulib_m4code_verify ()
22148 if ! $gl_gnulib_enabled_verify; then
22149 gl_gnulib_enabled_verify=true
22152 if test $REPLACE_GETOPT = 1; then
22153 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
22155 if test $REPLACE_LSTAT = 1; then
22156 func_gl_gnulib_m4code_dosname
22158 if test $REPLACE_LSTAT = 1; then
22159 func_gl_gnulib_m4code_stat
22161 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
22162 func_gl_gnulib_m4code_sigprocmask
22164 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
22165 func_gl_gnulib_m4code_stat
22167 if test $ac_cv_func_strtoimax = no; then
22168 func_gl_gnulib_m4code_verify
22170 if test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then
22171 func_gl_gnulib_m4code_strtoll
22173 if test $ac_cv_func_strtoumax = no; then
22174 func_gl_gnulib_m4code_verify
22176 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
22177 func_gl_gnulib_m4code_strtoull
22180 if $gl_gnulib_enabled_dosname; then
22181 gl_GNULIB_ENABLED_dosname_TRUE=
22182 gl_GNULIB_ENABLED_dosname_FALSE='#'
22183 else
22184 gl_GNULIB_ENABLED_dosname_TRUE='#'
22185 gl_GNULIB_ENABLED_dosname_FALSE=
22188 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
22189 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
22190 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
22191 else
22192 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
22193 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
22196 if $gl_gnulib_enabled_pathmax; then
22197 gl_GNULIB_ENABLED_pathmax_TRUE=
22198 gl_GNULIB_ENABLED_pathmax_FALSE='#'
22199 else
22200 gl_GNULIB_ENABLED_pathmax_TRUE='#'
22201 gl_GNULIB_ENABLED_pathmax_FALSE=
22204 if $gl_gnulib_enabled_sigprocmask; then
22205 gl_GNULIB_ENABLED_sigprocmask_TRUE=
22206 gl_GNULIB_ENABLED_sigprocmask_FALSE='#'
22207 else
22208 gl_GNULIB_ENABLED_sigprocmask_TRUE='#'
22209 gl_GNULIB_ENABLED_sigprocmask_FALSE=
22212 if $gl_gnulib_enabled_stat; then
22213 gl_GNULIB_ENABLED_stat_TRUE=
22214 gl_GNULIB_ENABLED_stat_FALSE='#'
22215 else
22216 gl_GNULIB_ENABLED_stat_TRUE='#'
22217 gl_GNULIB_ENABLED_stat_FALSE=
22220 if $gl_gnulib_enabled_strtoll; then
22221 gl_GNULIB_ENABLED_strtoll_TRUE=
22222 gl_GNULIB_ENABLED_strtoll_FALSE='#'
22223 else
22224 gl_GNULIB_ENABLED_strtoll_TRUE='#'
22225 gl_GNULIB_ENABLED_strtoll_FALSE=
22228 if $gl_gnulib_enabled_strtoull; then
22229 gl_GNULIB_ENABLED_strtoull_TRUE=
22230 gl_GNULIB_ENABLED_strtoull_FALSE='#'
22231 else
22232 gl_GNULIB_ENABLED_strtoull_TRUE='#'
22233 gl_GNULIB_ENABLED_strtoull_FALSE=
22236 if $gl_gnulib_enabled_verify; then
22237 gl_GNULIB_ENABLED_verify_TRUE=
22238 gl_GNULIB_ENABLED_verify_FALSE='#'
22239 else
22240 gl_GNULIB_ENABLED_verify_TRUE='#'
22241 gl_GNULIB_ENABLED_verify_FALSE=
22244 # End of code from modules
22254 gltests_libdeps=
22255 gltests_ltlibdeps=
22265 gl_source_base='tests'
22266 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
22268 gl_module_indicator_condition=$gltests_WITNESS
22279 LIBGNU_LIBDEPS="$gl_libdeps"
22281 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
22285 case "$opsys" in
22286 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
22288 darwin)
22289 ## The -headerpad option tells ld (see man page) to leave room at the
22290 ## end of the header for adding load commands. Needed for dumping.
22291 ## 0x690 is the total size of 30 segment load commands (at 56
22292 ## each); under Cocoa 31 commands are required.
22293 if test "$HAVE_NS" = "yes"; then
22294 libs_nsgui="-framework AppKit"
22295 headerpad_extra=6C8
22296 else
22297 libs_nsgui=
22298 headerpad_extra=690
22300 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
22302 ## This is here because src/Makefile.in did some extra fiddling around
22303 ## with LD_SWITCH_SYSTEM. The cpp logic was:
22304 ## #ifndef LD_SWITCH_SYSTEM
22305 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
22306 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
22307 ## not using gcc, darwin system not on an alpha (ie darwin, since
22308 ## darwin + alpha does not occur).
22309 ## Because this was done in src/Makefile.in, the resulting part of
22310 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
22311 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
22312 ## rather than LD_SWITCH_SYSTEM.
22313 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
22314 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
22317 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
22318 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
22319 ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
22320 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
22321 ## had different values in configure (in ac_link) and src/Makefile.in.
22322 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
22323 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
22325 *) LD_SWITCH_SYSTEM_TEMACS= ;;
22326 esac
22328 if test "$NS_IMPL_GNUSTEP" = "yes"; then
22329 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
22335 LD_FIRSTFLAG=
22336 ORDINARY_LINK=
22337 case "$opsys" in
22338 ## gnu: GNU needs its own crt0.
22339 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
22341 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
22342 ## library search parth, i.e. it won't search /usr/lib for libc and
22343 ## friends. Using -nostartfiles instead avoids this problem, and
22344 ## will also work on earlier NetBSD releases.
22345 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
22347 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
22348 ## MkLinux/LinuxPPC needs this.
22349 ## ibms390x only supports opsys = gnu-linux so it can be added here.
22350 gnu-*)
22351 case "$machine" in
22352 macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;;
22353 esac
22355 esac
22358 if test "x$ORDINARY_LINK" = "xyes"; then
22360 LD_FIRSTFLAG=""
22362 $as_echo "#define ORDINARY_LINK 1" >>confdefs.h
22365 ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
22366 ## freebsd, gnu-* not on macppc|ibms390x.
22367 elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
22369 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
22370 ## places that are difficult to figure out at make time. Fortunately,
22371 ## these same versions allow you to pass arbitrary flags on to the
22372 ## linker, so there is no reason not to use it as a linker.
22374 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
22375 ## searching for libraries in its internal directories, so we have to
22376 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
22377 LD_FIRSTFLAG="-nostdlib"
22380 ## FIXME? What setting of EDIT_LDFLAGS should this have?
22381 test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
22386 ## FIXME? The logic here is not precisely the same as that above.
22387 ## There is no check here for a pre-defined LD_FIRSTFLAG.
22388 ## Should we only be setting LIB_GCC if LD ~ -nostdlib?
22389 LIB_GCC=
22390 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
22392 case "$opsys" in
22393 freebsd|netbsd|openbsd) LIB_GCC= ;;
22395 gnu-*)
22396 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
22397 ## build on ARM EABI under GNU/Linux. (Bug#5518)
22398 case $host_cpu in
22399 arm*)
22400 LIB_GCC="-lgcc_s"
22403 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
22404 ## immediately undefine it again and redefine it to empty.
22405 ## Was the C_SWITCH_X_SITE part really necessary?
22406 ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
22407 LIB_GCC=
22409 esac
22412 ## Ask GCC where to find libgcc.a.
22413 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
22414 esac
22418 ## If we're using X11/GNUstep, define some consequences.
22419 if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
22421 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
22424 $as_echo "#define HAVE_MOUSE 1" >>confdefs.h
22431 #### Report on what we decided to do.
22432 #### Report GTK as a toolkit, even if it doesn't use Xt.
22433 #### It makes printing result more understandable as using GTK sets
22434 #### toolkit_scroll_bars to yes by default.
22435 if test "${HAVE_GTK}" = "yes"; then
22436 USE_X_TOOLKIT=GTK
22439 and_machfile=
22440 if test -n "$machfile"; then
22441 and_machfile=" and \`${machfile}'"
22444 echo "
22445 Configured for \`${canonical}'.
22447 Where should the build process find the source code? ${srcdir}
22448 What operating system and machine description files should Emacs use?
22449 \`${opsysfile}'${and_machfile}
22450 What compiler should emacs be built with? ${CC} ${CFLAGS}
22451 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
22452 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
22453 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
22454 What window system should Emacs use? ${window_system}
22455 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
22457 if test -n "${x_includes}"; then
22458 echo " Where do we find X Windows header files? ${x_includes}"
22459 else
22460 echo " Where do we find X Windows header files? Standard dirs"
22462 if test -n "${x_libraries}"; then
22463 echo " Where do we find X Windows libraries? ${x_libraries}"
22464 else
22465 echo " Where do we find X Windows libraries? Standard dirs"
22468 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
22469 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
22470 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
22471 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
22472 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
22473 echo " Does Emacs use -lpng? ${HAVE_PNG}"
22474 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
22475 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
22477 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
22478 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
22479 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
22480 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
22481 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
22482 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
22483 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
22485 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
22486 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
22487 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
22488 echo " Does Emacs use -lxft? ${HAVE_XFT}"
22490 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
22491 echo
22493 if test -n "${EMACSDATA}"; then
22494 echo " Environment variable EMACSDATA set to: $EMACSDATA"
22496 if test -n "${EMACSDOC}"; then
22497 echo " Environment variable EMACSDOC set to: $EMACSDOC"
22500 if test $USE_XASSERTS = yes; then
22501 echo " Compiling with asserts turned on."
22502 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
22505 echo
22507 if test "$HAVE_NS" = "yes"; then
22508 echo
22509 echo "You must run \"${MAKE-make} install\" in order to test the built application.
22510 The installed application will go to nextstep/Emacs.app and can be
22511 run or moved from there."
22512 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
22513 echo "The application will be fully self-contained."
22514 else
22515 echo "The lisp resources for the application will be installed under ${prefix}.
22516 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
22517 to run if these resources are not installed."
22519 echo
22523 # Remove any trailing slashes in these variables.
22524 test "${prefix}" != NONE &&
22525 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
22526 test "${exec_prefix}" != NONE &&
22527 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
22529 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"
22531 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"
22534 opt_makefile=test/automated/Makefile
22536 if test -f $srcdir/${opt_makefile}.in; then
22537 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
22538 ac_config_files="$ac_config_files test/automated/Makefile"
22542 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
22546 ac_config_commands="$ac_config_commands mkdirs"
22549 ac_config_commands="$ac_config_commands epaths"
22552 ac_config_commands="$ac_config_commands gdbinit"
22555 cat >confcache <<\_ACEOF
22556 # This file is a shell script that caches the results of configure
22557 # tests run on this system so they can be shared between configure
22558 # scripts and configure runs, see configure's option --config-cache.
22559 # It is not useful on other systems. If it contains results you don't
22560 # want to keep, you may remove or edit it.
22562 # config.status only pays attention to the cache file if you give it
22563 # the --recheck option to rerun configure.
22565 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22566 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22567 # following values.
22569 _ACEOF
22571 # The following way of writing the cache mishandles newlines in values,
22572 # but we know of no workaround that is simple, portable, and efficient.
22573 # So, we kill variables containing newlines.
22574 # Ultrix sh set writes to stderr and can't be redirected directly,
22575 # and sets the high bit in the cache file unless we assign to the vars.
22577 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
22578 eval ac_val=\$$ac_var
22579 case $ac_val in #(
22580 *${as_nl}*)
22581 case $ac_var in #(
22582 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
22583 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
22584 esac
22585 case $ac_var in #(
22586 _ | IFS | as_nl) ;; #(
22587 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
22588 *) { eval $ac_var=; unset $ac_var;} ;;
22589 esac ;;
22590 esac
22591 done
22593 (set) 2>&1 |
22594 case $as_nl`(ac_space=' '; set) 2>&1` in #(
22595 *${as_nl}ac_space=\ *)
22596 # `set' does not quote correctly, so add quotes: double-quote
22597 # substitution turns \\\\ into \\, and sed turns \\ into \.
22598 sed -n \
22599 "s/'/'\\\\''/g;
22600 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22601 ;; #(
22603 # `set' quotes correctly as required by POSIX, so do not add quotes.
22604 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
22606 esac |
22607 sort
22609 sed '
22610 /^ac_cv_env_/b end
22611 t clear
22612 :clear
22613 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22614 t end
22615 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22616 :end' >>confcache
22617 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
22618 if test -w "$cache_file"; then
22619 test "x$cache_file" != "x/dev/null" &&
22620 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
22621 $as_echo "$as_me: updating cache $cache_file" >&6;}
22622 cat confcache >$cache_file
22623 else
22624 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
22625 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
22628 rm -f confcache
22630 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22631 # Let make expand exec_prefix.
22632 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22634 DEFS=-DHAVE_CONFIG_H
22636 ac_libobjs=
22637 ac_ltlibobjs=
22638 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22639 # 1. Remove the extension, and $U if already installed.
22640 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
22641 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
22642 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
22643 # will be set to the directory where LIBOBJS objects are built.
22644 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
22645 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
22646 done
22647 LIBOBJS=$ac_libobjs
22649 LTLIBOBJS=$ac_ltlibobjs
22652 if test -n "$EXEEXT"; then
22653 am__EXEEXT_TRUE=
22654 am__EXEEXT_FALSE='#'
22655 else
22656 am__EXEEXT_TRUE='#'
22657 am__EXEEXT_FALSE=
22660 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
22661 as_fn_error "conditional \"AMDEP\" was never defined.
22662 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22664 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
22665 as_fn_error "conditional \"am__fastdepCC\" was never defined.
22666 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22669 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
22670 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
22671 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22673 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
22674 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
22675 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22678 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
22679 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
22680 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22682 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
22683 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
22684 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22686 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
22687 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
22688 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22690 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
22691 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
22692 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22694 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
22695 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
22696 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22698 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
22699 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
22700 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22702 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
22703 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
22704 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22706 if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then
22707 as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined.
22708 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22710 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
22711 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
22712 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22714 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
22715 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
22716 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22718 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
22719 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
22720 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22722 if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
22723 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
22724 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22727 gl_libobjs=
22728 gl_ltlibobjs=
22729 if test -n "$gl_LIBOBJS"; then
22730 # Remove the extension.
22731 sed_drop_objext='s/\.o$//;s/\.obj$//'
22732 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
22733 gl_libobjs="$gl_libobjs $i.$ac_objext"
22734 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
22735 done
22737 gl_LIBOBJS=$gl_libobjs
22739 gl_LTLIBOBJS=$gl_ltlibobjs
22743 gltests_libobjs=
22744 gltests_ltlibobjs=
22745 if test -n "$gltests_LIBOBJS"; then
22746 # Remove the extension.
22747 sed_drop_objext='s/\.o$//;s/\.obj$//'
22748 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
22749 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
22750 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
22751 done
22753 gltests_LIBOBJS=$gltests_libobjs
22755 gltests_LTLIBOBJS=$gltests_ltlibobjs
22759 : ${CONFIG_STATUS=./config.status}
22760 ac_write_fail=0
22761 ac_clean_files_save=$ac_clean_files
22762 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22763 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
22764 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
22765 as_write_fail=0
22766 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
22767 #! $SHELL
22768 # Generated by $as_me.
22769 # Run this file to recreate the current configuration.
22770 # Compiler output produced by configure, useful for debugging
22771 # configure, is in config.log if it exists.
22773 debug=false
22774 ac_cs_recheck=false
22775 ac_cs_silent=false
22777 SHELL=\${CONFIG_SHELL-$SHELL}
22778 export SHELL
22779 _ASEOF
22780 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
22781 ## -------------------- ##
22782 ## M4sh Initialization. ##
22783 ## -------------------- ##
22785 # Be more Bourne compatible
22786 DUALCASE=1; export DUALCASE # for MKS sh
22787 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22788 emulate sh
22789 NULLCMD=:
22790 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22791 # is contrary to our usage. Disable this feature.
22792 alias -g '${1+"$@"}'='"$@"'
22793 setopt NO_GLOB_SUBST
22794 else
22795 case `(set -o) 2>/dev/null` in #(
22796 *posix*) :
22797 set -o posix ;; #(
22798 *) :
22800 esac
22804 as_nl='
22806 export as_nl
22807 # Printing a long string crashes Solaris 7 /usr/bin/printf.
22808 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22809 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
22810 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
22811 # Prefer a ksh shell builtin over an external printf program on Solaris,
22812 # but without wasting forks for bash or zsh.
22813 if test -z "$BASH_VERSION$ZSH_VERSION" \
22814 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
22815 as_echo='print -r --'
22816 as_echo_n='print -rn --'
22817 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
22818 as_echo='printf %s\n'
22819 as_echo_n='printf %s'
22820 else
22821 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
22822 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
22823 as_echo_n='/usr/ucb/echo -n'
22824 else
22825 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
22826 as_echo_n_body='eval
22827 arg=$1;
22828 case $arg in #(
22829 *"$as_nl"*)
22830 expr "X$arg" : "X\\(.*\\)$as_nl";
22831 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
22832 esac;
22833 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
22835 export as_echo_n_body
22836 as_echo_n='sh -c $as_echo_n_body as_echo'
22838 export as_echo_body
22839 as_echo='sh -c $as_echo_body as_echo'
22842 # The user is always right.
22843 if test "${PATH_SEPARATOR+set}" != set; then
22844 PATH_SEPARATOR=:
22845 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
22846 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
22847 PATH_SEPARATOR=';'
22852 # IFS
22853 # We need space, tab and new line, in precisely that order. Quoting is
22854 # there to prevent editors from complaining about space-tab.
22855 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
22856 # splitting by setting IFS to empty value.)
22857 IFS=" "" $as_nl"
22859 # Find who we are. Look in the path if we contain no directory separator.
22860 case $0 in #((
22861 *[\\/]* ) as_myself=$0 ;;
22862 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22863 for as_dir in $PATH
22865 IFS=$as_save_IFS
22866 test -z "$as_dir" && as_dir=.
22867 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22868 done
22869 IFS=$as_save_IFS
22872 esac
22873 # We did not find ourselves, most probably we were run as `sh COMMAND'
22874 # in which case we are not to be found in the path.
22875 if test "x$as_myself" = x; then
22876 as_myself=$0
22878 if test ! -f "$as_myself"; then
22879 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22880 exit 1
22883 # Unset variables that we do not need and which cause bugs (e.g. in
22884 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
22885 # suppresses any "Segmentation fault" message there. '((' could
22886 # trigger a bug in pdksh 5.2.14.
22887 for as_var in BASH_ENV ENV MAIL MAILPATH
22888 do eval test x\${$as_var+set} = xset \
22889 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
22890 done
22891 PS1='$ '
22892 PS2='> '
22893 PS4='+ '
22895 # NLS nuisances.
22896 LC_ALL=C
22897 export LC_ALL
22898 LANGUAGE=C
22899 export LANGUAGE
22901 # CDPATH.
22902 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22905 # as_fn_error ERROR [LINENO LOG_FD]
22906 # ---------------------------------
22907 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
22908 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22909 # script with status $?, using 1 if that was 0.
22910 as_fn_error ()
22912 as_status=$?; test $as_status -eq 0 && as_status=1
22913 if test "$3"; then
22914 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
22915 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
22917 $as_echo "$as_me: error: $1" >&2
22918 as_fn_exit $as_status
22919 } # as_fn_error
22922 # as_fn_set_status STATUS
22923 # -----------------------
22924 # Set $? to STATUS, without forking.
22925 as_fn_set_status ()
22927 return $1
22928 } # as_fn_set_status
22930 # as_fn_exit STATUS
22931 # -----------------
22932 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22933 as_fn_exit ()
22935 set +e
22936 as_fn_set_status $1
22937 exit $1
22938 } # as_fn_exit
22940 # as_fn_unset VAR
22941 # ---------------
22942 # Portably unset VAR.
22943 as_fn_unset ()
22945 { eval $1=; unset $1;}
22947 as_unset=as_fn_unset
22948 # as_fn_append VAR VALUE
22949 # ----------------------
22950 # Append the text in VALUE to the end of the definition contained in VAR. Take
22951 # advantage of any shell optimizations that allow amortized linear growth over
22952 # repeated appends, instead of the typical quadratic growth present in naive
22953 # implementations.
22954 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
22955 eval 'as_fn_append ()
22957 eval $1+=\$2
22959 else
22960 as_fn_append ()
22962 eval $1=\$$1\$2
22964 fi # as_fn_append
22966 # as_fn_arith ARG...
22967 # ------------------
22968 # Perform arithmetic evaluation on the ARGs, and store the result in the
22969 # global $as_val. Take advantage of shells that can avoid forks. The arguments
22970 # must be portable across $(()) and expr.
22971 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
22972 eval 'as_fn_arith ()
22974 as_val=$(( $* ))
22976 else
22977 as_fn_arith ()
22979 as_val=`expr "$@" || test $? -eq 1`
22981 fi # as_fn_arith
22984 if expr a : '\(a\)' >/dev/null 2>&1 &&
22985 test "X`expr 00001 : '.*\(...\)'`" = X001; then
22986 as_expr=expr
22987 else
22988 as_expr=false
22991 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22992 as_basename=basename
22993 else
22994 as_basename=false
22997 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22998 as_dirname=dirname
22999 else
23000 as_dirname=false
23003 as_me=`$as_basename -- "$0" ||
23004 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23005 X"$0" : 'X\(//\)$' \| \
23006 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
23007 $as_echo X/"$0" |
23008 sed '/^.*\/\([^/][^/]*\)\/*$/{
23009 s//\1/
23012 /^X\/\(\/\/\)$/{
23013 s//\1/
23016 /^X\/\(\/\).*/{
23017 s//\1/
23020 s/.*/./; q'`
23022 # Avoid depending upon Character Ranges.
23023 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23024 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23025 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23026 as_cr_digits='0123456789'
23027 as_cr_alnum=$as_cr_Letters$as_cr_digits
23029 ECHO_C= ECHO_N= ECHO_T=
23030 case `echo -n x` in #(((((
23031 -n*)
23032 case `echo 'xy\c'` in
23033 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23034 xy) ECHO_C='\c';;
23035 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
23036 ECHO_T=' ';;
23037 esac;;
23039 ECHO_N='-n';;
23040 esac
23042 rm -f conf$$ conf$$.exe conf$$.file
23043 if test -d conf$$.dir; then
23044 rm -f conf$$.dir/conf$$.file
23045 else
23046 rm -f conf$$.dir
23047 mkdir conf$$.dir 2>/dev/null
23049 if (echo >conf$$.file) 2>/dev/null; then
23050 if ln -s conf$$.file conf$$ 2>/dev/null; then
23051 as_ln_s='ln -s'
23052 # ... but there are two gotchas:
23053 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23054 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23055 # In both cases, we have to default to `cp -p'.
23056 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
23057 as_ln_s='cp -p'
23058 elif ln conf$$.file conf$$ 2>/dev/null; then
23059 as_ln_s=ln
23060 else
23061 as_ln_s='cp -p'
23063 else
23064 as_ln_s='cp -p'
23066 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23067 rmdir conf$$.dir 2>/dev/null
23070 # as_fn_mkdir_p
23071 # -------------
23072 # Create "$as_dir" as a directory, including parents if necessary.
23073 as_fn_mkdir_p ()
23076 case $as_dir in #(
23077 -*) as_dir=./$as_dir;;
23078 esac
23079 test -d "$as_dir" || eval $as_mkdir_p || {
23080 as_dirs=
23081 while :; do
23082 case $as_dir in #(
23083 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
23084 *) as_qdir=$as_dir;;
23085 esac
23086 as_dirs="'$as_qdir' $as_dirs"
23087 as_dir=`$as_dirname -- "$as_dir" ||
23088 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23089 X"$as_dir" : 'X\(//\)[^/]' \| \
23090 X"$as_dir" : 'X\(//\)$' \| \
23091 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
23092 $as_echo X"$as_dir" |
23093 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23094 s//\1/
23097 /^X\(\/\/\)[^/].*/{
23098 s//\1/
23101 /^X\(\/\/\)$/{
23102 s//\1/
23105 /^X\(\/\).*/{
23106 s//\1/
23109 s/.*/./; q'`
23110 test -d "$as_dir" && break
23111 done
23112 test -z "$as_dirs" || eval "mkdir $as_dirs"
23113 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
23116 } # as_fn_mkdir_p
23117 if mkdir -p . 2>/dev/null; then
23118 as_mkdir_p='mkdir -p "$as_dir"'
23119 else
23120 test -d ./-p && rmdir ./-p
23121 as_mkdir_p=false
23124 if test -x / >/dev/null 2>&1; then
23125 as_test_x='test -x'
23126 else
23127 if ls -dL / >/dev/null 2>&1; then
23128 as_ls_L_option=L
23129 else
23130 as_ls_L_option=
23132 as_test_x='
23133 eval sh -c '\''
23134 if test -d "$1"; then
23135 test -d "$1/.";
23136 else
23137 case $1 in #(
23138 -*)set "./$1";;
23139 esac;
23140 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
23141 ???[sx]*):;;*)false;;esac;fi
23142 '\'' sh
23145 as_executable_p=$as_test_x
23147 # Sed expression to map a string onto a valid CPP name.
23148 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23150 # Sed expression to map a string onto a valid variable name.
23151 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23154 exec 6>&1
23155 ## ----------------------------------- ##
23156 ## Main body of $CONFIG_STATUS script. ##
23157 ## ----------------------------------- ##
23158 _ASEOF
23159 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
23161 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23162 # Save the log message, to keep $0 and so on meaningful, and to
23163 # report actual input values of CONFIG_FILES etc. instead of their
23164 # values after options handling.
23165 ac_log="
23166 This file was extended by emacs $as_me 24.1, which was
23167 generated by GNU Autoconf 2.65. Invocation command line was
23169 CONFIG_FILES = $CONFIG_FILES
23170 CONFIG_HEADERS = $CONFIG_HEADERS
23171 CONFIG_LINKS = $CONFIG_LINKS
23172 CONFIG_COMMANDS = $CONFIG_COMMANDS
23173 $ $0 $@
23175 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23178 _ACEOF
23180 case $ac_config_files in *"
23181 "*) set x $ac_config_files; shift; ac_config_files=$*;;
23182 esac
23184 case $ac_config_headers in *"
23185 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
23186 esac
23189 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23190 # Files that config.status was made for.
23191 config_files="$ac_config_files"
23192 config_headers="$ac_config_headers"
23193 config_commands="$ac_config_commands"
23195 _ACEOF
23197 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23198 ac_cs_usage="\
23199 \`$as_me' instantiates files and other configuration actions
23200 from templates according to the current configuration. Unless the files
23201 and actions are specified as TAGs, all are instantiated by default.
23203 Usage: $0 [OPTION]... [TAG]...
23205 -h, --help print this help, then exit
23206 -V, --version print version number and configuration settings, then exit
23207 --config print configuration, then exit
23208 -q, --quiet, --silent
23209 do not print progress messages
23210 -d, --debug don't remove temporary files
23211 --recheck update $as_me by reconfiguring in the same conditions
23212 --file=FILE[:TEMPLATE]
23213 instantiate the configuration file FILE
23214 --header=FILE[:TEMPLATE]
23215 instantiate the configuration header FILE
23217 Configuration files:
23218 $config_files
23220 Configuration headers:
23221 $config_headers
23223 Configuration commands:
23224 $config_commands
23226 Report bugs to the package provider."
23228 _ACEOF
23229 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23230 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
23231 ac_cs_version="\\
23232 emacs config.status 24.1
23233 configured by $0, generated by GNU Autoconf 2.65,
23234 with options \\"\$ac_cs_config\\"
23236 Copyright (C) 2009 Free Software Foundation, Inc.
23237 This config.status script is free software; the Free Software Foundation
23238 gives unlimited permission to copy, distribute and modify it."
23240 ac_pwd='$ac_pwd'
23241 srcdir='$srcdir'
23242 INSTALL='$INSTALL'
23243 MKDIR_P='$MKDIR_P'
23244 AWK='$AWK'
23245 test -n "\$AWK" || AWK=awk
23246 _ACEOF
23248 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23249 # The default lists apply if the user does not specify any file.
23250 ac_need_defaults=:
23251 while test $# != 0
23253 case $1 in
23254 --*=*)
23255 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23256 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
23257 ac_shift=:
23260 ac_option=$1
23261 ac_optarg=$2
23262 ac_shift=shift
23264 esac
23266 case $ac_option in
23267 # Handling of the options.
23268 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23269 ac_cs_recheck=: ;;
23270 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23271 $as_echo "$ac_cs_version"; exit ;;
23272 --config | --confi | --conf | --con | --co | --c )
23273 $as_echo "$ac_cs_config"; exit ;;
23274 --debug | --debu | --deb | --de | --d | -d )
23275 debug=: ;;
23276 --file | --fil | --fi | --f )
23277 $ac_shift
23278 case $ac_optarg in
23279 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
23280 esac
23281 as_fn_append CONFIG_FILES " '$ac_optarg'"
23282 ac_need_defaults=false;;
23283 --header | --heade | --head | --hea )
23284 $ac_shift
23285 case $ac_optarg in
23286 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
23287 esac
23288 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
23289 ac_need_defaults=false;;
23290 --he | --h)
23291 # Conflict between --help and --header
23292 as_fn_error "ambiguous option: \`$1'
23293 Try \`$0 --help' for more information.";;
23294 --help | --hel | -h )
23295 $as_echo "$ac_cs_usage"; exit ;;
23296 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23297 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23298 ac_cs_silent=: ;;
23300 # This is an error.
23301 -*) as_fn_error "unrecognized option: \`$1'
23302 Try \`$0 --help' for more information." ;;
23304 *) as_fn_append ac_config_targets " $1"
23305 ac_need_defaults=false ;;
23307 esac
23308 shift
23309 done
23311 ac_configure_extra_args=
23313 if $ac_cs_silent; then
23314 exec 6>/dev/null
23315 ac_configure_extra_args="$ac_configure_extra_args --silent"
23318 _ACEOF
23319 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23320 if \$ac_cs_recheck; then
23321 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23322 shift
23323 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
23324 CONFIG_SHELL='$SHELL'
23325 export CONFIG_SHELL
23326 exec "\$@"
23329 _ACEOF
23330 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23331 exec 5>>config.log
23333 echo
23334 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23335 ## Running $as_me. ##
23336 _ASBOX
23337 $as_echo "$ac_log"
23338 } >&5
23340 _ACEOF
23341 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23343 # INIT-COMMANDS
23345 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
23346 GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
23348 _ACEOF
23350 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23352 # Handling of arguments.
23353 for ac_config_target in $ac_config_targets
23355 case $ac_config_target in
23356 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
23357 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
23358 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23359 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
23360 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
23361 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23362 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
23363 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
23364 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
23365 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
23366 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
23367 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23368 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23369 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23370 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
23371 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
23372 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
23373 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
23375 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
23376 esac
23377 done
23380 # If the user did not use the arguments to specify the items to instantiate,
23381 # then the envvar interface is used. Set only those that are not.
23382 # We use the long form for the default assignment because of an extremely
23383 # bizarre bug on SunOS 4.1.3.
23384 if $ac_need_defaults; then
23385 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23386 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23387 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23390 # Have a temporary directory for convenience. Make it in the build tree
23391 # simply because there is no reason against having it here, and in addition,
23392 # creating and moving files from /tmp can sometimes cause problems.
23393 # Hook for its removal unless debugging.
23394 # Note that there is a small window in which the directory will not be cleaned:
23395 # after its creation but before its name has been assigned to `$tmp'.
23396 $debug ||
23398 tmp=
23399 trap 'exit_status=$?
23400 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23402 trap 'as_fn_exit 1' 1 2 13 15
23404 # Create a (secure) tmp directory for tmp files.
23407 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
23408 test -n "$tmp" && test -d "$tmp"
23409 } ||
23411 tmp=./conf$$-$RANDOM
23412 (umask 077 && mkdir "$tmp")
23413 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
23415 # Set up the scripts for CONFIG_FILES section.
23416 # No need to generate them if there are no CONFIG_FILES.
23417 # This happens for instance with `./config.status config.h'.
23418 if test -n "$CONFIG_FILES"; then
23420 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
23421 ac_cs_awk_getline=:
23422 ac_cs_awk_pipe_init=
23423 ac_cs_awk_read_file='
23424 while ((getline aline < (F[key])) > 0)
23425 print(aline)
23426 close(F[key])'
23427 ac_cs_awk_pipe_fini=
23428 else
23429 ac_cs_awk_getline=false
23430 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
23431 ac_cs_awk_read_file='
23432 print "|#_!!_#|"
23433 print "cat " F[key] " &&"
23434 '$ac_cs_awk_pipe_init
23435 # The final `:' finishes the AND list.
23436 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
23438 ac_cr=`echo X | tr X '\015'`
23439 # On cygwin, bash can eat \r inside `` if the user requested igncr.
23440 # But we know of no other shell where ac_cr would be empty at this
23441 # point, so we can use a bashism as a fallback.
23442 if test "x$ac_cr" = x; then
23443 eval ac_cr=\$\'\\r\'
23445 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
23446 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
23447 ac_cs_awk_cr='\r'
23448 else
23449 ac_cs_awk_cr=$ac_cr
23452 echo 'BEGIN {' >"$tmp/subs1.awk" &&
23453 _ACEOF
23455 # Create commands to substitute file output variables.
23457 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
23458 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
23459 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
23460 echo "_ACAWK" &&
23461 echo "_ACEOF"
23462 } >conf$$files.sh &&
23463 . ./conf$$files.sh ||
23464 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
23465 rm -f conf$$files.sh
23468 echo "cat >conf$$subs.awk <<_ACEOF" &&
23469 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
23470 echo "_ACEOF"
23471 } >conf$$subs.sh ||
23472 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
23473 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
23474 ac_delim='%!_!# '
23475 for ac_last_try in false false false false false :; do
23476 . ./conf$$subs.sh ||
23477 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
23479 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
23480 if test $ac_delim_n = $ac_delim_num; then
23481 break
23482 elif $ac_last_try; then
23483 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
23484 else
23485 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23487 done
23488 rm -f conf$$subs.sh
23490 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23491 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
23492 _ACEOF
23493 sed -n '
23495 s/^/S["/; s/!.*/"]=/
23498 s/^[^!]*!//
23499 :repl
23500 t repl
23501 s/'"$ac_delim"'$//
23502 t delim
23505 s/\(.\{148\}\)..*/\1/
23506 t more1
23507 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
23510 b repl
23511 :more1
23512 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23515 s/.\{148\}//
23516 t nl
23517 :delim
23519 s/\(.\{148\}\)..*/\1/
23520 t more2
23521 s/["\\]/\\&/g; s/^/"/; s/$/"/
23524 :more2
23525 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
23528 s/.\{148\}//
23529 t delim
23530 ' <conf$$subs.awk | sed '
23531 /^[^""]/{
23533 s/\n//
23535 ' >>$CONFIG_STATUS || ac_write_fail=1
23536 rm -f conf$$subs.awk
23537 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23538 _ACAWK
23539 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
23540 for (key in S) S_is_set[key] = 1
23541 FS = "\a"
23542 \$ac_cs_awk_pipe_init
23545 line = $ 0
23546 nfields = split(line, field, "@")
23547 substed = 0
23548 len = length(field[1])
23549 for (i = 2; i < nfields; i++) {
23550 key = field[i]
23551 keylen = length(key)
23552 if (S_is_set[key]) {
23553 value = S[key]
23554 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
23555 len += length(value) + length(field[++i])
23556 substed = 1
23557 } else
23558 len += 1 + keylen
23560 if (nfields == 3 && !substed) {
23561 key = field[2]
23562 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
23563 \$ac_cs_awk_read_file
23564 next
23567 print line
23569 \$ac_cs_awk_pipe_fini
23570 _ACAWK
23571 _ACEOF
23572 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23573 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
23574 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
23575 else
23577 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
23578 || as_fn_error "could not setup config files machinery" "$LINENO" 5
23579 _ACEOF
23581 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23582 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23583 # trailing colons and then remove the whole line if VPATH becomes empty
23584 # (actually we leave an empty line to preserve line numbers).
23585 if test "x$srcdir" = x.; then
23586 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23587 s/:*\$(srcdir):*/:/
23588 s/:*\${srcdir}:*/:/
23589 s/:*@srcdir@:*/:/
23590 s/^\([^=]*=[ ]*\):*/\1/
23591 s/:*$//
23592 s/^[^=]*=[ ]*$//
23596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23597 fi # test -n "$CONFIG_FILES"
23599 # Set up the scripts for CONFIG_HEADERS section.
23600 # No need to generate them if there are no CONFIG_HEADERS.
23601 # This happens for instance with `./config.status Makefile'.
23602 if test -n "$CONFIG_HEADERS"; then
23603 cat >"$tmp/defines.awk" <<\_ACAWK ||
23604 BEGIN {
23605 _ACEOF
23607 # Transform confdefs.h into an awk script `defines.awk', embedded as
23608 # here-document in config.status, that substitutes the proper values into
23609 # config.h.in to produce config.h.
23611 # Create a delimiter string that does not exist in confdefs.h, to ease
23612 # handling of long lines.
23613 ac_delim='%!_!# '
23614 for ac_last_try in false false :; do
23615 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
23616 if test -z "$ac_t"; then
23617 break
23618 elif $ac_last_try; then
23619 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
23620 else
23621 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23623 done
23625 # For the awk script, D is an array of macro values keyed by name,
23626 # likewise P contains macro parameters if any. Preserve backslash
23627 # newline sequences.
23629 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
23630 sed -n '
23631 s/.\{148\}/&'"$ac_delim"'/g
23632 t rset
23633 :rset
23634 s/^[ ]*#[ ]*define[ ][ ]*/ /
23635 t def
23637 :def
23638 s/\\$//
23639 t bsnl
23640 s/["\\]/\\&/g
23641 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
23642 D["\1"]=" \3"/p
23643 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
23645 :bsnl
23646 s/["\\]/\\&/g
23647 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
23648 D["\1"]=" \3\\\\\\n"\\/p
23649 t cont
23650 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
23651 t cont
23653 :cont
23655 s/.\{148\}/&'"$ac_delim"'/g
23656 t clear
23657 :clear
23658 s/\\$//
23659 t bsnlc
23660 s/["\\]/\\&/g; s/^/"/; s/$/"/p
23662 :bsnlc
23663 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
23664 b cont
23665 ' <confdefs.h | sed '
23666 s/'"$ac_delim"'/"\\\
23667 "/g' >>$CONFIG_STATUS || ac_write_fail=1
23669 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23670 for (key in D) D_is_set[key] = 1
23671 FS = "\a"
23673 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
23674 line = \$ 0
23675 split(line, arg, " ")
23676 if (arg[1] == "#") {
23677 defundef = arg[2]
23678 mac1 = arg[3]
23679 } else {
23680 defundef = substr(arg[1], 2)
23681 mac1 = arg[2]
23683 split(mac1, mac2, "(") #)
23684 macro = mac2[1]
23685 prefix = substr(line, 1, index(line, defundef) - 1)
23686 if (D_is_set[macro]) {
23687 # Preserve the white space surrounding the "#".
23688 print prefix "define", macro P[macro] D[macro]
23689 next
23690 } else {
23691 # Replace #undef with comments. This is necessary, for example,
23692 # in the case of _POSIX_SOURCE, which is predefined and required
23693 # on some systems where configure will not decide to define it.
23694 if (defundef == "undef") {
23695 print "/*", prefix defundef, macro, "*/"
23696 next
23700 { print }
23701 _ACAWK
23702 _ACEOF
23703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23704 as_fn_error "could not setup config headers machinery" "$LINENO" 5
23705 fi # test -n "$CONFIG_HEADERS"
23708 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
23709 shift
23710 for ac_tag
23712 case $ac_tag in
23713 :[FHLC]) ac_mode=$ac_tag; continue;;
23714 esac
23715 case $ac_mode$ac_tag in
23716 :[FHL]*:*);;
23717 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
23718 :[FH]-) ac_tag=-:-;;
23719 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23720 esac
23721 ac_save_IFS=$IFS
23722 IFS=:
23723 set x $ac_tag
23724 IFS=$ac_save_IFS
23725 shift
23726 ac_file=$1
23727 shift
23729 case $ac_mode in
23730 :L) ac_source=$1;;
23731 :[FH])
23732 ac_file_inputs=
23733 for ac_f
23735 case $ac_f in
23736 -) ac_f="$tmp/stdin";;
23737 *) # Look for the file first in the build tree, then in the source tree
23738 # (if the path is not absolute). The absolute path cannot be DOS-style,
23739 # because $ac_f cannot contain `:'.
23740 test -f "$ac_f" ||
23741 case $ac_f in
23742 [\\/$]*) false;;
23743 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23744 esac ||
23745 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
23746 esac
23747 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
23748 as_fn_append ac_file_inputs " '$ac_f'"
23749 done
23751 # Let's still pretend it is `configure' which instantiates (i.e., don't
23752 # use $as_me), people would be surprised to read:
23753 # /* config.h. Generated by config.status. */
23754 configure_input='Generated from '`
23755 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
23756 `' by configure.'
23757 if test x"$ac_file" != x-; then
23758 configure_input="$ac_file. $configure_input"
23759 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
23760 $as_echo "$as_me: creating $ac_file" >&6;}
23762 # Neutralize special characters interpreted by sed in replacement strings.
23763 case $configure_input in #(
23764 *\&* | *\|* | *\\* )
23765 ac_sed_conf_input=`$as_echo "$configure_input" |
23766 sed 's/[\\\\&|]/\\\\&/g'`;; #(
23767 *) ac_sed_conf_input=$configure_input;;
23768 esac
23770 case $ac_tag in
23771 *:-:* | *:-) cat >"$tmp/stdin" \
23772 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
23773 esac
23775 esac
23777 ac_dir=`$as_dirname -- "$ac_file" ||
23778 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23779 X"$ac_file" : 'X\(//\)[^/]' \| \
23780 X"$ac_file" : 'X\(//\)$' \| \
23781 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23782 $as_echo X"$ac_file" |
23783 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23784 s//\1/
23787 /^X\(\/\/\)[^/].*/{
23788 s//\1/
23791 /^X\(\/\/\)$/{
23792 s//\1/
23795 /^X\(\/\).*/{
23796 s//\1/
23799 s/.*/./; q'`
23800 as_dir="$ac_dir"; as_fn_mkdir_p
23801 ac_builddir=.
23803 case "$ac_dir" in
23804 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23806 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
23807 # A ".." for each directory in $ac_dir_suffix.
23808 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23809 case $ac_top_builddir_sub in
23810 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23811 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23812 esac ;;
23813 esac
23814 ac_abs_top_builddir=$ac_pwd
23815 ac_abs_builddir=$ac_pwd$ac_dir_suffix
23816 # for backward compatibility:
23817 ac_top_builddir=$ac_top_build_prefix
23819 case $srcdir in
23820 .) # We are building in place.
23821 ac_srcdir=.
23822 ac_top_srcdir=$ac_top_builddir_sub
23823 ac_abs_top_srcdir=$ac_pwd ;;
23824 [\\/]* | ?:[\\/]* ) # Absolute name.
23825 ac_srcdir=$srcdir$ac_dir_suffix;
23826 ac_top_srcdir=$srcdir
23827 ac_abs_top_srcdir=$srcdir ;;
23828 *) # Relative name.
23829 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23830 ac_top_srcdir=$ac_top_build_prefix$srcdir
23831 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23832 esac
23833 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23836 case $ac_mode in
23839 # CONFIG_FILE
23842 case $INSTALL in
23843 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23844 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
23845 esac
23846 ac_MKDIR_P=$MKDIR_P
23847 case $MKDIR_P in
23848 [\\/$]* | ?:[\\/]* ) ;;
23849 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
23850 esac
23851 _ACEOF
23853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23854 # If the template does not know about datarootdir, expand it.
23855 # FIXME: This hack should be removed a few years after 2.60.
23856 ac_datarootdir_hack=; ac_datarootdir_seen=
23857 ac_sed_dataroot='
23858 /datarootdir/ {
23862 /@datadir@/p
23863 /@docdir@/p
23864 /@infodir@/p
23865 /@localedir@/p
23866 /@mandir@/p'
23867 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23868 *datarootdir*) ac_datarootdir_seen=yes;;
23869 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23871 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23872 _ACEOF
23873 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23874 ac_datarootdir_hack='
23875 s&@datadir@&$datadir&g
23876 s&@docdir@&$docdir&g
23877 s&@infodir@&$infodir&g
23878 s&@localedir@&$localedir&g
23879 s&@mandir@&$mandir&g
23880 s&\\\${datarootdir}&$datarootdir&g' ;;
23881 esac
23882 _ACEOF
23884 # Neutralize VPATH when `$srcdir' = `.'.
23885 # Shell code in configure.ac might set extrasub.
23886 # FIXME: do we really want to maintain this feature?
23887 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23888 ac_sed_extra="$ac_vpsub
23889 $extrasub
23890 _ACEOF
23891 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23893 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23894 s|@configure_input@|$ac_sed_conf_input|;t t
23895 s&@top_builddir@&$ac_top_builddir_sub&;t t
23896 s&@top_build_prefix@&$ac_top_build_prefix&;t t
23897 s&@srcdir@&$ac_srcdir&;t t
23898 s&@abs_srcdir@&$ac_abs_srcdir&;t t
23899 s&@top_srcdir@&$ac_top_srcdir&;t t
23900 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23901 s&@builddir@&$ac_builddir&;t t
23902 s&@abs_builddir@&$ac_abs_builddir&;t t
23903 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23904 s&@INSTALL@&$ac_INSTALL&;t t
23905 s&@MKDIR_P@&$ac_MKDIR_P&;t t
23906 $ac_datarootdir_hack
23908 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
23909 if $ac_cs_awk_getline; then
23910 $AWK -f "$tmp/subs.awk"
23911 else
23912 $AWK -f "$tmp/subs.awk" | $SHELL
23913 fi >$tmp/out \
23914 || as_fn_error "could not create $ac_file" "$LINENO" 5
23916 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23917 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
23918 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
23919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23920 which seems to be undefined. Please make sure it is defined." >&5
23921 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23922 which seems to be undefined. Please make sure it is defined." >&2;}
23924 rm -f "$tmp/stdin"
23925 case $ac_file in
23926 -) cat "$tmp/out" && rm -f "$tmp/out";;
23927 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
23928 esac \
23929 || as_fn_error "could not create $ac_file" "$LINENO" 5
23933 # CONFIG_HEADER
23935 if test x"$ac_file" != x-; then
23937 $as_echo "/* $configure_input */" \
23938 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
23939 } >"$tmp/config.h" \
23940 || as_fn_error "could not create $ac_file" "$LINENO" 5
23941 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
23942 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23943 $as_echo "$as_me: $ac_file is unchanged" >&6;}
23944 else
23945 rm -f "$ac_file"
23946 mv "$tmp/config.h" "$ac_file" \
23947 || as_fn_error "could not create $ac_file" "$LINENO" 5
23949 else
23950 $as_echo "/* $configure_input */" \
23951 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
23952 || as_fn_error "could not create -" "$LINENO" 5
23954 # Compute "$ac_file"'s index in $config_headers.
23955 _am_arg="$ac_file"
23956 _am_stamp_count=1
23957 for _am_header in $config_headers :; do
23958 case $_am_header in
23959 $_am_arg | $_am_arg:* )
23960 break ;;
23962 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
23963 esac
23964 done
23965 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
23966 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23967 X"$_am_arg" : 'X\(//\)[^/]' \| \
23968 X"$_am_arg" : 'X\(//\)$' \| \
23969 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
23970 $as_echo X"$_am_arg" |
23971 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23972 s//\1/
23975 /^X\(\/\/\)[^/].*/{
23976 s//\1/
23979 /^X\(\/\/\)$/{
23980 s//\1/
23983 /^X\(\/\).*/{
23984 s//\1/
23987 s/.*/./; q'`/stamp-h$_am_stamp_count
23990 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23991 $as_echo "$as_me: executing $ac_file commands" >&6;}
23993 esac
23996 case $ac_file$ac_mode in
23997 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
23998 # Autoconf 2.62 quotes --file arguments for eval, but not when files
23999 # are listed without --file. Let's play safe and only enable the eval
24000 # if we detect the quoting.
24001 case $CONFIG_FILES in
24002 *\'*) eval set x "$CONFIG_FILES" ;;
24003 *) set x $CONFIG_FILES ;;
24004 esac
24005 shift
24006 for mf
24008 # Strip MF so we end up with the name of the file.
24009 mf=`echo "$mf" | sed -e 's/:.*$//'`
24010 # Check whether this is an Automake generated Makefile or not.
24011 # We used to match only the files named `Makefile.in', but
24012 # some people rename them; so instead we look at the file content.
24013 # Grep'ing the first line is not enough: some people post-process
24014 # each Makefile.in and add a new line on top of each file to say so.
24015 # Grep'ing the whole file is not good either: AIX grep has a line
24016 # limit of 2048, but all sed's we know have understand at least 4000.
24017 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
24018 dirpart=`$as_dirname -- "$mf" ||
24019 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24020 X"$mf" : 'X\(//\)[^/]' \| \
24021 X"$mf" : 'X\(//\)$' \| \
24022 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
24023 $as_echo X"$mf" |
24024 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24025 s//\1/
24028 /^X\(\/\/\)[^/].*/{
24029 s//\1/
24032 /^X\(\/\/\)$/{
24033 s//\1/
24036 /^X\(\/\).*/{
24037 s//\1/
24040 s/.*/./; q'`
24041 else
24042 continue
24044 # Extract the definition of DEPDIR, am__include, and am__quote
24045 # from the Makefile without running `make'.
24046 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
24047 test -z "$DEPDIR" && continue
24048 am__include=`sed -n 's/^am__include = //p' < "$mf"`
24049 test -z "am__include" && continue
24050 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
24051 # When using ansi2knr, U may be empty or an underscore; expand it
24052 U=`sed -n 's/^U = //p' < "$mf"`
24053 # Find all dependency output files, they are included files with
24054 # $(DEPDIR) in their names. We invoke sed twice because it is the
24055 # simplest approach to changing $(DEPDIR) to its actual value in the
24056 # expansion.
24057 for file in `sed -n "
24058 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
24059 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
24060 # Make sure the directory exists.
24061 test -f "$dirpart/$file" && continue
24062 fdir=`$as_dirname -- "$file" ||
24063 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24064 X"$file" : 'X\(//\)[^/]' \| \
24065 X"$file" : 'X\(//\)$' \| \
24066 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
24067 $as_echo X"$file" |
24068 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24069 s//\1/
24072 /^X\(\/\/\)[^/].*/{
24073 s//\1/
24076 /^X\(\/\/\)$/{
24077 s//\1/
24080 /^X\(\/\).*/{
24081 s//\1/
24084 s/.*/./; q'`
24085 as_dir=$dirpart/$fdir; as_fn_mkdir_p
24086 # echo "creating $dirpart/$file"
24087 echo '# dummy' > "$dirpart/$file"
24088 done
24089 done
24092 "mkdirs":C)
24093 for dir in etc lisp ; do
24094 test -d ${dir} || mkdir ${dir}
24095 done
24097 "epaths":C)
24098 echo creating src/epaths.h
24099 ${MAKE-make} epaths-force
24101 "gdbinit":C)
24102 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
24103 echo creating src/.gdbinit
24104 echo source $srcdir/src/.gdbinit > src/.gdbinit
24108 esac
24109 done # for ac_tag
24112 as_fn_exit 0
24113 _ACEOF
24114 ac_clean_files=$ac_clean_files_save
24116 test $ac_write_fail = 0 ||
24117 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
24120 # configure is writing to config.log, and then calls config.status.
24121 # config.status does its own redirection, appending to config.log.
24122 # Unfortunately, on DOS this fails, as config.log is still kept open
24123 # by configure, so config.status won't be able to write to it; its
24124 # output is simply discarded. So we exec the FD to /dev/null,
24125 # effectively closing config.log, so it can be properly (re)opened and
24126 # appended to by config.status. When coming back to configure, we
24127 # need to make the FD available again.
24128 if test "$no_create" != yes; then
24129 ac_cs_success=:
24130 ac_config_status_args=
24131 test "$silent" = yes &&
24132 ac_config_status_args="$ac_config_status_args --quiet"
24133 exec 5>/dev/null
24134 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24135 exec 5>>config.log
24136 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24137 # would make configure fail if this is the last instruction.
24138 $ac_cs_success || as_fn_exit $?
24140 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
24141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
24142 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}