Auto-commit of generated files.
[bpt/emacs.git] / autogen / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.65 for emacs 24.3.50.
4 #
5 #
6 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8 # Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26 else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52 else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" "" $as_nl"
90
91 # Find who we are. Look in the path if we contain no directory separator.
92 case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101 IFS=$as_save_IFS
102
103 ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108 as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there. '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136 if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144 else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150 esac
151 fi
152 "
153 as_required="as_fn_return () { (exit \$1); }
154 as_fn_success () { as_fn_return 0; }
155 as_fn_failure () { as_fn_return 1; }
156 as_fn_ret_success () { return 0; }
157 as_fn_ret_failure () { return 1; }
158
159 exitcode=0
160 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166 else
167 exitcode=1; echo positional parameters were not saved.
168 fi
169 test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174 test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177 else
178 as_have_required=no
179 fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182 else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184 as_found=false
185 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186 do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200 fi
201 fi
202 done;;
203 esac
204 as_found=false
205 done
206 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209 fi; }
210 IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
222 fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232 $0: including any error possibly output before this
233 $0: message. Then install a modern shell, or manually run
234 $0: the script under such a shell if you do have one."
235 fi
236 exit 1
237 fi
238 fi
239 fi
240 SHELL=${CONFIG_SHELL-/bin/sh}
241 export SHELL
242 # Unset more variables known to interfere with behavior of common tools.
243 CLICOLOR_FORCE= GREP_OPTIONS=
244 unset CLICOLOR_FORCE GREP_OPTIONS
245
246 ## --------------------- ##
247 ## M4sh Shell Functions. ##
248 ## --------------------- ##
249 # as_fn_unset VAR
250 # ---------------
251 # Portably unset VAR.
252 as_fn_unset ()
253 {
254 { eval $1=; unset $1;}
255 }
256 as_unset=as_fn_unset
257
258 # as_fn_set_status STATUS
259 # -----------------------
260 # Set $? to STATUS, without forking.
261 as_fn_set_status ()
262 {
263 return $1
264 } # as_fn_set_status
265
266 # as_fn_exit STATUS
267 # -----------------
268 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269 as_fn_exit ()
270 {
271 set +e
272 as_fn_set_status $1
273 exit $1
274 } # as_fn_exit
275
276 # as_fn_mkdir_p
277 # -------------
278 # Create "$as_dir" as a directory, including parents if necessary.
279 as_fn_mkdir_p ()
280 {
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298 $as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
320
321
322 } # as_fn_mkdir_p
323 # as_fn_append VAR VALUE
324 # ----------------------
325 # Append the text in VALUE to the end of the definition contained in VAR. Take
326 # advantage of any shell optimizations that allow amortized linear growth over
327 # repeated appends, instead of the typical quadratic growth present in naive
328 # implementations.
329 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334 else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339 fi # as_fn_append
340
341 # as_fn_arith ARG...
342 # ------------------
343 # Perform arithmetic evaluation on the ARGs, and store the result in the
344 # global $as_val. Take advantage of shells that can avoid forks. The arguments
345 # must be portable across $(()) and expr.
346 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351 else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356 fi # as_fn_arith
357
358
359 # as_fn_error ERROR [LINENO LOG_FD]
360 # ---------------------------------
361 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363 # script with status $?, using 1 if that was 0.
364 as_fn_error ()
365 {
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
370 fi
371 $as_echo "$as_me: error: $1" >&2
372 as_fn_exit $as_status
373 } # as_fn_error
374
375 if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
377 as_expr=expr
378 else
379 as_expr=false
380 fi
381
382 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383 as_basename=basename
384 else
385 as_basename=false
386 fi
387
388 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390 else
391 as_dirname=false
392 fi
393
394 as_me=`$as_basename -- "$0" ||
395 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
398 $as_echo X/"$0" |
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
412
413 # Avoid depending upon Character Ranges.
414 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417 as_cr_digits='0123456789'
418 as_cr_alnum=$as_cr_Letters$as_cr_digits
419
420
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
443
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
450 }
451
452 ECHO_C= ECHO_N= ECHO_T=
453 case `echo -n x` in #(((((
454 -n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461 *)
462 ECHO_N='-n';;
463 esac
464
465 rm -f conf$$ conf$$.exe conf$$.file
466 if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468 else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
471 fi
472 if (echo >conf$$.file) 2>/dev/null; then
473 if ln -s conf$$.file conf$$ 2>/dev/null; then
474 as_ln_s='ln -s'
475 # ... but there are two gotchas:
476 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
477 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
478 # In both cases, we have to default to `cp -p'.
479 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
480 as_ln_s='cp -p'
481 elif ln conf$$.file conf$$ 2>/dev/null; then
482 as_ln_s=ln
483 else
484 as_ln_s='cp -p'
485 fi
486 else
487 as_ln_s='cp -p'
488 fi
489 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490 rmdir conf$$.dir 2>/dev/null
491
492 if mkdir -p . 2>/dev/null; then
493 as_mkdir_p='mkdir -p "$as_dir"'
494 else
495 test -d ./-p && rmdir ./-p
496 as_mkdir_p=false
497 fi
498
499 if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
501 else
502 if ls -dL / >/dev/null 2>&1; then
503 as_ls_L_option=L
504 else
505 as_ls_L_option=
506 fi
507 as_test_x='
508 eval sh -c '\''
509 if test -d "$1"; then
510 test -d "$1/.";
511 else
512 case $1 in #(
513 -*)set "./$1";;
514 esac;
515 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516 ???[sx]*):;;*)false;;esac;fi
517 '\'' sh
518 '
519 fi
520 as_executable_p=$as_test_x
521
522 # Sed expression to map a string onto a valid CPP name.
523 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524
525 # Sed expression to map a string onto a valid variable name.
526 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529 test -n "$DJDIR" || exec 7<&0 </dev/null
530 exec 6>&1
531
532 # Name of the host.
533 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
534 # so uname gets run too.
535 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
537 #
538 # Initializations.
539 #
540 ac_default_prefix=/usr/local
541 ac_clean_files=
542 ac_config_libobj_dir=.
543 LIBOBJS=
544 cross_compiling=no
545 subdirs=
546 MFLAGS=
547 MAKEFLAGS=
548
549 # Identity of this package.
550 PACKAGE_NAME='emacs'
551 PACKAGE_TARNAME='emacs'
552 PACKAGE_VERSION='24.3.50'
553 PACKAGE_STRING='emacs 24.3.50'
554 PACKAGE_BUGREPORT=''
555 PACKAGE_URL=''
556
557 ac_unique_file="src/lisp.h"
558 # Factoring default headers for most tests.
559 ac_includes_default="\
560 #include <stdio.h>
561 #ifdef HAVE_SYS_TYPES_H
562 # include <sys/types.h>
563 #endif
564 #ifdef HAVE_SYS_STAT_H
565 # include <sys/stat.h>
566 #endif
567 #ifdef STDC_HEADERS
568 # include <stdlib.h>
569 # include <stddef.h>
570 #else
571 # ifdef HAVE_STDLIB_H
572 # include <stdlib.h>
573 # endif
574 #endif
575 #ifdef HAVE_STRING_H
576 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577 # include <memory.h>
578 # endif
579 # include <string.h>
580 #endif
581 #ifdef HAVE_STRINGS_H
582 # include <strings.h>
583 #endif
584 #ifdef HAVE_INTTYPES_H
585 # include <inttypes.h>
586 #endif
587 #ifdef HAVE_STDINT_H
588 # include <stdint.h>
589 #endif
590 #ifdef HAVE_UNISTD_H
591 # include <unistd.h>
592 #endif"
593
594 ac_header_list=
595 ac_func_list=
596 gl_getopt_required=POSIX
597 gl_getopt_required=POSIX
598 ac_subst_vars='gltests_LTLIBOBJS
599 gltests_LIBOBJS
600 gl_LTLIBOBJS
601 gl_LIBOBJS
602 am__EXEEXT_FALSE
603 am__EXEEXT_TRUE
604 LTLIBOBJS
605 LIBOBJS
606 SUBDIR_MAKEFILES_IN
607 WINDOW_SYSTEM_OBJ
608 EMACS_HEAPSIZE
609 TEMACS_POST_LINK
610 ADDSECTION
611 LD_SWITCH_SYSTEM_TEMACS
612 LIBGNU_LTLIBDEPS
613 LIBGNU_LIBDEPS
614 gltests_WITNESS
615 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
616 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
617 gl_GNULIB_ENABLED_tempname_FALSE
618 gl_GNULIB_ENABLED_tempname_TRUE
619 gl_GNULIB_ENABLED_strtoull_FALSE
620 gl_GNULIB_ENABLED_strtoull_TRUE
621 gl_GNULIB_ENABLED_strtoll_FALSE
622 gl_GNULIB_ENABLED_strtoll_TRUE
623 gl_GNULIB_ENABLED_stat_FALSE
624 gl_GNULIB_ENABLED_stat_TRUE
625 gl_GNULIB_ENABLED_secure_getenv_FALSE
626 gl_GNULIB_ENABLED_secure_getenv_TRUE
627 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
628 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
629 gl_GNULIB_ENABLED_pathmax_FALSE
630 gl_GNULIB_ENABLED_pathmax_TRUE
631 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
632 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
633 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
634 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
635 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
636 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
637 gl_GNULIB_ENABLED_getgroups_FALSE
638 gl_GNULIB_ENABLED_getgroups_TRUE
639 gl_GNULIB_ENABLED_getdtablesize_FALSE
640 gl_GNULIB_ENABLED_getdtablesize_TRUE
641 gl_GNULIB_ENABLED_euidaccess_FALSE
642 gl_GNULIB_ENABLED_euidaccess_TRUE
643 gl_GNULIB_ENABLED_dosname_FALSE
644 gl_GNULIB_ENABLED_dosname_TRUE
645 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
646 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
647 LTLIBINTL
648 LIBINTL
649 LIB_EACCESS
650 WINDOWS_64_BIT_OFF_T
651 HAVE_UNISTD_H
652 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
653 NEXT_UNISTD_H
654 LIB_TIMER_TIME
655 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
656 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
657 TIME_H_DEFINES_STRUCT_TIMESPEC
658 NEXT_AS_FIRST_DIRECTIVE_TIME_H
659 NEXT_TIME_H
660 WINDOWS_64_BIT_ST_SIZE
661 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
662 NEXT_SYS_STAT_H
663 NEXT_AS_FIRST_DIRECTIVE_STRING_H
664 NEXT_STRING_H
665 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
666 NEXT_STDLIB_H
667 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
668 NEXT_STDIO_H
669 REPLACE_VSPRINTF
670 REPLACE_VSNPRINTF
671 REPLACE_VPRINTF
672 REPLACE_VFPRINTF
673 REPLACE_VDPRINTF
674 REPLACE_VASPRINTF
675 REPLACE_TMPFILE
676 REPLACE_STDIO_WRITE_FUNCS
677 REPLACE_STDIO_READ_FUNCS
678 REPLACE_SPRINTF
679 REPLACE_SNPRINTF
680 REPLACE_RENAMEAT
681 REPLACE_RENAME
682 REPLACE_REMOVE
683 REPLACE_PRINTF
684 REPLACE_POPEN
685 REPLACE_PERROR
686 REPLACE_OBSTACK_PRINTF
687 REPLACE_GETLINE
688 REPLACE_GETDELIM
689 REPLACE_FTELLO
690 REPLACE_FTELL
691 REPLACE_FSEEKO
692 REPLACE_FSEEK
693 REPLACE_FREOPEN
694 REPLACE_FPURGE
695 REPLACE_FPRINTF
696 REPLACE_FOPEN
697 REPLACE_FFLUSH
698 REPLACE_FDOPEN
699 REPLACE_FCLOSE
700 REPLACE_DPRINTF
701 HAVE_VDPRINTF
702 HAVE_VASPRINTF
703 HAVE_RENAMEAT
704 HAVE_POPEN
705 HAVE_PCLOSE
706 HAVE_FTELLO
707 HAVE_FSEEKO
708 HAVE_DPRINTF
709 HAVE_DECL_VSNPRINTF
710 HAVE_DECL_SNPRINTF
711 HAVE_DECL_OBSTACK_PRINTF
712 HAVE_DECL_GETLINE
713 HAVE_DECL_GETDELIM
714 HAVE_DECL_FTELLO
715 HAVE_DECL_FSEEKO
716 HAVE_DECL_FPURGE
717 GNULIB_VSPRINTF_POSIX
718 GNULIB_VSNPRINTF
719 GNULIB_VPRINTF_POSIX
720 GNULIB_VPRINTF
721 GNULIB_VFPRINTF_POSIX
722 GNULIB_VFPRINTF
723 GNULIB_VDPRINTF
724 GNULIB_VSCANF
725 GNULIB_VFSCANF
726 GNULIB_VASPRINTF
727 GNULIB_TMPFILE
728 GNULIB_STDIO_H_SIGPIPE
729 GNULIB_STDIO_H_NONBLOCKING
730 GNULIB_SPRINTF_POSIX
731 GNULIB_SNPRINTF
732 GNULIB_SCANF
733 GNULIB_RENAMEAT
734 GNULIB_RENAME
735 GNULIB_REMOVE
736 GNULIB_PUTS
737 GNULIB_PUTCHAR
738 GNULIB_PUTC
739 GNULIB_PRINTF_POSIX
740 GNULIB_PRINTF
741 GNULIB_POPEN
742 GNULIB_PERROR
743 GNULIB_PCLOSE
744 GNULIB_OBSTACK_PRINTF_POSIX
745 GNULIB_OBSTACK_PRINTF
746 GNULIB_GETLINE
747 GNULIB_GETDELIM
748 GNULIB_GETCHAR
749 GNULIB_GETC
750 GNULIB_FWRITE
751 GNULIB_FTELLO
752 GNULIB_FTELL
753 GNULIB_FSEEKO
754 GNULIB_FSEEK
755 GNULIB_FSCANF
756 GNULIB_FREOPEN
757 GNULIB_FREAD
758 GNULIB_FPUTS
759 GNULIB_FPUTC
760 GNULIB_FPURGE
761 GNULIB_FPRINTF_POSIX
762 GNULIB_FPRINTF
763 GNULIB_FOPEN
764 GNULIB_FGETS
765 GNULIB_FGETC
766 GNULIB_FFLUSH
767 GNULIB_FDOPEN
768 GNULIB_FCLOSE
769 GNULIB_DPRINTF
770 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
771 NEXT_STDDEF_H
772 GL_GENERATE_STDDEF_H_FALSE
773 GL_GENERATE_STDDEF_H_TRUE
774 STDDEF_H
775 HAVE_WCHAR_T
776 REPLACE_NULL
777 HAVE__BOOL
778 GL_GENERATE_STDBOOL_H_FALSE
779 GL_GENERATE_STDBOOL_H_TRUE
780 STDBOOL_H
781 GL_GENERATE_STDARG_H_FALSE
782 GL_GENERATE_STDARG_H_TRUE
783 STDARG_H
784 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
785 NEXT_STDARG_H
786 GL_GENERATE_STDALIGN_H_FALSE
787 GL_GENERATE_STDALIGN_H_TRUE
788 STDALIGN_H
789 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
790 NEXT_SIGNAL_H
791 USE_ACL
792 LIB_ACL
793 LIB_PTHREAD_SIGMASK
794 REPLACE_RAISE
795 REPLACE_PTHREAD_SIGMASK
796 HAVE_SIGHANDLER_T
797 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
798 HAVE_STRUCT_SIGACTION_SA_SIGACTION
799 HAVE_SIGACTION
800 HAVE_SIGINFO_T
801 HAVE_SIGSET_T
802 HAVE_RAISE
803 HAVE_PTHREAD_SIGMASK
804 HAVE_POSIX_SIGNALBLOCKING
805 GNULIB_SIGACTION
806 GNULIB_SIGPROCMASK
807 GNULIB_SIGNAL_H_SIGPIPE
808 GNULIB_RAISE
809 GNULIB_PTHREAD_SIGMASK
810 HAVE_SYS_SELECT_H
811 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
812 NEXT_SYS_SELECT_H
813 REPLACE_SELECT
814 REPLACE_PSELECT
815 HAVE_PSELECT
816 GNULIB_SELECT
817 GNULIB_PSELECT
818 REPLACE_TIMEGM
819 REPLACE_NANOSLEEP
820 REPLACE_MKTIME
821 REPLACE_LOCALTIME_R
822 HAVE_TIMEGM
823 HAVE_STRPTIME
824 HAVE_NANOSLEEP
825 HAVE_DECL_LOCALTIME_R
826 GNULIB_TIME_R
827 GNULIB_TIMEGM
828 GNULIB_STRPTIME
829 GNULIB_NANOSLEEP
830 GNULIB_MKTIME
831 UNDEFINE_STRTOK_R
832 REPLACE_STRTOK_R
833 REPLACE_STRSIGNAL
834 REPLACE_STRNLEN
835 REPLACE_STRNDUP
836 REPLACE_STRNCAT
837 REPLACE_STRERROR_R
838 REPLACE_STRERROR
839 REPLACE_STRCHRNUL
840 REPLACE_STRCASESTR
841 REPLACE_STRSTR
842 REPLACE_STRDUP
843 REPLACE_STPNCPY
844 REPLACE_MEMMEM
845 REPLACE_MEMCHR
846 HAVE_STRVERSCMP
847 HAVE_DECL_STRSIGNAL
848 HAVE_DECL_STRERROR_R
849 HAVE_DECL_STRTOK_R
850 HAVE_STRCASESTR
851 HAVE_STRSEP
852 HAVE_STRPBRK
853 HAVE_DECL_STRNLEN
854 HAVE_DECL_STRNDUP
855 HAVE_DECL_STRDUP
856 HAVE_STRCHRNUL
857 HAVE_STPNCPY
858 HAVE_STPCPY
859 HAVE_RAWMEMCHR
860 HAVE_DECL_MEMRCHR
861 HAVE_MEMPCPY
862 HAVE_DECL_MEMMEM
863 HAVE_MEMCHR
864 HAVE_FFSLL
865 HAVE_FFSL
866 HAVE_MBSLEN
867 GNULIB_STRVERSCMP
868 GNULIB_STRSIGNAL
869 GNULIB_STRERROR_R
870 GNULIB_STRERROR
871 GNULIB_MBSTOK_R
872 GNULIB_MBSSEP
873 GNULIB_MBSSPN
874 GNULIB_MBSPBRK
875 GNULIB_MBSCSPN
876 GNULIB_MBSCASESTR
877 GNULIB_MBSPCASECMP
878 GNULIB_MBSNCASECMP
879 GNULIB_MBSCASECMP
880 GNULIB_MBSSTR
881 GNULIB_MBSRCHR
882 GNULIB_MBSCHR
883 GNULIB_MBSNLEN
884 GNULIB_MBSLEN
885 GNULIB_STRTOK_R
886 GNULIB_STRCASESTR
887 GNULIB_STRSTR
888 GNULIB_STRSEP
889 GNULIB_STRPBRK
890 GNULIB_STRNLEN
891 GNULIB_STRNDUP
892 GNULIB_STRNCAT
893 GNULIB_STRDUP
894 GNULIB_STRCHRNUL
895 GNULIB_STPNCPY
896 GNULIB_STPCPY
897 GNULIB_RAWMEMCHR
898 GNULIB_MEMRCHR
899 GNULIB_MEMPCPY
900 GNULIB_MEMMEM
901 GNULIB_MEMCHR
902 GNULIB_FFSLL
903 GNULIB_FFSL
904 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
905 NEXT_INTTYPES_H
906 UINT64_MAX_EQ_ULONG_MAX
907 UINT32_MAX_LT_UINTMAX_MAX
908 PRIPTR_PREFIX
909 PRI_MACROS_BROKEN
910 INT64_MAX_EQ_LONG_MAX
911 INT32_MAX_LT_INTMAX_MAX
912 REPLACE_STRTOIMAX
913 HAVE_DECL_STRTOUMAX
914 HAVE_DECL_STRTOIMAX
915 HAVE_DECL_IMAXDIV
916 HAVE_DECL_IMAXABS
917 GNULIB_STRTOUMAX
918 GNULIB_STRTOIMAX
919 GNULIB_IMAXDIV
920 GNULIB_IMAXABS
921 GL_GENERATE_STDINT_H_FALSE
922 GL_GENERATE_STDINT_H_TRUE
923 STDINT_H
924 WINT_T_SUFFIX
925 WCHAR_T_SUFFIX
926 SIG_ATOMIC_T_SUFFIX
927 SIZE_T_SUFFIX
928 PTRDIFF_T_SUFFIX
929 HAVE_SIGNED_WINT_T
930 HAVE_SIGNED_WCHAR_T
931 HAVE_SIGNED_SIG_ATOMIC_T
932 BITSIZEOF_WINT_T
933 BITSIZEOF_WCHAR_T
934 BITSIZEOF_SIG_ATOMIC_T
935 BITSIZEOF_SIZE_T
936 BITSIZEOF_PTRDIFF_T
937 APPLE_UNIVERSAL_BUILD
938 HAVE_SYS_BITYPES_H
939 HAVE_SYS_INTTYPES_H
940 HAVE_STDINT_H
941 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
942 NEXT_STDINT_H
943 HAVE_SYS_TYPES_H
944 HAVE_INTTYPES_H
945 HAVE_WCHAR_H
946 HAVE_UNSIGNED_LONG_LONG_INT
947 HAVE_LONG_LONG_INT
948 HAVE_WINSOCK2_H
949 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
950 NEXT_SYS_TIME_H
951 REPLACE_STRUCT_TIMEVAL
952 REPLACE_GETTIMEOFDAY
953 HAVE_SYS_TIME_H
954 HAVE_STRUCT_TIMEVAL
955 HAVE_GETTIMEOFDAY
956 GNULIB_GETTIMEOFDAY
957 GNULIB_GL_UNISTD_H_GETOPT
958 GETOPT_H
959 HAVE_GETOPT_H
960 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
961 NEXT_GETOPT_H
962 GETLOADAVG_LIBS
963 REPLACE_WCTOMB
964 REPLACE_UNSETENV
965 REPLACE_STRTOD
966 REPLACE_SETENV
967 REPLACE_REALPATH
968 REPLACE_REALLOC
969 REPLACE_RANDOM_R
970 REPLACE_PUTENV
971 REPLACE_PTSNAME_R
972 REPLACE_PTSNAME
973 REPLACE_MKSTEMP
974 REPLACE_MBTOWC
975 REPLACE_MALLOC
976 REPLACE_CANONICALIZE_FILE_NAME
977 REPLACE_CALLOC
978 HAVE_DECL_UNSETENV
979 HAVE_UNLOCKPT
980 HAVE_SYS_LOADAVG_H
981 HAVE_STRUCT_RANDOM_DATA
982 HAVE_STRTOULL
983 HAVE_STRTOLL
984 HAVE_STRTOD
985 HAVE_DECL_SETENV
986 HAVE_SETENV
987 HAVE_SECURE_GETENV
988 HAVE_RPMATCH
989 HAVE_REALPATH
990 HAVE_RANDOM_R
991 HAVE_RANDOM_H
992 HAVE_RANDOM
993 HAVE_PTSNAME_R
994 HAVE_PTSNAME
995 HAVE_POSIX_OPENPT
996 HAVE_MKSTEMPS
997 HAVE_MKSTEMP
998 HAVE_MKOSTEMPS
999 HAVE_MKOSTEMP
1000 HAVE_MKDTEMP
1001 HAVE_GRANTPT
1002 HAVE_GETSUBOPT
1003 HAVE_DECL_GETLOADAVG
1004 HAVE_CANONICALIZE_FILE_NAME
1005 HAVE_ATOLL
1006 HAVE__EXIT
1007 GNULIB_WCTOMB
1008 GNULIB_UNSETENV
1009 GNULIB_UNLOCKPT
1010 GNULIB_SYSTEM_POSIX
1011 GNULIB_STRTOULL
1012 GNULIB_STRTOLL
1013 GNULIB_STRTOD
1014 GNULIB_SETENV
1015 GNULIB_SECURE_GETENV
1016 GNULIB_RPMATCH
1017 GNULIB_REALPATH
1018 GNULIB_REALLOC_POSIX
1019 GNULIB_RANDOM_R
1020 GNULIB_RANDOM
1021 GNULIB_PUTENV
1022 GNULIB_PTSNAME_R
1023 GNULIB_PTSNAME
1024 GNULIB_POSIX_OPENPT
1025 GNULIB_MKSTEMPS
1026 GNULIB_MKSTEMP
1027 GNULIB_MKOSTEMPS
1028 GNULIB_MKOSTEMP
1029 GNULIB_MKDTEMP
1030 GNULIB_MBTOWC
1031 GNULIB_MALLOC_POSIX
1032 GNULIB_GRANTPT
1033 GNULIB_GETSUBOPT
1034 GNULIB_GETLOADAVG
1035 GNULIB_CANONICALIZE_FILE_NAME
1036 GNULIB_CALLOC_POSIX
1037 GNULIB_ATOLL
1038 GNULIB__EXIT
1039 REPLACE_UTIMENSAT
1040 REPLACE_STAT
1041 REPLACE_MKNOD
1042 REPLACE_MKFIFO
1043 REPLACE_MKDIR
1044 REPLACE_LSTAT
1045 REPLACE_FUTIMENS
1046 REPLACE_FSTATAT
1047 REPLACE_FSTAT
1048 HAVE_UTIMENSAT
1049 HAVE_MKNODAT
1050 HAVE_MKNOD
1051 HAVE_MKFIFOAT
1052 HAVE_MKFIFO
1053 HAVE_MKDIRAT
1054 HAVE_LSTAT
1055 HAVE_LCHMOD
1056 HAVE_FUTIMENS
1057 HAVE_FSTATAT
1058 HAVE_FCHMODAT
1059 GNULIB_UTIMENSAT
1060 GNULIB_STAT
1061 GNULIB_MKNODAT
1062 GNULIB_MKNOD
1063 GNULIB_MKFIFOAT
1064 GNULIB_MKFIFO
1065 GNULIB_MKDIRAT
1066 GNULIB_LSTAT
1067 GNULIB_LCHMOD
1068 GNULIB_FUTIMENS
1069 GNULIB_FSTATAT
1070 GNULIB_FSTAT
1071 GNULIB_FCHMODAT
1072 LIB_FDATASYNC
1073 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1074 NEXT_FCNTL_H
1075 REPLACE_OPENAT
1076 REPLACE_OPEN
1077 REPLACE_FCNTL
1078 HAVE_OPENAT
1079 HAVE_FCNTL
1080 GNULIB_OPENAT
1081 GNULIB_OPEN
1082 GNULIB_NONBLOCKING
1083 GNULIB_FCNTL
1084 GL_GENERATE_EXECINFO_H_FALSE
1085 GL_GENERATE_EXECINFO_H_TRUE
1086 LIB_EXECINFO
1087 EXECINFO_H
1088 EOVERFLOW_VALUE
1089 EOVERFLOW_HIDDEN
1090 ENOLINK_VALUE
1091 ENOLINK_HIDDEN
1092 EMULTIHOP_VALUE
1093 EMULTIHOP_HIDDEN
1094 GL_GENERATE_ERRNO_H_FALSE
1095 GL_GENERATE_ERRNO_H_TRUE
1096 ERRNO_H
1097 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1098 NEXT_ERRNO_H
1099 HAVE_DIRENT_H
1100 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1101 NEXT_DIRENT_H
1102 PRAGMA_COLUMNS
1103 PRAGMA_SYSTEM_HEADER
1104 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1105 INCLUDE_NEXT
1106 REPLACE_FDOPENDIR
1107 REPLACE_DIRFD
1108 REPLACE_CLOSEDIR
1109 REPLACE_OPENDIR
1110 HAVE_ALPHASORT
1111 HAVE_SCANDIR
1112 HAVE_FDOPENDIR
1113 HAVE_DECL_FDOPENDIR
1114 HAVE_DECL_DIRFD
1115 HAVE_CLOSEDIR
1116 HAVE_REWINDDIR
1117 HAVE_READDIR
1118 HAVE_OPENDIR
1119 GNULIB_ALPHASORT
1120 GNULIB_SCANDIR
1121 GNULIB_FDOPENDIR
1122 GNULIB_DIRFD
1123 GNULIB_CLOSEDIR
1124 GNULIB_REWINDDIR
1125 GNULIB_READDIR
1126 GNULIB_OPENDIR
1127 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1128 UNISTD_H_HAVE_WINSOCK2_H
1129 REPLACE_WRITE
1130 REPLACE_USLEEP
1131 REPLACE_UNLINKAT
1132 REPLACE_UNLINK
1133 REPLACE_TTYNAME_R
1134 REPLACE_SYMLINK
1135 REPLACE_SLEEP
1136 REPLACE_RMDIR
1137 REPLACE_READLINK
1138 REPLACE_READ
1139 REPLACE_PWRITE
1140 REPLACE_PREAD
1141 REPLACE_LSEEK
1142 REPLACE_LINKAT
1143 REPLACE_LINK
1144 REPLACE_LCHOWN
1145 REPLACE_ISATTY
1146 REPLACE_GETPAGESIZE
1147 REPLACE_GETGROUPS
1148 REPLACE_GETLOGIN_R
1149 REPLACE_GETDOMAINNAME
1150 REPLACE_GETCWD
1151 REPLACE_FTRUNCATE
1152 REPLACE_FCHOWNAT
1153 REPLACE_DUP2
1154 REPLACE_DUP
1155 REPLACE_CLOSE
1156 REPLACE_CHOWN
1157 HAVE_SYS_PARAM_H
1158 HAVE_OS_H
1159 HAVE_DECL_TTYNAME_R
1160 HAVE_DECL_SETHOSTNAME
1161 HAVE_DECL_GETUSERSHELL
1162 HAVE_DECL_GETPAGESIZE
1163 HAVE_DECL_GETLOGIN_R
1164 HAVE_DECL_GETDOMAINNAME
1165 HAVE_DECL_FDATASYNC
1166 HAVE_DECL_FCHDIR
1167 HAVE_DECL_ENVIRON
1168 HAVE_USLEEP
1169 HAVE_UNLINKAT
1170 HAVE_SYMLINKAT
1171 HAVE_SYMLINK
1172 HAVE_SLEEP
1173 HAVE_SETHOSTNAME
1174 HAVE_READLINKAT
1175 HAVE_READLINK
1176 HAVE_PWRITE
1177 HAVE_PREAD
1178 HAVE_PIPE2
1179 HAVE_PIPE
1180 HAVE_LINKAT
1181 HAVE_LINK
1182 HAVE_LCHOWN
1183 HAVE_GROUP_MEMBER
1184 HAVE_GETPAGESIZE
1185 HAVE_GETLOGIN
1186 HAVE_GETHOSTNAME
1187 HAVE_GETGROUPS
1188 HAVE_GETDTABLESIZE
1189 HAVE_FTRUNCATE
1190 HAVE_FSYNC
1191 HAVE_FDATASYNC
1192 HAVE_FCHOWNAT
1193 HAVE_FCHDIR
1194 HAVE_FACCESSAT
1195 HAVE_EUIDACCESS
1196 HAVE_DUP3
1197 HAVE_DUP2
1198 HAVE_CHOWN
1199 GNULIB_WRITE
1200 GNULIB_USLEEP
1201 GNULIB_UNLINKAT
1202 GNULIB_UNLINK
1203 GNULIB_UNISTD_H_SIGPIPE
1204 GNULIB_UNISTD_H_NONBLOCKING
1205 GNULIB_TTYNAME_R
1206 GNULIB_SYMLINKAT
1207 GNULIB_SYMLINK
1208 GNULIB_SLEEP
1209 GNULIB_SETHOSTNAME
1210 GNULIB_RMDIR
1211 GNULIB_READLINKAT
1212 GNULIB_READLINK
1213 GNULIB_READ
1214 GNULIB_PWRITE
1215 GNULIB_PREAD
1216 GNULIB_PIPE2
1217 GNULIB_PIPE
1218 GNULIB_LSEEK
1219 GNULIB_LINKAT
1220 GNULIB_LINK
1221 GNULIB_LCHOWN
1222 GNULIB_ISATTY
1223 GNULIB_GROUP_MEMBER
1224 GNULIB_GETUSERSHELL
1225 GNULIB_GETPAGESIZE
1226 GNULIB_GETLOGIN_R
1227 GNULIB_GETLOGIN
1228 GNULIB_GETHOSTNAME
1229 GNULIB_GETGROUPS
1230 GNULIB_GETDTABLESIZE
1231 GNULIB_GETDOMAINNAME
1232 GNULIB_GETCWD
1233 GNULIB_FTRUNCATE
1234 GNULIB_FSYNC
1235 GNULIB_FDATASYNC
1236 GNULIB_FCHOWNAT
1237 GNULIB_FCHDIR
1238 GNULIB_FACCESSAT
1239 GNULIB_EUIDACCESS
1240 GNULIB_ENVIRON
1241 GNULIB_DUP3
1242 GNULIB_DUP2
1243 GNULIB_DUP
1244 GNULIB_CLOSE
1245 GNULIB_CHOWN
1246 GNULIB_CHDIR
1247 LIB_CLOCK_GETTIME
1248 GL_GENERATE_ALLOCA_H_FALSE
1249 GL_GENERATE_ALLOCA_H_TRUE
1250 ALLOCA_H
1251 ALLOCA
1252 GL_COND_LIBTOOL_FALSE
1253 GL_COND_LIBTOOL_TRUE
1254 POST_ALLOC_OBJ
1255 PRE_ALLOC_OBJ
1256 CYGWIN_OBJ
1257 RALLOC_OBJ
1258 OLDXMENU_DEPS
1259 LIBX_OTHER
1260 LIBXMENU
1261 OLDXMENU
1262 OLDXMENU_TARGET
1263 LIBXT_OTHER
1264 TOOLKIT_LIBW
1265 WIDGET_OBJ
1266 XOBJ
1267 XMENU_OBJ
1268 FONT_OBJ
1269 OTHER_FILES
1270 GNU_OBJC_CFLAGS
1271 ns_appsrc
1272 ns_appresdir
1273 ns_appbindir
1274 ns_appdir
1275 X_TOOLKIT_TYPE
1276 GNUSTEP_CFLAGS
1277 C_SWITCH_X_SITE
1278 LD_SWITCH_X_SITE
1279 gameuser
1280 gamedir
1281 bitmapdir
1282 etcdocdir
1283 archlibdir
1284 etcdir
1285 x_default_search_path
1286 lisppath
1287 locallisppath
1288 standardlisppath
1289 leimdir
1290 lispdir
1291 srcdir
1292 canonical
1293 configuration
1294 version
1295 copyright
1296 XGSELOBJ
1297 KRB4LIB
1298 DESLIB
1299 KRB5LIB
1300 CRYPTOLIB
1301 COM_ERRLIB
1302 LIBRESOLV
1303 LIBHESIOD
1304 TERMCAP_OBJ
1305 LIBS_TERMCAP
1306 BLESSMAIL_TARGET
1307 LIBS_MAIL
1308 liblockfile
1309 LIBXML2_LIBS
1310 LIBXML2_CFLAGS
1311 XINERAMA_LIBS
1312 XINERAMA_CFLAGS
1313 XRANDR_LIBS
1314 XRANDR_CFLAGS
1315 LIBXSM
1316 LIBGPM
1317 LIBGIF
1318 LIBTIFF
1319 LIBZ
1320 LIBPNG
1321 LIBJPEG
1322 LIBXPM
1323 M17N_FLT_LIBS
1324 M17N_FLT_CFLAGS
1325 LIBOTF_LIBS
1326 LIBOTF_CFLAGS
1327 FREETYPE_LIBS
1328 FREETYPE_CFLAGS
1329 XFT_LIBS
1330 XFT_CFLAGS
1331 FONTCONFIG_LIBS
1332 FONTCONFIG_CFLAGS
1333 LIBXMU
1334 LIBXTR6
1335 NOTIFY_OBJ
1336 GFILENOTIFY_LIBS
1337 GFILENOTIFY_CFLAGS
1338 LIBGNUTLS_LIBS
1339 LIBGNUTLS_CFLAGS
1340 LIBSELINUX_LIBS
1341 SETTINGS_LIBS
1342 SETTINGS_CFLAGS
1343 GOBJECT_LIBS
1344 GOBJECT_CFLAGS
1345 GCONF_LIBS
1346 GCONF_CFLAGS
1347 GSETTINGS_LIBS
1348 GSETTINGS_CFLAGS
1349 DBUS_OBJ
1350 DBUS_LIBS
1351 DBUS_CFLAGS
1352 GTK_OBJ
1353 GTK_LIBS
1354 GTK_CFLAGS
1355 IMAGEMAGICK_LIBS
1356 IMAGEMAGICK_CFLAGS
1357 RSVG_LIBS
1358 RSVG_CFLAGS
1359 LIB_PTHREAD
1360 VMLIMIT_OBJ
1361 GMALLOC_OBJ
1362 HAVE_XSERVER
1363 XARGS_LIMIT
1364 NTLIB
1365 LIB_WSOCK32
1366 LIBS_ECLIENT
1367 CM_OBJ
1368 NTDIR
1369 FIRSTFILE_OBJ
1370 W32_RES_LINK
1371 CLIENTW
1372 CLIENTRES
1373 UPDATE_MANIFEST
1374 EMACS_MANIFEST
1375 EMACSRES
1376 W32_LIBS
1377 W32_OBJ
1378 WINDRES
1379 NS_OBJC_OBJ
1380 NS_OBJ
1381 ns_self_contained
1382 INSTALL_ARCH_INDEP_EXTRA
1383 LIBS_GNUSTEP
1384 LD_SWITCH_X_SITE_RPATH
1385 XMKMF
1386 DEPFLAGS
1387 MKDEPDIR
1388 CFLAGS_SOUND
1389 ALSA_LIBS
1390 ALSA_CFLAGS
1391 LIBSOUND
1392 PKG_CONFIG
1393 LIB_MATH
1394 LIBS_SYSTEM
1395 C_SWITCH_SYSTEM
1396 UNEXEC_OBJ
1397 C_SWITCH_MACHINE
1398 LD_SWITCH_SYSTEM
1399 CANNOT_DUMP
1400 DOCMISC_W32
1401 INFO_OPTS
1402 INFO_EXT
1403 HAVE_MAKEINFO
1404 PAXCTL
1405 GZIP_PROG
1406 INSTALL_INFO
1407 LN_S_FILEONLY
1408 GNULIB_WARN_CFLAGS
1409 WARN_CFLAGS
1410 WERROR_CFLAGS
1411 RANLIB
1412 ARFLAGS
1413 AR
1414 EGREP
1415 GREP
1416 CPP
1417 BUILDING_FOR_WINDOWSNT_FALSE
1418 BUILDING_FOR_WINDOWSNT_TRUE
1419 am__fastdepCC_FALSE
1420 am__fastdepCC_TRUE
1421 CCDEPMODE
1422 AMDEPBACKSLASH
1423 AMDEP_FALSE
1424 AMDEP_TRUE
1425 am__quote
1426 am__include
1427 DEPDIR
1428 OBJEXT
1429 EXEEXT
1430 ac_ct_CC
1431 CPPFLAGS
1432 LDFLAGS
1433 CFLAGS
1434 CC
1435 host_os
1436 host_vendor
1437 host_cpu
1438 host
1439 build_os
1440 build_vendor
1441 build_cpu
1442 build
1443 PROFILING_CFLAGS
1444 GZIP_INFO
1445 cache_file
1446 am__untar
1447 am__tar
1448 AMTAR
1449 am__leading_dot
1450 SET_MAKE
1451 AWK
1452 mkdir_p
1453 MKDIR_P
1454 INSTALL_STRIP_PROGRAM
1455 STRIP
1456 install_sh
1457 MAKEINFO
1458 AUTOHEADER
1459 AUTOMAKE
1460 AUTOCONF
1461 ACLOCAL
1462 VERSION
1463 PACKAGE
1464 CYGPATH_W
1465 am__isrc
1466 INSTALL_DATA
1467 INSTALL_SCRIPT
1468 INSTALL_PROGRAM
1469 target_alias
1470 host_alias
1471 build_alias
1472 LIBS
1473 ECHO_T
1474 ECHO_N
1475 ECHO_C
1476 DEFS
1477 mandir
1478 localedir
1479 libdir
1480 psdir
1481 pdfdir
1482 dvidir
1483 htmldir
1484 infodir
1485 docdir
1486 oldincludedir
1487 includedir
1488 localstatedir
1489 sharedstatedir
1490 sysconfdir
1491 datadir
1492 datarootdir
1493 libexecdir
1494 sbindir
1495 bindir
1496 program_transform_name
1497 prefix
1498 exec_prefix
1499 PACKAGE_URL
1500 PACKAGE_BUGREPORT
1501 PACKAGE_STRING
1502 PACKAGE_VERSION
1503 PACKAGE_TARNAME
1504 PACKAGE_NAME
1505 PATH_SEPARATOR
1506 SHELL'
1507 ac_subst_files='deps_frag
1508 lisp_frag'
1509 ac_user_opts='
1510 enable_option_checking
1511 with_all
1512 with_pop
1513 with_kerberos
1514 with_kerberos5
1515 with_hesiod
1516 with_mmdf
1517 with_mail_unlink
1518 with_mailhost
1519 with_sound
1520 with_x_toolkit
1521 with_wide_int
1522 with_xpm
1523 with_jpeg
1524 with_tiff
1525 with_gif
1526 with_png
1527 with_rsvg
1528 with_xml2
1529 with_imagemagick
1530 with_xft
1531 with_libotf
1532 with_m17n_flt
1533 with_toolkit_scroll_bars
1534 with_xaw3d
1535 with_xim
1536 with_ns
1537 with_w32
1538 with_gpm
1539 with_dbus
1540 with_gconf
1541 with_gsettings
1542 with_selinux
1543 with_gnutls
1544 with_zlib
1545 with_file_notification
1546 with_makeinfo
1547 with_compress_info
1548 with_pkg_config_prog
1549 with_gameuser
1550 with_gnustep_conf
1551 enable_ns_self_contained
1552 enable_locallisppath
1553 enable_checking
1554 enable_check_lisp_object_type
1555 enable_profiling
1556 enable_autodepend
1557 enable_gtk_deprecation_warnings
1558 enable_dependency_tracking
1559 enable_largefile
1560 enable_gcc_warnings
1561 enable_link_time_optimization
1562 with_x
1563 enable_acl
1564 '
1565 ac_precious_vars='build_alias
1566 host_alias
1567 target_alias
1568 CC
1569 CFLAGS
1570 LDFLAGS
1571 LIBS
1572 CPPFLAGS
1573 CPP
1574 XMKMF'
1575
1576
1577 # Initialize some variables set by options.
1578 ac_init_help=
1579 ac_init_version=false
1580 ac_unrecognized_opts=
1581 ac_unrecognized_sep=
1582 # The variables have the same names as the options, with
1583 # dashes changed to underlines.
1584 cache_file=/dev/null
1585 exec_prefix=NONE
1586 no_create=
1587 no_recursion=
1588 prefix=NONE
1589 program_prefix=NONE
1590 program_suffix=NONE
1591 program_transform_name=s,x,x,
1592 silent=
1593 site=
1594 srcdir=
1595 verbose=
1596 x_includes=NONE
1597 x_libraries=NONE
1598
1599 # Installation directory options.
1600 # These are left unexpanded so users can "make install exec_prefix=/foo"
1601 # and all the variables that are supposed to be based on exec_prefix
1602 # by default will actually change.
1603 # Use braces instead of parens because sh, perl, etc. also accept them.
1604 # (The list follows the same order as the GNU Coding Standards.)
1605 bindir='${exec_prefix}/bin'
1606 sbindir='${exec_prefix}/sbin'
1607 libexecdir='${exec_prefix}/libexec'
1608 datarootdir='${prefix}/share'
1609 datadir='${datarootdir}'
1610 sysconfdir='${prefix}/etc'
1611 sharedstatedir='${prefix}/com'
1612 localstatedir='${prefix}/var'
1613 includedir='${prefix}/include'
1614 oldincludedir='/usr/include'
1615 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1616 infodir='${datarootdir}/info'
1617 htmldir='${docdir}'
1618 dvidir='${docdir}'
1619 pdfdir='${docdir}'
1620 psdir='${docdir}'
1621 libdir='${exec_prefix}/lib'
1622 localedir='${datarootdir}/locale'
1623 mandir='${datarootdir}/man'
1624
1625 ac_prev=
1626 ac_dashdash=
1627 for ac_option
1628 do
1629 # If the previous option needs an argument, assign it.
1630 if test -n "$ac_prev"; then
1631 eval $ac_prev=\$ac_option
1632 ac_prev=
1633 continue
1634 fi
1635
1636 case $ac_option in
1637 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1638 *) ac_optarg=yes ;;
1639 esac
1640
1641 # Accept the important Cygnus configure options, so we can diagnose typos.
1642
1643 case $ac_dashdash$ac_option in
1644 --)
1645 ac_dashdash=yes ;;
1646
1647 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1648 ac_prev=bindir ;;
1649 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1650 bindir=$ac_optarg ;;
1651
1652 -build | --build | --buil | --bui | --bu)
1653 ac_prev=build_alias ;;
1654 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1655 build_alias=$ac_optarg ;;
1656
1657 -cache-file | --cache-file | --cache-fil | --cache-fi \
1658 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1659 ac_prev=cache_file ;;
1660 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1661 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1662 cache_file=$ac_optarg ;;
1663
1664 --config-cache | -C)
1665 cache_file=config.cache ;;
1666
1667 -datadir | --datadir | --datadi | --datad)
1668 ac_prev=datadir ;;
1669 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1670 datadir=$ac_optarg ;;
1671
1672 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1673 | --dataroo | --dataro | --datar)
1674 ac_prev=datarootdir ;;
1675 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1676 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1677 datarootdir=$ac_optarg ;;
1678
1679 -disable-* | --disable-*)
1680 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1681 # Reject names that are not valid shell variable names.
1682 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1683 as_fn_error "invalid feature name: $ac_useropt"
1684 ac_useropt_orig=$ac_useropt
1685 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1686 case $ac_user_opts in
1687 *"
1688 "enable_$ac_useropt"
1689 "*) ;;
1690 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1691 ac_unrecognized_sep=', ';;
1692 esac
1693 eval enable_$ac_useropt=no ;;
1694
1695 -docdir | --docdir | --docdi | --doc | --do)
1696 ac_prev=docdir ;;
1697 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1698 docdir=$ac_optarg ;;
1699
1700 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1701 ac_prev=dvidir ;;
1702 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1703 dvidir=$ac_optarg ;;
1704
1705 -enable-* | --enable-*)
1706 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1707 # Reject names that are not valid shell variable names.
1708 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709 as_fn_error "invalid feature name: $ac_useropt"
1710 ac_useropt_orig=$ac_useropt
1711 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712 case $ac_user_opts in
1713 *"
1714 "enable_$ac_useropt"
1715 "*) ;;
1716 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1717 ac_unrecognized_sep=', ';;
1718 esac
1719 eval enable_$ac_useropt=\$ac_optarg ;;
1720
1721 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1722 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1723 | --exec | --exe | --ex)
1724 ac_prev=exec_prefix ;;
1725 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1726 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1727 | --exec=* | --exe=* | --ex=*)
1728 exec_prefix=$ac_optarg ;;
1729
1730 -gas | --gas | --ga | --g)
1731 # Obsolete; use --with-gas.
1732 with_gas=yes ;;
1733
1734 -help | --help | --hel | --he | -h)
1735 ac_init_help=long ;;
1736 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1737 ac_init_help=recursive ;;
1738 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1739 ac_init_help=short ;;
1740
1741 -host | --host | --hos | --ho)
1742 ac_prev=host_alias ;;
1743 -host=* | --host=* | --hos=* | --ho=*)
1744 host_alias=$ac_optarg ;;
1745
1746 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1747 ac_prev=htmldir ;;
1748 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1749 | --ht=*)
1750 htmldir=$ac_optarg ;;
1751
1752 -includedir | --includedir | --includedi | --included | --include \
1753 | --includ | --inclu | --incl | --inc)
1754 ac_prev=includedir ;;
1755 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1756 | --includ=* | --inclu=* | --incl=* | --inc=*)
1757 includedir=$ac_optarg ;;
1758
1759 -infodir | --infodir | --infodi | --infod | --info | --inf)
1760 ac_prev=infodir ;;
1761 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1762 infodir=$ac_optarg ;;
1763
1764 -libdir | --libdir | --libdi | --libd)
1765 ac_prev=libdir ;;
1766 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1767 libdir=$ac_optarg ;;
1768
1769 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1770 | --libexe | --libex | --libe)
1771 ac_prev=libexecdir ;;
1772 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1773 | --libexe=* | --libex=* | --libe=*)
1774 libexecdir=$ac_optarg ;;
1775
1776 -localedir | --localedir | --localedi | --localed | --locale)
1777 ac_prev=localedir ;;
1778 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1779 localedir=$ac_optarg ;;
1780
1781 -localstatedir | --localstatedir | --localstatedi | --localstated \
1782 | --localstate | --localstat | --localsta | --localst | --locals)
1783 ac_prev=localstatedir ;;
1784 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1785 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1786 localstatedir=$ac_optarg ;;
1787
1788 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1789 ac_prev=mandir ;;
1790 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1791 mandir=$ac_optarg ;;
1792
1793 -nfp | --nfp | --nf)
1794 # Obsolete; use --without-fp.
1795 with_fp=no ;;
1796
1797 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1798 | --no-cr | --no-c | -n)
1799 no_create=yes ;;
1800
1801 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1802 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1803 no_recursion=yes ;;
1804
1805 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1806 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1807 | --oldin | --oldi | --old | --ol | --o)
1808 ac_prev=oldincludedir ;;
1809 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1810 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1811 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1812 oldincludedir=$ac_optarg ;;
1813
1814 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1815 ac_prev=prefix ;;
1816 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1817 prefix=$ac_optarg ;;
1818
1819 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1820 | --program-pre | --program-pr | --program-p)
1821 ac_prev=program_prefix ;;
1822 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1823 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1824 program_prefix=$ac_optarg ;;
1825
1826 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1827 | --program-suf | --program-su | --program-s)
1828 ac_prev=program_suffix ;;
1829 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1830 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1831 program_suffix=$ac_optarg ;;
1832
1833 -program-transform-name | --program-transform-name \
1834 | --program-transform-nam | --program-transform-na \
1835 | --program-transform-n | --program-transform- \
1836 | --program-transform | --program-transfor \
1837 | --program-transfo | --program-transf \
1838 | --program-trans | --program-tran \
1839 | --progr-tra | --program-tr | --program-t)
1840 ac_prev=program_transform_name ;;
1841 -program-transform-name=* | --program-transform-name=* \
1842 | --program-transform-nam=* | --program-transform-na=* \
1843 | --program-transform-n=* | --program-transform-=* \
1844 | --program-transform=* | --program-transfor=* \
1845 | --program-transfo=* | --program-transf=* \
1846 | --program-trans=* | --program-tran=* \
1847 | --progr-tra=* | --program-tr=* | --program-t=*)
1848 program_transform_name=$ac_optarg ;;
1849
1850 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1851 ac_prev=pdfdir ;;
1852 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1853 pdfdir=$ac_optarg ;;
1854
1855 -psdir | --psdir | --psdi | --psd | --ps)
1856 ac_prev=psdir ;;
1857 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1858 psdir=$ac_optarg ;;
1859
1860 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1861 | -silent | --silent | --silen | --sile | --sil)
1862 silent=yes ;;
1863
1864 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1865 ac_prev=sbindir ;;
1866 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1867 | --sbi=* | --sb=*)
1868 sbindir=$ac_optarg ;;
1869
1870 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1871 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1872 | --sharedst | --shareds | --shared | --share | --shar \
1873 | --sha | --sh)
1874 ac_prev=sharedstatedir ;;
1875 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1876 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1877 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1878 | --sha=* | --sh=*)
1879 sharedstatedir=$ac_optarg ;;
1880
1881 -site | --site | --sit)
1882 ac_prev=site ;;
1883 -site=* | --site=* | --sit=*)
1884 site=$ac_optarg ;;
1885
1886 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1887 ac_prev=srcdir ;;
1888 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1889 srcdir=$ac_optarg ;;
1890
1891 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1892 | --syscon | --sysco | --sysc | --sys | --sy)
1893 ac_prev=sysconfdir ;;
1894 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1895 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1896 sysconfdir=$ac_optarg ;;
1897
1898 -target | --target | --targe | --targ | --tar | --ta | --t)
1899 ac_prev=target_alias ;;
1900 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1901 target_alias=$ac_optarg ;;
1902
1903 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1904 verbose=yes ;;
1905
1906 -version | --version | --versio | --versi | --vers | -V)
1907 ac_init_version=: ;;
1908
1909 -with-* | --with-*)
1910 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1911 # Reject names that are not valid shell variable names.
1912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1913 as_fn_error "invalid package name: $ac_useropt"
1914 ac_useropt_orig=$ac_useropt
1915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1916 case $ac_user_opts in
1917 *"
1918 "with_$ac_useropt"
1919 "*) ;;
1920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1921 ac_unrecognized_sep=', ';;
1922 esac
1923 eval with_$ac_useropt=\$ac_optarg ;;
1924
1925 -without-* | --without-*)
1926 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1927 # Reject names that are not valid shell variable names.
1928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1929 as_fn_error "invalid package name: $ac_useropt"
1930 ac_useropt_orig=$ac_useropt
1931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1932 case $ac_user_opts in
1933 *"
1934 "with_$ac_useropt"
1935 "*) ;;
1936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1937 ac_unrecognized_sep=', ';;
1938 esac
1939 eval with_$ac_useropt=no ;;
1940
1941 --x)
1942 # Obsolete; use --with-x.
1943 with_x=yes ;;
1944
1945 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1946 | --x-incl | --x-inc | --x-in | --x-i)
1947 ac_prev=x_includes ;;
1948 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1949 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1950 x_includes=$ac_optarg ;;
1951
1952 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1953 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1954 ac_prev=x_libraries ;;
1955 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1956 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1957 x_libraries=$ac_optarg ;;
1958
1959 -*) as_fn_error "unrecognized option: \`$ac_option'
1960 Try \`$0 --help' for more information."
1961 ;;
1962
1963 *=*)
1964 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1965 # Reject names that are not valid shell variable names.
1966 case $ac_envvar in #(
1967 '' | [0-9]* | *[!_$as_cr_alnum]* )
1968 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1969 esac
1970 eval $ac_envvar=\$ac_optarg
1971 export $ac_envvar ;;
1972
1973 *)
1974 # FIXME: should be removed in autoconf 3.0.
1975 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1976 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1977 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1978 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1979 ;;
1980
1981 esac
1982 done
1983
1984 if test -n "$ac_prev"; then
1985 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1986 as_fn_error "missing argument to $ac_option"
1987 fi
1988
1989 if test -n "$ac_unrecognized_opts"; then
1990 case $enable_option_checking in
1991 no) ;;
1992 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1993 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1994 esac
1995 fi
1996
1997 # Check all directory arguments for consistency.
1998 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1999 datadir sysconfdir sharedstatedir localstatedir includedir \
2000 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2001 libdir localedir mandir
2002 do
2003 eval ac_val=\$$ac_var
2004 # Remove trailing slashes.
2005 case $ac_val in
2006 */ )
2007 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2008 eval $ac_var=\$ac_val;;
2009 esac
2010 # Be sure to have absolute directory names.
2011 case $ac_val in
2012 [\\/$]* | ?:[\\/]* ) continue;;
2013 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2014 esac
2015 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2016 done
2017
2018 # There might be people who depend on the old broken behavior: `$host'
2019 # used to hold the argument of --host etc.
2020 # FIXME: To remove some day.
2021 build=$build_alias
2022 host=$host_alias
2023 target=$target_alias
2024
2025 # FIXME: To remove some day.
2026 if test "x$host_alias" != x; then
2027 if test "x$build_alias" = x; then
2028 cross_compiling=maybe
2029 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2030 If a cross compiler is detected then cross compile mode will be used." >&2
2031 elif test "x$build_alias" != "x$host_alias"; then
2032 cross_compiling=yes
2033 fi
2034 fi
2035
2036 ac_tool_prefix=
2037 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2038
2039 test "$silent" = yes && exec 6>/dev/null
2040
2041
2042 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2043 ac_ls_di=`ls -di .` &&
2044 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2045 as_fn_error "working directory cannot be determined"
2046 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2047 as_fn_error "pwd does not report name of working directory"
2048
2049
2050 # Find the source files, if location was not specified.
2051 if test -z "$srcdir"; then
2052 ac_srcdir_defaulted=yes
2053 # Try the directory containing this script, then the parent directory.
2054 ac_confdir=`$as_dirname -- "$as_myself" ||
2055 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2056 X"$as_myself" : 'X\(//\)[^/]' \| \
2057 X"$as_myself" : 'X\(//\)$' \| \
2058 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2059 $as_echo X"$as_myself" |
2060 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2061 s//\1/
2062 q
2063 }
2064 /^X\(\/\/\)[^/].*/{
2065 s//\1/
2066 q
2067 }
2068 /^X\(\/\/\)$/{
2069 s//\1/
2070 q
2071 }
2072 /^X\(\/\).*/{
2073 s//\1/
2074 q
2075 }
2076 s/.*/./; q'`
2077 srcdir=$ac_confdir
2078 if test ! -r "$srcdir/$ac_unique_file"; then
2079 srcdir=..
2080 fi
2081 else
2082 ac_srcdir_defaulted=no
2083 fi
2084 if test ! -r "$srcdir/$ac_unique_file"; then
2085 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2086 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2087 fi
2088 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2089 ac_abs_confdir=`(
2090 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2091 pwd)`
2092 # When building in place, set srcdir=.
2093 if test "$ac_abs_confdir" = "$ac_pwd"; then
2094 srcdir=.
2095 fi
2096 # Remove unnecessary trailing slashes from srcdir.
2097 # Double slashes in file names in object file debugging info
2098 # mess up M-x gdb in Emacs.
2099 case $srcdir in
2100 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2101 esac
2102 for ac_var in $ac_precious_vars; do
2103 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2104 eval ac_env_${ac_var}_value=\$${ac_var}
2105 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2106 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2107 done
2108
2109 #
2110 # Report the --help message.
2111 #
2112 if test "$ac_init_help" = "long"; then
2113 # Omit some internal or obsolete options to make the list less imposing.
2114 # This message is too long to be a string in the A/UX 3.1 sh.
2115 cat <<_ACEOF
2116 \`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
2117
2118 Usage: $0 [OPTION]... [VAR=VALUE]...
2119
2120 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2121 VAR=VALUE. See below for descriptions of some of the useful variables.
2122
2123 Defaults for the options are specified in brackets.
2124
2125 Configuration:
2126 -h, --help display this help and exit
2127 --help=short display options specific to this package
2128 --help=recursive display the short help of all the included packages
2129 -V, --version display version information and exit
2130 -q, --quiet, --silent do not print \`checking...' messages
2131 --cache-file=FILE cache test results in FILE [disabled]
2132 -C, --config-cache alias for \`--cache-file=config.cache'
2133 -n, --no-create do not create output files
2134 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2135
2136 Installation directories:
2137 --prefix=PREFIX install architecture-independent files in PREFIX
2138 [$ac_default_prefix]
2139 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2140 [PREFIX]
2141
2142 By default, \`make install' will install all the files in
2143 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2144 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2145 for instance \`--prefix=\$HOME'.
2146
2147 For better control, use the options below.
2148
2149 Fine tuning of the installation directories:
2150 --bindir=DIR user executables [EPREFIX/bin]
2151 --sbindir=DIR system admin executables [EPREFIX/sbin]
2152 --libexecdir=DIR program executables [EPREFIX/libexec]
2153 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2154 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2155 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2156 --libdir=DIR object code libraries [EPREFIX/lib]
2157 --includedir=DIR C header files [PREFIX/include]
2158 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2159 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2160 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2161 --infodir=DIR info documentation [DATAROOTDIR/info]
2162 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2163 --mandir=DIR man documentation [DATAROOTDIR/man]
2164 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2165 --htmldir=DIR html documentation [DOCDIR]
2166 --dvidir=DIR dvi documentation [DOCDIR]
2167 --pdfdir=DIR pdf documentation [DOCDIR]
2168 --psdir=DIR ps documentation [DOCDIR]
2169 _ACEOF
2170
2171 cat <<\_ACEOF
2172
2173 Program names:
2174 --program-prefix=PREFIX prepend PREFIX to installed program names
2175 --program-suffix=SUFFIX append SUFFIX to installed program names
2176 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2177
2178 X features:
2179 --x-includes=DIR X include files are in DIR
2180 --x-libraries=DIR X library files are in DIR
2181
2182 System types:
2183 --build=BUILD configure for building on BUILD [guessed]
2184 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2185 _ACEOF
2186 fi
2187
2188 if test -n "$ac_init_help"; then
2189 case $ac_init_help in
2190 short | recursive ) echo "Configuration of emacs 24.3.50:";;
2191 esac
2192 cat <<\_ACEOF
2193
2194 Optional Features:
2195 --disable-option-checking ignore unrecognized --enable/--with options
2196 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2197 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2198 --disable-ns-self-contained
2199 disable self contained build under NeXTstep
2200 --enable-locallisppath=PATH
2201 directories Emacs should search for lisp files
2202 specific to this site
2203 --enable-checking[=LIST]
2204 enable expensive run-time checks. With LIST, enable
2205 only specific categories of checks. Categories are:
2206 all,yes,no. Flags are: stringbytes, stringoverrun,
2207 stringfreelist, xmallocoverrun, conslist, glyphs
2208 --enable-check-lisp-object-type
2209 enable compile time checks for the Lisp_Object data
2210 type. This is useful for development for catching
2211 certain types of bugs.
2212 --enable-profiling build emacs with low-level, gprof profiling support.
2213 Mainly useful for debugging Emacs itself. May not
2214 work on all platforms. Stops profiler.el working.
2215 --enable-autodepend automatically generate dependencies to .h-files.
2216 Requires GNU Make and Gcc. Enabled if GNU Make and
2217 Gcc is found
2218 --enable-gtk-deprecation-warnings
2219 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
2220 --disable-dependency-tracking speeds up one-time build
2221 --enable-dependency-tracking do not reject slow dependency extractors
2222 --disable-largefile omit support for large files
2223 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2224 intended for developers, and may generate false
2225 alarms when used with older or non-GNU development
2226 tools.
2227 --enable-link-time-optimization
2228 build emacs with link-time optimization. This is
2229 supported only for GCC since 4.5.0.
2230 --disable-acl do not support ACLs
2231
2232 Optional Packages:
2233 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2234 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2235 --without-all omit almost all features and build small executable
2236 with minimal dependencies
2237 --without-pop don't support POP mail retrieval with movemail
2238 --with-kerberos support Kerberos-authenticated POP
2239 --with-kerberos5 support Kerberos version 5 authenticated POP
2240 --with-hesiod support Hesiod to get the POP server host
2241 --with-mmdf support MMDF mailboxes
2242 --with-mail-unlink unlink, rather than empty, mail spool after reading
2243 --with-mailhost=HOSTNAME
2244 string giving default POP mail host
2245 --with-sound=VALUE compile with sound support (VALUE one of: yes, alsa,
2246 oss, bsd-ossaudio, no; default yes). Only for
2247 GNU/Linux, FreeBSD, NetBSD, MinGW.
2248 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2249 gtk3, lucid or athena, motif, no)
2250 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2251 --without-xpm don't compile with XPM image support
2252 --without-jpeg don't compile with JPEG image support
2253 --without-tiff don't compile with TIFF image support
2254 --without-gif don't compile with GIF image support
2255 --without-png don't compile with PNG image support
2256 --without-rsvg don't compile with SVG image support
2257 --without-xml2 don't compile with XML parsing support
2258 --without-imagemagick don't compile with ImageMagick image support
2259 --without-xft don't use XFT for anti aliased fonts
2260 --without-libotf don't use libotf for OpenType font support
2261 --without-m17n-flt don't use m17n-flt for text shaping
2262 --without-toolkit-scroll-bars
2263 don't use Motif or Xaw3d scroll bars
2264 --without-xaw3d don't use Xaw3d
2265 --without-xim don't use X11 XIM
2266 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2267 --with-w32 use native MS Windows GUI in a Cygwin build
2268 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2269 console
2270 --without-dbus don't compile with D-Bus support
2271 --without-gconf don't compile with GConf support
2272 --without-gsettings don't compile with GSettings support
2273 --without-selinux don't compile with SELinux support
2274 --without-gnutls don't use -lgnutls for SSL/TLS support
2275 --without-zlib don't compile with zlib decompression support
2276 --with-file-notification=LIB
2277 use a file notification library (LIB one of: yes,
2278 gfile, inotify, w32, no)
2279 --without-makeinfo don't require makeinfo for building manuals
2280 --without-compress-info don't compress the installed Info pages
2281 --with-pkg-config-prog=FILENAME
2282 file name of pkg-config for finding GTK and librsvg
2283 --with-gameuser=USER user for shared game score files
2284 --with-gnustep-conf=FILENAME
2285 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2286 or /etc/GNUstep/GNUstep.conf
2287 --with-x use the X Window System
2288
2289 Some influential environment variables:
2290 CC C compiler command
2291 CFLAGS C compiler flags
2292 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2293 nonstandard directory <lib dir>
2294 LIBS libraries to pass to the linker, e.g. -l<library>
2295 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2296 you have headers in a nonstandard directory <include dir>
2297 CPP C preprocessor
2298 XMKMF Path to xmkmf, Makefile generator for X Window System
2299
2300 Use these variables to override the choices made by `configure' or to help
2301 it to find libraries and programs with nonstandard names/locations.
2302
2303 Report bugs to the package provider.
2304 _ACEOF
2305 ac_status=$?
2306 fi
2307
2308 if test "$ac_init_help" = "recursive"; then
2309 # If there are subdirs, report their specific --help.
2310 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2311 test -d "$ac_dir" ||
2312 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2313 continue
2314 ac_builddir=.
2315
2316 case "$ac_dir" in
2317 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2318 *)
2319 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2320 # A ".." for each directory in $ac_dir_suffix.
2321 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2322 case $ac_top_builddir_sub in
2323 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2325 esac ;;
2326 esac
2327 ac_abs_top_builddir=$ac_pwd
2328 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2329 # for backward compatibility:
2330 ac_top_builddir=$ac_top_build_prefix
2331
2332 case $srcdir in
2333 .) # We are building in place.
2334 ac_srcdir=.
2335 ac_top_srcdir=$ac_top_builddir_sub
2336 ac_abs_top_srcdir=$ac_pwd ;;
2337 [\\/]* | ?:[\\/]* ) # Absolute name.
2338 ac_srcdir=$srcdir$ac_dir_suffix;
2339 ac_top_srcdir=$srcdir
2340 ac_abs_top_srcdir=$srcdir ;;
2341 *) # Relative name.
2342 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2343 ac_top_srcdir=$ac_top_build_prefix$srcdir
2344 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2345 esac
2346 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2347
2348 cd "$ac_dir" || { ac_status=$?; continue; }
2349 # Check for guested configure.
2350 if test -f "$ac_srcdir/configure.gnu"; then
2351 echo &&
2352 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2353 elif test -f "$ac_srcdir/configure"; then
2354 echo &&
2355 $SHELL "$ac_srcdir/configure" --help=recursive
2356 else
2357 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2358 fi || ac_status=$?
2359 cd "$ac_pwd" || { ac_status=$?; break; }
2360 done
2361 fi
2362
2363 test -n "$ac_init_help" && exit $ac_status
2364 if $ac_init_version; then
2365 cat <<\_ACEOF
2366 emacs configure 24.3.50
2367 generated by GNU Autoconf 2.65
2368
2369 Copyright (C) 2009 Free Software Foundation, Inc.
2370 This configure script is free software; the Free Software Foundation
2371 gives unlimited permission to copy, distribute and modify it.
2372 _ACEOF
2373 exit
2374 fi
2375
2376 ## ------------------------ ##
2377 ## Autoconf initialization. ##
2378 ## ------------------------ ##
2379
2380 # ac_fn_c_try_compile LINENO
2381 # --------------------------
2382 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2383 ac_fn_c_try_compile ()
2384 {
2385 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386 rm -f conftest.$ac_objext
2387 if { { ac_try="$ac_compile"
2388 case "(($ac_try" in
2389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2390 *) ac_try_echo=$ac_try;;
2391 esac
2392 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2393 $as_echo "$ac_try_echo"; } >&5
2394 (eval "$ac_compile") 2>conftest.err
2395 ac_status=$?
2396 if test -s conftest.err; then
2397 grep -v '^ *+' conftest.err >conftest.er1
2398 cat conftest.er1 >&5
2399 mv -f conftest.er1 conftest.err
2400 fi
2401 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2402 test $ac_status = 0; } && {
2403 test -z "$ac_c_werror_flag" ||
2404 test ! -s conftest.err
2405 } && test -s conftest.$ac_objext; then :
2406 ac_retval=0
2407 else
2408 $as_echo "$as_me: failed program was:" >&5
2409 sed 's/^/| /' conftest.$ac_ext >&5
2410
2411 ac_retval=1
2412 fi
2413 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2414 as_fn_set_status $ac_retval
2415
2416 } # ac_fn_c_try_compile
2417
2418 # ac_fn_c_try_cpp LINENO
2419 # ----------------------
2420 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2421 ac_fn_c_try_cpp ()
2422 {
2423 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424 if { { ac_try="$ac_cpp conftest.$ac_ext"
2425 case "(($ac_try" in
2426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2427 *) ac_try_echo=$ac_try;;
2428 esac
2429 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2430 $as_echo "$ac_try_echo"; } >&5
2431 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2432 ac_status=$?
2433 if test -s conftest.err; then
2434 grep -v '^ *+' conftest.err >conftest.er1
2435 cat conftest.er1 >&5
2436 mv -f conftest.er1 conftest.err
2437 fi
2438 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2439 test $ac_status = 0; } >/dev/null && {
2440 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2441 test ! -s conftest.err
2442 }; then :
2443 ac_retval=0
2444 else
2445 $as_echo "$as_me: failed program was:" >&5
2446 sed 's/^/| /' conftest.$ac_ext >&5
2447
2448 ac_retval=1
2449 fi
2450 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2451 as_fn_set_status $ac_retval
2452
2453 } # ac_fn_c_try_cpp
2454
2455 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2456 # -------------------------------------------------------
2457 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2458 # the include files in INCLUDES and setting the cache variable VAR
2459 # accordingly.
2460 ac_fn_c_check_header_mongrel ()
2461 {
2462 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2463 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465 $as_echo_n "checking for $2... " >&6; }
2466 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2467 $as_echo_n "(cached) " >&6
2468 fi
2469 eval ac_res=\$$3
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2471 $as_echo "$ac_res" >&6; }
2472 else
2473 # Is the header compilable?
2474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2475 $as_echo_n "checking $2 usability... " >&6; }
2476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2477 /* end confdefs.h. */
2478 $4
2479 #include <$2>
2480 _ACEOF
2481 if ac_fn_c_try_compile "$LINENO"; then :
2482 ac_header_compiler=yes
2483 else
2484 ac_header_compiler=no
2485 fi
2486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2488 $as_echo "$ac_header_compiler" >&6; }
2489
2490 # Is the header present?
2491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2492 $as_echo_n "checking $2 presence... " >&6; }
2493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2494 /* end confdefs.h. */
2495 #include <$2>
2496 _ACEOF
2497 if ac_fn_c_try_cpp "$LINENO"; then :
2498 ac_header_preproc=yes
2499 else
2500 ac_header_preproc=no
2501 fi
2502 rm -f conftest.err conftest.$ac_ext
2503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2504 $as_echo "$ac_header_preproc" >&6; }
2505
2506 # So? What about this header?
2507 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2508 yes:no: )
2509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2510 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2512 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2513 ;;
2514 no:yes:* )
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2516 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2518 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2520 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2522 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2524 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2525 ;;
2526 esac
2527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528 $as_echo_n "checking for $2... " >&6; }
2529 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2530 $as_echo_n "(cached) " >&6
2531 else
2532 eval "$3=\$ac_header_compiler"
2533 fi
2534 eval ac_res=\$$3
2535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2536 $as_echo "$ac_res" >&6; }
2537 fi
2538 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2539
2540 } # ac_fn_c_check_header_mongrel
2541
2542 # ac_fn_c_try_run LINENO
2543 # ----------------------
2544 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2545 # that executables *can* be run.
2546 ac_fn_c_try_run ()
2547 {
2548 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2549 if { { ac_try="$ac_link"
2550 case "(($ac_try" in
2551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2552 *) ac_try_echo=$ac_try;;
2553 esac
2554 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2555 $as_echo "$ac_try_echo"; } >&5
2556 (eval "$ac_link") 2>&5
2557 ac_status=$?
2558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2560 { { case "(($ac_try" in
2561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2562 *) ac_try_echo=$ac_try;;
2563 esac
2564 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2565 $as_echo "$ac_try_echo"; } >&5
2566 (eval "$ac_try") 2>&5
2567 ac_status=$?
2568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2569 test $ac_status = 0; }; }; then :
2570 ac_retval=0
2571 else
2572 $as_echo "$as_me: program exited with status $ac_status" >&5
2573 $as_echo "$as_me: failed program was:" >&5
2574 sed 's/^/| /' conftest.$ac_ext >&5
2575
2576 ac_retval=$ac_status
2577 fi
2578 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2579 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2580 as_fn_set_status $ac_retval
2581
2582 } # ac_fn_c_try_run
2583
2584 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2585 # -------------------------------------------------------
2586 # Tests whether HEADER exists and can be compiled using the include files in
2587 # INCLUDES, setting the cache variable VAR accordingly.
2588 ac_fn_c_check_header_compile ()
2589 {
2590 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2592 $as_echo_n "checking for $2... " >&6; }
2593 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2594 $as_echo_n "(cached) " >&6
2595 else
2596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2597 /* end confdefs.h. */
2598 $4
2599 #include <$2>
2600 _ACEOF
2601 if ac_fn_c_try_compile "$LINENO"; then :
2602 eval "$3=yes"
2603 else
2604 eval "$3=no"
2605 fi
2606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2607 fi
2608 eval ac_res=\$$3
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2610 $as_echo "$ac_res" >&6; }
2611 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2612
2613 } # ac_fn_c_check_header_compile
2614
2615 # ac_fn_c_try_link LINENO
2616 # -----------------------
2617 # Try to link conftest.$ac_ext, and return whether this succeeded.
2618 ac_fn_c_try_link ()
2619 {
2620 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2621 rm -f conftest.$ac_objext conftest$ac_exeext
2622 if { { ac_try="$ac_link"
2623 case "(($ac_try" in
2624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2625 *) ac_try_echo=$ac_try;;
2626 esac
2627 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2628 $as_echo "$ac_try_echo"; } >&5
2629 (eval "$ac_link") 2>conftest.err
2630 ac_status=$?
2631 if test -s conftest.err; then
2632 grep -v '^ *+' conftest.err >conftest.er1
2633 cat conftest.er1 >&5
2634 mv -f conftest.er1 conftest.err
2635 fi
2636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2637 test $ac_status = 0; } && {
2638 test -z "$ac_c_werror_flag" ||
2639 test ! -s conftest.err
2640 } && test -s conftest$ac_exeext && {
2641 test "$cross_compiling" = yes ||
2642 $as_test_x conftest$ac_exeext
2643 }; then :
2644 ac_retval=0
2645 else
2646 $as_echo "$as_me: failed program was:" >&5
2647 sed 's/^/| /' conftest.$ac_ext >&5
2648
2649 ac_retval=1
2650 fi
2651 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2652 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2653 # interfere with the next link command; also delete a directory that is
2654 # left behind by Apple's compiler. We do this before executing the actions.
2655 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2656 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2657 as_fn_set_status $ac_retval
2658
2659 } # ac_fn_c_try_link
2660
2661 # ac_fn_c_check_decl LINENO SYMBOL VAR
2662 # ------------------------------------
2663 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2664 ac_fn_c_check_decl ()
2665 {
2666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2668 $as_echo_n "checking whether $2 is declared... " >&6; }
2669 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2670 $as_echo_n "(cached) " >&6
2671 else
2672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2673 /* end confdefs.h. */
2674 $4
2675 int
2676 main ()
2677 {
2678 #ifndef $2
2679 (void) $2;
2680 #endif
2681
2682 ;
2683 return 0;
2684 }
2685 _ACEOF
2686 if ac_fn_c_try_compile "$LINENO"; then :
2687 eval "$3=yes"
2688 else
2689 eval "$3=no"
2690 fi
2691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692 fi
2693 eval ac_res=\$$3
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2695 $as_echo "$ac_res" >&6; }
2696 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2697
2698 } # ac_fn_c_check_decl
2699
2700 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2701 # ----------------------------------------------
2702 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2703 ac_fn_c_check_header_preproc ()
2704 {
2705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2707 $as_echo_n "checking for $2... " >&6; }
2708 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2709 $as_echo_n "(cached) " >&6
2710 else
2711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712 /* end confdefs.h. */
2713 #include <$2>
2714 _ACEOF
2715 if ac_fn_c_try_cpp "$LINENO"; then :
2716 eval "$3=yes"
2717 else
2718 eval "$3=no"
2719 fi
2720 rm -f conftest.err conftest.$ac_ext
2721 fi
2722 eval ac_res=\$$3
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2724 $as_echo "$ac_res" >&6; }
2725 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2726
2727 } # ac_fn_c_check_header_preproc
2728
2729 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2730 # ----------------------------------------------------
2731 # Tries to find if the field MEMBER exists in type AGGR, after including
2732 # INCLUDES, setting cache variable VAR accordingly.
2733 ac_fn_c_check_member ()
2734 {
2735 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2737 $as_echo_n "checking for $2.$3... " >&6; }
2738 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2739 $as_echo_n "(cached) " >&6
2740 else
2741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2742 /* end confdefs.h. */
2743 $5
2744 int
2745 main ()
2746 {
2747 static $2 ac_aggr;
2748 if (ac_aggr.$3)
2749 return 0;
2750 ;
2751 return 0;
2752 }
2753 _ACEOF
2754 if ac_fn_c_try_compile "$LINENO"; then :
2755 eval "$4=yes"
2756 else
2757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758 /* end confdefs.h. */
2759 $5
2760 int
2761 main ()
2762 {
2763 static $2 ac_aggr;
2764 if (sizeof ac_aggr.$3)
2765 return 0;
2766 ;
2767 return 0;
2768 }
2769 _ACEOF
2770 if ac_fn_c_try_compile "$LINENO"; then :
2771 eval "$4=yes"
2772 else
2773 eval "$4=no"
2774 fi
2775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2776 fi
2777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2778 fi
2779 eval ac_res=\$$4
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2781 $as_echo "$ac_res" >&6; }
2782 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2783
2784 } # ac_fn_c_check_member
2785
2786 # ac_fn_c_check_func LINENO FUNC VAR
2787 # ----------------------------------
2788 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2789 ac_fn_c_check_func ()
2790 {
2791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2793 $as_echo_n "checking for $2... " >&6; }
2794 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2795 $as_echo_n "(cached) " >&6
2796 else
2797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2798 /* end confdefs.h. */
2799 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2800 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2801 #define $2 innocuous_$2
2802
2803 /* System header to define __stub macros and hopefully few prototypes,
2804 which can conflict with char $2 (); below.
2805 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2806 <limits.h> exists even on freestanding compilers. */
2807
2808 #ifdef __STDC__
2809 # include <limits.h>
2810 #else
2811 # include <assert.h>
2812 #endif
2813
2814 #undef $2
2815
2816 /* Override any GCC internal prototype to avoid an error.
2817 Use char because int might match the return type of a GCC
2818 builtin and then its argument prototype would still apply. */
2819 #ifdef __cplusplus
2820 extern "C"
2821 #endif
2822 char $2 ();
2823 /* The GNU C library defines this for functions which it implements
2824 to always fail with ENOSYS. Some functions are actually named
2825 something starting with __ and the normal name is an alias. */
2826 #if defined __stub_$2 || defined __stub___$2
2827 choke me
2828 #endif
2829
2830 int
2831 main ()
2832 {
2833 return $2 ();
2834 ;
2835 return 0;
2836 }
2837 _ACEOF
2838 if ac_fn_c_try_link "$LINENO"; then :
2839 eval "$3=yes"
2840 else
2841 eval "$3=no"
2842 fi
2843 rm -f core conftest.err conftest.$ac_objext \
2844 conftest$ac_exeext conftest.$ac_ext
2845 fi
2846 eval ac_res=\$$3
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2848 $as_echo "$ac_res" >&6; }
2849 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2850
2851 } # ac_fn_c_check_func
2852
2853 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2854 # -------------------------------------------
2855 # Tests whether TYPE exists after having included INCLUDES, setting cache
2856 # variable VAR accordingly.
2857 ac_fn_c_check_type ()
2858 {
2859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2861 $as_echo_n "checking for $2... " >&6; }
2862 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2863 $as_echo_n "(cached) " >&6
2864 else
2865 eval "$3=no"
2866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2867 /* end confdefs.h. */
2868 $4
2869 int
2870 main ()
2871 {
2872 if (sizeof ($2))
2873 return 0;
2874 ;
2875 return 0;
2876 }
2877 _ACEOF
2878 if ac_fn_c_try_compile "$LINENO"; then :
2879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880 /* end confdefs.h. */
2881 $4
2882 int
2883 main ()
2884 {
2885 if (sizeof (($2)))
2886 return 0;
2887 ;
2888 return 0;
2889 }
2890 _ACEOF
2891 if ac_fn_c_try_compile "$LINENO"; then :
2892
2893 else
2894 eval "$3=yes"
2895 fi
2896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2897 fi
2898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899 fi
2900 eval ac_res=\$$3
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2902 $as_echo "$ac_res" >&6; }
2903 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2904
2905 } # ac_fn_c_check_type
2906
2907 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2908 # --------------------------------------------
2909 # Tries to find the compile-time value of EXPR in a program that includes
2910 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2911 # computed
2912 ac_fn_c_compute_int ()
2913 {
2914 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2915 if test "$cross_compiling" = yes; then
2916 # Depending upon the size, compute the lo and hi bounds.
2917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2918 /* end confdefs.h. */
2919 $4
2920 int
2921 main ()
2922 {
2923 static int test_array [1 - 2 * !(($2) >= 0)];
2924 test_array [0] = 0
2925
2926 ;
2927 return 0;
2928 }
2929 _ACEOF
2930 if ac_fn_c_try_compile "$LINENO"; then :
2931 ac_lo=0 ac_mid=0
2932 while :; do
2933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2934 /* end confdefs.h. */
2935 $4
2936 int
2937 main ()
2938 {
2939 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2940 test_array [0] = 0
2941
2942 ;
2943 return 0;
2944 }
2945 _ACEOF
2946 if ac_fn_c_try_compile "$LINENO"; then :
2947 ac_hi=$ac_mid; break
2948 else
2949 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2950 if test $ac_lo -le $ac_mid; then
2951 ac_lo= ac_hi=
2952 break
2953 fi
2954 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2955 fi
2956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2957 done
2958 else
2959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2960 /* end confdefs.h. */
2961 $4
2962 int
2963 main ()
2964 {
2965 static int test_array [1 - 2 * !(($2) < 0)];
2966 test_array [0] = 0
2967
2968 ;
2969 return 0;
2970 }
2971 _ACEOF
2972 if ac_fn_c_try_compile "$LINENO"; then :
2973 ac_hi=-1 ac_mid=-1
2974 while :; do
2975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2976 /* end confdefs.h. */
2977 $4
2978 int
2979 main ()
2980 {
2981 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2982 test_array [0] = 0
2983
2984 ;
2985 return 0;
2986 }
2987 _ACEOF
2988 if ac_fn_c_try_compile "$LINENO"; then :
2989 ac_lo=$ac_mid; break
2990 else
2991 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2992 if test $ac_mid -le $ac_hi; then
2993 ac_lo= ac_hi=
2994 break
2995 fi
2996 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2997 fi
2998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2999 done
3000 else
3001 ac_lo= ac_hi=
3002 fi
3003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3004 fi
3005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006 # Binary search between lo and hi bounds.
3007 while test "x$ac_lo" != "x$ac_hi"; do
3008 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010 /* end confdefs.h. */
3011 $4
3012 int
3013 main ()
3014 {
3015 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3016 test_array [0] = 0
3017
3018 ;
3019 return 0;
3020 }
3021 _ACEOF
3022 if ac_fn_c_try_compile "$LINENO"; then :
3023 ac_hi=$ac_mid
3024 else
3025 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3026 fi
3027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3028 done
3029 case $ac_lo in #((
3030 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3031 '') ac_retval=1 ;;
3032 esac
3033 else
3034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3035 /* end confdefs.h. */
3036 $4
3037 static long int longval () { return $2; }
3038 static unsigned long int ulongval () { return $2; }
3039 #include <stdio.h>
3040 #include <stdlib.h>
3041 int
3042 main ()
3043 {
3044
3045 FILE *f = fopen ("conftest.val", "w");
3046 if (! f)
3047 return 1;
3048 if (($2) < 0)
3049 {
3050 long int i = longval ();
3051 if (i != ($2))
3052 return 1;
3053 fprintf (f, "%ld", i);
3054 }
3055 else
3056 {
3057 unsigned long int i = ulongval ();
3058 if (i != ($2))
3059 return 1;
3060 fprintf (f, "%lu", i);
3061 }
3062 /* Do not output a trailing newline, as this causes \r\n confusion
3063 on some platforms. */
3064 return ferror (f) || fclose (f) != 0;
3065
3066 ;
3067 return 0;
3068 }
3069 _ACEOF
3070 if ac_fn_c_try_run "$LINENO"; then :
3071 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3072 else
3073 ac_retval=1
3074 fi
3075 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3076 conftest.$ac_objext conftest.beam conftest.$ac_ext
3077 rm -f conftest.val
3078
3079 fi
3080 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3081 as_fn_set_status $ac_retval
3082
3083 } # ac_fn_c_compute_int
3084 cat >config.log <<_ACEOF
3085 This file contains any messages produced by compilers while
3086 running configure, to aid debugging if configure makes a mistake.
3087
3088 It was created by emacs $as_me 24.3.50, which was
3089 generated by GNU Autoconf 2.65. Invocation command line was
3090
3091 $ $0 $@
3092
3093 _ACEOF
3094 exec 5>>config.log
3095 {
3096 cat <<_ASUNAME
3097 ## --------- ##
3098 ## Platform. ##
3099 ## --------- ##
3100
3101 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3102 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3103 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3104 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3105 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3106
3107 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3108 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3109
3110 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3111 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3112 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3113 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3114 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3115 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3116 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3117
3118 _ASUNAME
3119
3120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3121 for as_dir in $PATH
3122 do
3123 IFS=$as_save_IFS
3124 test -z "$as_dir" && as_dir=.
3125 $as_echo "PATH: $as_dir"
3126 done
3127 IFS=$as_save_IFS
3128
3129 } >&5
3130
3131 cat >&5 <<_ACEOF
3132
3133
3134 ## ----------- ##
3135 ## Core tests. ##
3136 ## ----------- ##
3137
3138 _ACEOF
3139
3140
3141 # Keep a trace of the command line.
3142 # Strip out --no-create and --no-recursion so they do not pile up.
3143 # Strip out --silent because we don't want to record it for future runs.
3144 # Also quote any args containing shell meta-characters.
3145 # Make two passes to allow for proper duplicate-argument suppression.
3146 ac_configure_args=
3147 ac_configure_args0=
3148 ac_configure_args1=
3149 ac_must_keep_next=false
3150 for ac_pass in 1 2
3151 do
3152 for ac_arg
3153 do
3154 case $ac_arg in
3155 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3156 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3157 | -silent | --silent | --silen | --sile | --sil)
3158 continue ;;
3159 *\'*)
3160 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3161 esac
3162 case $ac_pass in
3163 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3164 2)
3165 as_fn_append ac_configure_args1 " '$ac_arg'"
3166 if test $ac_must_keep_next = true; then
3167 ac_must_keep_next=false # Got value, back to normal.
3168 else
3169 case $ac_arg in
3170 *=* | --config-cache | -C | -disable-* | --disable-* \
3171 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3172 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3173 | -with-* | --with-* | -without-* | --without-* | --x)
3174 case "$ac_configure_args0 " in
3175 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3176 esac
3177 ;;
3178 -* ) ac_must_keep_next=true ;;
3179 esac
3180 fi
3181 as_fn_append ac_configure_args " '$ac_arg'"
3182 ;;
3183 esac
3184 done
3185 done
3186 { ac_configure_args0=; unset ac_configure_args0;}
3187 { ac_configure_args1=; unset ac_configure_args1;}
3188
3189 # When interrupted or exit'd, cleanup temporary files, and complete
3190 # config.log. We remove comments because anyway the quotes in there
3191 # would cause problems or look ugly.
3192 # WARNING: Use '\'' to represent an apostrophe within the trap.
3193 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3194 trap 'exit_status=$?
3195 # Save into config.log some information that might help in debugging.
3196 {
3197 echo
3198
3199 cat <<\_ASBOX
3200 ## ---------------- ##
3201 ## Cache variables. ##
3202 ## ---------------- ##
3203 _ASBOX
3204 echo
3205 # The following way of writing the cache mishandles newlines in values,
3206 (
3207 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3208 eval ac_val=\$$ac_var
3209 case $ac_val in #(
3210 *${as_nl}*)
3211 case $ac_var in #(
3212 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3213 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3214 esac
3215 case $ac_var in #(
3216 _ | IFS | as_nl) ;; #(
3217 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3218 *) { eval $ac_var=; unset $ac_var;} ;;
3219 esac ;;
3220 esac
3221 done
3222 (set) 2>&1 |
3223 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3224 *${as_nl}ac_space=\ *)
3225 sed -n \
3226 "s/'\''/'\''\\\\'\'''\''/g;
3227 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3228 ;; #(
3229 *)
3230 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3231 ;;
3232 esac |
3233 sort
3234 )
3235 echo
3236
3237 cat <<\_ASBOX
3238 ## ----------------- ##
3239 ## Output variables. ##
3240 ## ----------------- ##
3241 _ASBOX
3242 echo
3243 for ac_var in $ac_subst_vars
3244 do
3245 eval ac_val=\$$ac_var
3246 case $ac_val in
3247 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248 esac
3249 $as_echo "$ac_var='\''$ac_val'\''"
3250 done | sort
3251 echo
3252
3253 if test -n "$ac_subst_files"; then
3254 cat <<\_ASBOX
3255 ## ------------------- ##
3256 ## File substitutions. ##
3257 ## ------------------- ##
3258 _ASBOX
3259 echo
3260 for ac_var in $ac_subst_files
3261 do
3262 eval ac_val=\$$ac_var
3263 case $ac_val in
3264 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3265 esac
3266 $as_echo "$ac_var='\''$ac_val'\''"
3267 done | sort
3268 echo
3269 fi
3270
3271 if test -s confdefs.h; then
3272 cat <<\_ASBOX
3273 ## ----------- ##
3274 ## confdefs.h. ##
3275 ## ----------- ##
3276 _ASBOX
3277 echo
3278 cat confdefs.h
3279 echo
3280 fi
3281 test "$ac_signal" != 0 &&
3282 $as_echo "$as_me: caught signal $ac_signal"
3283 $as_echo "$as_me: exit $exit_status"
3284 } >&5
3285 rm -f core *.core core.conftest.* &&
3286 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3287 exit $exit_status
3288 ' 0
3289 for ac_signal in 1 2 13 15; do
3290 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3291 done
3292 ac_signal=0
3293
3294 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3295 rm -f -r conftest* confdefs.h
3296
3297 $as_echo "/* confdefs.h */" > confdefs.h
3298
3299 # Predefined preprocessor variables.
3300
3301 cat >>confdefs.h <<_ACEOF
3302 #define PACKAGE_NAME "$PACKAGE_NAME"
3303 _ACEOF
3304
3305 cat >>confdefs.h <<_ACEOF
3306 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3307 _ACEOF
3308
3309 cat >>confdefs.h <<_ACEOF
3310 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3311 _ACEOF
3312
3313 cat >>confdefs.h <<_ACEOF
3314 #define PACKAGE_STRING "$PACKAGE_STRING"
3315 _ACEOF
3316
3317 cat >>confdefs.h <<_ACEOF
3318 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3319 _ACEOF
3320
3321 cat >>confdefs.h <<_ACEOF
3322 #define PACKAGE_URL "$PACKAGE_URL"
3323 _ACEOF
3324
3325
3326 # Let the site file select an alternate cache file if it wants to.
3327 # Prefer an explicitly selected file to automatically selected ones.
3328 ac_site_file1=NONE
3329 ac_site_file2=NONE
3330 if test -n "$CONFIG_SITE"; then
3331 ac_site_file1=$CONFIG_SITE
3332 elif test "x$prefix" != xNONE; then
3333 ac_site_file1=$prefix/share/config.site
3334 ac_site_file2=$prefix/etc/config.site
3335 else
3336 ac_site_file1=$ac_default_prefix/share/config.site
3337 ac_site_file2=$ac_default_prefix/etc/config.site
3338 fi
3339 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3340 do
3341 test "x$ac_site_file" = xNONE && continue
3342 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3343 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3344 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3345 sed 's/^/| /' "$ac_site_file" >&5
3346 . "$ac_site_file"
3347 fi
3348 done
3349
3350 if test -r "$cache_file"; then
3351 # Some versions of bash will fail to source /dev/null (special files
3352 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3353 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3355 $as_echo "$as_me: loading cache $cache_file" >&6;}
3356 case $cache_file in
3357 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3358 *) . "./$cache_file";;
3359 esac
3360 fi
3361 else
3362 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3363 $as_echo "$as_me: creating cache $cache_file" >&6;}
3364 >$cache_file
3365 fi
3366
3367 as_fn_append ac_header_list " sys/systeminfo.h"
3368 as_fn_append ac_header_list " coff.h"
3369 as_fn_append ac_header_list " pty.h"
3370 as_fn_append ac_header_list " sys/resource.h"
3371 as_fn_append ac_header_list " sys/utsname.h"
3372 as_fn_append ac_header_list " pwd.h"
3373 as_fn_append ac_header_list " utmp.h"
3374 as_fn_append ac_header_list " util.h"
3375 as_fn_append ac_header_list " sys/socket.h"
3376 as_fn_append ac_header_list " stdlib.h"
3377 as_fn_append ac_header_list " unistd.h"
3378 as_fn_append ac_header_list " sys/param.h"
3379 as_fn_append ac_header_list " pthread.h"
3380 as_fn_append ac_header_list " malloc/malloc.h"
3381 as_fn_append ac_header_list " maillock.h"
3382 as_fn_append ac_header_list " sys/un.h"
3383 as_fn_append ac_func_list " tzset"
3384 as_fn_append ac_func_list " readlinkat"
3385 as_fn_append ac_header_list " dirent.h"
3386 as_fn_append ac_header_list " execinfo.h"
3387 as_fn_append ac_func_list " faccessat"
3388 as_fn_append ac_func_list " fcntl"
3389 as_fn_append ac_func_list " fdopendir"
3390 as_fn_append ac_header_list " stdio_ext.h"
3391 as_fn_append ac_func_list " fstatat"
3392 as_fn_append ac_func_list " fsync"
3393 gl_getopt_required=GNU
3394 as_fn_append ac_header_list " getopt.h"
3395 as_fn_append ac_func_list " gettimeofday"
3396 as_fn_append ac_func_list " nanotime"
3397 as_fn_append ac_header_list " sys/time.h"
3398 as_fn_append ac_header_list " wchar.h"
3399 as_fn_append ac_header_list " stdint.h"
3400 as_fn_append ac_header_list " inttypes.h"
3401 as_fn_append ac_func_list " lstat"
3402 as_fn_append ac_func_list " mkostemp"
3403 as_fn_append ac_func_list " pipe2"
3404 as_fn_append ac_header_list " sys/select.h"
3405 as_fn_append ac_func_list " pselect"
3406 as_fn_append ac_func_list " pthread_sigmask"
3407 as_fn_append ac_func_list " readlink"
3408 as_fn_append ac_func_list " strtoimax"
3409 as_fn_append ac_func_list " strtoumax"
3410 as_fn_append ac_func_list " symlink"
3411 as_fn_append ac_header_list " sys/stat.h"
3412 as_fn_append ac_func_list " localtime_r"
3413 as_fn_append ac_header_list " utime.h"
3414 as_fn_append ac_func_list " futimes"
3415 as_fn_append ac_func_list " futimesat"
3416 as_fn_append ac_func_list " futimens"
3417 as_fn_append ac_func_list " utimensat"
3418 as_fn_append ac_func_list " lutimes"
3419 as_fn_append ac_func_list " getdtablesize"
3420 as_fn_append ac_func_list " secure_getenv"
3421 # Check that the precious variables saved in the cache have kept the same
3422 # value.
3423 ac_cache_corrupted=false
3424 for ac_var in $ac_precious_vars; do
3425 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3426 eval ac_new_set=\$ac_env_${ac_var}_set
3427 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3428 eval ac_new_val=\$ac_env_${ac_var}_value
3429 case $ac_old_set,$ac_new_set in
3430 set,)
3431 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3432 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3433 ac_cache_corrupted=: ;;
3434 ,set)
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3436 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3437 ac_cache_corrupted=: ;;
3438 ,);;
3439 *)
3440 if test "x$ac_old_val" != "x$ac_new_val"; then
3441 # differences in whitespace do not lead to failure.
3442 ac_old_val_w=`echo x $ac_old_val`
3443 ac_new_val_w=`echo x $ac_new_val`
3444 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3445 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3446 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3447 ac_cache_corrupted=:
3448 else
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3450 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3451 eval $ac_var=\$ac_old_val
3452 fi
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3454 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3456 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3457 fi;;
3458 esac
3459 # Pass precious variables to config.status.
3460 if test "$ac_new_set" = set; then
3461 case $ac_new_val in
3462 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3463 *) ac_arg=$ac_var=$ac_new_val ;;
3464 esac
3465 case " $ac_configure_args " in
3466 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3467 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3468 esac
3469 fi
3470 done
3471 if $ac_cache_corrupted; then
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3473 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3475 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3476 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3477 fi
3478 ## -------------------- ##
3479 ## Main body of script. ##
3480 ## -------------------- ##
3481
3482 ac_ext=c
3483 ac_cpp='$CPP $CPPFLAGS'
3484 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3485 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3486 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3487
3488
3489
3490 emacs_config_options=
3491 optsep=
3492 for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
3493 case $opt in
3494 -n | --no-create | --no-recursion)
3495 continue ;;
3496 CFLAGS | CPPFLAGS | LDFLAGS)
3497 eval 'test "${'$opt'+set}" = set' || continue
3498 case " $*" in
3499 *" $opt="*) continue ;;
3500 esac
3501 eval opt=$opt=\$$opt ;;
3502 esac
3503
3504 emacs_shell_specials=$IFS\''"#$&()*;<>?[\\`{|~'
3505 case $opt in
3506 *["$emacs_shell_specials"]*)
3507 case $opt in
3508 *\'*)
3509 emacs_quote_apostrophes="s/'/'\\\\''/g"
3510 opt=`$as_echo "$opt" | sed "$emacs_quote_apostrophes"` ;;
3511 esac
3512 opt="'$opt'"
3513 case $opt in
3514 *['"\\']*)
3515 emacs_quote_for_c='s/["\\]/\\&/g; $!s/$/\\n\\/'
3516 opt=`$as_echo "$opt" | sed "$emacs_quote_for_c"` ;;
3517 esac ;;
3518 esac
3519 as_fn_append emacs_config_options "$optsep$opt"
3520 optsep=' '
3521 done
3522
3523 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3524
3525
3526 ac_aux_dir=
3527 for ac_dir in build-aux "$srcdir"/build-aux; do
3528 for ac_t in install-sh install.sh shtool; do
3529 if test -f "$ac_dir/$ac_t"; then
3530 ac_aux_dir=$ac_dir
3531 ac_install_sh="$ac_aux_dir/$ac_t -c"
3532 break 2
3533 fi
3534 done
3535 done
3536 if test -z "$ac_aux_dir"; then
3537 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3538 fi
3539
3540 # These three variables are undocumented and unsupported,
3541 # and are intended to be withdrawn in a future Autoconf release.
3542 # They can cause serious problems if a builder's source tree is in a directory
3543 # whose full name contains unusual characters.
3544 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3545 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3546 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3547
3548
3549 am__api_version='1.11'
3550
3551 # Find a good install program. We prefer a C program (faster),
3552 # so one script is as good as another. But avoid the broken or
3553 # incompatible versions:
3554 # SysV /etc/install, /usr/sbin/install
3555 # SunOS /usr/etc/install
3556 # IRIX /sbin/install
3557 # AIX /bin/install
3558 # AmigaOS /C/install, which installs bootblocks on floppy discs
3559 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3560 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3561 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3562 # OS/2's system install, which has a completely different semantic
3563 # ./install, which can be erroneously created by make from ./install.sh.
3564 # Reject install programs that cannot install multiple files.
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3566 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3567 if test -z "$INSTALL"; then
3568 if test "${ac_cv_path_install+set}" = set; then :
3569 $as_echo_n "(cached) " >&6
3570 else
3571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3572 for as_dir in $PATH
3573 do
3574 IFS=$as_save_IFS
3575 test -z "$as_dir" && as_dir=.
3576 # Account for people who put trailing slashes in PATH elements.
3577 case $as_dir/ in #((
3578 ./ | .// | /[cC]/* | \
3579 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3580 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3581 /usr/ucb/* ) ;;
3582 *)
3583 # OSF1 and SCO ODT 3.0 have their own names for install.
3584 # Don't use installbsd from OSF since it installs stuff as root
3585 # by default.
3586 for ac_prog in ginstall scoinst install; do
3587 for ac_exec_ext in '' $ac_executable_extensions; do
3588 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3589 if test $ac_prog = install &&
3590 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3591 # AIX install. It has an incompatible calling convention.
3592 :
3593 elif test $ac_prog = install &&
3594 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3595 # program-specific install script used by HP pwplus--don't use.
3596 :
3597 else
3598 rm -rf conftest.one conftest.two conftest.dir
3599 echo one > conftest.one
3600 echo two > conftest.two
3601 mkdir conftest.dir
3602 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3603 test -s conftest.one && test -s conftest.two &&
3604 test -s conftest.dir/conftest.one &&
3605 test -s conftest.dir/conftest.two
3606 then
3607 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3608 break 3
3609 fi
3610 fi
3611 fi
3612 done
3613 done
3614 ;;
3615 esac
3616
3617 done
3618 IFS=$as_save_IFS
3619
3620 rm -rf conftest.one conftest.two conftest.dir
3621
3622 fi
3623 if test "${ac_cv_path_install+set}" = set; then
3624 INSTALL=$ac_cv_path_install
3625 else
3626 # As a last resort, use the slow shell script. Don't cache a
3627 # value for INSTALL within a source directory, because that will
3628 # break other packages using the cache if that directory is
3629 # removed, or if the value is a relative name.
3630 INSTALL=$ac_install_sh
3631 fi
3632 fi
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3634 $as_echo "$INSTALL" >&6; }
3635
3636 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3637 # It thinks the first close brace ends the variable substitution.
3638 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3639
3640 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3641
3642 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3643
3644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3645 $as_echo_n "checking whether build environment is sane... " >&6; }
3646 # Just in case
3647 sleep 1
3648 echo timestamp > conftest.file
3649 # Reject unsafe characters in $srcdir or the absolute working directory
3650 # name. Accept space and tab only in the latter.
3651 am_lf='
3652 '
3653 case `pwd` in
3654 *[\\\"\#\$\&\'\`$am_lf]*)
3655 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3656 esac
3657 case $srcdir in
3658 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3659 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3660 esac
3661
3662 # Do `set' in a subshell so we don't clobber the current shell's
3663 # arguments. Must try -L first in case configure is actually a
3664 # symlink; some systems play weird games with the mod time of symlinks
3665 # (eg FreeBSD returns the mod time of the symlink's containing
3666 # directory).
3667 if (
3668 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3669 if test "$*" = "X"; then
3670 # -L didn't work.
3671 set X `ls -t "$srcdir/configure" conftest.file`
3672 fi
3673 rm -f conftest.file
3674 if test "$*" != "X $srcdir/configure conftest.file" \
3675 && test "$*" != "X conftest.file $srcdir/configure"; then
3676
3677 # If neither matched, then we have a broken ls. This can happen
3678 # if, for instance, CONFIG_SHELL is bash and it inherits a
3679 # broken ls alias from the environment. This has actually
3680 # happened. Such a system could not be considered "sane".
3681 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3682 alias in your environment" "$LINENO" 5
3683 fi
3684
3685 test "$2" = conftest.file
3686 )
3687 then
3688 # Ok.
3689 :
3690 else
3691 as_fn_error "newly created file is older than distributed files!
3692 Check your system clock" "$LINENO" 5
3693 fi
3694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3695 $as_echo "yes" >&6; }
3696 test "$program_prefix" != NONE &&
3697 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3698 # Use a double $ so make ignores it.
3699 test "$program_suffix" != NONE &&
3700 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3701 # Double any \ or $.
3702 # By default was `s,x,x', remove it if useless.
3703 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3704 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3705
3706 # expand $ac_aux_dir to an absolute path
3707 am_aux_dir=`cd $ac_aux_dir && pwd`
3708
3709 if test x"${MISSING+set}" != xset; then
3710 case $am_aux_dir in
3711 *\ * | *\ *)
3712 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3713 *)
3714 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3715 esac
3716 fi
3717 # Use eval to expand $SHELL
3718 if eval "$MISSING --run true"; then
3719 am_missing_run="$MISSING --run "
3720 else
3721 am_missing_run=
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3723 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3724 fi
3725
3726 if test x"${install_sh}" != xset; then
3727 case $am_aux_dir in
3728 *\ * | *\ *)
3729 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3730 *)
3731 install_sh="\${SHELL} $am_aux_dir/install-sh"
3732 esac
3733 fi
3734
3735 # Installed binaries are usually stripped using `strip' when the user
3736 # run `make install-strip'. However `strip' might not be the right
3737 # tool to use in cross-compilation environments, therefore Automake
3738 # will honor the `STRIP' environment variable to overrule this program.
3739 if test "$cross_compiling" != no; then
3740 if test -n "$ac_tool_prefix"; then
3741 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3742 set dummy ${ac_tool_prefix}strip; ac_word=$2
3743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3744 $as_echo_n "checking for $ac_word... " >&6; }
3745 if test "${ac_cv_prog_STRIP+set}" = set; then :
3746 $as_echo_n "(cached) " >&6
3747 else
3748 if test -n "$STRIP"; then
3749 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3750 else
3751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3752 for as_dir in $PATH
3753 do
3754 IFS=$as_save_IFS
3755 test -z "$as_dir" && as_dir=.
3756 for ac_exec_ext in '' $ac_executable_extensions; do
3757 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3758 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3760 break 2
3761 fi
3762 done
3763 done
3764 IFS=$as_save_IFS
3765
3766 fi
3767 fi
3768 STRIP=$ac_cv_prog_STRIP
3769 if test -n "$STRIP"; then
3770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3771 $as_echo "$STRIP" >&6; }
3772 else
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3774 $as_echo "no" >&6; }
3775 fi
3776
3777
3778 fi
3779 if test -z "$ac_cv_prog_STRIP"; then
3780 ac_ct_STRIP=$STRIP
3781 # Extract the first word of "strip", so it can be a program name with args.
3782 set dummy strip; ac_word=$2
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784 $as_echo_n "checking for $ac_word... " >&6; }
3785 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3786 $as_echo_n "(cached) " >&6
3787 else
3788 if test -n "$ac_ct_STRIP"; then
3789 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3790 else
3791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792 for as_dir in $PATH
3793 do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
3796 for ac_exec_ext in '' $ac_executable_extensions; do
3797 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3798 ac_cv_prog_ac_ct_STRIP="strip"
3799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3800 break 2
3801 fi
3802 done
3803 done
3804 IFS=$as_save_IFS
3805
3806 fi
3807 fi
3808 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3809 if test -n "$ac_ct_STRIP"; then
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3811 $as_echo "$ac_ct_STRIP" >&6; }
3812 else
3813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814 $as_echo "no" >&6; }
3815 fi
3816
3817 if test "x$ac_ct_STRIP" = x; then
3818 STRIP=":"
3819 else
3820 case $cross_compiling:$ac_tool_warned in
3821 yes:)
3822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3823 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3824 ac_tool_warned=yes ;;
3825 esac
3826 STRIP=$ac_ct_STRIP
3827 fi
3828 else
3829 STRIP="$ac_cv_prog_STRIP"
3830 fi
3831
3832 fi
3833 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3834
3835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3836 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3837 if test -z "$MKDIR_P"; then
3838 if test "${ac_cv_path_mkdir+set}" = set; then :
3839 $as_echo_n "(cached) " >&6
3840 else
3841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3843 do
3844 IFS=$as_save_IFS
3845 test -z "$as_dir" && as_dir=.
3846 for ac_prog in mkdir gmkdir; do
3847 for ac_exec_ext in '' $ac_executable_extensions; do
3848 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3849 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3850 'mkdir (GNU coreutils) '* | \
3851 'mkdir (coreutils) '* | \
3852 'mkdir (fileutils) '4.1*)
3853 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3854 break 3;;
3855 esac
3856 done
3857 done
3858 done
3859 IFS=$as_save_IFS
3860
3861 fi
3862
3863 test -d ./--version && rmdir ./--version
3864 if test "${ac_cv_path_mkdir+set}" = set; then
3865 MKDIR_P="$ac_cv_path_mkdir -p"
3866 else
3867 # As a last resort, use the slow shell script. Don't cache a
3868 # value for MKDIR_P within a source directory, because that will
3869 # break other packages using the cache if that directory is
3870 # removed, or if the value is a relative name.
3871 MKDIR_P="$ac_install_sh -d"
3872 fi
3873 fi
3874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3875 $as_echo "$MKDIR_P" >&6; }
3876
3877 mkdir_p="$MKDIR_P"
3878 case $mkdir_p in
3879 [\\/$]* | ?:[\\/]*) ;;
3880 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3881 esac
3882
3883 for ac_prog in gawk mawk nawk awk
3884 do
3885 # Extract the first word of "$ac_prog", so it can be a program name with args.
3886 set dummy $ac_prog; ac_word=$2
3887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3888 $as_echo_n "checking for $ac_word... " >&6; }
3889 if test "${ac_cv_prog_AWK+set}" = set; then :
3890 $as_echo_n "(cached) " >&6
3891 else
3892 if test -n "$AWK"; then
3893 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3894 else
3895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3896 for as_dir in $PATH
3897 do
3898 IFS=$as_save_IFS
3899 test -z "$as_dir" && as_dir=.
3900 for ac_exec_ext in '' $ac_executable_extensions; do
3901 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3902 ac_cv_prog_AWK="$ac_prog"
3903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3904 break 2
3905 fi
3906 done
3907 done
3908 IFS=$as_save_IFS
3909
3910 fi
3911 fi
3912 AWK=$ac_cv_prog_AWK
3913 if test -n "$AWK"; then
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3915 $as_echo "$AWK" >&6; }
3916 else
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3918 $as_echo "no" >&6; }
3919 fi
3920
3921
3922 test -n "$AWK" && break
3923 done
3924
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3926 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3927 set x ${MAKE-make}
3928 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3929 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3930 $as_echo_n "(cached) " >&6
3931 else
3932 cat >conftest.make <<\_ACEOF
3933 SHELL = /bin/sh
3934 all:
3935 @echo '@@@%%%=$(MAKE)=@@@%%%'
3936 _ACEOF
3937 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3938 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3939 *@@@%%%=?*=@@@%%%*)
3940 eval ac_cv_prog_make_${ac_make}_set=yes;;
3941 *)
3942 eval ac_cv_prog_make_${ac_make}_set=no;;
3943 esac
3944 rm -f conftest.make
3945 fi
3946 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3948 $as_echo "yes" >&6; }
3949 SET_MAKE=
3950 else
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3952 $as_echo "no" >&6; }
3953 SET_MAKE="MAKE=${MAKE-make}"
3954 fi
3955
3956 rm -rf .tst 2>/dev/null
3957 mkdir .tst 2>/dev/null
3958 if test -d .tst; then
3959 am__leading_dot=.
3960 else
3961 am__leading_dot=_
3962 fi
3963 rmdir .tst 2>/dev/null
3964
3965 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3966 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3967 # is not polluted with repeated "-I."
3968 am__isrc=' -I$(srcdir)'
3969 # test to see if srcdir already configured
3970 if test -f $srcdir/config.status; then
3971 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3972 fi
3973 fi
3974
3975 # test whether we have cygpath
3976 if test -z "$CYGPATH_W"; then
3977 if (cygpath --version) >/dev/null 2>/dev/null; then
3978 CYGPATH_W='cygpath -w'
3979 else
3980 CYGPATH_W=echo
3981 fi
3982 fi
3983
3984
3985 # Define the identity of the package.
3986 PACKAGE='emacs'
3987 VERSION='24.3.50'
3988
3989
3990 cat >>confdefs.h <<_ACEOF
3991 #define PACKAGE "$PACKAGE"
3992 _ACEOF
3993
3994
3995 cat >>confdefs.h <<_ACEOF
3996 #define VERSION "$VERSION"
3997 _ACEOF
3998
3999 # Some tools Automake needs.
4000
4001 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4002
4003
4004 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4005
4006
4007 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4008
4009
4010 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4011
4012
4013 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4014
4015 # We need awk for the "check" target. The system "awk" is bad on
4016 # some platforms.
4017 # Always define AMTAR for backward compatibility.
4018
4019 AMTAR=${AMTAR-"${am_missing_run}tar"}
4020
4021 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
4022
4023
4024
4025
4026
4027
4028
4029
4030 lispdir='${datadir}/emacs/${version}/lisp'
4031 leimdir='${datadir}/emacs/${version}/leim'
4032 standardlisppath='${lispdir}:${leimdir}'
4033 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
4034 '${datadir}/emacs/site-lisp'
4035 lisppath='${locallisppath}:${standardlisppath}'
4036 etcdir='${datadir}/emacs/${version}/etc'
4037 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
4038 etcdocdir='${datadir}/emacs/${version}/etc'
4039 gamedir='${localstatedir}/games/emacs'
4040
4041
4042 # Check whether --with-all was given.
4043 if test "${with_all+set}" = set; then :
4044 withval=$with_all; with_features=$withval
4045 else
4046 with_features=yes
4047 fi
4048
4049
4050
4051
4052
4053 # Check whether --with-pop was given.
4054 if test "${with_pop+set}" = set; then :
4055 withval=$with_pop;
4056 else
4057 with_pop=$with_features
4058 fi
4059
4060 if test "$with_pop" = yes; then
4061 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4062
4063 fi
4064
4065
4066 # Check whether --with-kerberos was given.
4067 if test "${with_kerberos+set}" = set; then :
4068 withval=$with_kerberos;
4069 else
4070 with_kerberos=no
4071 fi
4072
4073 if test "$with_kerberos" != no; then
4074 $as_echo "#define KERBEROS 1" >>confdefs.h
4075
4076 fi
4077
4078
4079 # Check whether --with-kerberos5 was given.
4080 if test "${with_kerberos5+set}" = set; then :
4081 withval=$with_kerberos5;
4082 else
4083 with_kerberos5=no
4084 fi
4085
4086 if test "${with_kerberos5}" != no; then
4087 if test "${with_kerberos}" = no; then
4088 with_kerberos=yes
4089 $as_echo "#define KERBEROS 1" >>confdefs.h
4090
4091 fi
4092
4093 $as_echo "#define KERBEROS5 1" >>confdefs.h
4094
4095 fi
4096
4097
4098 # Check whether --with-hesiod was given.
4099 if test "${with_hesiod+set}" = set; then :
4100 withval=$with_hesiod;
4101 else
4102 with_hesiod=no
4103 fi
4104
4105 if test "$with_hesiod" != no; then
4106
4107 $as_echo "#define HESIOD 1" >>confdefs.h
4108
4109 fi
4110
4111
4112 # Check whether --with-mmdf was given.
4113 if test "${with_mmdf+set}" = set; then :
4114 withval=$with_mmdf;
4115 else
4116 with_mmdf=no
4117 fi
4118
4119 if test "$with_mmdf" != no; then
4120
4121 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4122
4123 fi
4124
4125
4126 # Check whether --with-mail-unlink was given.
4127 if test "${with_mail_unlink+set}" = set; then :
4128 withval=$with_mail_unlink;
4129 else
4130 with_mail_unlink=no
4131 fi
4132
4133 if test "$with_mail_unlink" != no; then
4134
4135 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4136
4137 fi
4138
4139
4140 # Check whether --with-mailhost was given.
4141 if test "${with_mailhost+set}" = set; then :
4142 withval=$with_mailhost;
4143 cat >>confdefs.h <<_ACEOF
4144 #define MAILHOST "$withval"
4145 _ACEOF
4146
4147 fi
4148
4149
4150
4151 # Check whether --with-sound was given.
4152 if test "${with_sound+set}" = set; then :
4153 withval=$with_sound; case "${withval}" in
4154 yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
4155 *) as_fn_error "\`--with-sound=$withval' is invalid;
4156 this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
4157 ;;
4158 esac
4159 with_sound=$val
4160
4161 else
4162 with_sound=$with_features
4163 fi
4164
4165
4166
4167 # Check whether --with-x-toolkit was given.
4168 if test "${with_x_toolkit+set}" = set; then :
4169 withval=$with_x_toolkit; case "${withval}" in
4170 y | ye | yes ) val=gtk ;;
4171 n | no ) val=no ;;
4172 l | lu | luc | luci | lucid ) val=lucid ;;
4173 a | at | ath | athe | athen | athena ) val=athena ;;
4174 m | mo | mot | moti | motif ) val=motif ;;
4175 g | gt | gtk ) val=gtk ;;
4176 gtk2 ) val=gtk2 ;;
4177 gtk3 ) val=gtk3 ;;
4178 * )
4179 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4180 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4181 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4182 \`athena' and \`lucid' are synonyms." "$LINENO" 5
4183 ;;
4184 esac
4185 with_x_toolkit=$val
4186
4187 fi
4188
4189
4190
4191 # Check whether --with-wide-int was given.
4192 if test "${with_wide_int+set}" = set; then :
4193 withval=$with_wide_int;
4194 else
4195 with_wide_int=no
4196 fi
4197
4198 if test "$with_wide_int" = yes; then
4199
4200 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4201
4202 fi
4203
4204
4205 # Check whether --with-xpm was given.
4206 if test "${with_xpm+set}" = set; then :
4207 withval=$with_xpm;
4208 else
4209 with_xpm=$with_features
4210 fi
4211
4212
4213 # Check whether --with-jpeg was given.
4214 if test "${with_jpeg+set}" = set; then :
4215 withval=$with_jpeg;
4216 else
4217 with_jpeg=$with_features
4218 fi
4219
4220
4221 # Check whether --with-tiff was given.
4222 if test "${with_tiff+set}" = set; then :
4223 withval=$with_tiff;
4224 else
4225 with_tiff=$with_features
4226 fi
4227
4228
4229 # Check whether --with-gif was given.
4230 if test "${with_gif+set}" = set; then :
4231 withval=$with_gif;
4232 else
4233 with_gif=$with_features
4234 fi
4235
4236
4237 # Check whether --with-png was given.
4238 if test "${with_png+set}" = set; then :
4239 withval=$with_png;
4240 else
4241 with_png=$with_features
4242 fi
4243
4244
4245 # Check whether --with-rsvg was given.
4246 if test "${with_rsvg+set}" = set; then :
4247 withval=$with_rsvg;
4248 else
4249 with_rsvg=$with_features
4250 fi
4251
4252
4253 # Check whether --with-xml2 was given.
4254 if test "${with_xml2+set}" = set; then :
4255 withval=$with_xml2;
4256 else
4257 with_xml2=$with_features
4258 fi
4259
4260
4261 # Check whether --with-imagemagick was given.
4262 if test "${with_imagemagick+set}" = set; then :
4263 withval=$with_imagemagick;
4264 else
4265 with_imagemagick=$with_features
4266 fi
4267
4268
4269
4270 # Check whether --with-xft was given.
4271 if test "${with_xft+set}" = set; then :
4272 withval=$with_xft;
4273 else
4274 with_xft=$with_features
4275 fi
4276
4277
4278 # Check whether --with-libotf was given.
4279 if test "${with_libotf+set}" = set; then :
4280 withval=$with_libotf;
4281 else
4282 with_libotf=$with_features
4283 fi
4284
4285
4286 # Check whether --with-m17n-flt was given.
4287 if test "${with_m17n_flt+set}" = set; then :
4288 withval=$with_m17n_flt;
4289 else
4290 with_m17n_flt=$with_features
4291 fi
4292
4293
4294
4295 # Check whether --with-toolkit-scroll-bars was given.
4296 if test "${with_toolkit_scroll_bars+set}" = set; then :
4297 withval=$with_toolkit_scroll_bars;
4298 else
4299 with_toolkit_scroll_bars=$with_features
4300 fi
4301
4302
4303 # Check whether --with-xaw3d was given.
4304 if test "${with_xaw3d+set}" = set; then :
4305 withval=$with_xaw3d;
4306 else
4307 with_xaw3d=$with_features
4308 fi
4309
4310
4311 # Check whether --with-xim was given.
4312 if test "${with_xim+set}" = set; then :
4313 withval=$with_xim;
4314 else
4315 with_xim=$with_features
4316 fi
4317
4318
4319 # Check whether --with-ns was given.
4320 if test "${with_ns+set}" = set; then :
4321 withval=$with_ns;
4322 else
4323 with_ns=no
4324 fi
4325
4326
4327 # Check whether --with-w32 was given.
4328 if test "${with_w32+set}" = set; then :
4329 withval=$with_w32;
4330 else
4331 with_w32=no
4332 fi
4333
4334
4335
4336 # Check whether --with-gpm was given.
4337 if test "${with_gpm+set}" = set; then :
4338 withval=$with_gpm;
4339 else
4340 with_gpm=$with_features
4341 fi
4342
4343
4344 # Check whether --with-dbus was given.
4345 if test "${with_dbus+set}" = set; then :
4346 withval=$with_dbus;
4347 else
4348 with_dbus=$with_features
4349 fi
4350
4351
4352 # Check whether --with-gconf was given.
4353 if test "${with_gconf+set}" = set; then :
4354 withval=$with_gconf;
4355 else
4356 with_gconf=$with_features
4357 fi
4358
4359
4360 # Check whether --with-gsettings was given.
4361 if test "${with_gsettings+set}" = set; then :
4362 withval=$with_gsettings;
4363 else
4364 with_gsettings=$with_features
4365 fi
4366
4367
4368 # Check whether --with-selinux was given.
4369 if test "${with_selinux+set}" = set; then :
4370 withval=$with_selinux;
4371 else
4372 with_selinux=$with_features
4373 fi
4374
4375
4376 # Check whether --with-gnutls was given.
4377 if test "${with_gnutls+set}" = set; then :
4378 withval=$with_gnutls;
4379 else
4380 with_gnutls=$with_features
4381 fi
4382
4383
4384 # Check whether --with-zlib was given.
4385 if test "${with_zlib+set}" = set; then :
4386 withval=$with_zlib;
4387 else
4388 with_zlib=$with_features
4389 fi
4390
4391
4392
4393 # Check whether --with-file-notification was given.
4394 if test "${with_file_notification+set}" = set; then :
4395 withval=$with_file_notification; case "${withval}" in
4396 y | ye | yes ) val=yes ;;
4397 n | no ) val=no ;;
4398 g | gf | gfi | gfil | gfile ) val=gfile ;;
4399 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4400 w | w3 | w32 ) val=w32 ;;
4401 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4402 this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
4403 \`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep,
4404 otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5
4405 ;;
4406 esac
4407 with_file_notification=$val
4408
4409 else
4410 with_file_notification=$with_features
4411 fi
4412
4413
4414 ## For the times when you want to build Emacs but don't have
4415 ## a suitable makeinfo, and can live without the manuals.
4416
4417 # Check whether --with-makeinfo was given.
4418 if test "${with_makeinfo+set}" = set; then :
4419 withval=$with_makeinfo;
4420 else
4421 with_makeinfo=$with_features
4422 fi
4423
4424
4425 ## Makefile.in needs the cache file name.
4426
4427
4428 ## This is an option because I do not know if all info/man support
4429 ## compressed files, nor how to test if they do so.
4430
4431 # Check whether --with-compress-info was given.
4432 if test "${with_compress_info+set}" = set; then :
4433 withval=$with_compress_info;
4434 else
4435 with_compress_info=$with_features
4436 fi
4437
4438 if test $with_compress_info = yes; then
4439 GZIP_INFO=yes
4440 else
4441 GZIP_INFO=
4442 fi
4443
4444
4445
4446 # Check whether --with-pkg-config-prog was given.
4447 if test "${with_pkg_config_prog+set}" = set; then :
4448 withval=$with_pkg_config_prog;
4449 fi
4450
4451 if test "X${with_pkg_config_prog}" != X; then
4452 if test "${with_pkg_config_prog}" != yes; then
4453 PKG_CONFIG="${with_pkg_config_prog}"
4454 fi
4455 fi
4456
4457
4458 # Check whether --with-gameuser was given.
4459 if test "${with_gameuser+set}" = set; then :
4460 withval=$with_gameuser;
4461 fi
4462
4463 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4464 && gameuser="${with_gameuser}"
4465 test "X$gameuser" = X && gameuser=games
4466
4467
4468 # Check whether --with-gnustep-conf was given.
4469 if test "${with_gnustep_conf+set}" = set; then :
4470 withval=$with_gnustep_conf;
4471 fi
4472
4473 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4474 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4475 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4476 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4477
4478 # Check whether --enable-ns-self-contained was given.
4479 if test "${enable_ns_self_contained+set}" = set; then :
4480 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4481 else
4482 EN_NS_SELF_CONTAINED=yes
4483 fi
4484
4485
4486 # Check whether --enable-locallisppath was given.
4487 if test "${enable_locallisppath+set}" = set; then :
4488 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4489 locallisppath=
4490 elif test "${enableval}" != "yes"; then
4491 locallisppath=${enableval}
4492 fi
4493 fi
4494
4495
4496 # Check whether --enable-checking was given.
4497 if test "${enable_checking+set}" = set; then :
4498 enableval=$enable_checking; ac_checking_flags="${enableval}"
4499 fi
4500
4501 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4502 for check in $ac_checking_flags
4503 do
4504 case $check in
4505 # these set all the flags to specific states
4506 yes) ac_enable_checking=1 ;;
4507 no) ac_enable_checking= ;
4508 ac_gc_check_stringbytes= ;
4509 ac_gc_check_string_overrun= ;
4510 ac_gc_check_string_free_list= ;
4511 ac_xmalloc_overrun= ;
4512 ac_gc_check_cons_list= ;
4513 ac_glyphs_debug= ;;
4514 all) ac_enable_checking=1 ;
4515 ac_gc_check_stringbytes=1 ;
4516 ac_gc_check_string_overrun=1 ;
4517 ac_gc_check_string_free_list=1 ;
4518 ac_xmalloc_overrun=1 ;
4519 ac_gc_check_cons_list=1 ;
4520 ac_glyphs_debug=1 ;;
4521 # these enable particular checks
4522 stringbytes) ac_gc_check_stringbytes=1 ;;
4523 stringoverrun) ac_gc_check_string_overrun=1 ;;
4524 stringfreelist) ac_gc_check_string_free_list=1 ;;
4525 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4526 conslist) ac_gc_check_cons_list=1 ;;
4527 glyphs) ac_glyphs_debug=1 ;;
4528 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4529 esac
4530 done
4531 IFS="$ac_save_IFS"
4532
4533 if test x$ac_enable_checking != x ; then
4534
4535 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4536
4537 fi
4538 if test x$ac_gc_check_stringbytes != x ; then
4539
4540 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4541
4542 fi
4543 if test x$ac_gc_check_string_overrun != x ; then
4544
4545 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4546
4547 fi
4548 if test x$ac_gc_check_string_free_list != x ; then
4549
4550 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4551
4552 fi
4553 if test x$ac_xmalloc_overrun != x ; then
4554
4555 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4556
4557 fi
4558 if test x$ac_gc_check_cons_list != x ; then
4559
4560 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4561
4562 fi
4563 if test x$ac_glyphs_debug != x ; then
4564
4565 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4566
4567 fi
4568
4569 # Check whether --enable-check-lisp-object-type was given.
4570 if test "${enable_check_lisp_object_type+set}" = set; then :
4571 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4572
4573 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4574
4575 fi
4576 fi
4577
4578
4579
4580 # Check whether --enable-profiling was given.
4581 if test "${enable_profiling+set}" = set; then :
4582 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4583 fi
4584
4585 if test x$ac_enable_profiling != x ; then
4586 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4587 else
4588 PROFILING_CFLAGS=
4589 fi
4590
4591
4592 # Check whether --enable-autodepend was given.
4593 if test "${enable_autodepend+set}" = set; then :
4594 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4595 else
4596 ac_enable_autodepend=yes
4597 fi
4598
4599
4600 # Check whether --enable-gtk-deprecation-warnings was given.
4601 if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4602 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4603 fi
4604
4605
4606 #### Make srcdir absolute, if it isn't already. It's important to
4607 #### avoid running the file name through pwd unnecessarily, since pwd can
4608 #### give you automounter prefixes, which can go away. We do all this
4609 #### so Emacs can find its files when run uninstalled.
4610 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4611 unset CDPATH
4612 case "${srcdir}" in
4613 [\\/]* | ?:[\\/]*) ;;
4614 . )
4615 ## We may be able to use the $PWD environment variable to make this
4616 ## absolute. But sometimes PWD is inaccurate.
4617 ## Note: we used to use $PWD at the end instead of `pwd`,
4618 ## but that tested only for a well-formed and valid PWD,
4619 ## it did not object when PWD was well-formed and valid but just wrong.
4620 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
4621 then
4622 srcdir="$PWD"
4623 else
4624 srcdir=`(cd "$srcdir"; pwd)`
4625 fi
4626 ;;
4627 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
4628 esac
4629
4630 ### Canonicalize the configuration name.
4631
4632 # Make sure we can run config.sub.
4633 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4634 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4635
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4637 $as_echo_n "checking build system type... " >&6; }
4638 if test "${ac_cv_build+set}" = set; then :
4639 $as_echo_n "(cached) " >&6
4640 else
4641 ac_build_alias=$build_alias
4642 test "x$ac_build_alias" = x &&
4643 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4644 test "x$ac_build_alias" = x &&
4645 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4646 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4647 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4648
4649 fi
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4651 $as_echo "$ac_cv_build" >&6; }
4652 case $ac_cv_build in
4653 *-*-*) ;;
4654 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4655 esac
4656 build=$ac_cv_build
4657 ac_save_IFS=$IFS; IFS='-'
4658 set x $ac_cv_build
4659 shift
4660 build_cpu=$1
4661 build_vendor=$2
4662 shift; shift
4663 # Remember, the first character of IFS is used to create $*,
4664 # except with old shells:
4665 build_os=$*
4666 IFS=$ac_save_IFS
4667 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4668
4669
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4671 $as_echo_n "checking host system type... " >&6; }
4672 if test "${ac_cv_host+set}" = set; then :
4673 $as_echo_n "(cached) " >&6
4674 else
4675 if test "x$host_alias" = x; then
4676 ac_cv_host=$ac_cv_build
4677 else
4678 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4679 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4680 fi
4681
4682 fi
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4684 $as_echo "$ac_cv_host" >&6; }
4685 case $ac_cv_host in
4686 *-*-*) ;;
4687 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4688 esac
4689 host=$ac_cv_host
4690 ac_save_IFS=$IFS; IFS='-'
4691 set x $ac_cv_host
4692 shift
4693 host_cpu=$1
4694 host_vendor=$2
4695 shift; shift
4696 # Remember, the first character of IFS is used to create $*,
4697 # except with old shells:
4698 host_os=$*
4699 IFS=$ac_save_IFS
4700 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4701
4702
4703 canonical=$host
4704 configuration=${host_alias-${build_alias-$host}}
4705
4706
4707
4708 ### If you add support for a new configuration, add code to this
4709 ### switch statement to recognize your configuration name and select
4710 ### the appropriate operating system file.
4711
4712 ### You would hope that you could choose an s/*.h
4713 ### file based on the operating system portion. However, it turns out
4714 ### that each s/*.h file is pretty manufacturer-specific.
4715 ### So we basically have to have a special case for each
4716 ### configuration name.
4717 ###
4718 ### As far as handling version numbers on operating systems is
4719 ### concerned, make sure things will fail in a fixable way. If
4720 ### /etc/MACHINES doesn't say anything about version numbers, be
4721 ### prepared to handle anything reasonably. If version numbers
4722 ### matter, be sure /etc/MACHINES says something about it.
4723
4724 opsys='' unported=no
4725 case "${canonical}" in
4726
4727 ## GNU/Linux and similar ports
4728 *-*-linux* )
4729 opsys=gnu-linux
4730 ;;
4731
4732 ## FreeBSD ports
4733 *-*-freebsd* )
4734 opsys=freebsd
4735 ;;
4736
4737 ## DragonFly ports
4738 *-*-dragonfly* )
4739 opsys=dragonfly
4740 ;;
4741
4742 ## FreeBSD kernel + glibc based userland
4743 *-*-kfreebsd*gnu* )
4744 opsys=gnu-kfreebsd
4745 ;;
4746
4747 ## NetBSD ports
4748 *-*-netbsd* )
4749 opsys=netbsd
4750 ;;
4751
4752 ## OpenBSD ports
4753 *-*-openbsd* )
4754 opsys=openbsd
4755 ;;
4756
4757 ## Apple Darwin / Mac OS X
4758 *-apple-darwin* )
4759 case "${canonical}" in
4760 i[3456]86-* ) ;;
4761 powerpc-* ) ;;
4762 x86_64-* ) ;;
4763 * ) unported=yes ;;
4764 esac
4765 opsys=darwin
4766 ## Use fink packages if available.
4767 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4768 ## if test -d /sw/include && test -d /sw/lib; then
4769 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4770 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4771 ## fi
4772 ;;
4773
4774 ## Cygwin ports
4775 *-*-cygwin )
4776 opsys=cygwin
4777 ;;
4778
4779 ## HP 9000 series 700 and 800, running HP/UX
4780 hppa*-hp-hpux10.2* )
4781 opsys=hpux10-20
4782 ;;
4783 hppa*-hp-hpux1[1-9]* )
4784 opsys=hpux11
4785 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4786 ;;
4787
4788 ## IBM machines
4789 rs6000-ibm-aix4.[23]* )
4790 opsys=aix4-2
4791 ;;
4792 powerpc-ibm-aix4.[23]* )
4793 opsys=aix4-2
4794 ;;
4795 rs6000-ibm-aix[56]* )
4796 opsys=aix4-2
4797 ;;
4798 powerpc-ibm-aix[56]* )
4799 opsys=aix4-2
4800 ;;
4801
4802 ## Silicon Graphics machines
4803 ## Iris 4D
4804 mips-sgi-irix6.5 )
4805 opsys=irix6-5
4806 # Without defining _LANGUAGE_C, things get masked out in the headers
4807 # so that, for instance, grepping for `free' in stdlib.h fails and
4808 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4809 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4810 ;;
4811
4812 ## Suns
4813 *-sun-solaris* \
4814 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4815 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4816 case "${canonical}" in
4817 i[3456]86-*-* ) ;;
4818 amd64-*-*|x86_64-*-*) ;;
4819 sparc* ) ;;
4820 * ) unported=yes ;;
4821 esac
4822 case "${canonical}" in
4823 *-sunos5.6* | *-solaris2.6* )
4824 opsys=sol2-6
4825 RANLIB="ar -ts"
4826 ;;
4827 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4828 opsys=sol2-6
4829 emacs_check_sunpro_c=yes
4830 ;;
4831 *-sunos5* | *-solaris* )
4832 opsys=sol2-10
4833 emacs_check_sunpro_c=yes
4834 ;;
4835 esac
4836 ## Watch out for a compiler that we know will not work.
4837 case "${canonical}" in
4838 *-solaris* | *-sunos5* )
4839 if [ "x$CC" = x/usr/ucb/cc ]; then
4840 ## /usr/ucb/cc doesn't work;
4841 ## we should find some other compiler that does work.
4842 unset CC
4843 fi
4844 ;;
4845 *) ;;
4846 esac
4847 ;;
4848
4849 ## Intel 386 machines where we don't care about the manufacturer.
4850 i[3456]86-*-* )
4851 case "${canonical}" in
4852 *-darwin* ) opsys=darwin ;;
4853 *-mingw32 )
4854 opsys=mingw32
4855 # MinGW overrides and adds some system headers in nt/inc.
4856 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4857 ;;
4858 *-sysv4.2uw* ) opsys=unixware ;;
4859 *-sysv5uw* ) opsys=unixware ;;
4860 *-sysv5OpenUNIX* ) opsys=unixware ;;
4861 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4862 esac
4863 ;;
4864
4865 * )
4866 unported=yes
4867 ;;
4868 esac
4869
4870 ### If the code above didn't choose an operating system, just choose
4871 ### an operating system based on the configuration name. You really
4872 ### only want to use this when you have no idea what the right
4873 ### operating system is; if you know what operating systems a machine
4874 ### runs, it's cleaner to make it explicit in the case statement
4875 ### above.
4876 if test x"${opsys}" = x; then
4877 case "${canonical}" in
4878 *-gnu* ) opsys=gnu ;;
4879 * )
4880 unported=yes
4881 ;;
4882 esac
4883 fi
4884
4885
4886
4887 if test $unported = yes; then
4888 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4889 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4890 fi
4891
4892
4893 #### Choose a compiler.
4894
4895 ac_ext=c
4896 ac_cpp='$CPP $CPPFLAGS'
4897 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4898 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4899 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4900 if test -n "$ac_tool_prefix"; then
4901 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4902 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904 $as_echo_n "checking for $ac_word... " >&6; }
4905 if test "${ac_cv_prog_CC+set}" = set; then :
4906 $as_echo_n "(cached) " >&6
4907 else
4908 if test -n "$CC"; then
4909 ac_cv_prog_CC="$CC" # Let the user override the test.
4910 else
4911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4912 for as_dir in $PATH
4913 do
4914 IFS=$as_save_IFS
4915 test -z "$as_dir" && as_dir=.
4916 for ac_exec_ext in '' $ac_executable_extensions; do
4917 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4918 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4920 break 2
4921 fi
4922 done
4923 done
4924 IFS=$as_save_IFS
4925
4926 fi
4927 fi
4928 CC=$ac_cv_prog_CC
4929 if test -n "$CC"; then
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4931 $as_echo "$CC" >&6; }
4932 else
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4934 $as_echo "no" >&6; }
4935 fi
4936
4937
4938 fi
4939 if test -z "$ac_cv_prog_CC"; then
4940 ac_ct_CC=$CC
4941 # Extract the first word of "gcc", so it can be a program name with args.
4942 set dummy gcc; ac_word=$2
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944 $as_echo_n "checking for $ac_word... " >&6; }
4945 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4946 $as_echo_n "(cached) " >&6
4947 else
4948 if test -n "$ac_ct_CC"; then
4949 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4950 else
4951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4952 for as_dir in $PATH
4953 do
4954 IFS=$as_save_IFS
4955 test -z "$as_dir" && as_dir=.
4956 for ac_exec_ext in '' $ac_executable_extensions; do
4957 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4958 ac_cv_prog_ac_ct_CC="gcc"
4959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4960 break 2
4961 fi
4962 done
4963 done
4964 IFS=$as_save_IFS
4965
4966 fi
4967 fi
4968 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4969 if test -n "$ac_ct_CC"; then
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4971 $as_echo "$ac_ct_CC" >&6; }
4972 else
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4974 $as_echo "no" >&6; }
4975 fi
4976
4977 if test "x$ac_ct_CC" = x; then
4978 CC=""
4979 else
4980 case $cross_compiling:$ac_tool_warned in
4981 yes:)
4982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4983 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4984 ac_tool_warned=yes ;;
4985 esac
4986 CC=$ac_ct_CC
4987 fi
4988 else
4989 CC="$ac_cv_prog_CC"
4990 fi
4991
4992 if test -z "$CC"; then
4993 if test -n "$ac_tool_prefix"; then
4994 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4995 set dummy ${ac_tool_prefix}cc; ac_word=$2
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4997 $as_echo_n "checking for $ac_word... " >&6; }
4998 if test "${ac_cv_prog_CC+set}" = set; then :
4999 $as_echo_n "(cached) " >&6
5000 else
5001 if test -n "$CC"; then
5002 ac_cv_prog_CC="$CC" # Let the user override the test.
5003 else
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005 for as_dir in $PATH
5006 do
5007 IFS=$as_save_IFS
5008 test -z "$as_dir" && as_dir=.
5009 for ac_exec_ext in '' $ac_executable_extensions; do
5010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5011 ac_cv_prog_CC="${ac_tool_prefix}cc"
5012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5013 break 2
5014 fi
5015 done
5016 done
5017 IFS=$as_save_IFS
5018
5019 fi
5020 fi
5021 CC=$ac_cv_prog_CC
5022 if test -n "$CC"; then
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5024 $as_echo "$CC" >&6; }
5025 else
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027 $as_echo "no" >&6; }
5028 fi
5029
5030
5031 fi
5032 fi
5033 if test -z "$CC"; then
5034 # Extract the first word of "cc", so it can be a program name with args.
5035 set dummy cc; ac_word=$2
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5037 $as_echo_n "checking for $ac_word... " >&6; }
5038 if test "${ac_cv_prog_CC+set}" = set; then :
5039 $as_echo_n "(cached) " >&6
5040 else
5041 if test -n "$CC"; then
5042 ac_cv_prog_CC="$CC" # Let the user override the test.
5043 else
5044 ac_prog_rejected=no
5045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5046 for as_dir in $PATH
5047 do
5048 IFS=$as_save_IFS
5049 test -z "$as_dir" && as_dir=.
5050 for ac_exec_ext in '' $ac_executable_extensions; do
5051 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5052 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5053 ac_prog_rejected=yes
5054 continue
5055 fi
5056 ac_cv_prog_CC="cc"
5057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5058 break 2
5059 fi
5060 done
5061 done
5062 IFS=$as_save_IFS
5063
5064 if test $ac_prog_rejected = yes; then
5065 # We found a bogon in the path, so make sure we never use it.
5066 set dummy $ac_cv_prog_CC
5067 shift
5068 if test $# != 0; then
5069 # We chose a different compiler from the bogus one.
5070 # However, it has the same basename, so the bogon will be chosen
5071 # first if we set CC to just the basename; use the full file name.
5072 shift
5073 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5074 fi
5075 fi
5076 fi
5077 fi
5078 CC=$ac_cv_prog_CC
5079 if test -n "$CC"; then
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5081 $as_echo "$CC" >&6; }
5082 else
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5084 $as_echo "no" >&6; }
5085 fi
5086
5087
5088 fi
5089 if test -z "$CC"; then
5090 if test -n "$ac_tool_prefix"; then
5091 for ac_prog in cl.exe
5092 do
5093 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5094 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096 $as_echo_n "checking for $ac_word... " >&6; }
5097 if test "${ac_cv_prog_CC+set}" = set; then :
5098 $as_echo_n "(cached) " >&6
5099 else
5100 if test -n "$CC"; then
5101 ac_cv_prog_CC="$CC" # Let the user override the test.
5102 else
5103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104 for as_dir in $PATH
5105 do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
5108 for ac_exec_ext in '' $ac_executable_extensions; do
5109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5112 break 2
5113 fi
5114 done
5115 done
5116 IFS=$as_save_IFS
5117
5118 fi
5119 fi
5120 CC=$ac_cv_prog_CC
5121 if test -n "$CC"; then
5122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5123 $as_echo "$CC" >&6; }
5124 else
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5126 $as_echo "no" >&6; }
5127 fi
5128
5129
5130 test -n "$CC" && break
5131 done
5132 fi
5133 if test -z "$CC"; then
5134 ac_ct_CC=$CC
5135 for ac_prog in cl.exe
5136 do
5137 # Extract the first word of "$ac_prog", so it can be a program name with args.
5138 set dummy $ac_prog; ac_word=$2
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140 $as_echo_n "checking for $ac_word... " >&6; }
5141 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5142 $as_echo_n "(cached) " >&6
5143 else
5144 if test -n "$ac_ct_CC"; then
5145 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5146 else
5147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5148 for as_dir in $PATH
5149 do
5150 IFS=$as_save_IFS
5151 test -z "$as_dir" && as_dir=.
5152 for ac_exec_ext in '' $ac_executable_extensions; do
5153 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5154 ac_cv_prog_ac_ct_CC="$ac_prog"
5155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5156 break 2
5157 fi
5158 done
5159 done
5160 IFS=$as_save_IFS
5161
5162 fi
5163 fi
5164 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5165 if test -n "$ac_ct_CC"; then
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5167 $as_echo "$ac_ct_CC" >&6; }
5168 else
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170 $as_echo "no" >&6; }
5171 fi
5172
5173
5174 test -n "$ac_ct_CC" && break
5175 done
5176
5177 if test "x$ac_ct_CC" = x; then
5178 CC=""
5179 else
5180 case $cross_compiling:$ac_tool_warned in
5181 yes:)
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5183 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5184 ac_tool_warned=yes ;;
5185 esac
5186 CC=$ac_ct_CC
5187 fi
5188 fi
5189
5190 fi
5191
5192
5193 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5194 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5195 as_fn_error "no acceptable C compiler found in \$PATH
5196 See \`config.log' for more details." "$LINENO" 5; }
5197
5198 # Provide some information about the compiler.
5199 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5200 set X $ac_compile
5201 ac_compiler=$2
5202 for ac_option in --version -v -V -qversion; do
5203 { { ac_try="$ac_compiler $ac_option >&5"
5204 case "(($ac_try" in
5205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206 *) ac_try_echo=$ac_try;;
5207 esac
5208 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5209 $as_echo "$ac_try_echo"; } >&5
5210 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5211 ac_status=$?
5212 if test -s conftest.err; then
5213 sed '10a\
5214 ... rest of stderr output deleted ...
5215 10q' conftest.err >conftest.er1
5216 cat conftest.er1 >&5
5217 fi
5218 rm -f conftest.er1 conftest.err
5219 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5220 test $ac_status = 0; }
5221 done
5222
5223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5224 /* end confdefs.h. */
5225
5226 int
5227 main ()
5228 {
5229
5230 ;
5231 return 0;
5232 }
5233 _ACEOF
5234 ac_clean_files_save=$ac_clean_files
5235 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5236 # Try to create an executable without -o first, disregard a.out.
5237 # It will help us diagnose broken compilers, and finding out an intuition
5238 # of exeext.
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5240 $as_echo_n "checking whether the C compiler works... " >&6; }
5241 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5242
5243 # The possible output files:
5244 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5245
5246 ac_rmfiles=
5247 for ac_file in $ac_files
5248 do
5249 case $ac_file in
5250 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5251 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5252 esac
5253 done
5254 rm -f $ac_rmfiles
5255
5256 if { { ac_try="$ac_link_default"
5257 case "(($ac_try" in
5258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5259 *) ac_try_echo=$ac_try;;
5260 esac
5261 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5262 $as_echo "$ac_try_echo"; } >&5
5263 (eval "$ac_link_default") 2>&5
5264 ac_status=$?
5265 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5266 test $ac_status = 0; }; then :
5267 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5268 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5269 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5270 # so that the user can short-circuit this test for compilers unknown to
5271 # Autoconf.
5272 for ac_file in $ac_files ''
5273 do
5274 test -f "$ac_file" || continue
5275 case $ac_file in
5276 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5277 ;;
5278 [ab].out )
5279 # We found the default executable, but exeext='' is most
5280 # certainly right.
5281 break;;
5282 *.* )
5283 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5284 then :; else
5285 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5286 fi
5287 # We set ac_cv_exeext here because the later test for it is not
5288 # safe: cross compilers may not add the suffix if given an `-o'
5289 # argument, so we may need to know it at that point already.
5290 # Even if this section looks crufty: it has the advantage of
5291 # actually working.
5292 break;;
5293 * )
5294 break;;
5295 esac
5296 done
5297 test "$ac_cv_exeext" = no && ac_cv_exeext=
5298
5299 else
5300 ac_file=''
5301 fi
5302 if test -z "$ac_file"; then :
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304 $as_echo "no" >&6; }
5305 $as_echo "$as_me: failed program was:" >&5
5306 sed 's/^/| /' conftest.$ac_ext >&5
5307
5308 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5309 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5310 { as_fn_set_status 77
5311 as_fn_error "C compiler cannot create executables
5312 See \`config.log' for more details." "$LINENO" 5; }; }
5313 else
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5315 $as_echo "yes" >&6; }
5316 fi
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5318 $as_echo_n "checking for C compiler default output file name... " >&6; }
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5320 $as_echo "$ac_file" >&6; }
5321 ac_exeext=$ac_cv_exeext
5322
5323 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5324 ac_clean_files=$ac_clean_files_save
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5326 $as_echo_n "checking for suffix of executables... " >&6; }
5327 if { { ac_try="$ac_link"
5328 case "(($ac_try" in
5329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5330 *) ac_try_echo=$ac_try;;
5331 esac
5332 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5333 $as_echo "$ac_try_echo"; } >&5
5334 (eval "$ac_link") 2>&5
5335 ac_status=$?
5336 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5337 test $ac_status = 0; }; then :
5338 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5339 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5340 # work properly (i.e., refer to `conftest.exe'), while it won't with
5341 # `rm'.
5342 for ac_file in conftest.exe conftest conftest.*; do
5343 test -f "$ac_file" || continue
5344 case $ac_file in
5345 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5346 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5347 break;;
5348 * ) break;;
5349 esac
5350 done
5351 else
5352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5353 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5354 as_fn_error "cannot compute suffix of executables: cannot compile and link
5355 See \`config.log' for more details." "$LINENO" 5; }
5356 fi
5357 rm -f conftest conftest$ac_cv_exeext
5358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5359 $as_echo "$ac_cv_exeext" >&6; }
5360
5361 rm -f conftest.$ac_ext
5362 EXEEXT=$ac_cv_exeext
5363 ac_exeext=$EXEEXT
5364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5365 /* end confdefs.h. */
5366 #include <stdio.h>
5367 int
5368 main ()
5369 {
5370 FILE *f = fopen ("conftest.out", "w");
5371 return ferror (f) || fclose (f) != 0;
5372
5373 ;
5374 return 0;
5375 }
5376 _ACEOF
5377 ac_clean_files="$ac_clean_files conftest.out"
5378 # Check that the compiler produces executables we can run. If not, either
5379 # the compiler is broken, or we cross compile.
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5381 $as_echo_n "checking whether we are cross compiling... " >&6; }
5382 if test "$cross_compiling" != yes; then
5383 { { ac_try="$ac_link"
5384 case "(($ac_try" in
5385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5386 *) ac_try_echo=$ac_try;;
5387 esac
5388 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5389 $as_echo "$ac_try_echo"; } >&5
5390 (eval "$ac_link") 2>&5
5391 ac_status=$?
5392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5393 test $ac_status = 0; }
5394 if { ac_try='./conftest$ac_cv_exeext'
5395 { { case "(($ac_try" in
5396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5397 *) ac_try_echo=$ac_try;;
5398 esac
5399 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5400 $as_echo "$ac_try_echo"; } >&5
5401 (eval "$ac_try") 2>&5
5402 ac_status=$?
5403 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5404 test $ac_status = 0; }; }; then
5405 cross_compiling=no
5406 else
5407 if test "$cross_compiling" = maybe; then
5408 cross_compiling=yes
5409 else
5410 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5411 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5412 as_fn_error "cannot run C compiled programs.
5413 If you meant to cross compile, use \`--host'.
5414 See \`config.log' for more details." "$LINENO" 5; }
5415 fi
5416 fi
5417 fi
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5419 $as_echo "$cross_compiling" >&6; }
5420
5421 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5422 ac_clean_files=$ac_clean_files_save
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5424 $as_echo_n "checking for suffix of object files... " >&6; }
5425 if test "${ac_cv_objext+set}" = set; then :
5426 $as_echo_n "(cached) " >&6
5427 else
5428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5429 /* end confdefs.h. */
5430
5431 int
5432 main ()
5433 {
5434
5435 ;
5436 return 0;
5437 }
5438 _ACEOF
5439 rm -f conftest.o conftest.obj
5440 if { { ac_try="$ac_compile"
5441 case "(($ac_try" in
5442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5443 *) ac_try_echo=$ac_try;;
5444 esac
5445 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5446 $as_echo "$ac_try_echo"; } >&5
5447 (eval "$ac_compile") 2>&5
5448 ac_status=$?
5449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5450 test $ac_status = 0; }; then :
5451 for ac_file in conftest.o conftest.obj conftest.*; do
5452 test -f "$ac_file" || continue;
5453 case $ac_file in
5454 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5455 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5456 break;;
5457 esac
5458 done
5459 else
5460 $as_echo "$as_me: failed program was:" >&5
5461 sed 's/^/| /' conftest.$ac_ext >&5
5462
5463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5464 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5465 as_fn_error "cannot compute suffix of object files: cannot compile
5466 See \`config.log' for more details." "$LINENO" 5; }
5467 fi
5468 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5469 fi
5470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5471 $as_echo "$ac_cv_objext" >&6; }
5472 OBJEXT=$ac_cv_objext
5473 ac_objext=$OBJEXT
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5475 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5476 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5477 $as_echo_n "(cached) " >&6
5478 else
5479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5480 /* end confdefs.h. */
5481
5482 int
5483 main ()
5484 {
5485 #ifndef __GNUC__
5486 choke me
5487 #endif
5488
5489 ;
5490 return 0;
5491 }
5492 _ACEOF
5493 if ac_fn_c_try_compile "$LINENO"; then :
5494 ac_compiler_gnu=yes
5495 else
5496 ac_compiler_gnu=no
5497 fi
5498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5499 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5500
5501 fi
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5503 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5504 if test $ac_compiler_gnu = yes; then
5505 GCC=yes
5506 else
5507 GCC=
5508 fi
5509 ac_test_CFLAGS=${CFLAGS+set}
5510 ac_save_CFLAGS=$CFLAGS
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5512 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5513 if test "${ac_cv_prog_cc_g+set}" = set; then :
5514 $as_echo_n "(cached) " >&6
5515 else
5516 ac_save_c_werror_flag=$ac_c_werror_flag
5517 ac_c_werror_flag=yes
5518 ac_cv_prog_cc_g=no
5519 CFLAGS="-g"
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521 /* end confdefs.h. */
5522
5523 int
5524 main ()
5525 {
5526
5527 ;
5528 return 0;
5529 }
5530 _ACEOF
5531 if ac_fn_c_try_compile "$LINENO"; then :
5532 ac_cv_prog_cc_g=yes
5533 else
5534 CFLAGS=""
5535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5536 /* end confdefs.h. */
5537
5538 int
5539 main ()
5540 {
5541
5542 ;
5543 return 0;
5544 }
5545 _ACEOF
5546 if ac_fn_c_try_compile "$LINENO"; then :
5547
5548 else
5549 ac_c_werror_flag=$ac_save_c_werror_flag
5550 CFLAGS="-g"
5551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552 /* end confdefs.h. */
5553
5554 int
5555 main ()
5556 {
5557
5558 ;
5559 return 0;
5560 }
5561 _ACEOF
5562 if ac_fn_c_try_compile "$LINENO"; then :
5563 ac_cv_prog_cc_g=yes
5564 fi
5565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5566 fi
5567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5568 fi
5569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5570 ac_c_werror_flag=$ac_save_c_werror_flag
5571 fi
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5573 $as_echo "$ac_cv_prog_cc_g" >&6; }
5574 if test "$ac_test_CFLAGS" = set; then
5575 CFLAGS=$ac_save_CFLAGS
5576 elif test $ac_cv_prog_cc_g = yes; then
5577 if test "$GCC" = yes; then
5578 CFLAGS="-g -O2"
5579 else
5580 CFLAGS="-g"
5581 fi
5582 else
5583 if test "$GCC" = yes; then
5584 CFLAGS="-O2"
5585 else
5586 CFLAGS=
5587 fi
5588 fi
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5590 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5591 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5592 $as_echo_n "(cached) " >&6
5593 else
5594 ac_cv_prog_cc_c89=no
5595 ac_save_CC=$CC
5596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5597 /* end confdefs.h. */
5598 #include <stdarg.h>
5599 #include <stdio.h>
5600 #include <sys/types.h>
5601 #include <sys/stat.h>
5602 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5603 struct buf { int x; };
5604 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5605 static char *e (p, i)
5606 char **p;
5607 int i;
5608 {
5609 return p[i];
5610 }
5611 static char *f (char * (*g) (char **, int), char **p, ...)
5612 {
5613 char *s;
5614 va_list v;
5615 va_start (v,p);
5616 s = g (p, va_arg (v,int));
5617 va_end (v);
5618 return s;
5619 }
5620
5621 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5622 function prototypes and stuff, but not '\xHH' hex character constants.
5623 These don't provoke an error unfortunately, instead are silently treated
5624 as 'x'. The following induces an error, until -std is added to get
5625 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5626 array size at least. It's necessary to write '\x00'==0 to get something
5627 that's true only with -std. */
5628 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5629
5630 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5631 inside strings and character constants. */
5632 #define FOO(x) 'x'
5633 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5634
5635 int test (int i, double x);
5636 struct s1 {int (*f) (int a);};
5637 struct s2 {int (*f) (double a);};
5638 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5639 int argc;
5640 char **argv;
5641 int
5642 main ()
5643 {
5644 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5645 ;
5646 return 0;
5647 }
5648 _ACEOF
5649 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5650 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5651 do
5652 CC="$ac_save_CC $ac_arg"
5653 if ac_fn_c_try_compile "$LINENO"; then :
5654 ac_cv_prog_cc_c89=$ac_arg
5655 fi
5656 rm -f core conftest.err conftest.$ac_objext
5657 test "x$ac_cv_prog_cc_c89" != "xno" && break
5658 done
5659 rm -f conftest.$ac_ext
5660 CC=$ac_save_CC
5661
5662 fi
5663 # AC_CACHE_VAL
5664 case "x$ac_cv_prog_cc_c89" in
5665 x)
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5667 $as_echo "none needed" >&6; } ;;
5668 xno)
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5670 $as_echo "unsupported" >&6; } ;;
5671 *)
5672 CC="$CC $ac_cv_prog_cc_c89"
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5674 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5675 esac
5676 if test "x$ac_cv_prog_cc_c89" != xno; then :
5677
5678 fi
5679
5680 ac_ext=c
5681 ac_cpp='$CPP $CPPFLAGS'
5682 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5683 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5684 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5685 DEPDIR="${am__leading_dot}deps"
5686
5687 ac_config_commands="$ac_config_commands depfiles"
5688
5689
5690 am_make=${MAKE-make}
5691 cat > confinc << 'END'
5692 am__doit:
5693 @echo this is the am__doit target
5694 .PHONY: am__doit
5695 END
5696 # If we don't find an include directive, just comment out the code.
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5698 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5699 am__include="#"
5700 am__quote=
5701 _am_result=none
5702 # First try GNU make style include.
5703 echo "include confinc" > confmf
5704 # Ignore all kinds of additional output from `make'.
5705 case `$am_make -s -f confmf 2> /dev/null` in #(
5706 *the\ am__doit\ target*)
5707 am__include=include
5708 am__quote=
5709 _am_result=GNU
5710 ;;
5711 esac
5712 # Now try BSD make style include.
5713 if test "$am__include" = "#"; then
5714 echo '.include "confinc"' > confmf
5715 case `$am_make -s -f confmf 2> /dev/null` in #(
5716 *the\ am__doit\ target*)
5717 am__include=.include
5718 am__quote="\""
5719 _am_result=BSD
5720 ;;
5721 esac
5722 fi
5723
5724
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5726 $as_echo "$_am_result" >&6; }
5727 rm -f confinc confmf
5728
5729 # Check whether --enable-dependency-tracking was given.
5730 if test "${enable_dependency_tracking+set}" = set; then :
5731 enableval=$enable_dependency_tracking;
5732 fi
5733
5734 if test "x$enable_dependency_tracking" != xno; then
5735 am_depcomp="$ac_aux_dir/depcomp"
5736 AMDEPBACKSLASH='\'
5737 fi
5738 if test "x$enable_dependency_tracking" != xno; then
5739 AMDEP_TRUE=
5740 AMDEP_FALSE='#'
5741 else
5742 AMDEP_TRUE='#'
5743 AMDEP_FALSE=
5744 fi
5745
5746
5747
5748 depcc="$CC" am_compiler_list=
5749
5750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5751 $as_echo_n "checking dependency style of $depcc... " >&6; }
5752 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5753 $as_echo_n "(cached) " >&6
5754 else
5755 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5756 # We make a subdir and do the tests there. Otherwise we can end up
5757 # making bogus files that we don't know about and never remove. For
5758 # instance it was reported that on HP-UX the gcc test will end up
5759 # making a dummy file named `D' -- because `-MD' means `put the output
5760 # in D'.
5761 mkdir conftest.dir
5762 # Copy depcomp to subdir because otherwise we won't find it if we're
5763 # using a relative directory.
5764 cp "$am_depcomp" conftest.dir
5765 cd conftest.dir
5766 # We will build objects and dependencies in a subdirectory because
5767 # it helps to detect inapplicable dependency modes. For instance
5768 # both Tru64's cc and ICC support -MD to output dependencies as a
5769 # side effect of compilation, but ICC will put the dependencies in
5770 # the current directory while Tru64 will put them in the object
5771 # directory.
5772 mkdir sub
5773
5774 am_cv_CC_dependencies_compiler_type=none
5775 if test "$am_compiler_list" = ""; then
5776 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5777 fi
5778 am__universal=false
5779 case " $depcc " in #(
5780 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5781 esac
5782
5783 for depmode in $am_compiler_list; do
5784 # Setup a source with many dependencies, because some compilers
5785 # like to wrap large dependency lists on column 80 (with \), and
5786 # we should not choose a depcomp mode which is confused by this.
5787 #
5788 # We need to recreate these files for each test, as the compiler may
5789 # overwrite some of them when testing with obscure command lines.
5790 # This happens at least with the AIX C compiler.
5791 : > sub/conftest.c
5792 for i in 1 2 3 4 5 6; do
5793 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5794 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5795 # Solaris 8's {/usr,}/bin/sh.
5796 touch sub/conftst$i.h
5797 done
5798 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5799
5800 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5801 # mode. It turns out that the SunPro C++ compiler does not properly
5802 # handle `-M -o', and we need to detect this. Also, some Intel
5803 # versions had trouble with output in subdirs
5804 am__obj=sub/conftest.${OBJEXT-o}
5805 am__minus_obj="-o $am__obj"
5806 case $depmode in
5807 gcc)
5808 # This depmode causes a compiler race in universal mode.
5809 test "$am__universal" = false || continue
5810 ;;
5811 nosideeffect)
5812 # after this tag, mechanisms are not by side-effect, so they'll
5813 # only be used when explicitly requested
5814 if test "x$enable_dependency_tracking" = xyes; then
5815 continue
5816 else
5817 break
5818 fi
5819 ;;
5820 msvisualcpp | msvcmsys)
5821 # This compiler won't grok `-c -o', but also, the minuso test has
5822 # not run yet. These depmodes are late enough in the game, and
5823 # so weak that their functioning should not be impacted.
5824 am__obj=conftest.${OBJEXT-o}
5825 am__minus_obj=
5826 ;;
5827 none) break ;;
5828 esac
5829 if depmode=$depmode \
5830 source=sub/conftest.c object=$am__obj \
5831 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5832 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5833 >/dev/null 2>conftest.err &&
5834 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5835 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5836 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5837 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5838 # icc doesn't choke on unknown options, it will just issue warnings
5839 # or remarks (even with -Werror). So we grep stderr for any message
5840 # that says an option was ignored or not supported.
5841 # When given -MP, icc 7.0 and 7.1 complain thusly:
5842 # icc: Command line warning: ignoring option '-M'; no argument required
5843 # The diagnosis changed in icc 8.0:
5844 # icc: Command line remark: option '-MP' not supported
5845 if (grep 'ignoring option' conftest.err ||
5846 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5847 am_cv_CC_dependencies_compiler_type=$depmode
5848 break
5849 fi
5850 fi
5851 done
5852
5853 cd ..
5854 rm -rf conftest.dir
5855 else
5856 am_cv_CC_dependencies_compiler_type=none
5857 fi
5858
5859 fi
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5861 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5862 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5863
5864 if
5865 test "x$enable_dependency_tracking" != xno \
5866 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5867 am__fastdepCC_TRUE=
5868 am__fastdepCC_FALSE='#'
5869 else
5870 am__fastdepCC_TRUE='#'
5871 am__fastdepCC_FALSE=
5872 fi
5873
5874
5875 if test "x$CC" != xcc; then
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5877 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5878 else
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5880 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5881 fi
5882 set dummy $CC; ac_cc=`$as_echo "$2" |
5883 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5884 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5885 $as_echo_n "(cached) " >&6
5886 else
5887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5888 /* end confdefs.h. */
5889
5890 int
5891 main ()
5892 {
5893
5894 ;
5895 return 0;
5896 }
5897 _ACEOF
5898 # Make sure it works both with $CC and with simple cc.
5899 # We do the test twice because some compilers refuse to overwrite an
5900 # existing .o file with -o, though they will create one.
5901 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5902 rm -f conftest2.*
5903 if { { case "(($ac_try" in
5904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5905 *) ac_try_echo=$ac_try;;
5906 esac
5907 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5908 $as_echo "$ac_try_echo"; } >&5
5909 (eval "$ac_try") 2>&5
5910 ac_status=$?
5911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5912 test $ac_status = 0; } &&
5913 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5915 *) ac_try_echo=$ac_try;;
5916 esac
5917 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5918 $as_echo "$ac_try_echo"; } >&5
5919 (eval "$ac_try") 2>&5
5920 ac_status=$?
5921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5922 test $ac_status = 0; };
5923 then
5924 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5925 if test "x$CC" != xcc; then
5926 # Test first that cc exists at all.
5927 if { ac_try='cc -c conftest.$ac_ext >&5'
5928 { { case "(($ac_try" in
5929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5930 *) ac_try_echo=$ac_try;;
5931 esac
5932 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5933 $as_echo "$ac_try_echo"; } >&5
5934 (eval "$ac_try") 2>&5
5935 ac_status=$?
5936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5937 test $ac_status = 0; }; }; then
5938 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5939 rm -f conftest2.*
5940 if { { case "(($ac_try" in
5941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5942 *) ac_try_echo=$ac_try;;
5943 esac
5944 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5945 $as_echo "$ac_try_echo"; } >&5
5946 (eval "$ac_try") 2>&5
5947 ac_status=$?
5948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5949 test $ac_status = 0; } &&
5950 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5952 *) ac_try_echo=$ac_try;;
5953 esac
5954 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5955 $as_echo "$ac_try_echo"; } >&5
5956 (eval "$ac_try") 2>&5
5957 ac_status=$?
5958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5959 test $ac_status = 0; };
5960 then
5961 # cc works too.
5962 :
5963 else
5964 # cc exists but doesn't like -o.
5965 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5966 fi
5967 fi
5968 fi
5969 else
5970 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5971 fi
5972 rm -f core conftest*
5973
5974 fi
5975 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5977 $as_echo "yes" >&6; }
5978 else
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5980 $as_echo "no" >&6; }
5981
5982 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5983
5984 fi
5985
5986 # FIXME: we rely on the cache variable name because
5987 # there is no other way.
5988 set dummy $CC
5989 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5990 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5991 if test "$am_t" != yes; then
5992 # Losing compiler, so override with the script.
5993 # FIXME: It is wrong to rewrite CC.
5994 # But if we don't then we get into trouble of one sort or another.
5995 # A longer-term fix would be to have automake use am__CC in this case,
5996 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5997 CC="$am_aux_dir/compile $CC"
5998 fi
5999
6000
6001
6002 if test x$GCC = xyes; then
6003 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
6004 else
6005 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6006 fi
6007
6008 if test "x$opsys" = "xmingw32"; then
6009 BUILDING_FOR_WINDOWSNT_TRUE=
6010 BUILDING_FOR_WINDOWSNT_FALSE='#'
6011 else
6012 BUILDING_FOR_WINDOWSNT_TRUE='#'
6013 BUILDING_FOR_WINDOWSNT_FALSE=
6014 fi
6015
6016
6017 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
6018 # as we don't use them.
6019
6020 # Avoid gnulib's threadlib module, as we do threads our own way.
6021
6022
6023 # Initialize gnulib right after choosing the compiler.
6024
6025 ac_ext=c
6026 ac_cpp='$CPP $CPPFLAGS'
6027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6031 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6032 # On Suns, sometimes $CPP names a directory.
6033 if test -n "$CPP" && test -d "$CPP"; then
6034 CPP=
6035 fi
6036 if test -z "$CPP"; then
6037 if test "${ac_cv_prog_CPP+set}" = set; then :
6038 $as_echo_n "(cached) " >&6
6039 else
6040 # Double quotes because CPP needs to be expanded
6041 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6042 do
6043 ac_preproc_ok=false
6044 for ac_c_preproc_warn_flag in '' yes
6045 do
6046 # Use a header file that comes with gcc, so configuring glibc
6047 # with a fresh cross-compiler works.
6048 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6049 # <limits.h> exists even on freestanding compilers.
6050 # On the NeXT, cc -E runs the code through the compiler's parser,
6051 # not just through cpp. "Syntax error" is here to catch this case.
6052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6053 /* end confdefs.h. */
6054 #ifdef __STDC__
6055 # include <limits.h>
6056 #else
6057 # include <assert.h>
6058 #endif
6059 Syntax error
6060 _ACEOF
6061 if ac_fn_c_try_cpp "$LINENO"; then :
6062
6063 else
6064 # Broken: fails on valid input.
6065 continue
6066 fi
6067 rm -f conftest.err conftest.$ac_ext
6068
6069 # OK, works on sane cases. Now check whether nonexistent headers
6070 # can be detected and how.
6071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6072 /* end confdefs.h. */
6073 #include <ac_nonexistent.h>
6074 _ACEOF
6075 if ac_fn_c_try_cpp "$LINENO"; then :
6076 # Broken: success on invalid input.
6077 continue
6078 else
6079 # Passes both tests.
6080 ac_preproc_ok=:
6081 break
6082 fi
6083 rm -f conftest.err conftest.$ac_ext
6084
6085 done
6086 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6087 rm -f conftest.err conftest.$ac_ext
6088 if $ac_preproc_ok; then :
6089 break
6090 fi
6091
6092 done
6093 ac_cv_prog_CPP=$CPP
6094
6095 fi
6096 CPP=$ac_cv_prog_CPP
6097 else
6098 ac_cv_prog_CPP=$CPP
6099 fi
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6101 $as_echo "$CPP" >&6; }
6102 ac_preproc_ok=false
6103 for ac_c_preproc_warn_flag in '' yes
6104 do
6105 # Use a header file that comes with gcc, so configuring glibc
6106 # with a fresh cross-compiler works.
6107 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6108 # <limits.h> exists even on freestanding compilers.
6109 # On the NeXT, cc -E runs the code through the compiler's parser,
6110 # not just through cpp. "Syntax error" is here to catch this case.
6111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6112 /* end confdefs.h. */
6113 #ifdef __STDC__
6114 # include <limits.h>
6115 #else
6116 # include <assert.h>
6117 #endif
6118 Syntax error
6119 _ACEOF
6120 if ac_fn_c_try_cpp "$LINENO"; then :
6121
6122 else
6123 # Broken: fails on valid input.
6124 continue
6125 fi
6126 rm -f conftest.err conftest.$ac_ext
6127
6128 # OK, works on sane cases. Now check whether nonexistent headers
6129 # can be detected and how.
6130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6131 /* end confdefs.h. */
6132 #include <ac_nonexistent.h>
6133 _ACEOF
6134 if ac_fn_c_try_cpp "$LINENO"; then :
6135 # Broken: success on invalid input.
6136 continue
6137 else
6138 # Passes both tests.
6139 ac_preproc_ok=:
6140 break
6141 fi
6142 rm -f conftest.err conftest.$ac_ext
6143
6144 done
6145 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6146 rm -f conftest.err conftest.$ac_ext
6147 if $ac_preproc_ok; then :
6148
6149 else
6150 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6151 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6152 as_fn_error "C preprocessor \"$CPP\" fails sanity check
6153 See \`config.log' for more details." "$LINENO" 5; }
6154 fi
6155
6156 ac_ext=c
6157 ac_cpp='$CPP $CPPFLAGS'
6158 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6159 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6160 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6161
6162
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6164 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6165 if test "${ac_cv_path_GREP+set}" = set; then :
6166 $as_echo_n "(cached) " >&6
6167 else
6168 if test -z "$GREP"; then
6169 ac_path_GREP_found=false
6170 # Loop through the user's path and test for each of PROGNAME-LIST
6171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6172 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6173 do
6174 IFS=$as_save_IFS
6175 test -z "$as_dir" && as_dir=.
6176 for ac_prog in grep ggrep; do
6177 for ac_exec_ext in '' $ac_executable_extensions; do
6178 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6179 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6180 # Check for GNU ac_path_GREP and select it if it is found.
6181 # Check for GNU $ac_path_GREP
6182 case `"$ac_path_GREP" --version 2>&1` in
6183 *GNU*)
6184 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6185 *)
6186 ac_count=0
6187 $as_echo_n 0123456789 >"conftest.in"
6188 while :
6189 do
6190 cat "conftest.in" "conftest.in" >"conftest.tmp"
6191 mv "conftest.tmp" "conftest.in"
6192 cp "conftest.in" "conftest.nl"
6193 $as_echo 'GREP' >> "conftest.nl"
6194 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6195 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6196 as_fn_arith $ac_count + 1 && ac_count=$as_val
6197 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6198 # Best one so far, save it but keep looking for a better one
6199 ac_cv_path_GREP="$ac_path_GREP"
6200 ac_path_GREP_max=$ac_count
6201 fi
6202 # 10*(2^10) chars as input seems more than enough
6203 test $ac_count -gt 10 && break
6204 done
6205 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6206 esac
6207
6208 $ac_path_GREP_found && break 3
6209 done
6210 done
6211 done
6212 IFS=$as_save_IFS
6213 if test -z "$ac_cv_path_GREP"; then
6214 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6215 fi
6216 else
6217 ac_cv_path_GREP=$GREP
6218 fi
6219
6220 fi
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6222 $as_echo "$ac_cv_path_GREP" >&6; }
6223 GREP="$ac_cv_path_GREP"
6224
6225
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6227 $as_echo_n "checking for egrep... " >&6; }
6228 if test "${ac_cv_path_EGREP+set}" = set; then :
6229 $as_echo_n "(cached) " >&6
6230 else
6231 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6232 then ac_cv_path_EGREP="$GREP -E"
6233 else
6234 if test -z "$EGREP"; then
6235 ac_path_EGREP_found=false
6236 # Loop through the user's path and test for each of PROGNAME-LIST
6237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6239 do
6240 IFS=$as_save_IFS
6241 test -z "$as_dir" && as_dir=.
6242 for ac_prog in egrep; do
6243 for ac_exec_ext in '' $ac_executable_extensions; do
6244 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6245 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6246 # Check for GNU ac_path_EGREP and select it if it is found.
6247 # Check for GNU $ac_path_EGREP
6248 case `"$ac_path_EGREP" --version 2>&1` in
6249 *GNU*)
6250 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6251 *)
6252 ac_count=0
6253 $as_echo_n 0123456789 >"conftest.in"
6254 while :
6255 do
6256 cat "conftest.in" "conftest.in" >"conftest.tmp"
6257 mv "conftest.tmp" "conftest.in"
6258 cp "conftest.in" "conftest.nl"
6259 $as_echo 'EGREP' >> "conftest.nl"
6260 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6261 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6262 as_fn_arith $ac_count + 1 && ac_count=$as_val
6263 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6264 # Best one so far, save it but keep looking for a better one
6265 ac_cv_path_EGREP="$ac_path_EGREP"
6266 ac_path_EGREP_max=$ac_count
6267 fi
6268 # 10*(2^10) chars as input seems more than enough
6269 test $ac_count -gt 10 && break
6270 done
6271 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6272 esac
6273
6274 $ac_path_EGREP_found && break 3
6275 done
6276 done
6277 done
6278 IFS=$as_save_IFS
6279 if test -z "$ac_cv_path_EGREP"; then
6280 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6281 fi
6282 else
6283 ac_cv_path_EGREP=$EGREP
6284 fi
6285
6286 fi
6287 fi
6288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6289 $as_echo "$ac_cv_path_EGREP" >&6; }
6290 EGREP="$ac_cv_path_EGREP"
6291
6292
6293
6294
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6296 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6297 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6298 $as_echo_n "(cached) " >&6
6299 else
6300
6301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6302 /* end confdefs.h. */
6303
6304 #ifdef __ACK__
6305 Amsterdam
6306 #endif
6307
6308 _ACEOF
6309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6310 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6311 gl_cv_c_amsterdam_compiler=yes
6312 else
6313 gl_cv_c_amsterdam_compiler=no
6314 fi
6315 rm -f conftest*
6316
6317
6318 fi
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6320 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6321 if test -z "$AR"; then
6322 if test $gl_cv_c_amsterdam_compiler = yes; then
6323 AR='cc -c.a'
6324 if test -z "$ARFLAGS"; then
6325 ARFLAGS='-o'
6326 fi
6327 else
6328 if test -n "$ac_tool_prefix"; then
6329 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6330 set dummy ${ac_tool_prefix}ar; ac_word=$2
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6332 $as_echo_n "checking for $ac_word... " >&6; }
6333 if test "${ac_cv_prog_AR+set}" = set; then :
6334 $as_echo_n "(cached) " >&6
6335 else
6336 if test -n "$AR"; then
6337 ac_cv_prog_AR="$AR" # Let the user override the test.
6338 else
6339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6340 for as_dir in $PATH
6341 do
6342 IFS=$as_save_IFS
6343 test -z "$as_dir" && as_dir=.
6344 for ac_exec_ext in '' $ac_executable_extensions; do
6345 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6346 ac_cv_prog_AR="${ac_tool_prefix}ar"
6347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6348 break 2
6349 fi
6350 done
6351 done
6352 IFS=$as_save_IFS
6353
6354 fi
6355 fi
6356 AR=$ac_cv_prog_AR
6357 if test -n "$AR"; then
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6359 $as_echo "$AR" >&6; }
6360 else
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362 $as_echo "no" >&6; }
6363 fi
6364
6365
6366 fi
6367 if test -z "$ac_cv_prog_AR"; then
6368 ac_ct_AR=$AR
6369 # Extract the first word of "ar", so it can be a program name with args.
6370 set dummy ar; ac_word=$2
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6372 $as_echo_n "checking for $ac_word... " >&6; }
6373 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6374 $as_echo_n "(cached) " >&6
6375 else
6376 if test -n "$ac_ct_AR"; then
6377 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6378 else
6379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380 for as_dir in $PATH
6381 do
6382 IFS=$as_save_IFS
6383 test -z "$as_dir" && as_dir=.
6384 for ac_exec_ext in '' $ac_executable_extensions; do
6385 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6386 ac_cv_prog_ac_ct_AR="ar"
6387 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6388 break 2
6389 fi
6390 done
6391 done
6392 IFS=$as_save_IFS
6393
6394 fi
6395 fi
6396 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6397 if test -n "$ac_ct_AR"; then
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6399 $as_echo "$ac_ct_AR" >&6; }
6400 else
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402 $as_echo "no" >&6; }
6403 fi
6404
6405 if test "x$ac_ct_AR" = x; then
6406 AR="ar"
6407 else
6408 case $cross_compiling:$ac_tool_warned in
6409 yes:)
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6411 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6412 ac_tool_warned=yes ;;
6413 esac
6414 AR=$ac_ct_AR
6415 fi
6416 else
6417 AR="$ac_cv_prog_AR"
6418 fi
6419
6420 if test -z "$ARFLAGS"; then
6421 ARFLAGS='cru'
6422 fi
6423 fi
6424 else
6425 if test -z "$ARFLAGS"; then
6426 ARFLAGS='cru'
6427 fi
6428 fi
6429
6430
6431 if test -z "$RANLIB"; then
6432 if test $gl_cv_c_amsterdam_compiler = yes; then
6433 RANLIB=':'
6434 else
6435 if test -n "$ac_tool_prefix"; then
6436 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6437 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439 $as_echo_n "checking for $ac_word... " >&6; }
6440 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6441 $as_echo_n "(cached) " >&6
6442 else
6443 if test -n "$RANLIB"; then
6444 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6445 else
6446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6447 for as_dir in $PATH
6448 do
6449 IFS=$as_save_IFS
6450 test -z "$as_dir" && as_dir=.
6451 for ac_exec_ext in '' $ac_executable_extensions; do
6452 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6453 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6455 break 2
6456 fi
6457 done
6458 done
6459 IFS=$as_save_IFS
6460
6461 fi
6462 fi
6463 RANLIB=$ac_cv_prog_RANLIB
6464 if test -n "$RANLIB"; then
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6466 $as_echo "$RANLIB" >&6; }
6467 else
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469 $as_echo "no" >&6; }
6470 fi
6471
6472
6473 fi
6474 if test -z "$ac_cv_prog_RANLIB"; then
6475 ac_ct_RANLIB=$RANLIB
6476 # Extract the first word of "ranlib", so it can be a program name with args.
6477 set dummy ranlib; ac_word=$2
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479 $as_echo_n "checking for $ac_word... " >&6; }
6480 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6481 $as_echo_n "(cached) " >&6
6482 else
6483 if test -n "$ac_ct_RANLIB"; then
6484 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6485 else
6486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487 for as_dir in $PATH
6488 do
6489 IFS=$as_save_IFS
6490 test -z "$as_dir" && as_dir=.
6491 for ac_exec_ext in '' $ac_executable_extensions; do
6492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6493 ac_cv_prog_ac_ct_RANLIB="ranlib"
6494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495 break 2
6496 fi
6497 done
6498 done
6499 IFS=$as_save_IFS
6500
6501 fi
6502 fi
6503 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6504 if test -n "$ac_ct_RANLIB"; then
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6506 $as_echo "$ac_ct_RANLIB" >&6; }
6507 else
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509 $as_echo "no" >&6; }
6510 fi
6511
6512 if test "x$ac_ct_RANLIB" = x; then
6513 RANLIB=":"
6514 else
6515 case $cross_compiling:$ac_tool_warned in
6516 yes:)
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6518 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6519 ac_tool_warned=yes ;;
6520 esac
6521 RANLIB=$ac_ct_RANLIB
6522 fi
6523 else
6524 RANLIB="$ac_cv_prog_RANLIB"
6525 fi
6526
6527 fi
6528 fi
6529
6530
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6532 $as_echo_n "checking for ANSI C header files... " >&6; }
6533 if test "${ac_cv_header_stdc+set}" = set; then :
6534 $as_echo_n "(cached) " >&6
6535 else
6536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6537 /* end confdefs.h. */
6538 #include <stdlib.h>
6539 #include <stdarg.h>
6540 #include <string.h>
6541 #include <float.h>
6542
6543 int
6544 main ()
6545 {
6546
6547 ;
6548 return 0;
6549 }
6550 _ACEOF
6551 if ac_fn_c_try_compile "$LINENO"; then :
6552 ac_cv_header_stdc=yes
6553 else
6554 ac_cv_header_stdc=no
6555 fi
6556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6557
6558 if test $ac_cv_header_stdc = yes; then
6559 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6561 /* end confdefs.h. */
6562 #include <string.h>
6563
6564 _ACEOF
6565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6566 $EGREP "memchr" >/dev/null 2>&1; then :
6567
6568 else
6569 ac_cv_header_stdc=no
6570 fi
6571 rm -f conftest*
6572
6573 fi
6574
6575 if test $ac_cv_header_stdc = yes; then
6576 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6578 /* end confdefs.h. */
6579 #include <stdlib.h>
6580
6581 _ACEOF
6582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6583 $EGREP "free" >/dev/null 2>&1; then :
6584
6585 else
6586 ac_cv_header_stdc=no
6587 fi
6588 rm -f conftest*
6589
6590 fi
6591
6592 if test $ac_cv_header_stdc = yes; then
6593 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6594 if test "$cross_compiling" = yes; then :
6595 :
6596 else
6597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6598 /* end confdefs.h. */
6599 #include <ctype.h>
6600 #include <stdlib.h>
6601 #if ((' ' & 0x0FF) == 0x020)
6602 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6603 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6604 #else
6605 # define ISLOWER(c) \
6606 (('a' <= (c) && (c) <= 'i') \
6607 || ('j' <= (c) && (c) <= 'r') \
6608 || ('s' <= (c) && (c) <= 'z'))
6609 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6610 #endif
6611
6612 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6613 int
6614 main ()
6615 {
6616 int i;
6617 for (i = 0; i < 256; i++)
6618 if (XOR (islower (i), ISLOWER (i))
6619 || toupper (i) != TOUPPER (i))
6620 return 2;
6621 return 0;
6622 }
6623 _ACEOF
6624 if ac_fn_c_try_run "$LINENO"; then :
6625
6626 else
6627 ac_cv_header_stdc=no
6628 fi
6629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6630 conftest.$ac_objext conftest.beam conftest.$ac_ext
6631 fi
6632
6633 fi
6634 fi
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6636 $as_echo "$ac_cv_header_stdc" >&6; }
6637 if test $ac_cv_header_stdc = yes; then
6638
6639 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6640
6641 fi
6642
6643 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6644 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6645 inttypes.h stdint.h unistd.h
6646 do :
6647 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6648 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6649 "
6650 eval as_val=\$$as_ac_Header
6651 if test "x$as_val" = x""yes; then :
6652 cat >>confdefs.h <<_ACEOF
6653 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6654 _ACEOF
6655
6656 fi
6657
6658 done
6659
6660
6661
6662 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6663 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6664 MINIX=yes
6665 else
6666 MINIX=
6667 fi
6668
6669
6670 if test "$MINIX" = yes; then
6671
6672 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6673
6674
6675 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6676
6677
6678 $as_echo "#define _MINIX 1" >>confdefs.h
6679
6680
6681 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6682
6683 fi
6684
6685
6686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6687 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6688 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6689 $as_echo_n "(cached) " >&6
6690 else
6691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6692 /* end confdefs.h. */
6693
6694 # define __EXTENSIONS__ 1
6695 $ac_includes_default
6696 int
6697 main ()
6698 {
6699
6700 ;
6701 return 0;
6702 }
6703 _ACEOF
6704 if ac_fn_c_try_compile "$LINENO"; then :
6705 ac_cv_safe_to_define___extensions__=yes
6706 else
6707 ac_cv_safe_to_define___extensions__=no
6708 fi
6709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6710 fi
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6712 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6713 test $ac_cv_safe_to_define___extensions__ = yes &&
6714 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6715
6716 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6717
6718 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6719
6720 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6721
6722 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6723
6724 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6725
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6727 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6728 if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6729 $as_echo_n "(cached) " >&6
6730 else
6731 ac_cv_should_define__xopen_source=no
6732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6733 /* end confdefs.h. */
6734
6735 #include <wchar.h>
6736 mbstate_t x;
6737 int
6738 main ()
6739 {
6740
6741 ;
6742 return 0;
6743 }
6744 _ACEOF
6745 if ac_fn_c_try_compile "$LINENO"; then :
6746
6747 else
6748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6749 /* end confdefs.h. */
6750
6751 #define _XOPEN_SOURCE 500
6752 #include <wchar.h>
6753 mbstate_t x;
6754 int
6755 main ()
6756 {
6757
6758 ;
6759 return 0;
6760 }
6761 _ACEOF
6762 if ac_fn_c_try_compile "$LINENO"; then :
6763 ac_cv_should_define__xopen_source=yes
6764 fi
6765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6766 fi
6767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6768 fi
6769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6770 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6771 test $ac_cv_should_define__xopen_source = yes &&
6772 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6773
6774
6775
6776
6777
6778
6779
6780
6781 # Check whether --enable-largefile was given.
6782 if test "${enable_largefile+set}" = set; then :
6783 enableval=$enable_largefile;
6784 fi
6785
6786 if test "$enable_largefile" != no; then
6787
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6789 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6790 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6791 $as_echo_n "(cached) " >&6
6792 else
6793 ac_cv_sys_largefile_CC=no
6794 if test "$GCC" != yes; then
6795 ac_save_CC=$CC
6796 while :; do
6797 # IRIX 6.2 and later do not support large files by default,
6798 # so use the C compiler's -n32 option if that helps.
6799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6800 /* end confdefs.h. */
6801 #include <sys/types.h>
6802 /* Check that off_t can represent 2**63 - 1 correctly.
6803 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6804 since some C++ compilers masquerading as C compilers
6805 incorrectly reject 9223372036854775807. */
6806 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6807 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6808 && LARGE_OFF_T % 2147483647 == 1)
6809 ? 1 : -1];
6810 int
6811 main ()
6812 {
6813
6814 ;
6815 return 0;
6816 }
6817 _ACEOF
6818 if ac_fn_c_try_compile "$LINENO"; then :
6819 break
6820 fi
6821 rm -f core conftest.err conftest.$ac_objext
6822 CC="$CC -n32"
6823 if ac_fn_c_try_compile "$LINENO"; then :
6824 ac_cv_sys_largefile_CC=' -n32'; break
6825 fi
6826 rm -f core conftest.err conftest.$ac_objext
6827 break
6828 done
6829 CC=$ac_save_CC
6830 rm -f conftest.$ac_ext
6831 fi
6832 fi
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6834 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6835 if test "$ac_cv_sys_largefile_CC" != no; then
6836 CC=$CC$ac_cv_sys_largefile_CC
6837 fi
6838
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6840 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6841 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6842 $as_echo_n "(cached) " >&6
6843 else
6844 while :; do
6845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6846 /* end confdefs.h. */
6847 #include <sys/types.h>
6848 /* Check that off_t can represent 2**63 - 1 correctly.
6849 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6850 since some C++ compilers masquerading as C compilers
6851 incorrectly reject 9223372036854775807. */
6852 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6853 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6854 && LARGE_OFF_T % 2147483647 == 1)
6855 ? 1 : -1];
6856 int
6857 main ()
6858 {
6859
6860 ;
6861 return 0;
6862 }
6863 _ACEOF
6864 if ac_fn_c_try_compile "$LINENO"; then :
6865 ac_cv_sys_file_offset_bits=no; break
6866 fi
6867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6869 /* end confdefs.h. */
6870 #define _FILE_OFFSET_BITS 64
6871 #include <sys/types.h>
6872 /* Check that off_t can represent 2**63 - 1 correctly.
6873 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6874 since some C++ compilers masquerading as C compilers
6875 incorrectly reject 9223372036854775807. */
6876 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6877 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6878 && LARGE_OFF_T % 2147483647 == 1)
6879 ? 1 : -1];
6880 int
6881 main ()
6882 {
6883
6884 ;
6885 return 0;
6886 }
6887 _ACEOF
6888 if ac_fn_c_try_compile "$LINENO"; then :
6889 ac_cv_sys_file_offset_bits=64; break
6890 fi
6891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6892 ac_cv_sys_file_offset_bits=unknown
6893 break
6894 done
6895 fi
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6897 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6898 case $ac_cv_sys_file_offset_bits in #(
6899 no | unknown) ;;
6900 *)
6901 cat >>confdefs.h <<_ACEOF
6902 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6903 _ACEOF
6904 ;;
6905 esac
6906 rm -rf conftest*
6907 if test $ac_cv_sys_file_offset_bits = unknown; then
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6909 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6910 if test "${ac_cv_sys_large_files+set}" = set; then :
6911 $as_echo_n "(cached) " >&6
6912 else
6913 while :; do
6914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6915 /* end confdefs.h. */
6916 #include <sys/types.h>
6917 /* Check that off_t can represent 2**63 - 1 correctly.
6918 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6919 since some C++ compilers masquerading as C compilers
6920 incorrectly reject 9223372036854775807. */
6921 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6922 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6923 && LARGE_OFF_T % 2147483647 == 1)
6924 ? 1 : -1];
6925 int
6926 main ()
6927 {
6928
6929 ;
6930 return 0;
6931 }
6932 _ACEOF
6933 if ac_fn_c_try_compile "$LINENO"; then :
6934 ac_cv_sys_large_files=no; break
6935 fi
6936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6938 /* end confdefs.h. */
6939 #define _LARGE_FILES 1
6940 #include <sys/types.h>
6941 /* Check that off_t can represent 2**63 - 1 correctly.
6942 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6943 since some C++ compilers masquerading as C compilers
6944 incorrectly reject 9223372036854775807. */
6945 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6946 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6947 && LARGE_OFF_T % 2147483647 == 1)
6948 ? 1 : -1];
6949 int
6950 main ()
6951 {
6952
6953 ;
6954 return 0;
6955 }
6956 _ACEOF
6957 if ac_fn_c_try_compile "$LINENO"; then :
6958 ac_cv_sys_large_files=1; break
6959 fi
6960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6961 ac_cv_sys_large_files=unknown
6962 break
6963 done
6964 fi
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6966 $as_echo "$ac_cv_sys_large_files" >&6; }
6967 case $ac_cv_sys_large_files in #(
6968 no | unknown) ;;
6969 *)
6970 cat >>confdefs.h <<_ACEOF
6971 #define _LARGE_FILES $ac_cv_sys_large_files
6972 _ACEOF
6973 ;;
6974 esac
6975 rm -rf conftest*
6976 fi
6977
6978
6979 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6980
6981 fi
6982
6983 case $ac_cv_prog_cc_stdc in #(
6984 no) :
6985 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6986 *) :
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6988 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6989 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6990 $as_echo_n "(cached) " >&6
6991 else
6992 ac_cv_prog_cc_c99=no
6993 ac_save_CC=$CC
6994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6995 /* end confdefs.h. */
6996 #include <stdarg.h>
6997 #include <stdbool.h>
6998 #include <stdlib.h>
6999 #include <wchar.h>
7000 #include <stdio.h>
7001
7002 // Check varargs macros. These examples are taken from C99 6.10.3.5.
7003 #define debug(...) fprintf (stderr, __VA_ARGS__)
7004 #define showlist(...) puts (#__VA_ARGS__)
7005 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
7006 static void
7007 test_varargs_macros (void)
7008 {
7009 int x = 1234;
7010 int y = 5678;
7011 debug ("Flag");
7012 debug ("X = %d\n", x);
7013 showlist (The first, second, and third items.);
7014 report (x>y, "x is %d but y is %d", x, y);
7015 }
7016
7017 // Check long long types.
7018 #define BIG64 18446744073709551615ull
7019 #define BIG32 4294967295ul
7020 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
7021 #if !BIG_OK
7022 your preprocessor is broken;
7023 #endif
7024 #if BIG_OK
7025 #else
7026 your preprocessor is broken;
7027 #endif
7028 static long long int bignum = -9223372036854775807LL;
7029 static unsigned long long int ubignum = BIG64;
7030
7031 struct incomplete_array
7032 {
7033 int datasize;
7034 double data[];
7035 };
7036
7037 struct named_init {
7038 int number;
7039 const wchar_t *name;
7040 double average;
7041 };
7042
7043 typedef const char *ccp;
7044
7045 static inline int
7046 test_restrict (ccp restrict text)
7047 {
7048 // See if C++-style comments work.
7049 // Iterate through items via the restricted pointer.
7050 // Also check for declarations in for loops.
7051 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7052 continue;
7053 return 0;
7054 }
7055
7056 // Check varargs and va_copy.
7057 static void
7058 test_varargs (const char *format, ...)
7059 {
7060 va_list args;
7061 va_start (args, format);
7062 va_list args_copy;
7063 va_copy (args_copy, args);
7064
7065 const char *str;
7066 int number;
7067 float fnumber;
7068
7069 while (*format)
7070 {
7071 switch (*format++)
7072 {
7073 case 's': // string
7074 str = va_arg (args_copy, const char *);
7075 break;
7076 case 'd': // int
7077 number = va_arg (args_copy, int);
7078 break;
7079 case 'f': // float
7080 fnumber = va_arg (args_copy, double);
7081 break;
7082 default:
7083 break;
7084 }
7085 }
7086 va_end (args_copy);
7087 va_end (args);
7088 }
7089
7090 int
7091 main ()
7092 {
7093
7094 // Check bool.
7095 _Bool success = false;
7096
7097 // Check restrict.
7098 if (test_restrict ("String literal") == 0)
7099 success = true;
7100 char *restrict newvar = "Another string";
7101
7102 // Check varargs.
7103 test_varargs ("s, d' f .", "string", 65, 34.234);
7104 test_varargs_macros ();
7105
7106 // Check flexible array members.
7107 struct incomplete_array *ia =
7108 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7109 ia->datasize = 10;
7110 for (int i = 0; i < ia->datasize; ++i)
7111 ia->data[i] = i * 1.234;
7112
7113 // Check named initializers.
7114 struct named_init ni = {
7115 .number = 34,
7116 .name = L"Test wide string",
7117 .average = 543.34343,
7118 };
7119
7120 ni.number = 58;
7121
7122 int dynamic_array[ni.number];
7123 dynamic_array[ni.number - 1] = 543;
7124
7125 // work around unused variable warnings
7126 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7127 || dynamic_array[ni.number - 1] != 543);
7128
7129 ;
7130 return 0;
7131 }
7132 _ACEOF
7133 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7134 do
7135 CC="$ac_save_CC $ac_arg"
7136 if ac_fn_c_try_compile "$LINENO"; then :
7137 ac_cv_prog_cc_c99=$ac_arg
7138 fi
7139 rm -f core conftest.err conftest.$ac_objext
7140 test "x$ac_cv_prog_cc_c99" != "xno" && break
7141 done
7142 rm -f conftest.$ac_ext
7143 CC=$ac_save_CC
7144
7145 fi
7146 # AC_CACHE_VAL
7147 case "x$ac_cv_prog_cc_c99" in
7148 x)
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7150 $as_echo "none needed" >&6; } ;;
7151 xno)
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7153 $as_echo "unsupported" >&6; } ;;
7154 *)
7155 CC="$CC $ac_cv_prog_cc_c99"
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7157 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7158 esac
7159 if test "x$ac_cv_prog_cc_c99" != xno; then :
7160 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7161 else
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7163 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7164 if test "${ac_cv_prog_cc_c89+set}" = set; then :
7165 $as_echo_n "(cached) " >&6
7166 else
7167 ac_cv_prog_cc_c89=no
7168 ac_save_CC=$CC
7169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7170 /* end confdefs.h. */
7171 #include <stdarg.h>
7172 #include <stdio.h>
7173 #include <sys/types.h>
7174 #include <sys/stat.h>
7175 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7176 struct buf { int x; };
7177 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7178 static char *e (p, i)
7179 char **p;
7180 int i;
7181 {
7182 return p[i];
7183 }
7184 static char *f (char * (*g) (char **, int), char **p, ...)
7185 {
7186 char *s;
7187 va_list v;
7188 va_start (v,p);
7189 s = g (p, va_arg (v,int));
7190 va_end (v);
7191 return s;
7192 }
7193
7194 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7195 function prototypes and stuff, but not '\xHH' hex character constants.
7196 These don't provoke an error unfortunately, instead are silently treated
7197 as 'x'. The following induces an error, until -std is added to get
7198 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7199 array size at least. It's necessary to write '\x00'==0 to get something
7200 that's true only with -std. */
7201 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7202
7203 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7204 inside strings and character constants. */
7205 #define FOO(x) 'x'
7206 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7207
7208 int test (int i, double x);
7209 struct s1 {int (*f) (int a);};
7210 struct s2 {int (*f) (double a);};
7211 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7212 int argc;
7213 char **argv;
7214 int
7215 main ()
7216 {
7217 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7218 ;
7219 return 0;
7220 }
7221 _ACEOF
7222 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7223 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7224 do
7225 CC="$ac_save_CC $ac_arg"
7226 if ac_fn_c_try_compile "$LINENO"; then :
7227 ac_cv_prog_cc_c89=$ac_arg
7228 fi
7229 rm -f core conftest.err conftest.$ac_objext
7230 test "x$ac_cv_prog_cc_c89" != "xno" && break
7231 done
7232 rm -f conftest.$ac_ext
7233 CC=$ac_save_CC
7234
7235 fi
7236 # AC_CACHE_VAL
7237 case "x$ac_cv_prog_cc_c89" in
7238 x)
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7240 $as_echo "none needed" >&6; } ;;
7241 xno)
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7243 $as_echo "unsupported" >&6; } ;;
7244 *)
7245 CC="$CC $ac_cv_prog_cc_c89"
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7247 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7248 esac
7249 if test "x$ac_cv_prog_cc_c89" != xno; then :
7250 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7251 else
7252 ac_cv_prog_cc_stdc=no
7253 fi
7254
7255 fi
7256 ;;
7257 esac
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7259 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
7260 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
7261 $as_echo_n "(cached) " >&6
7262 fi
7263
7264 case $ac_cv_prog_cc_stdc in #(
7265 no) :
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7267 $as_echo "unsupported" >&6; } ;; #(
7268 '') :
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7270 $as_echo "none needed" >&6; } ;; #(
7271 *) :
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7273 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7274 esac
7275
7276
7277
7278 # Code from module alloca-opt:
7279 # Code from module allocator:
7280 # Code from module at-internal:
7281 # Code from module binary-io:
7282 # Code from module c-ctype:
7283 # Code from module c-strcase:
7284 # Code from module careadlinkat:
7285 # Code from module clock-time:
7286 # Code from module close-stream:
7287 # Code from module crypto/md5:
7288 # Code from module crypto/sha1:
7289 # Code from module crypto/sha256:
7290 # Code from module crypto/sha512:
7291 # Code from module dirent:
7292 # Code from module dosname:
7293 # Code from module dtoastr:
7294 # Code from module dtotimespec:
7295 # Code from module dup2:
7296 # Code from module environ:
7297 # Code from module errno:
7298 # Code from module euidaccess:
7299 # Code from module execinfo:
7300 # Code from module extensions:
7301
7302 # Code from module extern-inline:
7303 # Code from module faccessat:
7304 # Code from module fcntl:
7305 # Code from module fcntl-h:
7306 # Code from module fdatasync:
7307 # Code from module fdopendir:
7308 # Code from module filemode:
7309 # Code from module fpending:
7310 # Code from module fstatat:
7311 # Code from module fsync:
7312 # Code from module getdtablesize:
7313 # Code from module getgroups:
7314 # Code from module getloadavg:
7315 # Code from module getopt-gnu:
7316 # Code from module getopt-posix:
7317 # Code from module gettext-h:
7318 # Code from module gettime:
7319 # Code from module gettimeofday:
7320 # Code from module group-member:
7321 # Code from module include_next:
7322 # Code from module intprops:
7323 # Code from module inttypes-incomplete:
7324 # Code from module largefile:
7325
7326 # Code from module lstat:
7327 # Code from module manywarnings:
7328 # Code from module memrchr:
7329 # Code from module mkostemp:
7330 # Code from module mktime:
7331 # Code from module multiarch:
7332 # Code from module nocrash:
7333 # Code from module openat-h:
7334 # Code from module pathmax:
7335 # Code from module pipe2:
7336 # Code from module pselect:
7337 # Code from module pthread_sigmask:
7338 # Code from module putenv:
7339 # Code from module qacl:
7340 # Code from module readlink:
7341 # Code from module readlinkat:
7342 # Code from module root-uid:
7343 # Code from module secure_getenv:
7344 # Code from module sig2str:
7345 # Code from module signal-h:
7346 # Code from module snippet/_Noreturn:
7347 # Code from module snippet/arg-nonnull:
7348 # Code from module snippet/c++defs:
7349 # Code from module snippet/warn-on-use:
7350 # Code from module socklen:
7351 # Code from module ssize_t:
7352 # Code from module stat:
7353 # Code from module stat-time:
7354 # Code from module stdalign:
7355 # Code from module stdarg:
7356
7357
7358
7359 # Code from module stdbool:
7360 # Code from module stddef:
7361 # Code from module stdint:
7362 # Code from module stdio:
7363 # Code from module stdlib:
7364 # Code from module strftime:
7365 # Code from module string:
7366 # Code from module strtoimax:
7367 # Code from module strtoll:
7368 # Code from module strtoull:
7369 # Code from module strtoumax:
7370 # Code from module symlink:
7371 # Code from module sys_select:
7372 # Code from module sys_stat:
7373 # Code from module sys_time:
7374 # Code from module tempname:
7375 # Code from module time:
7376 # Code from module time_r:
7377 # Code from module timer-time:
7378 # Code from module timespec:
7379 # Code from module timespec-add:
7380 # Code from module timespec-sub:
7381 # Code from module u64:
7382 # Code from module unistd:
7383 # Code from module unsetenv:
7384 # Code from module utimens:
7385 # Code from module verify:
7386 # Code from module warnings:
7387 # Code from module xalloc-oversized:
7388
7389
7390 if test "$ac_test_CFLAGS" != set; then
7391 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7392 # if -g3 works and the user does not specify CFLAGS.
7393 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7394 case $CFLAGS in
7395 '-g')
7396 emacs_g3_CFLAGS='-g3';;
7397 '-g -O2')
7398 emacs_g3_CFLAGS='-g3 -O2';;
7399 *)
7400 emacs_g3_CFLAGS='';;
7401 esac
7402 if test -n "$emacs_g3_CFLAGS"; then
7403 emacs_save_CFLAGS=$CFLAGS
7404 CFLAGS=$emacs_g3_CFLAGS
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7406 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7407 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7408 $as_echo_n "(cached) " >&6
7409 else
7410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7411 /* end confdefs.h. */
7412
7413 int
7414 main ()
7415 {
7416
7417 ;
7418 return 0;
7419 }
7420 _ACEOF
7421 if ac_fn_c_try_link "$LINENO"; then :
7422 emacs_cv_prog_cc_g3=yes
7423 else
7424 emacs_cv_prog_cc_g3=no
7425 fi
7426 rm -f core conftest.err conftest.$ac_objext \
7427 conftest$ac_exeext conftest.$ac_ext
7428 fi
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7430 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7431 if test $emacs_cv_prog_cc_g3 != yes; then
7432 CFLAGS=$emacs_save_CFLAGS
7433 fi
7434 if test $opsys = mingw32; then
7435 CFLAGS="$CFLAGS -gdwarf-2"
7436 fi
7437 fi
7438
7439 case $CFLAGS in
7440 *-O*) ;;
7441 *)
7442 # No optimization flag was inferred for this non-GCC compiler.
7443 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7444 emacs_save_CFLAGS=$CFLAGS
7445 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7446 CFLAGS=${CFLAGS}-O
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7448 $as_echo_n "checking whether $CC accepts -O... " >&6; }
7449 if test "${emacs_cv_prog_cc_o+set}" = set; then :
7450 $as_echo_n "(cached) " >&6
7451 else
7452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7453 /* end confdefs.h. */
7454
7455 int
7456 main ()
7457 {
7458
7459 ;
7460 return 0;
7461 }
7462 _ACEOF
7463 if ac_fn_c_try_link "$LINENO"; then :
7464 emacs_cv_prog_cc_o=yes
7465 else
7466 emacs_cv_prog_cc_o=no
7467 fi
7468 rm -f core conftest.err conftest.$ac_objext \
7469 conftest$ac_exeext conftest.$ac_ext
7470 fi
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7472 $as_echo "$emacs_cv_prog_cc_o" >&6; }
7473 if test $emacs_cv_prog_cc_o != yes; then
7474 CFLAGS=$emacs_save_CFLAGS
7475 fi ;;
7476 esac
7477 fi
7478
7479 # Check whether --enable-gcc-warnings was given.
7480 if test "${enable_gcc_warnings+set}" = set; then :
7481 enableval=$enable_gcc_warnings; case $enableval in
7482 yes|no) ;;
7483 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7484 esac
7485 gl_gcc_warnings=$enableval
7486 else
7487 gl_gcc_warnings=no
7488
7489 fi
7490
7491
7492 # Check whether --enable-link-time-optimization was given.
7493 if test "${enable_link_time_optimization+set}" = set; then :
7494 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7496 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7497 ac_lto_supported=no
7498 if test x$GCC = xyes; then
7499 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7500 if test x$CPUS != x; then
7501 LTO="-flto=$CPUS"
7502 else
7503 LTO="-flto"
7504 fi
7505 old_CFLAGS=$CFLAGS
7506 CFLAGS="$CFLAGS $LTO"
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508 /* end confdefs.h. */
7509
7510 int
7511 main ()
7512 {
7513
7514 ;
7515 return 0;
7516 }
7517 _ACEOF
7518 if ac_fn_c_try_compile "$LINENO"; then :
7519 ac_lto_supported=yes
7520 else
7521 ac_lto_supported=no
7522 fi
7523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7524 CFLAGS="$old_CFLAGS"
7525 fi
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7527 $as_echo "$ac_lto_supported" >&6; }
7528 if test "$ac_lto_supported" = "yes"; then
7529 CFLAGS="$CFLAGS $LTO"
7530 fi
7531 fi
7532 fi
7533
7534
7535 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7536 # ------------------------------------------------
7537 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7538 # Otherwise, run RUN-IF-NOT-FOUND.
7539
7540
7541 # When compiling with GCC, prefer -isystem to -I when including system
7542 # include files, to avoid generating useless diagnostics for the files.
7543 if test "$gl_gcc_warnings" != yes; then
7544 isystem='-I'
7545 else
7546 isystem='-isystem '
7547
7548 # This, $nw, is the list of warnings we disable.
7549 nw=
7550
7551 case $with_x_toolkit in
7552 lucid | athena | motif)
7553 # Old toolkits mishandle 'const'.
7554 nw="$nw -Wwrite-strings"
7555 ;;
7556 *)
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7558 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7559 if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7560 $as_echo_n "(cached) " >&6
7561 else
7562
7563 gl_save_compiler_FLAGS="$CFLAGS"
7564 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7566 /* end confdefs.h. */
7567
7568 int
7569 main ()
7570 {
7571
7572 ;
7573 return 0;
7574 }
7575 _ACEOF
7576 if ac_fn_c_try_compile "$LINENO"; then :
7577 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7578 else
7579 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7580 fi
7581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7582 CFLAGS="$gl_save_compiler_FLAGS"
7583
7584 fi
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7586 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7587 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7588 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7589 else
7590 gl_unknown_warnings_are_errors=
7591 fi
7592
7593
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7595 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7596 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7597 $as_echo_n "(cached) " >&6
7598 else
7599
7600 gl_save_compiler_FLAGS="$CFLAGS"
7601 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7603 /* end confdefs.h. */
7604
7605 int
7606 main ()
7607 {
7608
7609 ;
7610 return 0;
7611 }
7612 _ACEOF
7613 if ac_fn_c_try_compile "$LINENO"; then :
7614 gl_cv_warn_c__Werror=yes
7615 else
7616 gl_cv_warn_c__Werror=no
7617 fi
7618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7619 CFLAGS="$gl_save_compiler_FLAGS"
7620
7621 fi
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7623 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7624 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7625 as_fn_append WERROR_CFLAGS " -Werror"
7626 fi
7627
7628
7629 ;;
7630 esac
7631
7632
7633 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7634 nw="$nw -Woverlength-strings" # Not a problem these days
7635 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7636 nw="$nw -Wformat-nonliteral" # we do this a lot
7637 nw="$nw -Wvla" # warnings in gettext.h
7638 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7639 nw="$nw -Wswitch-default" # Too many warnings for now
7640 nw="$nw -Winline" # OK to ignore 'inline'
7641 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7642 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7643 # signed overflow has undefined behavior
7644 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7645 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7646 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
7647
7648 # Emacs doesn't care about shadowing; see
7649 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7650 nw="$nw -Wshadow"
7651
7652 # Emacs's use of alloca inhibits protecting the stack.
7653 nw="$nw -Wstack-protector"
7654
7655 # The following line should be removable at some point.
7656 nw="$nw -Wsuggest-attribute=pure"
7657
7658 # clang is unduly picky about some things.
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7660 $as_echo_n "checking whether the compiler is clang... " >&6; }
7661 if test "${emacs_cv_clang+set}" = set; then :
7662 $as_echo_n "(cached) " >&6
7663 else
7664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7665 /* end confdefs.h. */
7666
7667 #ifndef __clang__
7668 #error "not clang"
7669 #endif
7670
7671 int
7672 main ()
7673 {
7674
7675 ;
7676 return 0;
7677 }
7678 _ACEOF
7679 if ac_fn_c_try_compile "$LINENO"; then :
7680 emacs_cv_clang=yes
7681 else
7682 emacs_cv_clang=no
7683 fi
7684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7685 fi
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7687 $as_echo "$emacs_cv_clang" >&6; }
7688 if test $emacs_cv_clang = yes; then
7689 nw="$nw -Wcast-align"
7690 fi
7691
7692
7693
7694 if test -n "$GCC"; then
7695
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7697 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7698 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7699 $as_echo_n "(cached) " >&6
7700 else
7701
7702 gl_save_CFLAGS="$CFLAGS"
7703 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7705 /* end confdefs.h. */
7706
7707 int
7708 main ()
7709 {
7710
7711 ;
7712 return 0;
7713 }
7714 _ACEOF
7715 if ac_fn_c_try_compile "$LINENO"; then :
7716 gl_cv_cc_nomfi_supported=yes
7717 else
7718 gl_cv_cc_nomfi_supported=no
7719 fi
7720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7721 CFLAGS="$gl_save_CFLAGS"
7722 fi
7723
7724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7725 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7726
7727 if test "$gl_cv_cc_nomfi_supported" = yes; then
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7729 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7730 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7731 $as_echo_n "(cached) " >&6
7732 else
7733
7734 gl_save_CFLAGS="$CFLAGS"
7735 CFLAGS="$CFLAGS -W -Werror"
7736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7737 /* end confdefs.h. */
7738 void f (void)
7739 {
7740 typedef struct { int a; int b; } s_t;
7741 s_t s1 = { 0, };
7742 }
7743
7744 int
7745 main ()
7746 {
7747
7748 ;
7749 return 0;
7750 }
7751 _ACEOF
7752 if ac_fn_c_try_compile "$LINENO"; then :
7753 gl_cv_cc_nomfi_needed=no
7754 else
7755 gl_cv_cc_nomfi_needed=yes
7756 fi
7757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7758 CFLAGS="$gl_save_CFLAGS"
7759
7760 fi
7761
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7763 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7764 fi
7765
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7767 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7768 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7769 $as_echo_n "(cached) " >&6
7770 else
7771
7772 gl_save_CFLAGS="$CFLAGS"
7773 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7775 /* end confdefs.h. */
7776
7777 int
7778 main ()
7779 {
7780
7781 ;
7782 return 0;
7783 }
7784 _ACEOF
7785 if ac_fn_c_try_compile "$LINENO"; then :
7786 gl_cv_cc_uninitialized_supported=yes
7787 else
7788 gl_cv_cc_uninitialized_supported=no
7789 fi
7790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7791 CFLAGS="$gl_save_CFLAGS"
7792 fi
7793
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7795 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7796
7797 fi
7798
7799 # List all gcc warning categories.
7800 gl_manywarn_set=
7801 for gl_manywarn_item in \
7802 -W \
7803 -Wabi \
7804 -Waddress \
7805 -Waggressive-loop-optimizations \
7806 -Wall \
7807 -Warray-bounds \
7808 -Wattributes \
7809 -Wbad-function-cast \
7810 -Wbuiltin-macro-redefined \
7811 -Wcast-align \
7812 -Wchar-subscripts \
7813 -Wclobbered \
7814 -Wcomment \
7815 -Wcomments \
7816 -Wcoverage-mismatch \
7817 -Wcpp \
7818 -Wdeprecated \
7819 -Wdeprecated-declarations \
7820 -Wdisabled-optimization \
7821 -Wdiv-by-zero \
7822 -Wdouble-promotion \
7823 -Wempty-body \
7824 -Wendif-labels \
7825 -Wenum-compare \
7826 -Wextra \
7827 -Wformat-contains-nul \
7828 -Wformat-extra-args \
7829 -Wformat-nonliteral \
7830 -Wformat-security \
7831 -Wformat-y2k \
7832 -Wformat-zero-length \
7833 -Wfree-nonheap-object \
7834 -Wignored-qualifiers \
7835 -Wimplicit \
7836 -Wimplicit-function-declaration \
7837 -Wimplicit-int \
7838 -Winit-self \
7839 -Winline \
7840 -Wint-to-pointer-cast \
7841 -Winvalid-memory-model \
7842 -Winvalid-pch \
7843 -Wjump-misses-init \
7844 -Wlogical-op \
7845 -Wmain \
7846 -Wmaybe-uninitialized \
7847 -Wmissing-braces \
7848 -Wmissing-declarations \
7849 -Wmissing-field-initializers \
7850 -Wmissing-include-dirs \
7851 -Wmissing-parameter-type \
7852 -Wmissing-prototypes \
7853 -Wmudflap \
7854 -Wmultichar \
7855 -Wnarrowing \
7856 -Wnested-externs \
7857 -Wnonnull \
7858 -Wnormalized=nfc \
7859 -Wold-style-declaration \
7860 -Wold-style-definition \
7861 -Woverflow \
7862 -Woverlength-strings \
7863 -Woverride-init \
7864 -Wpacked \
7865 -Wpacked-bitfield-compat \
7866 -Wparentheses \
7867 -Wpointer-arith \
7868 -Wpointer-sign \
7869 -Wpointer-to-int-cast \
7870 -Wpragmas \
7871 -Wreturn-local-addr \
7872 -Wreturn-type \
7873 -Wsequence-point \
7874 -Wshadow \
7875 -Wsizeof-pointer-memaccess \
7876 -Wstack-protector \
7877 -Wstrict-aliasing \
7878 -Wstrict-overflow \
7879 -Wstrict-prototypes \
7880 -Wsuggest-attribute=const \
7881 -Wsuggest-attribute=format \
7882 -Wsuggest-attribute=noreturn \
7883 -Wsuggest-attribute=pure \
7884 -Wswitch \
7885 -Wswitch-default \
7886 -Wsync-nand \
7887 -Wsystem-headers \
7888 -Wtrampolines \
7889 -Wtrigraphs \
7890 -Wtype-limits \
7891 -Wuninitialized \
7892 -Wunknown-pragmas \
7893 -Wunsafe-loop-optimizations \
7894 -Wunused \
7895 -Wunused-but-set-parameter \
7896 -Wunused-but-set-variable \
7897 -Wunused-function \
7898 -Wunused-label \
7899 -Wunused-local-typedefs \
7900 -Wunused-macros \
7901 -Wunused-parameter \
7902 -Wunused-result \
7903 -Wunused-value \
7904 -Wunused-variable \
7905 -Wvarargs \
7906 -Wvariadic-macros \
7907 -Wvector-operation-performance \
7908 -Wvla \
7909 -Wvolatile-register-var \
7910 -Wwrite-strings \
7911 \
7912 ; do
7913 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7914 done
7915
7916 # Disable specific options as needed.
7917 if test "$gl_cv_cc_nomfi_needed" = yes; then
7918 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7919 fi
7920
7921 if test "$gl_cv_cc_uninitialized_supported" = no; then
7922 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7923 fi
7924
7925 ws=$gl_manywarn_set
7926
7927
7928 gl_warn_set=
7929 set x $ws; shift
7930 for gl_warn_item
7931 do
7932 case " $nw " in
7933 *" $gl_warn_item "*)
7934 ;;
7935 *)
7936 gl_warn_set="$gl_warn_set $gl_warn_item"
7937 ;;
7938 esac
7939 done
7940 ws=$gl_warn_set
7941
7942 for w in $ws; do
7943
7944 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7945 gl_positive="$w"
7946 case $gl_positive in
7947 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7948 esac
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7950 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7951 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7952 $as_echo_n "(cached) " >&6
7953 else
7954
7955 gl_save_compiler_FLAGS="$CFLAGS"
7956 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
7957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7958 /* end confdefs.h. */
7959
7960 int
7961 main ()
7962 {
7963
7964 ;
7965 return 0;
7966 }
7967 _ACEOF
7968 if ac_fn_c_try_compile "$LINENO"; then :
7969 eval "$as_gl_Warn=yes"
7970 else
7971 eval "$as_gl_Warn=no"
7972 fi
7973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7974 CFLAGS="$gl_save_compiler_FLAGS"
7975
7976 fi
7977 eval ac_res=\$$as_gl_Warn
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7979 $as_echo "$ac_res" >&6; }
7980 eval as_val=\$$as_gl_Warn
7981 if test "x$as_val" = x""yes; then :
7982 as_fn_append WARN_CFLAGS " $w"
7983 fi
7984
7985
7986 done
7987
7988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7989 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7990 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7991 $as_echo_n "(cached) " >&6
7992 else
7993
7994 gl_save_compiler_FLAGS="$CFLAGS"
7995 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
7996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7997 /* end confdefs.h. */
7998
7999 int
8000 main ()
8001 {
8002
8003 ;
8004 return 0;
8005 }
8006 _ACEOF
8007 if ac_fn_c_try_compile "$LINENO"; then :
8008 gl_cv_warn_c__Wno_missing_field_initializers=yes
8009 else
8010 gl_cv_warn_c__Wno_missing_field_initializers=no
8011 fi
8012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8013 CFLAGS="$gl_save_compiler_FLAGS"
8014
8015 fi
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
8017 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
8018 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
8019 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
8020 fi
8021
8022 # We need this one
8023
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
8025 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
8026 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
8027 $as_echo_n "(cached) " >&6
8028 else
8029
8030 gl_save_compiler_FLAGS="$CFLAGS"
8031 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
8032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8033 /* end confdefs.h. */
8034
8035 int
8036 main ()
8037 {
8038
8039 ;
8040 return 0;
8041 }
8042 _ACEOF
8043 if ac_fn_c_try_compile "$LINENO"; then :
8044 gl_cv_warn_c__Wno_sign_compare=yes
8045 else
8046 gl_cv_warn_c__Wno_sign_compare=no
8047 fi
8048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8049 CFLAGS="$gl_save_compiler_FLAGS"
8050
8051 fi
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
8053 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
8054 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
8055 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
8056 fi
8057
8058 # Too many warnings for now
8059
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
8061 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8062 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8063 $as_echo_n "(cached) " >&6
8064 else
8065
8066 gl_save_compiler_FLAGS="$CFLAGS"
8067 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
8068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8069 /* end confdefs.h. */
8070
8071 int
8072 main ()
8073 {
8074
8075 ;
8076 return 0;
8077 }
8078 _ACEOF
8079 if ac_fn_c_try_compile "$LINENO"; then :
8080 gl_cv_warn_c__Wno_type_limits=yes
8081 else
8082 gl_cv_warn_c__Wno_type_limits=no
8083 fi
8084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8085 CFLAGS="$gl_save_compiler_FLAGS"
8086
8087 fi
8088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8089 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8090 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8091 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8092 fi
8093
8094 # Too many warnings for now
8095
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
8097 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8098 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8099 $as_echo_n "(cached) " >&6
8100 else
8101
8102 gl_save_compiler_FLAGS="$CFLAGS"
8103 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
8104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8105 /* end confdefs.h. */
8106
8107 int
8108 main ()
8109 {
8110
8111 ;
8112 return 0;
8113 }
8114 _ACEOF
8115 if ac_fn_c_try_compile "$LINENO"; then :
8116 gl_cv_warn_c__Wno_switch=yes
8117 else
8118 gl_cv_warn_c__Wno_switch=no
8119 fi
8120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8121 CFLAGS="$gl_save_compiler_FLAGS"
8122
8123 fi
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8125 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8126 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8127 as_fn_append WARN_CFLAGS " -Wno-switch"
8128 fi
8129
8130 # Too many warnings for now
8131
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
8133 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8134 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8135 $as_echo_n "(cached) " >&6
8136 else
8137
8138 gl_save_compiler_FLAGS="$CFLAGS"
8139 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
8140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8141 /* end confdefs.h. */
8142
8143 int
8144 main ()
8145 {
8146
8147 ;
8148 return 0;
8149 }
8150 _ACEOF
8151 if ac_fn_c_try_compile "$LINENO"; then :
8152 gl_cv_warn_c__Wno_unused_parameter=yes
8153 else
8154 gl_cv_warn_c__Wno_unused_parameter=no
8155 fi
8156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8157 CFLAGS="$gl_save_compiler_FLAGS"
8158
8159 fi
8160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8161 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8162 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8163 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8164 fi
8165
8166 # Too many warnings for now
8167
8168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
8169 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8170 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8171 $as_echo_n "(cached) " >&6
8172 else
8173
8174 gl_save_compiler_FLAGS="$CFLAGS"
8175 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
8176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8177 /* end confdefs.h. */
8178
8179 int
8180 main ()
8181 {
8182
8183 ;
8184 return 0;
8185 }
8186 _ACEOF
8187 if ac_fn_c_try_compile "$LINENO"; then :
8188 gl_cv_warn_c__Wno_format_nonliteral=yes
8189 else
8190 gl_cv_warn_c__Wno_format_nonliteral=no
8191 fi
8192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8193 CFLAGS="$gl_save_compiler_FLAGS"
8194
8195 fi
8196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8197 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8198 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8199 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8200 fi
8201
8202
8203
8204 # In spite of excluding -Wlogical-op above, it is enabled, as of
8205 # gcc 4.5.0 20090517.
8206
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
8208 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8209 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8210 $as_echo_n "(cached) " >&6
8211 else
8212
8213 gl_save_compiler_FLAGS="$CFLAGS"
8214 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
8215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216 /* end confdefs.h. */
8217
8218 int
8219 main ()
8220 {
8221
8222 ;
8223 return 0;
8224 }
8225 _ACEOF
8226 if ac_fn_c_try_compile "$LINENO"; then :
8227 gl_cv_warn_c__Wno_logical_op=yes
8228 else
8229 gl_cv_warn_c__Wno_logical_op=no
8230 fi
8231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8232 CFLAGS="$gl_save_compiler_FLAGS"
8233
8234 fi
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8236 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8237 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8238 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8239 fi
8240
8241
8242
8243 # More things that clang is unduly picky about.
8244 if test $emacs_cv_clang = yes; then
8245
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8247 $as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8248 if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8249 $as_echo_n "(cached) " >&6
8250 else
8251
8252 gl_save_compiler_FLAGS="$CFLAGS"
8253 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
8254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8255 /* end confdefs.h. */
8256
8257 int
8258 main ()
8259 {
8260
8261 ;
8262 return 0;
8263 }
8264 _ACEOF
8265 if ac_fn_c_try_compile "$LINENO"; then :
8266 gl_cv_warn_c__Wno_format_extra_args=yes
8267 else
8268 gl_cv_warn_c__Wno_format_extra_args=no
8269 fi
8270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8271 CFLAGS="$gl_save_compiler_FLAGS"
8272
8273 fi
8274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8275 $as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8276 if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8277 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8278 fi
8279
8280
8281
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8283 $as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8284 if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8285 $as_echo_n "(cached) " >&6
8286 else
8287
8288 gl_save_compiler_FLAGS="$CFLAGS"
8289 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
8290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8291 /* end confdefs.h. */
8292
8293 int
8294 main ()
8295 {
8296
8297 ;
8298 return 0;
8299 }
8300 _ACEOF
8301 if ac_fn_c_try_compile "$LINENO"; then :
8302 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8303 else
8304 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8305 fi
8306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8307 CFLAGS="$gl_save_compiler_FLAGS"
8308
8309 fi
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8311 $as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8312 if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8313 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8314 fi
8315
8316
8317
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8319 $as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8320 if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8321 $as_echo_n "(cached) " >&6
8322 else
8323
8324 gl_save_compiler_FLAGS="$CFLAGS"
8325 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-command-line-argument"
8326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8327 /* end confdefs.h. */
8328
8329 int
8330 main ()
8331 {
8332
8333 ;
8334 return 0;
8335 }
8336 _ACEOF
8337 if ac_fn_c_try_compile "$LINENO"; then :
8338 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8339 else
8340 gl_cv_warn_c__Wno_unused_command_line_argument=no
8341 fi
8342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8343 CFLAGS="$gl_save_compiler_FLAGS"
8344
8345 fi
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8347 $as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8348 if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8349 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8350 fi
8351
8352
8353
8354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8355 $as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8356 if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8357 $as_echo_n "(cached) " >&6
8358 else
8359
8360 gl_save_compiler_FLAGS="$CFLAGS"
8361 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-value"
8362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8363 /* end confdefs.h. */
8364
8365 int
8366 main ()
8367 {
8368
8369 ;
8370 return 0;
8371 }
8372 _ACEOF
8373 if ac_fn_c_try_compile "$LINENO"; then :
8374 gl_cv_warn_c__Wno_unused_value=yes
8375 else
8376 gl_cv_warn_c__Wno_unused_value=no
8377 fi
8378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8379 CFLAGS="$gl_save_compiler_FLAGS"
8380
8381 fi
8382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8383 $as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8384 if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8385 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8386 fi
8387
8388
8389 fi
8390
8391
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8393 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8394 if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8395 $as_echo_n "(cached) " >&6
8396 else
8397
8398 gl_save_compiler_FLAGS="$CFLAGS"
8399 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
8400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8401 /* end confdefs.h. */
8402
8403 int
8404 main ()
8405 {
8406
8407 ;
8408 return 0;
8409 }
8410 _ACEOF
8411 if ac_fn_c_try_compile "$LINENO"; then :
8412 gl_cv_warn_c__fdiagnostics_show_option=yes
8413 else
8414 gl_cv_warn_c__fdiagnostics_show_option=no
8415 fi
8416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8417 CFLAGS="$gl_save_compiler_FLAGS"
8418
8419 fi
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8421 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8422 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8423 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
8424 fi
8425
8426
8427
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8429 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8430 if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8431 $as_echo_n "(cached) " >&6
8432 else
8433
8434 gl_save_compiler_FLAGS="$CFLAGS"
8435 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
8436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8437 /* end confdefs.h. */
8438
8439 int
8440 main ()
8441 {
8442
8443 ;
8444 return 0;
8445 }
8446 _ACEOF
8447 if ac_fn_c_try_compile "$LINENO"; then :
8448 gl_cv_warn_c__funit_at_a_time=yes
8449 else
8450 gl_cv_warn_c__funit_at_a_time=no
8451 fi
8452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8453 CFLAGS="$gl_save_compiler_FLAGS"
8454
8455 fi
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8457 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8458 if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8459 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8460 fi
8461
8462
8463
8464
8465 $as_echo "#define lint 1" >>confdefs.h
8466
8467
8468
8469 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8470
8471
8472 # We use a slightly smaller set of warning options for lib/.
8473 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8474 nw=
8475 nw="$nw -Wunused-macros"
8476
8477
8478 gl_warn_set=
8479 set x $WARN_CFLAGS; shift
8480 for gl_warn_item
8481 do
8482 case " $nw " in
8483 *" $gl_warn_item "*)
8484 ;;
8485 *)
8486 gl_warn_set="$gl_warn_set $gl_warn_item"
8487 ;;
8488 esac
8489 done
8490 GNULIB_WARN_CFLAGS=$gl_warn_set
8491
8492
8493 fi
8494
8495
8496
8497
8498
8499
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8501 $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8502 rm -f conf$$ conf$$.file
8503
8504 LN_S_FILEONLY='cp -p'
8505
8506 if (echo >conf$$.file) 2>/dev/null; then
8507 if ln -s conf$$.file conf$$ 2>/dev/null; then
8508 LN_S_FILEONLY='ln -s'
8509 elif ln conf$$.file conf$$ 2>/dev/null; then
8510 LN_S_FILEONLY=ln
8511 fi
8512 fi
8513
8514 rm -f conf$$ conf$$.file
8515
8516 if test "$LN_S_FILEONLY" = "ln -s"; then
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8518 $as_echo "yes" >&6; }
8519 else
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8521 $as_echo "no, using $LN_S_FILEONLY" >&6; }
8522 fi
8523
8524
8525
8526
8527 if test "$opsys" = "mingw32"; then
8528 LN_S="ln"
8529 fi
8530
8531 # Extract the first word of "install-info", so it can be a program name with args.
8532 set dummy install-info; ac_word=$2
8533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8534 $as_echo_n "checking for $ac_word... " >&6; }
8535 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
8536 $as_echo_n "(cached) " >&6
8537 else
8538 case $INSTALL_INFO in
8539 [\\/]* | ?:[\\/]*)
8540 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8541 ;;
8542 *)
8543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8544 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
8545 do
8546 IFS=$as_save_IFS
8547 test -z "$as_dir" && as_dir=.
8548 for ac_exec_ext in '' $ac_executable_extensions; do
8549 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8550 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8552 break 2
8553 fi
8554 done
8555 done
8556 IFS=$as_save_IFS
8557
8558 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8559 ;;
8560 esac
8561 fi
8562 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8563 if test -n "$INSTALL_INFO"; then
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8565 $as_echo "$INSTALL_INFO" >&6; }
8566 else
8567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8568 $as_echo "no" >&6; }
8569 fi
8570
8571
8572 # Extract the first word of "gzip", so it can be a program name with args.
8573 set dummy gzip; ac_word=$2
8574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8575 $as_echo_n "checking for $ac_word... " >&6; }
8576 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
8577 $as_echo_n "(cached) " >&6
8578 else
8579 case $GZIP_PROG in
8580 [\\/]* | ?:[\\/]*)
8581 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8582 ;;
8583 *)
8584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8585 for as_dir in $PATH
8586 do
8587 IFS=$as_save_IFS
8588 test -z "$as_dir" && as_dir=.
8589 for ac_exec_ext in '' $ac_executable_extensions; do
8590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8591 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8593 break 2
8594 fi
8595 done
8596 done
8597 IFS=$as_save_IFS
8598
8599 ;;
8600 esac
8601 fi
8602 GZIP_PROG=$ac_cv_path_GZIP_PROG
8603 if test -n "$GZIP_PROG"; then
8604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8605 $as_echo "$GZIP_PROG" >&6; }
8606 else
8607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8608 $as_echo "no" >&6; }
8609 fi
8610
8611
8612
8613 if test $opsys = gnu-linux; then
8614 # Extract the first word of "paxctl", so it can be a program name with args.
8615 set dummy paxctl; ac_word=$2
8616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8617 $as_echo_n "checking for $ac_word... " >&6; }
8618 if test "${ac_cv_path_PAXCTL+set}" = set; then :
8619 $as_echo_n "(cached) " >&6
8620 else
8621 case $PAXCTL in
8622 [\\/]* | ?:[\\/]*)
8623 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8624 ;;
8625 *)
8626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8627 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8628 do
8629 IFS=$as_save_IFS
8630 test -z "$as_dir" && as_dir=.
8631 for ac_exec_ext in '' $ac_executable_extensions; do
8632 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8633 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8635 break 2
8636 fi
8637 done
8638 done
8639 IFS=$as_save_IFS
8640
8641 ;;
8642 esac
8643 fi
8644 PAXCTL=$ac_cv_path_PAXCTL
8645 if test -n "$PAXCTL"; then
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8647 $as_echo "$PAXCTL" >&6; }
8648 else
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8650 $as_echo "no" >&6; }
8651 fi
8652
8653
8654 if test "X$PAXCTL" != X; then
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8656 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8658 /* end confdefs.h. */
8659
8660 int
8661 main ()
8662 {
8663
8664 ;
8665 return 0;
8666 }
8667 _ACEOF
8668 if ac_fn_c_try_link "$LINENO"; then :
8669 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8670 $as_echo "yes" >&6; }
8671 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672 $as_echo "no" >&6; }; PAXCTL=""; fi
8673 fi
8674 rm -f core conftest.err conftest.$ac_objext \
8675 conftest$ac_exeext conftest.$ac_ext
8676 fi
8677 fi
8678
8679 ## Need makeinfo >= 4.7 (?) to build the manuals.
8680 # Extract the first word of "makeinfo", so it can be a program name with args.
8681 set dummy makeinfo; ac_word=$2
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8683 $as_echo_n "checking for $ac_word... " >&6; }
8684 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8685 $as_echo_n "(cached) " >&6
8686 else
8687 case $MAKEINFO in
8688 [\\/]* | ?:[\\/]*)
8689 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8690 ;;
8691 *)
8692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8693 for as_dir in $PATH
8694 do
8695 IFS=$as_save_IFS
8696 test -z "$as_dir" && as_dir=.
8697 for ac_exec_ext in '' $ac_executable_extensions; do
8698 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8699 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8701 break 2
8702 fi
8703 done
8704 done
8705 IFS=$as_save_IFS
8706
8707 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8708 ;;
8709 esac
8710 fi
8711 MAKEINFO=$ac_cv_path_MAKEINFO
8712 if test -n "$MAKEINFO"; then
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8714 $as_echo "$MAKEINFO" >&6; }
8715 else
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8717 $as_echo "no" >&6; }
8718 fi
8719
8720
8721 if test "$MAKEINFO" != "no"; then
8722 case `
8723 $MAKEINFO --version 2> /dev/null |
8724 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8725 ` in
8726 '') MAKEINFO=no;;
8727 esac
8728 fi
8729
8730 ## Makeinfo is unusual. For a released Emacs, the manuals are
8731 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8732 ## therefore in the category of "special tools" not normally required, which
8733 ## configure does not have to check for (eg autoconf itself).
8734 ## In a Bazaar checkout on the other hand, the manuals are not included.
8735 ## So makeinfo is a requirement to build from Bazaar, and configure
8736 ## should test for it as it does for any other build requirement.
8737 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8738 ## with pre-built manuals, from a Bazaar checkout.
8739 HAVE_MAKEINFO=yes
8740
8741 if test "$MAKEINFO" = "no"; then
8742 MAKEINFO=makeinfo
8743 if test "x${with_makeinfo}" = "xno"; then
8744 HAVE_MAKEINFO=no
8745 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
8746 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8747 source tree does not seem to have pre-built manuals in the \`info' directory.
8748 Either install a suitable version of makeinfo, or re-run configure
8749 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8750 fi
8751 fi
8752
8753
8754 INFO_EXT=.info
8755 INFO_OPTS=--no-split
8756
8757
8758
8759 if test $opsys = mingw32; then
8760 DOCMISC_W32=efaq-w32
8761 else
8762 DOCMISC_W32=
8763 fi
8764
8765
8766
8767 if test x$GCC = xyes; then
8768 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8769 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8770 else
8771 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8772 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8773 fi
8774
8775
8776 late_LDFLAGS=$LDFLAGS
8777 if test x$GCC = xyes; then
8778 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8779 else
8780 LDFLAGS="$LDFLAGS -znocombreloc"
8781 fi
8782
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8784 $as_echo_n "checking for -znocombreloc... " >&6; }
8785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8786 /* end confdefs.h. */
8787
8788 int
8789 main ()
8790 {
8791
8792 ;
8793 return 0;
8794 }
8795 _ACEOF
8796 if ac_fn_c_try_link "$LINENO"; then :
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8798 $as_echo "yes" >&6; }
8799 else
8800 LDFLAGS=$late_LDFLAGS
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802 $as_echo "no" >&6; }
8803 fi
8804 rm -f core conftest.err conftest.$ac_objext \
8805 conftest$ac_exeext conftest.$ac_ext
8806
8807
8808 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8809 case "$opsys" in
8810 your-opsys-here) CANNOT_DUMP=yes ;;
8811 esac
8812
8813 test "$CANNOT_DUMP" = "yes" && \
8814
8815 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8816
8817
8818
8819
8820
8821 UNEXEC_OBJ=unexelf.o
8822 case "$opsys" in
8823 # MSDOS uses unexcoff.o
8824 aix4-2)
8825 UNEXEC_OBJ=unexaix.o
8826 ;;
8827 cygwin)
8828 UNEXEC_OBJ=unexcw.o
8829 ;;
8830 darwin)
8831 UNEXEC_OBJ=unexmacosx.o
8832 ;;
8833 hpux10-20 | hpux11)
8834 UNEXEC_OBJ=unexhp9k800.o
8835 ;;
8836 mingw32)
8837 UNEXEC_OBJ=unexw32.o
8838 ;;
8839 sol2-10)
8840 # Use the Solaris dldump() function, called from unexsol.c, to dump
8841 # emacs, instead of the generic ELF dump code found in unexelf.c.
8842 # The resulting binary has a complete symbol table, and is better
8843 # for debugging and other observability tools (debuggers, pstack, etc).
8844 #
8845 # If you encounter a problem using dldump(), please consider sending
8846 # a message to the OpenSolaris tools-linking mailing list:
8847 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8848 #
8849 # It is likely that dldump() works with older Solaris too, but this has
8850 # not been tested, so for now this change is for Solaris 10 or newer.
8851 UNEXEC_OBJ=unexsol.o
8852 ;;
8853 esac
8854
8855 LD_SWITCH_SYSTEM=
8856 case "$opsys" in
8857 freebsd|dragonfly)
8858 ## Let `ld' find image libs and similar things in /usr/local/lib.
8859 ## The system compiler, GCC, has apparently been modified to not
8860 ## look there, contrary to what a stock GCC would do.
8861 ### It's not our place to do this. See bug#10313#17.
8862 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8863 :
8864 ;;
8865
8866 gnu-linux)
8867 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8868 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8869 ;;
8870
8871 netbsd)
8872 ### It's not our place to do this. See bug#10313#17.
8873 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8874 :
8875 ;;
8876
8877 openbsd)
8878 ## Han Boetes <han@boetes.org> says this is necessary,
8879 ## otherwise Emacs dumps core on elf systems.
8880 LD_SWITCH_SYSTEM="-Z"
8881 ;;
8882 esac
8883
8884
8885 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8886
8887 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8888 ## which has not been defined yet. When this was handled with cpp,
8889 ## it was expanded to null when configure sourced the s/*.h file.
8890 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8891 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8892 ## (or somesuch), but because it is supposed to go at the _front_
8893 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8894 ## Compare with the gnu-linux case below, which added to the end
8895 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8896 ## LD_SWITCH_SYSTEM_TEMACS.
8897 case "$opsys" in
8898 netbsd|openbsd)
8899 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8900 esac
8901
8902
8903 C_SWITCH_MACHINE=
8904 case $canonical in
8905 alpha*)
8906 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8907 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8908
8909 fi
8910
8911 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8912 ## With ELF, make sure that all common symbols get allocated to in the
8913 ## data section. Otherwise, the dump of temacs may miss variables in
8914 ## the shared library that have been initialized. For example, with
8915 ## GNU libc, __malloc_initialized would normally be resolved to the
8916 ## shared library's .bss section, which is fatal.
8917 if test "x$GCC" = "xyes"; then
8918 C_SWITCH_MACHINE="-fno-common"
8919 else
8920 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
8921 fi
8922 else
8923 UNEXEC_OBJ=unexalpha.o
8924 fi
8925 ;;
8926 esac
8927
8928
8929
8930
8931 C_SWITCH_SYSTEM=
8932 ## Some programs in src produce warnings saying certain subprograms
8933 ## are too complex and need a MAXMEM value greater than 2000 for
8934 ## additional optimization. --nils@exp-math.uni-essen.de
8935 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8936 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8937 test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
8938 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8939 ## It is redundant in glibc2, since we define _GNU_SOURCE.
8940
8941
8942
8943 LIBS_SYSTEM=
8944 case "$opsys" in
8945 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8946 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8947
8948 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
8949
8950 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8951
8952 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
8953
8954 ## Motif needs -lgen.
8955 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8956 esac
8957
8958
8959
8960 ### Make sure subsequent tests use flags consistent with the build flags.
8961
8962 if test x"${OVERRIDE_CPPFLAGS}" != x; then
8963 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8964 else
8965 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8966 fi
8967
8968 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8969
8970 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8971
8972
8973
8974 LIB_MATH=-lm
8975 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
8976
8977 case $opsys in
8978 cygwin )
8979 LIB_MATH=
8980 ;;
8981 darwin )
8982 ## Adding -lm confuses the dynamic linker, so omit it.
8983 LIB_MATH=
8984 ;;
8985 freebsd | dragonfly )
8986 SYSTEM_TYPE=berkeley-unix
8987 ;;
8988 gnu-linux | gnu-kfreebsd )
8989 ;;
8990 hpux10-20 | hpux11 )
8991 ;;
8992 mingw32 )
8993 LIB_MATH=
8994 SYSTEM_TYPE=windows-nt
8995 ;;
8996 netbsd | openbsd )
8997 SYSTEM_TYPE=berkeley-unix
8998 ;;
8999
9000 sol2* | unixware )
9001 SYSTEM_TYPE=usg-unix-v
9002 ;;
9003
9004 esac
9005
9006
9007
9008 cat >>confdefs.h <<_ACEOF
9009 #define SYSTEM_TYPE "$SYSTEM_TYPE"
9010 _ACEOF
9011
9012
9013
9014 pre_PKG_CONFIG_CFLAGS=$CFLAGS
9015 pre_PKG_CONFIG_LIBS=$LIBS
9016
9017 # Extract the first word of "pkg-config", so it can be a program name with args.
9018 set dummy pkg-config; ac_word=$2
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9020 $as_echo_n "checking for $ac_word... " >&6; }
9021 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9022 $as_echo_n "(cached) " >&6
9023 else
9024 case $PKG_CONFIG in
9025 [\\/]* | ?:[\\/]*)
9026 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9027 ;;
9028 *)
9029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9030 for as_dir in $PATH
9031 do
9032 IFS=$as_save_IFS
9033 test -z "$as_dir" && as_dir=.
9034 for ac_exec_ext in '' $ac_executable_extensions; do
9035 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9036 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9038 break 2
9039 fi
9040 done
9041 done
9042 IFS=$as_save_IFS
9043
9044 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9045 ;;
9046 esac
9047 fi
9048 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9049 if test -n "$PKG_CONFIG"; then
9050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9051 $as_echo "$PKG_CONFIG" >&6; }
9052 else
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054 $as_echo "no" >&6; }
9055 fi
9056
9057
9058
9059
9060
9061 HAVE_SOUND=no
9062 if test "${with_sound}" != "no"; then
9063 # Sound support for GNU/Linux, the free BSDs, and MinGW.
9064 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
9065 do :
9066 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9067 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9068 #ifdef __MINGW32__
9069 #define WIN32_LEAN_AND_MEAN
9070 #include <windows.h>
9071 #endif
9072
9073 "
9074 eval as_val=\$$as_ac_Header
9075 if test "x$as_val" = x""yes; then :
9076 cat >>confdefs.h <<_ACEOF
9077 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9078 _ACEOF
9079 have_sound_header=yes
9080 fi
9081
9082 done
9083
9084 test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
9085 as_fn_error "OSS sound support requested but not found." "$LINENO" 5
9086
9087 if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
9088 # Emulation library used on NetBSD.
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
9090 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9091 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
9092 $as_echo_n "(cached) " >&6
9093 else
9094 ac_check_lib_save_LIBS=$LIBS
9095 LIBS="-lossaudio $LIBS"
9096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9097 /* end confdefs.h. */
9098
9099 /* Override any GCC internal prototype to avoid an error.
9100 Use char because int might match the return type of a GCC
9101 builtin and then its argument prototype would still apply. */
9102 #ifdef __cplusplus
9103 extern "C"
9104 #endif
9105 char _oss_ioctl ();
9106 int
9107 main ()
9108 {
9109 return _oss_ioctl ();
9110 ;
9111 return 0;
9112 }
9113 _ACEOF
9114 if ac_fn_c_try_link "$LINENO"; then :
9115 ac_cv_lib_ossaudio__oss_ioctl=yes
9116 else
9117 ac_cv_lib_ossaudio__oss_ioctl=no
9118 fi
9119 rm -f core conftest.err conftest.$ac_objext \
9120 conftest$ac_exeext conftest.$ac_ext
9121 LIBS=$ac_check_lib_save_LIBS
9122 fi
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9124 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9125 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9126 LIBSOUND=-lossaudio
9127 else
9128 LIBSOUND=
9129 fi
9130
9131 test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
9132 as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
9133 fi
9134
9135
9136 if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
9137 ALSA_REQUIRED=1.0.0
9138 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
9139
9140 succeeded=no
9141
9142 if test "$PKG_CONFIG" = "no" ; then
9143 HAVE_ALSA=no
9144 else
9145 PKG_CONFIG_MIN_VERSION=0.9.0
9146 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9148 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
9149
9150 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9151 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9152 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
9153 edit_cflags="
9154 s,///*,/,g
9155 s/^/ /
9156 s/ -I/ $isystem/g
9157 s/^ //
9158 "
9159 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9160 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9162 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9163 succeeded=yes
9164 else
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166 $as_echo "no" >&6; }
9167 ALSA_CFLAGS=""
9168 ALSA_LIBS=""
9169 ## If we have a custom action on failure, don't print errors, but
9170 ## do set a variable so people can do so. Do it in a subshell
9171 ## to capture any diagnostics in invoking pkg-config.
9172 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
9173
9174 fi
9175
9176
9177
9178 else
9179 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9180 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9181 fi
9182 fi
9183
9184 if test $succeeded = yes; then
9185 HAVE_ALSA=yes
9186 else
9187 HAVE_ALSA=no
9188 fi
9189
9190 if test $HAVE_ALSA = yes; then
9191 SAVE_CFLAGS="$CFLAGS"
9192 SAVE_LIBS="$LIBS"
9193 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9194 LIBS="$ALSA_LIBS $LIBS"
9195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196 /* end confdefs.h. */
9197 #include <asoundlib.h>
9198 int
9199 main ()
9200 {
9201 snd_lib_error_set_handler (0);
9202 ;
9203 return 0;
9204 }
9205 _ACEOF
9206 if ac_fn_c_try_compile "$LINENO"; then :
9207 emacs_alsa_normal=yes
9208 else
9209 emacs_alsa_normal=no
9210 fi
9211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9212 if test "$emacs_alsa_normal" != yes; then
9213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9214 /* end confdefs.h. */
9215 #include <alsa/asoundlib.h>
9216 int
9217 main ()
9218 {
9219 snd_lib_error_set_handler (0);
9220 ;
9221 return 0;
9222 }
9223 _ACEOF
9224 if ac_fn_c_try_compile "$LINENO"; then :
9225 emacs_alsa_subdir=yes
9226 else
9227 emacs_alsa_subdir=no
9228 fi
9229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9230 if test "$emacs_alsa_subdir" != yes; then
9231 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9232 fi
9233 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
9234 fi
9235
9236 CFLAGS="$SAVE_CFLAGS"
9237 LIBS="$SAVE_LIBS"
9238 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9239 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
9240
9241 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
9242
9243 elif test "${with_sound}" = "alsa"; then
9244 as_fn_error "ALSA sound support requested but not found." "$LINENO" 5
9245 fi
9246 fi
9247 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
9248 case "$opsys" in
9249 gnu-linux|freebsd|netbsd|mingw32)
9250
9251 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
9252
9253 HAVE_SOUND=yes
9254 ;;
9255 esac
9256 fi
9257
9258
9259 fi
9260
9261
9262
9263
9264 for ac_header in $ac_header_list
9265 do :
9266 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9267 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9268 "
9269 eval as_val=\$$as_ac_Header
9270 if test "x$as_val" = x""yes; then :
9271 cat >>confdefs.h <<_ACEOF
9272 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9273 _ACEOF
9274
9275 fi
9276
9277 done
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9298 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9300 /* end confdefs.h. */
9301 #include <sys/personality.h>
9302 int
9303 main ()
9304 {
9305 personality (PER_LINUX32)
9306 ;
9307 return 0;
9308 }
9309 _ACEOF
9310 if ac_fn_c_try_compile "$LINENO"; then :
9311 emacs_cv_personality_linux32=yes
9312 else
9313 emacs_cv_personality_linux32=no
9314 fi
9315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9317 $as_echo "$emacs_cv_personality_linux32" >&6; }
9318
9319 if test $emacs_cv_personality_linux32 = yes; then
9320
9321 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9322
9323 fi
9324
9325 for ac_header in term.h
9326 do :
9327 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9328 if test "x$ac_cv_header_term_h" = x""yes; then :
9329 cat >>confdefs.h <<_ACEOF
9330 #define HAVE_TERM_H 1
9331 _ACEOF
9332
9333 fi
9334
9335 done
9336
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9338 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9339 if test "${ac_cv_header_time+set}" = set; then :
9340 $as_echo_n "(cached) " >&6
9341 else
9342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9343 /* end confdefs.h. */
9344 #include <sys/types.h>
9345 #include <sys/time.h>
9346 #include <time.h>
9347
9348 int
9349 main ()
9350 {
9351 if ((struct tm *) 0)
9352 return 0;
9353 ;
9354 return 0;
9355 }
9356 _ACEOF
9357 if ac_fn_c_try_compile "$LINENO"; then :
9358 ac_cv_header_time=yes
9359 else
9360 ac_cv_header_time=no
9361 fi
9362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9363 fi
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9365 $as_echo "$ac_cv_header_time" >&6; }
9366 if test $ac_cv_header_time = yes; then
9367
9368 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9369
9370 fi
9371
9372 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9373
9374 "
9375 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9376 ac_have_decl=1
9377 else
9378 ac_have_decl=0
9379 fi
9380
9381 cat >>confdefs.h <<_ACEOF
9382 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
9383 _ACEOF
9384
9385 if test $ac_cv_have_decl_sys_siglist != yes; then
9386 # For Tru64, at least:
9387 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9388
9389 "
9390 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9391 ac_have_decl=1
9392 else
9393 ac_have_decl=0
9394 fi
9395
9396 cat >>confdefs.h <<_ACEOF
9397 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9398 _ACEOF
9399
9400 fi
9401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9402 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9403 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9404 $as_echo_n "(cached) " >&6
9405 else
9406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9407 /* end confdefs.h. */
9408 #include <sys/types.h>
9409 #include <sys/wait.h>
9410 #ifndef WEXITSTATUS
9411 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9412 #endif
9413 #ifndef WIFEXITED
9414 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9415 #endif
9416
9417 int
9418 main ()
9419 {
9420 int s;
9421 wait (&s);
9422 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9423 ;
9424 return 0;
9425 }
9426 _ACEOF
9427 if ac_fn_c_try_compile "$LINENO"; then :
9428 ac_cv_header_sys_wait_h=yes
9429 else
9430 ac_cv_header_sys_wait_h=no
9431 fi
9432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9433 fi
9434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9435 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
9436 if test $ac_cv_header_sys_wait_h = yes; then
9437
9438 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9439
9440 fi
9441
9442
9443
9444
9445
9446 for ac_header in net/if.h
9447 do :
9448 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9449 #if HAVE_SYS_SOCKET_H
9450 #include <sys/socket.h>
9451 #endif
9452 "
9453 if test "x$ac_cv_header_net_if_h" = x""yes; then :
9454 cat >>confdefs.h <<_ACEOF
9455 #define HAVE_NET_IF_H 1
9456 _ACEOF
9457
9458 fi
9459
9460 done
9461
9462 for ac_header in ifaddrs.h
9463 do :
9464 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9465 #if HAVE_SYS_SOCKET_H
9466 #include <sys/socket.h>
9467 #endif
9468 "
9469 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9470 cat >>confdefs.h <<_ACEOF
9471 #define HAVE_IFADDRS_H 1
9472 _ACEOF
9473
9474 fi
9475
9476 done
9477
9478 for ac_header in net/if_dl.h
9479 do :
9480 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9481 #if HAVE_SYS_SOCKET_H
9482 #include <sys/socket.h>
9483 #endif
9484 "
9485 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
9486 cat >>confdefs.h <<_ACEOF
9487 #define HAVE_NET_IF_DL_H 1
9488 _ACEOF
9489
9490 fi
9491
9492 done
9493
9494
9495 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9496 #if HAVE_SYS_SOCKET_H
9497 #include <sys/socket.h>
9498 #endif
9499 #if HAVE_NET_IF_H
9500 #include <net/if.h>
9501 #endif
9502 "
9503 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
9504
9505 cat >>confdefs.h <<_ACEOF
9506 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9507 _ACEOF
9508
9509
9510 fi
9511 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9512 #if HAVE_SYS_SOCKET_H
9513 #include <sys/socket.h>
9514 #endif
9515 #if HAVE_NET_IF_H
9516 #include <net/if.h>
9517 #endif
9518 "
9519 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9520
9521 cat >>confdefs.h <<_ACEOF
9522 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9523 _ACEOF
9524
9525
9526 fi
9527 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9528 #if HAVE_SYS_SOCKET_H
9529 #include <sys/socket.h>
9530 #endif
9531 #if HAVE_NET_IF_H
9532 #include <net/if.h>
9533 #endif
9534 "
9535 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9536
9537 cat >>confdefs.h <<_ACEOF
9538 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9539 _ACEOF
9540
9541
9542 fi
9543 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9544 #if HAVE_SYS_SOCKET_H
9545 #include <sys/socket.h>
9546 #endif
9547 #if HAVE_NET_IF_H
9548 #include <net/if.h>
9549 #endif
9550 "
9551 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9552
9553 cat >>confdefs.h <<_ACEOF
9554 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9555 _ACEOF
9556
9557
9558 fi
9559 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9560 #if HAVE_SYS_SOCKET_H
9561 #include <sys/socket.h>
9562 #endif
9563 #if HAVE_NET_IF_H
9564 #include <net/if.h>
9565 #endif
9566 "
9567 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9568
9569 cat >>confdefs.h <<_ACEOF
9570 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9571 _ACEOF
9572
9573
9574 fi
9575 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9576 #if HAVE_SYS_SOCKET_H
9577 #include <sys/socket.h>
9578 #endif
9579 #if HAVE_NET_IF_H
9580 #include <net/if.h>
9581 #endif
9582 "
9583 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9584
9585 cat >>confdefs.h <<_ACEOF
9586 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9587 _ACEOF
9588
9589
9590 fi
9591
9592
9593
9594
9595 DEPFLAGS=
9596 MKDEPDIR=":"
9597 deps_frag=deps.mk
9598 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9600 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9601 HAVE_GNU_MAKE=no
9602 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9603 if test "x$testval" != x; then
9604 HAVE_GNU_MAKE=yes
9605 else
9606 ac_enable_autodepend=no
9607 fi
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9609 $as_echo "$HAVE_GNU_MAKE" >&6; }
9610 if test $HAVE_GNU_MAKE = yes; then
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9612 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9613 SAVE_CFLAGS="$CFLAGS"
9614 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9616 /* end confdefs.h. */
9617
9618 int
9619 main ()
9620 {
9621
9622 ;
9623 return 0;
9624 }
9625 _ACEOF
9626 if ac_fn_c_try_compile "$LINENO"; then :
9627
9628 else
9629 ac_enable_autodepend=no
9630 fi
9631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9632 CFLAGS="$SAVE_CFLAGS"
9633 test -f deps.d || ac_enable_autodepend=no
9634 rm -rf deps.d
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9636 $as_echo "$ac_enable_autodepend" >&6; }
9637 fi
9638 if test $ac_enable_autodepend = yes; then
9639 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9640 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9641 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9642 deps_frag=autodeps.mk
9643 fi
9644 fi
9645 deps_frag=$srcdir/src/$deps_frag
9646
9647
9648
9649
9650
9651 lisp_frag=$srcdir/src/lisp.mk
9652
9653
9654
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9656 $as_echo_n "checking for long file names... " >&6; }
9657 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9658 $as_echo_n "(cached) " >&6
9659 else
9660 ac_cv_sys_long_file_names=yes
9661 # Test for long file names in all the places we know might matter:
9662 # . the current directory, where building will happen
9663 # $prefix/lib where we will be installing things
9664 # $exec_prefix/lib likewise
9665 # $TMPDIR if set, where it might want to write temporary files
9666 # /tmp where it might want to write temporary files
9667 # /var/tmp likewise
9668 # /usr/tmp likewise
9669 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9670 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9671 # in the usual case where exec_prefix is '${prefix}'.
9672 case $ac_dir in #(
9673 . | /* | ?:[\\/]*) ;; #(
9674 *) continue;;
9675 esac
9676 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9677 ac_xdir=$ac_dir/cf$$
9678 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9679 ac_tf1=$ac_xdir/conftest9012345
9680 ac_tf2=$ac_xdir/conftest9012346
9681 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9682 ac_cv_sys_long_file_names=no
9683 rm -f -r "$ac_xdir" 2>/dev/null
9684 test $ac_cv_sys_long_file_names = no && break
9685 done
9686 fi
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9688 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9689 if test $ac_cv_sys_long_file_names = yes; then
9690
9691 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9692
9693 fi
9694
9695
9696 #### Choose a window system.
9697
9698 ## We leave window_system equal to none if
9699 ## we end up building without one. Any new window system should
9700 ## set window_system to an appropriate value and add objects to
9701 ## window-system-specific substs.
9702
9703 window_system=none
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9705 $as_echo_n "checking for X... " >&6; }
9706
9707
9708 # Check whether --with-x was given.
9709 if test "${with_x+set}" = set; then :
9710 withval=$with_x;
9711 fi
9712
9713 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9714 if test "x$with_x" = xno; then
9715 # The user explicitly disabled X.
9716 have_x=disabled
9717 else
9718 case $x_includes,$x_libraries in #(
9719 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9720 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9721 $as_echo_n "(cached) " >&6
9722 else
9723 # One or both of the vars are not set, and there is no cached value.
9724 ac_x_includes=no ac_x_libraries=no
9725 rm -f -r conftest.dir
9726 if mkdir conftest.dir; then
9727 cd conftest.dir
9728 cat >Imakefile <<'_ACEOF'
9729 incroot:
9730 @echo incroot='${INCROOT}'
9731 usrlibdir:
9732 @echo usrlibdir='${USRLIBDIR}'
9733 libdir:
9734 @echo libdir='${LIBDIR}'
9735 _ACEOF
9736 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9737 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9738 for ac_var in incroot usrlibdir libdir; do
9739 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9740 done
9741 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9742 for ac_extension in a so sl dylib la dll; do
9743 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9744 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9745 ac_im_usrlibdir=$ac_im_libdir; break
9746 fi
9747 done
9748 # Screen out bogus values from the imake configuration. They are
9749 # bogus both because they are the default anyway, and because
9750 # using them would break gcc on systems where it needs fixed includes.
9751 case $ac_im_incroot in
9752 /usr/include) ac_x_includes= ;;
9753 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9754 esac
9755 case $ac_im_usrlibdir in
9756 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9757 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9758 esac
9759 fi
9760 cd ..
9761 rm -f -r conftest.dir
9762 fi
9763
9764 # Standard set of common directories for X headers.
9765 # Check X11 before X11Rn because it is often a symlink to the current release.
9766 ac_x_header_dirs='
9767 /usr/X11/include
9768 /usr/X11R7/include
9769 /usr/X11R6/include
9770 /usr/X11R5/include
9771 /usr/X11R4/include
9772
9773 /usr/include/X11
9774 /usr/include/X11R7
9775 /usr/include/X11R6
9776 /usr/include/X11R5
9777 /usr/include/X11R4
9778
9779 /usr/local/X11/include
9780 /usr/local/X11R7/include
9781 /usr/local/X11R6/include
9782 /usr/local/X11R5/include
9783 /usr/local/X11R4/include
9784
9785 /usr/local/include/X11
9786 /usr/local/include/X11R7
9787 /usr/local/include/X11R6
9788 /usr/local/include/X11R5
9789 /usr/local/include/X11R4
9790
9791 /usr/X386/include
9792 /usr/x386/include
9793 /usr/XFree86/include/X11
9794
9795 /usr/include
9796 /usr/local/include
9797 /usr/unsupported/include
9798 /usr/athena/include
9799 /usr/local/x11r5/include
9800 /usr/lpp/Xamples/include
9801
9802 /usr/openwin/include
9803 /usr/openwin/share/include'
9804
9805 if test "$ac_x_includes" = no; then
9806 # Guess where to find include files, by looking for Xlib.h.
9807 # First, try using that file with no special directory specified.
9808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9809 /* end confdefs.h. */
9810 #include <X11/Xlib.h>
9811 _ACEOF
9812 if ac_fn_c_try_cpp "$LINENO"; then :
9813 # We can compile using X headers with no special include directory.
9814 ac_x_includes=
9815 else
9816 for ac_dir in $ac_x_header_dirs; do
9817 if test -r "$ac_dir/X11/Xlib.h"; then
9818 ac_x_includes=$ac_dir
9819 break
9820 fi
9821 done
9822 fi
9823 rm -f conftest.err conftest.$ac_ext
9824 fi # $ac_x_includes = no
9825
9826 if test "$ac_x_libraries" = no; then
9827 # Check for the libraries.
9828 # See if we find them without any special options.
9829 # Don't add to $LIBS permanently.
9830 ac_save_LIBS=$LIBS
9831 LIBS="-lX11 $LIBS"
9832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9833 /* end confdefs.h. */
9834 #include <X11/Xlib.h>
9835 int
9836 main ()
9837 {
9838 XrmInitialize ()
9839 ;
9840 return 0;
9841 }
9842 _ACEOF
9843 if ac_fn_c_try_link "$LINENO"; then :
9844 LIBS=$ac_save_LIBS
9845 # We can link X programs with no special library path.
9846 ac_x_libraries=
9847 else
9848 LIBS=$ac_save_LIBS
9849 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9850 do
9851 # Don't even attempt the hair of trying to link an X program!
9852 for ac_extension in a so sl dylib la dll; do
9853 if test -r "$ac_dir/libX11.$ac_extension"; then
9854 ac_x_libraries=$ac_dir
9855 break 2
9856 fi
9857 done
9858 done
9859 fi
9860 rm -f core conftest.err conftest.$ac_objext \
9861 conftest$ac_exeext conftest.$ac_ext
9862 fi # $ac_x_libraries = no
9863
9864 case $ac_x_includes,$ac_x_libraries in #(
9865 no,* | *,no | *\'*)
9866 # Didn't find X, or a directory has "'" in its name.
9867 ac_cv_have_x="have_x=no";; #(
9868 *)
9869 # Record where we found X for the cache.
9870 ac_cv_have_x="have_x=yes\
9871 ac_x_includes='$ac_x_includes'\
9872 ac_x_libraries='$ac_x_libraries'"
9873 esac
9874 fi
9875 ;; #(
9876 *) have_x=yes;;
9877 esac
9878 eval "$ac_cv_have_x"
9879 fi # $with_x != no
9880
9881 if test "$have_x" != yes; then
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9883 $as_echo "$have_x" >&6; }
9884 no_x=yes
9885 else
9886 # If each of the values was on the command line, it overrides each guess.
9887 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9888 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9889 # Update the cache value to reflect the command line values.
9890 ac_cv_have_x="have_x=yes\
9891 ac_x_includes='$x_includes'\
9892 ac_x_libraries='$x_libraries'"
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9894 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9895 fi
9896
9897 if test "$no_x" != yes; then
9898 window_system=x11
9899 fi
9900
9901 LD_SWITCH_X_SITE_RPATH=
9902 if test "${x_libraries}" != NONE; then
9903 if test -n "${x_libraries}"; then
9904 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9905 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9906 fi
9907 x_default_search_path=""
9908 x_search_path=${x_libraries}
9909 if test -z "${x_search_path}"; then
9910 x_search_path=/usr/lib
9911 fi
9912 for x_library in `echo ${x_search_path}: | \
9913 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9914 x_search_path="\
9915 ${x_library}/X11/%L/%T/%N%C%S:\
9916 ${x_library}/X11/%l/%T/%N%C%S:\
9917 ${x_library}/X11/%T/%N%C%S:\
9918 ${x_library}/X11/%L/%T/%N%S:\
9919 ${x_library}/X11/%l/%T/%N%S:\
9920 ${x_library}/X11/%T/%N%S"
9921 if test x"${x_default_search_path}" = x; then
9922 x_default_search_path=${x_search_path}
9923 else
9924 x_default_search_path="${x_search_path}:${x_default_search_path}"
9925 fi
9926 done
9927 fi
9928
9929
9930 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9931 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9932 fi
9933
9934 if test x"${x_includes}" = x; then
9935 bitmapdir=/usr/include/X11/bitmaps
9936 else
9937 # accumulate include directories that have X11 bitmap subdirectories
9938 bmd_acc="dummyval"
9939 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9940 if test -d "${bmd}/X11/bitmaps"; then
9941 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9942 fi
9943 if test -d "${bmd}/bitmaps"; then
9944 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9945 fi
9946 done
9947 if test ${bmd_acc} != "dummyval"; then
9948 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9949 fi
9950 fi
9951
9952 HAVE_NS=no
9953 NS_IMPL_COCOA=no
9954 NS_IMPL_GNUSTEP=no
9955 tmp_CPPFLAGS="$CPPFLAGS"
9956 tmp_CFLAGS="$CFLAGS"
9957 CPPFLAGS="$CPPFLAGS -x objective-c"
9958 CFLAGS="$CFLAGS -x objective-c"
9959 GNU_OBJC_CFLAGS=
9960 LIBS_GNUSTEP=
9961 if test "${with_ns}" != no; then
9962 if test "${opsys}" = darwin; then
9963 NS_IMPL_COCOA=yes
9964 ns_appdir=`pwd`/nextstep/Emacs.app
9965 ns_appbindir=${ns_appdir}/Contents/MacOS
9966 ns_appresdir=${ns_appdir}/Contents/Resources
9967 ns_appsrc=Cocoa/Emacs.base
9968 elif test -f $GNUSTEP_CONFIG_FILE; then
9969 NS_IMPL_GNUSTEP=yes
9970 ns_appdir=`pwd`/nextstep/Emacs.app
9971 ns_appbindir=${ns_appdir}
9972 ns_appresdir=${ns_appdir}/Resources
9973 ns_appsrc=GNUstep/Emacs.base
9974 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9975 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9976 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9977 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9978 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9979 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9980 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9981 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9982 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9983 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9984 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9985 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9987 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9988 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9989 $as_echo_n "(cached) " >&6
9990 else
9991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9992 /* end confdefs.h. */
9993 #include <GNUstepBase/GSConfig.h>
9994 int
9995 main ()
9996 {
9997 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9998 1;
9999 #else
10000 fail;
10001 #endif
10002 ;
10003 return 0;
10004 }
10005 _ACEOF
10006 if ac_fn_c_try_compile "$LINENO"; then :
10007 emacs_cv_objc_exceptions=yes
10008 else
10009 emacs_cv_objc_exceptions=no
10010 fi
10011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10012 fi
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
10014 $as_echo "$emacs_cv_objc_exceptions" >&6; }
10015 if test $emacs_cv_objc_exceptions = yes; then
10016
10017 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
10018
10019 GNU_OBJC_CFLAGS="-fobjc-exceptions"
10020 fi
10021 fi
10022
10023 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
10024
10025 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
10026 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
10027 HAVE_NS=yes
10028 else
10029 as_fn_error "\`--with-ns' was specified, but the include
10030 files are missing or cannot be compiled." "$LINENO" 5
10031 fi
10032
10033
10034
10035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10036 /* end confdefs.h. */
10037 #include <AppKit/AppKit.h>
10038 int
10039 main ()
10040 {
10041
10042 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10043 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
10044 ; /* OK */
10045 #else
10046 #error "OSX 10.4 or newer required"
10047 #endif
10048 #endif
10049
10050 ;
10051 return 0;
10052 }
10053 _ACEOF
10054 if ac_fn_c_try_compile "$LINENO"; then :
10055 ns_osx_have_104=yes
10056 else
10057 ns_osx_have_104=no
10058 fi
10059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10061 /* end confdefs.h. */
10062 #include <Foundation/NSObjCRuntime.h>
10063 int
10064 main ()
10065 {
10066 NSInteger i;
10067 ;
10068 return 0;
10069 }
10070 _ACEOF
10071 if ac_fn_c_try_compile "$LINENO"; then :
10072 ns_have_nsinteger=yes
10073 else
10074 ns_have_nsinteger=no
10075 fi
10076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10077 if test $ns_osx_have_104 = no; then
10078 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10079 fi
10080 if test $ns_have_nsinteger = yes; then
10081
10082 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
10083
10084 fi
10085 fi
10086
10087
10088
10089 INSTALL_ARCH_INDEP_EXTRA=install-etc
10090 ns_self_contained=no
10091 NS_OBJ=
10092 NS_OBJC_OBJ=
10093 if test "${HAVE_NS}" = yes; then
10094 if test "$with_toolkit_scroll_bars" = "no"; then
10095 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10096 fi
10097
10098 window_system=nextstep
10099 # set up packaging dirs
10100 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10101 ns_self_contained=yes
10102 prefix=${ns_appresdir}
10103 exec_prefix=${ns_appbindir}
10104 libexecdir="\${ns_appbindir}/libexec"
10105 archlibdir="\${ns_appbindir}/libexec"
10106 etcdocdir="\${ns_appresdir}/etc"
10107 etcdir="\${ns_appresdir}/etc"
10108 infodir="\${ns_appresdir}/info"
10109 mandir="\${ns_appresdir}/man"
10110 lispdir="\${ns_appresdir}/lisp"
10111 leimdir="\${ns_appresdir}/leim"
10112 INSTALL_ARCH_INDEP_EXTRA=
10113 fi
10114 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
10115 fi
10116 CFLAGS="$tmp_CFLAGS"
10117 CPPFLAGS="$tmp_CPPFLAGS"
10118
10119
10120
10121
10122
10123 HAVE_W32=no
10124 W32_OBJ=
10125 W32_LIBS=
10126 EMACSRES=
10127 CLIENTRES=
10128 CLIENTW=
10129 W32_RES_LINK=
10130 EMACS_MANIFEST=
10131 UPDATE_MANIFEST=
10132 if test "${with_w32}" != no; then
10133 case "${opsys}" in
10134 cygwin)
10135 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
10136 if test "x$ac_cv_header_windows_h" = x""yes; then :
10137 HAVE_W32=yes
10138 else
10139 as_fn_error "\`--with-w32' was specified, but windows.h
10140 cannot be found." "$LINENO" 5
10141 fi
10142
10143
10144 ;;
10145 mingw32)
10146 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10147 ;;
10148 *)
10149 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10150 ;;
10151 esac
10152 fi
10153
10154 if test "${opsys}" = "mingw32"; then
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10156 $as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10158 /* end confdefs.h. */
10159
10160 #include <windows.h>
10161 #include <usp10.h>
10162 int
10163 main ()
10164 {
10165 PIMAGE_NT_HEADERS pHeader;
10166 PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
10167 ;
10168 return 0;
10169 }
10170 _ACEOF
10171 if ac_fn_c_try_compile "$LINENO"; then :
10172 emacs_cv_w32api=yes
10173 HAVE_W32=yes
10174 else
10175 emacs_cv_w32api=no
10176 fi
10177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10179 $as_echo "$emacs_cv_w32api" >&6; }
10180 if test "${emacs_cv_w32api}" = "no"; then
10181 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10182 fi
10183 fi
10184
10185 FIRSTFILE_OBJ=
10186 NTDIR=
10187 LIBS_ECLIENT=
10188 LIB_WSOCK32=
10189 NTLIB=
10190 CM_OBJ="cm.o"
10191 XARGS_LIMIT=
10192 if test "${HAVE_W32}" = "yes"; then
10193
10194 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10195
10196 if test -n "$ac_tool_prefix"; then
10197 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10198 set dummy ${ac_tool_prefix}windres; ac_word=$2
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10200 $as_echo_n "checking for $ac_word... " >&6; }
10201 if test "${ac_cv_prog_WINDRES+set}" = set; then :
10202 $as_echo_n "(cached) " >&6
10203 else
10204 if test -n "$WINDRES"; then
10205 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10206 else
10207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208 for as_dir in $PATH
10209 do
10210 IFS=$as_save_IFS
10211 test -z "$as_dir" && as_dir=.
10212 for ac_exec_ext in '' $ac_executable_extensions; do
10213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10214 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216 break 2
10217 fi
10218 done
10219 done
10220 IFS=$as_save_IFS
10221
10222 fi
10223 fi
10224 WINDRES=$ac_cv_prog_WINDRES
10225 if test -n "$WINDRES"; then
10226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10227 $as_echo "$WINDRES" >&6; }
10228 else
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10230 $as_echo "no" >&6; }
10231 fi
10232
10233
10234 fi
10235 if test -z "$ac_cv_prog_WINDRES"; then
10236 ac_ct_WINDRES=$WINDRES
10237 # Extract the first word of "windres", so it can be a program name with args.
10238 set dummy windres; ac_word=$2
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240 $as_echo_n "checking for $ac_word... " >&6; }
10241 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10242 $as_echo_n "(cached) " >&6
10243 else
10244 if test -n "$ac_ct_WINDRES"; then
10245 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10246 else
10247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248 for as_dir in $PATH
10249 do
10250 IFS=$as_save_IFS
10251 test -z "$as_dir" && as_dir=.
10252 for ac_exec_ext in '' $ac_executable_extensions; do
10253 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10254 ac_cv_prog_ac_ct_WINDRES="windres"
10255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10256 break 2
10257 fi
10258 done
10259 done
10260 IFS=$as_save_IFS
10261
10262 fi
10263 fi
10264 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10265 if test -n "$ac_ct_WINDRES"; then
10266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10267 $as_echo "$ac_ct_WINDRES" >&6; }
10268 else
10269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270 $as_echo "no" >&6; }
10271 fi
10272
10273 if test "x$ac_ct_WINDRES" = x; then
10274 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10275 else
10276 case $cross_compiling:$ac_tool_warned in
10277 yes:)
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10279 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10280 ac_tool_warned=yes ;;
10281 esac
10282 WINDRES=$ac_ct_WINDRES
10283 fi
10284 else
10285 WINDRES="$ac_cv_prog_WINDRES"
10286 fi
10287
10288 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10289 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
10290 EMACSRES="emacs.res"
10291 case "$canonical" in
10292 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10293 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10294 esac
10295 UPDATE_MANIFEST=update-game-score.exe.manifest
10296 if test "${opsys}" = "cygwin"; then
10297 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10298 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10299 # Tell the linker that emacs.res is an object (which we compile from
10300 # the rc file), not a linker script.
10301 W32_RES_LINK="-Wl,emacs.res"
10302 else
10303 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
10304 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10305 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10306 W32_RES_LINK="\$(EMACSRES)"
10307 CLIENTRES="emacsclient.res"
10308 CLIENTW="emacsclientw\$(EXEEXT)"
10309 FIRSTFILE_OBJ=firstfile.o
10310 NTDIR=nt
10311 CM_OBJ=
10312 LIBS_ECLIENT="-lcomctl32"
10313 LIB_WSOCK32="-lwsock32"
10314 NTLIB="ntlib.$ac_objext"
10315 XARGS_LIMIT="-s 10000"
10316 fi
10317 fi
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334 if test "${HAVE_W32}" = "yes"; then
10335 window_system=w32
10336 with_xft=no
10337 fi
10338
10339 ## $window_system is now set to the window system we will
10340 ## ultimately use.
10341
10342 term_header=
10343 HAVE_X_WINDOWS=no
10344 HAVE_X11=no
10345 USE_X_TOOLKIT=none
10346
10347 case "${window_system}" in
10348 x11 )
10349 HAVE_X_WINDOWS=yes
10350 HAVE_X11=yes
10351 term_header=xterm.h
10352 case "${with_x_toolkit}" in
10353 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10354 motif ) USE_X_TOOLKIT=MOTIF ;;
10355 gtk ) with_gtk=yes
10356 term_header=gtkutil.h
10357 USE_X_TOOLKIT=none ;;
10358 gtk2 ) with_gtk2=yes
10359 term_header=gtkutil.h
10360 USE_X_TOOLKIT=none ;;
10361 gtk3 ) with_gtk3=yes
10362 term_header=gtkutil.h
10363 USE_X_TOOLKIT=none ;;
10364 no ) USE_X_TOOLKIT=none ;;
10365 * ) USE_X_TOOLKIT=maybe ;;
10366 esac
10367 ;;
10368 nextstep )
10369 term_header=nsterm.h
10370 ;;
10371 w32 )
10372 term_header=w32term.h
10373 ;;
10374 esac
10375
10376 if test "$window_system" = none && test "X$with_x" != "Xno"; then
10377 # Extract the first word of "X", so it can be a program name with args.
10378 set dummy X; ac_word=$2
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10380 $as_echo_n "checking for $ac_word... " >&6; }
10381 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10382 $as_echo_n "(cached) " >&6
10383 else
10384 if test -n "$HAVE_XSERVER"; then
10385 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10386 else
10387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10388 for as_dir in $PATH
10389 do
10390 IFS=$as_save_IFS
10391 test -z "$as_dir" && as_dir=.
10392 for ac_exec_ext in '' $ac_executable_extensions; do
10393 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10394 ac_cv_prog_HAVE_XSERVER="true"
10395 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10396 break 2
10397 fi
10398 done
10399 done
10400 IFS=$as_save_IFS
10401
10402 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10403 fi
10404 fi
10405 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10406 if test -n "$HAVE_XSERVER"; then
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10408 $as_echo "$HAVE_XSERVER" >&6; }
10409 else
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411 $as_echo "no" >&6; }
10412 fi
10413
10414
10415 if test "$HAVE_XSERVER" = true ||
10416 test -n "$DISPLAY" ||
10417 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10418 as_fn_error "You seem to be running X, but no X development libraries
10419 were found. You should install the relevant development files for X
10420 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10421 sure you have development files for image handling, i.e.
10422 tiff, gif, jpeg, png and xpm.
10423 If you are sure you want Emacs compiled without X window support, pass
10424 --without-x
10425 to configure." "$LINENO" 5
10426 fi
10427 fi
10428
10429 ### If we're using X11, we should use the X menu package.
10430 HAVE_MENUS=no
10431 case ${HAVE_X11} in
10432 yes ) HAVE_MENUS=yes ;;
10433 esac
10434
10435 # Does the opsystem file prohibit the use of the GNU malloc?
10436 # Assume not, until told otherwise.
10437 GNU_MALLOC=yes
10438
10439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10440 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10441 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
10442 $as_echo_n "(cached) " >&6
10443 else
10444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10445 /* end confdefs.h. */
10446 #include <malloc.h>
10447 static void hook (void) {}
10448 int
10449 main ()
10450 {
10451 malloc_set_state (malloc_get_state ());
10452 __after_morecore_hook = hook;
10453 __malloc_initialize_hook = hook;
10454 ;
10455 return 0;
10456 }
10457 _ACEOF
10458 if ac_fn_c_try_link "$LINENO"; then :
10459 emacs_cv_var_doug_lea_malloc=yes
10460 else
10461 emacs_cv_var_doug_lea_malloc=no
10462 fi
10463 rm -f core conftest.err conftest.$ac_objext \
10464 conftest$ac_exeext conftest.$ac_ext
10465 fi
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10467 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10468 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10469
10470
10471 system_malloc=no
10472 case "$opsys" in
10473 ## darwin ld insists on the use of malloc routines in the System framework.
10474 darwin|sol2-10) system_malloc=yes ;;
10475 esac
10476
10477 if test "${system_malloc}" = "yes"; then
10478
10479 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10480
10481 GNU_MALLOC=no
10482 GNU_MALLOC_reason="
10483 (The GNU allocators don't work with this system configuration.)"
10484 GMALLOC_OBJ=
10485 VMLIMIT_OBJ=
10486 else
10487 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10488 VMLIMIT_OBJ=vm-limit.o
10489
10490 for ac_header in sys/vlimit.h
10491 do :
10492 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10493 if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10494 cat >>confdefs.h <<_ACEOF
10495 #define HAVE_SYS_VLIMIT_H 1
10496 _ACEOF
10497
10498 fi
10499
10500 done
10501
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10503 $as_echo_n "checking for data_start... " >&6; }
10504 if test "${emacs_cv_data_start+set}" = set; then :
10505 $as_echo_n "(cached) " >&6
10506 else
10507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10508 /* end confdefs.h. */
10509 extern char data_start[]; char ch;
10510 int
10511 main ()
10512 {
10513 return data_start < &ch;
10514 ;
10515 return 0;
10516 }
10517 _ACEOF
10518 if ac_fn_c_try_link "$LINENO"; then :
10519 emacs_cv_data_start=yes
10520 else
10521 emacs_cv_data_start=no
10522 fi
10523 rm -f core conftest.err conftest.$ac_objext \
10524 conftest$ac_exeext conftest.$ac_ext
10525 fi
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10527 $as_echo "$emacs_cv_data_start" >&6; }
10528 if test $emacs_cv_data_start = yes; then
10529
10530 $as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10531
10532 fi
10533 fi
10534
10535
10536
10537 if test "$doug_lea_malloc" = "yes" ; then
10538 if test "$GNU_MALLOC" = yes ; then
10539 GNU_MALLOC_reason="
10540 (Using Doug Lea's new malloc from the GNU C Library.)"
10541 fi
10542
10543 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10544
10545
10546 ## Use mmap directly for allocating larger buffers.
10547 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10548 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10549 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10550 case "$opsys" in
10551 gnu*) REL_ALLOC=no ;;
10552 esac
10553 fi
10554
10555 if test x"${REL_ALLOC}" = x; then
10556 REL_ALLOC=${GNU_MALLOC}
10557 fi
10558
10559 use_mmap_for_buffers=no
10560 case "$opsys" in
10561 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10562 esac
10563
10564
10565
10566
10567
10568
10569
10570
10571 for ac_func in getpagesize
10572 do :
10573 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10574 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10575 cat >>confdefs.h <<_ACEOF
10576 #define HAVE_GETPAGESIZE 1
10577 _ACEOF
10578
10579 fi
10580 done
10581
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10583 $as_echo_n "checking for working mmap... " >&6; }
10584 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10585 $as_echo_n "(cached) " >&6
10586 else
10587 if test "$cross_compiling" = yes; then :
10588 ac_cv_func_mmap_fixed_mapped=no
10589 else
10590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10591 /* end confdefs.h. */
10592 $ac_includes_default
10593 /* malloc might have been renamed as rpl_malloc. */
10594 #undef malloc
10595
10596 /* Thanks to Mike Haertel and Jim Avera for this test.
10597 Here is a matrix of mmap possibilities:
10598 mmap private not fixed
10599 mmap private fixed at somewhere currently unmapped
10600 mmap private fixed at somewhere already mapped
10601 mmap shared not fixed
10602 mmap shared fixed at somewhere currently unmapped
10603 mmap shared fixed at somewhere already mapped
10604 For private mappings, we should verify that changes cannot be read()
10605 back from the file, nor mmap's back from the file at a different
10606 address. (There have been systems where private was not correctly
10607 implemented like the infamous i386 svr4.0, and systems where the
10608 VM page cache was not coherent with the file system buffer cache
10609 like early versions of FreeBSD and possibly contemporary NetBSD.)
10610 For shared mappings, we should conversely verify that changes get
10611 propagated back to all the places they're supposed to be.
10612
10613 Grep wants private fixed already mapped.
10614 The main things grep needs to know about mmap are:
10615 * does it exist and is it safe to write into the mmap'd area
10616 * how to use it (BSD variants) */
10617
10618 #include <fcntl.h>
10619 #include <sys/mman.h>
10620
10621 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10622 char *malloc ();
10623 #endif
10624
10625 /* This mess was copied from the GNU getpagesize.h. */
10626 #ifndef HAVE_GETPAGESIZE
10627 # ifdef _SC_PAGESIZE
10628 # define getpagesize() sysconf(_SC_PAGESIZE)
10629 # else /* no _SC_PAGESIZE */
10630 # ifdef HAVE_SYS_PARAM_H
10631 # include <sys/param.h>
10632 # ifdef EXEC_PAGESIZE
10633 # define getpagesize() EXEC_PAGESIZE
10634 # else /* no EXEC_PAGESIZE */
10635 # ifdef NBPG
10636 # define getpagesize() NBPG * CLSIZE
10637 # ifndef CLSIZE
10638 # define CLSIZE 1
10639 # endif /* no CLSIZE */
10640 # else /* no NBPG */
10641 # ifdef NBPC
10642 # define getpagesize() NBPC
10643 # else /* no NBPC */
10644 # ifdef PAGESIZE
10645 # define getpagesize() PAGESIZE
10646 # endif /* PAGESIZE */
10647 # endif /* no NBPC */
10648 # endif /* no NBPG */
10649 # endif /* no EXEC_PAGESIZE */
10650 # else /* no HAVE_SYS_PARAM_H */
10651 # define getpagesize() 8192 /* punt totally */
10652 # endif /* no HAVE_SYS_PARAM_H */
10653 # endif /* no _SC_PAGESIZE */
10654
10655 #endif /* no HAVE_GETPAGESIZE */
10656
10657 int
10658 main ()
10659 {
10660 char *data, *data2, *data3;
10661 const char *cdata2;
10662 int i, pagesize;
10663 int fd, fd2;
10664
10665 pagesize = getpagesize ();
10666
10667 /* First, make a file with some known garbage in it. */
10668 data = (char *) malloc (pagesize);
10669 if (!data)
10670 return 1;
10671 for (i = 0; i < pagesize; ++i)
10672 *(data + i) = rand ();
10673 umask (0);
10674 fd = creat ("conftest.mmap", 0600);
10675 if (fd < 0)
10676 return 2;
10677 if (write (fd, data, pagesize) != pagesize)
10678 return 3;
10679 close (fd);
10680
10681 /* Next, check that the tail of a page is zero-filled. File must have
10682 non-zero length, otherwise we risk SIGBUS for entire page. */
10683 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10684 if (fd2 < 0)
10685 return 4;
10686 cdata2 = "";
10687 if (write (fd2, cdata2, 1) != 1)
10688 return 5;
10689 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10690 if (data2 == MAP_FAILED)
10691 return 6;
10692 for (i = 0; i < pagesize; ++i)
10693 if (*(data2 + i))
10694 return 7;
10695 close (fd2);
10696 if (munmap (data2, pagesize))
10697 return 8;
10698
10699 /* Next, try to mmap the file at a fixed address which already has
10700 something else allocated at it. If we can, also make sure that
10701 we see the same garbage. */
10702 fd = open ("conftest.mmap", O_RDWR);
10703 if (fd < 0)
10704 return 9;
10705 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10706 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10707 return 10;
10708 for (i = 0; i < pagesize; ++i)
10709 if (*(data + i) != *(data2 + i))
10710 return 11;
10711
10712 /* Finally, make sure that changes to the mapped area do not
10713 percolate back to the file as seen by read(). (This is a bug on
10714 some variants of i386 svr4.0.) */
10715 for (i = 0; i < pagesize; ++i)
10716 *(data2 + i) = *(data2 + i) + 1;
10717 data3 = (char *) malloc (pagesize);
10718 if (!data3)
10719 return 12;
10720 if (read (fd, data3, pagesize) != pagesize)
10721 return 13;
10722 for (i = 0; i < pagesize; ++i)
10723 if (*(data + i) != *(data3 + i))
10724 return 14;
10725 close (fd);
10726 return 0;
10727 }
10728 _ACEOF
10729 if ac_fn_c_try_run "$LINENO"; then :
10730 ac_cv_func_mmap_fixed_mapped=yes
10731 else
10732 ac_cv_func_mmap_fixed_mapped=no
10733 fi
10734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10735 conftest.$ac_objext conftest.beam conftest.$ac_ext
10736 fi
10737
10738 fi
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10740 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10741 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10742
10743 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10744
10745 fi
10746 rm -f conftest.mmap conftest.txt
10747
10748 if test $use_mmap_for_buffers = yes; then
10749
10750 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10751
10752 REL_ALLOC=no
10753 fi
10754
10755 LIBS="$LIBS_SYSTEM $LIBS"
10756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10758 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10759 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10760 $as_echo_n "(cached) " >&6
10761 else
10762 ac_check_lib_save_LIBS=$LIBS
10763 LIBS="-ldnet $LIBS"
10764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10765 /* end confdefs.h. */
10766
10767 /* Override any GCC internal prototype to avoid an error.
10768 Use char because int might match the return type of a GCC
10769 builtin and then its argument prototype would still apply. */
10770 #ifdef __cplusplus
10771 extern "C"
10772 #endif
10773 char dnet_ntoa ();
10774 int
10775 main ()
10776 {
10777 return dnet_ntoa ();
10778 ;
10779 return 0;
10780 }
10781 _ACEOF
10782 if ac_fn_c_try_link "$LINENO"; then :
10783 ac_cv_lib_dnet_dnet_ntoa=yes
10784 else
10785 ac_cv_lib_dnet_dnet_ntoa=no
10786 fi
10787 rm -f core conftest.err conftest.$ac_objext \
10788 conftest$ac_exeext conftest.$ac_ext
10789 LIBS=$ac_check_lib_save_LIBS
10790 fi
10791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10792 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10793 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10794 cat >>confdefs.h <<_ACEOF
10795 #define HAVE_LIBDNET 1
10796 _ACEOF
10797
10798 LIBS="-ldnet $LIBS"
10799
10800 fi
10801
10802
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10804 $as_echo_n "checking for main in -lXbsd... " >&6; }
10805 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10806 $as_echo_n "(cached) " >&6
10807 else
10808 ac_check_lib_save_LIBS=$LIBS
10809 LIBS="-lXbsd $LIBS"
10810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10811 /* end confdefs.h. */
10812
10813
10814 int
10815 main ()
10816 {
10817 return main ();
10818 ;
10819 return 0;
10820 }
10821 _ACEOF
10822 if ac_fn_c_try_link "$LINENO"; then :
10823 ac_cv_lib_Xbsd_main=yes
10824 else
10825 ac_cv_lib_Xbsd_main=no
10826 fi
10827 rm -f core conftest.err conftest.$ac_objext \
10828 conftest$ac_exeext conftest.$ac_ext
10829 LIBS=$ac_check_lib_save_LIBS
10830 fi
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10832 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10833 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10834 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10835 fi
10836
10837
10838 LIB_PTHREAD=
10839
10840
10841
10842 if test "$ac_cv_header_pthread_h"; then
10843 if test "$GMALLOC_OBJ" = gmalloc.o; then
10844 emacs_pthread_function=pthread_atfork
10845 else
10846 emacs_pthread_function=pthread_self
10847 fi
10848 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10850 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10851 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10852 $as_echo_n "(cached) " >&6
10853 else
10854 ac_check_lib_save_LIBS=$LIBS
10855 LIBS="-lpthread $LIBS"
10856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10857 /* end confdefs.h. */
10858
10859 /* Override any GCC internal prototype to avoid an error.
10860 Use char because int might match the return type of a GCC
10861 builtin and then its argument prototype would still apply. */
10862 #ifdef __cplusplus
10863 extern "C"
10864 #endif
10865 char $emacs_pthread_function ();
10866 int
10867 main ()
10868 {
10869 return $emacs_pthread_function ();
10870 ;
10871 return 0;
10872 }
10873 _ACEOF
10874 if ac_fn_c_try_link "$LINENO"; then :
10875 eval "$as_ac_Lib=yes"
10876 else
10877 eval "$as_ac_Lib=no"
10878 fi
10879 rm -f core conftest.err conftest.$ac_objext \
10880 conftest$ac_exeext conftest.$ac_ext
10881 LIBS=$ac_check_lib_save_LIBS
10882 fi
10883 eval ac_res=\$$as_ac_Lib
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10885 $as_echo "$ac_res" >&6; }
10886 eval as_val=\$$as_ac_Lib
10887 if test "x$as_val" = x""yes; then :
10888 HAVE_PTHREAD=yes
10889 fi
10890
10891 fi
10892 if test "$HAVE_PTHREAD" = yes; then
10893 case "${canonical}" in
10894 *-hpux*) ;;
10895 *) LIB_PTHREAD="-lpthread"
10896 LIBS="$LIB_PTHREAD $LIBS" ;;
10897 esac
10898
10899 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10900
10901 fi
10902
10903
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10905 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10906 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10907 $as_echo_n "(cached) " >&6
10908 else
10909 ac_check_lib_save_LIBS=$LIBS
10910 LIBS="-lpthreads $LIBS"
10911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10912 /* end confdefs.h. */
10913
10914 /* Override any GCC internal prototype to avoid an error.
10915 Use char because int might match the return type of a GCC
10916 builtin and then its argument prototype would still apply. */
10917 #ifdef __cplusplus
10918 extern "C"
10919 #endif
10920 char cma_open ();
10921 int
10922 main ()
10923 {
10924 return cma_open ();
10925 ;
10926 return 0;
10927 }
10928 _ACEOF
10929 if ac_fn_c_try_link "$LINENO"; then :
10930 ac_cv_lib_pthreads_cma_open=yes
10931 else
10932 ac_cv_lib_pthreads_cma_open=no
10933 fi
10934 rm -f core conftest.err conftest.$ac_objext \
10935 conftest$ac_exeext conftest.$ac_ext
10936 LIBS=$ac_check_lib_save_LIBS
10937 fi
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10939 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10940 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10941 cat >>confdefs.h <<_ACEOF
10942 #define HAVE_LIBPTHREADS 1
10943 _ACEOF
10944
10945 LIBS="-lpthreads $LIBS"
10946
10947 fi
10948
10949
10950 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10951 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10952 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10953 ## added to LIBS in configure would never contain the pthreads part,
10954 ## but the value used in Makefiles might. FIXME?
10955 ##
10956 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10957 ## be harmless on older versions of X where it happens to exist.
10958 test "$opsys" = "aix4-2" && \
10959 test $ac_cv_lib_pthreads_cma_open = yes && \
10960 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10961
10962
10963 case ${host_os} in
10964 aix*)
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10966 $as_echo_n "checking for -bbigtoc option... " >&6; }
10967 if test "${gdb_cv_bigtoc+set}" = set; then :
10968 $as_echo_n "(cached) " >&6
10969 else
10970
10971 case $GCC in
10972 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10973 *) gdb_cv_bigtoc=-bbigtoc ;;
10974 esac
10975
10976 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978 /* end confdefs.h. */
10979
10980 int
10981 main ()
10982 {
10983 int i;
10984 ;
10985 return 0;
10986 }
10987 _ACEOF
10988 if ac_fn_c_try_link "$LINENO"; then :
10989
10990 else
10991 gdb_cv_bigtoc=
10992 fi
10993 rm -f core conftest.err conftest.$ac_objext \
10994 conftest$ac_exeext conftest.$ac_ext
10995
10996 fi
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10998 $as_echo "$gdb_cv_bigtoc" >&6; }
10999 ;;
11000 esac
11001
11002 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
11003 # used for the tests that follow. We set them back to REAL_CFLAGS and
11004 # REAL_CPPFLAGS later on.
11005
11006 REAL_CFLAGS="$CFLAGS"
11007 REAL_CPPFLAGS="$CPPFLAGS"
11008
11009 if test "${HAVE_X11}" = "yes"; then
11010 DEFS="$C_SWITCH_X_SITE $DEFS"
11011 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
11012 LIBS="-lX11 $LIBS"
11013 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
11014 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
11015
11016 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
11017 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
11018 # but it's more convenient here to set LD_RUN_PATH since this
11019 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
11020 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
11021 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
11022 export LD_RUN_PATH
11023 fi
11024
11025 if test "${opsys}" = "gnu-linux"; then
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
11027 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
11028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029 /* end confdefs.h. */
11030
11031 int
11032 main ()
11033 {
11034 XOpenDisplay ("foo");
11035 ;
11036 return 0;
11037 }
11038 _ACEOF
11039 if ac_fn_c_try_link "$LINENO"; then :
11040 xgnu_linux_first_failure=no
11041 else
11042 xgnu_linux_first_failure=yes
11043 fi
11044 rm -f core conftest.err conftest.$ac_objext \
11045 conftest$ac_exeext conftest.$ac_ext
11046 if test "${xgnu_linux_first_failure}" = "yes"; then
11047 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
11048 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
11049 OLD_CPPFLAGS="$CPPFLAGS"
11050 OLD_LIBS="$LIBS"
11051 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11052 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11053 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11054 LIBS="$LIBS -b i486-linuxaout"
11055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11056 /* end confdefs.h. */
11057
11058 int
11059 main ()
11060 {
11061 XOpenDisplay ("foo");
11062 ;
11063 return 0;
11064 }
11065 _ACEOF
11066 if ac_fn_c_try_link "$LINENO"; then :
11067 xgnu_linux_second_failure=no
11068 else
11069 xgnu_linux_second_failure=yes
11070 fi
11071 rm -f core conftest.err conftest.$ac_objext \
11072 conftest$ac_exeext conftest.$ac_ext
11073 if test "${xgnu_linux_second_failure}" = "yes"; then
11074 # If we get the same failure with -b, there is no use adding -b.
11075 # So take it out. This plays safe.
11076 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11077 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11078 CPPFLAGS="$OLD_CPPFLAGS"
11079 LIBS="$OLD_LIBS"
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11081 $as_echo "no" >&6; }
11082 else
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11084 $as_echo "yes" >&6; }
11085 fi
11086 else
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088 $as_echo "no" >&6; }
11089 fi
11090 fi
11091
11092 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11093 # header files included from there.
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11095 $as_echo_n "checking for Xkb... " >&6; }
11096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11097 /* end confdefs.h. */
11098 #include <X11/Xlib.h>
11099 #include <X11/XKBlib.h>
11100 int
11101 main ()
11102 {
11103 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
11104 ;
11105 return 0;
11106 }
11107 _ACEOF
11108 if ac_fn_c_try_link "$LINENO"; then :
11109 emacs_xkb=yes
11110 else
11111 emacs_xkb=no
11112 fi
11113 rm -f core conftest.err conftest.$ac_objext \
11114 conftest$ac_exeext conftest.$ac_ext
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11116 $as_echo "$emacs_xkb" >&6; }
11117 if test $emacs_xkb = yes; then
11118
11119 $as_echo "#define HAVE_XKB 1" >>confdefs.h
11120
11121 fi
11122
11123 for ac_func in XrmSetDatabase XScreenResourceString \
11124 XScreenNumberOfScreen
11125 do :
11126 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11127 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11128 eval as_val=\$$as_ac_var
11129 if test "x$as_val" = x""yes; then :
11130 cat >>confdefs.h <<_ACEOF
11131 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11132 _ACEOF
11133
11134 fi
11135 done
11136
11137 fi
11138
11139 if test "${window_system}" = "x11"; then
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11141 $as_echo_n "checking X11 version 6... " >&6; }
11142 if test "${emacs_cv_x11_version_6+set}" = set; then :
11143 $as_echo_n "(cached) " >&6
11144 else
11145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11146 /* end confdefs.h. */
11147 #include <X11/Xlib.h>
11148 int
11149 main ()
11150 {
11151 #if XlibSpecificationRelease < 6
11152 fail;
11153 #endif
11154
11155 ;
11156 return 0;
11157 }
11158 _ACEOF
11159 if ac_fn_c_try_link "$LINENO"; then :
11160 emacs_cv_x11_version_6=yes
11161 else
11162 emacs_cv_x11_version_6=no
11163 fi
11164 rm -f core conftest.err conftest.$ac_objext \
11165 conftest$ac_exeext conftest.$ac_ext
11166 fi
11167
11168 if test $emacs_cv_x11_version_6 = yes; then
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11170 $as_echo "6 or newer" >&6; }
11171
11172 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
11173
11174
11175 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
11176
11177 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11178 ## XIM support.
11179 case "$opsys" in
11180 sol2-*) : ;;
11181 *)
11182 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
11183
11184 ;;
11185 esac
11186 else
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11188 $as_echo "before 6" >&6; }
11189 fi
11190 fi
11191
11192
11193 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11194 HAVE_RSVG=no
11195 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
11196 if test "${with_rsvg}" != "no"; then
11197 RSVG_REQUIRED=2.11.0
11198 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11199
11200
11201 succeeded=no
11202
11203 if test "$PKG_CONFIG" = "no" ; then
11204 :
11205 else
11206 PKG_CONFIG_MIN_VERSION=0.9.0
11207 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11209 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
11210
11211 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11212 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11213 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
11214 edit_cflags="
11215 s,///*,/,g
11216 s/^/ /
11217 s/ -I/ $isystem/g
11218 s/^ //
11219 "
11220 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11221 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11223 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11224 succeeded=yes
11225 else
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11227 $as_echo "no" >&6; }
11228 RSVG_CFLAGS=""
11229 RSVG_LIBS=""
11230 ## If we have a custom action on failure, don't print errors, but
11231 ## do set a variable so people can do so. Do it in a subshell
11232 ## to capture any diagnostics in invoking pkg-config.
11233 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
11234
11235 fi
11236
11237
11238
11239 else
11240 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11241 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11242 fi
11243 fi
11244
11245 if test $succeeded = yes; then
11246 HAVE_RSVG=yes
11247 else
11248 :
11249 fi
11250
11251
11252
11253
11254 if test $HAVE_RSVG = yes; then
11255
11256 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
11257
11258 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11259 LIBS="$RSVG_LIBS $LIBS"
11260 fi
11261 fi
11262 fi
11263
11264 HAVE_IMAGEMAGICK=no
11265 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
11266 if test "${with_imagemagick}" != "no"; then
11267 ## 6.2.8 is the earliest version known to work, but earlier versions
11268 ## might work - let us know if you find one.
11269 ## 6.0.7 does not work. See bug#7955.
11270 ## 6.8.2 makes Emacs crash; see Bug#13867.
11271 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
11272
11273 succeeded=no
11274
11275 if test "$PKG_CONFIG" = "no" ; then
11276 :
11277 else
11278 PKG_CONFIG_MIN_VERSION=0.9.0
11279 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11281 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
11282
11283 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11284 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11285 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
11286 edit_cflags="
11287 s,///*,/,g
11288 s/^/ /
11289 s/ -I/ $isystem/g
11290 s/^ //
11291 "
11292 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11293 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11295 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11296 succeeded=yes
11297 else
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299 $as_echo "no" >&6; }
11300 IMAGEMAGICK_CFLAGS=""
11301 IMAGEMAGICK_LIBS=""
11302 ## If we have a custom action on failure, don't print errors, but
11303 ## do set a variable so people can do so. Do it in a subshell
11304 ## to capture any diagnostics in invoking pkg-config.
11305 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
11306
11307 fi
11308
11309
11310
11311 else
11312 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11313 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11314 fi
11315 fi
11316
11317 if test $succeeded = yes; then
11318 HAVE_IMAGEMAGICK=yes
11319 else
11320 :
11321 fi
11322
11323
11324
11325
11326 if test $HAVE_IMAGEMAGICK = yes; then
11327
11328 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
11329
11330 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11331 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11332 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11333 do :
11334 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11335 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11336 eval as_val=\$$as_ac_var
11337 if test "x$as_val" = x""yes; then :
11338 cat >>confdefs.h <<_ACEOF
11339 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11340 _ACEOF
11341
11342 fi
11343 done
11344
11345 fi
11346 fi
11347 fi
11348
11349
11350 HAVE_GTK=no
11351 GTK_OBJ=
11352 gtk_term_header=$term_header
11353 check_gtk2=no
11354 gtk3_pkg_errors=
11355 if test "${opsys}" != "mingw32"; then
11356 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11357 GLIB_REQUIRED=2.28
11358 GTK_REQUIRED=3.0
11359 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11360
11361
11362 succeeded=no
11363
11364 if test "$PKG_CONFIG" = "no" ; then
11365 pkg_check_gtk=no
11366 else
11367 PKG_CONFIG_MIN_VERSION=0.9.0
11368 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11370 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11371
11372 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11373 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11374 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11375 edit_cflags="
11376 s,///*,/,g
11377 s/^/ /
11378 s/ -I/ $isystem/g
11379 s/^ //
11380 "
11381 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11382 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11384 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11385 succeeded=yes
11386 else
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388 $as_echo "no" >&6; }
11389 GTK_CFLAGS=""
11390 GTK_LIBS=""
11391 ## If we have a custom action on failure, don't print errors, but
11392 ## do set a variable so people can do so. Do it in a subshell
11393 ## to capture any diagnostics in invoking pkg-config.
11394 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11395
11396 fi
11397
11398
11399
11400 else
11401 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11402 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11403 fi
11404 fi
11405
11406 if test $succeeded = yes; then
11407 pkg_check_gtk=yes
11408 else
11409 pkg_check_gtk=no
11410 fi
11411
11412 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11413 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11414 fi
11415 if test "$pkg_check_gtk" = "yes"; then
11416
11417 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
11418
11419 GTK_OBJ=emacsgtkfixed.o
11420 gtk_term_header=gtkutil.h
11421 USE_GTK_TOOLKIT="GTK3"
11422 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11423 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
11424 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
11425 fi
11426 else
11427 check_gtk2=yes
11428 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11429 fi
11430 fi
11431
11432 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11433 GLIB_REQUIRED=2.10
11434 GTK_REQUIRED=2.10
11435 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11436
11437
11438 succeeded=no
11439
11440 if test "$PKG_CONFIG" = "no" ; then
11441 pkg_check_gtk=no
11442 else
11443 PKG_CONFIG_MIN_VERSION=0.9.0
11444 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11446 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11447
11448 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11449 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11450 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11451 edit_cflags="
11452 s,///*,/,g
11453 s/^/ /
11454 s/ -I/ $isystem/g
11455 s/^ //
11456 "
11457 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11458 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11460 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11461 succeeded=yes
11462 else
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464 $as_echo "no" >&6; }
11465 GTK_CFLAGS=""
11466 GTK_LIBS=""
11467 ## If we have a custom action on failure, don't print errors, but
11468 ## do set a variable so people can do so. Do it in a subshell
11469 ## to capture any diagnostics in invoking pkg-config.
11470 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11471
11472 fi
11473
11474
11475
11476 else
11477 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11478 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11479 fi
11480 fi
11481
11482 if test $succeeded = yes; then
11483 pkg_check_gtk=yes
11484 else
11485 pkg_check_gtk=no
11486 fi
11487
11488 if test "$pkg_check_gtk" = "no" &&
11489 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11490 then
11491 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11492 fi
11493 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
11494 fi
11495 fi
11496
11497 if test x"$pkg_check_gtk" = xyes; then
11498
11499
11500
11501 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11502 CFLAGS="$CFLAGS $GTK_CFLAGS"
11503 LIBS="$GTK_LIBS $LIBS"
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
11505 $as_echo_n "checking whether GTK compiles... " >&6; }
11506 GTK_COMPILES=no
11507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11508 /* end confdefs.h. */
11509 /* Check the Gtk and Glib APIs. */
11510 #include <gtk/gtk.h>
11511 #include <glib-object.h>
11512 static void
11513 callback (GObject *go, GParamSpec *spec, gpointer user_data)
11514 {}
11515
11516 int
11517 main ()
11518 {
11519
11520 GtkSettings *gs = 0;
11521 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
11522 strict C prohibits this. Use gtk_main_iteration to test that the
11523 libraries are there. */
11524 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
11525 0, 0, 0, G_CALLBACK (callback), 0))
11526 gtk_main_iteration ();
11527
11528 ;
11529 return 0;
11530 }
11531 _ACEOF
11532 if ac_fn_c_try_link "$LINENO"; then :
11533 GTK_COMPILES=yes
11534 fi
11535 rm -f core conftest.err conftest.$ac_objext \
11536 conftest$ac_exeext conftest.$ac_ext
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5
11538 $as_echo "$GTK_COMPILES" >&6; }
11539 if test "${GTK_COMPILES}" != "yes"; then
11540 GTK_OBJ=
11541 if test "$USE_X_TOOLKIT" != "maybe"; then
11542 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11543 fi
11544 else
11545 HAVE_GTK=yes
11546
11547 $as_echo "#define USE_GTK 1" >>confdefs.h
11548
11549 GTK_OBJ="gtkutil.o $GTK_OBJ"
11550 term_header=$gtk_term_header
11551 USE_X_TOOLKIT=none
11552 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
11553 :
11554 else
11555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11556 closing open displays. This is no problem if you just use
11557 one display, but if you use more than one and close one of them
11558 Emacs may crash." >&5
11559 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11560 closing open displays. This is no problem if you just use
11561 one display, but if you use more than one and close one of them
11562 Emacs may crash." >&2;}
11563 sleep 3
11564 fi
11565 fi
11566
11567 fi
11568
11569
11570
11571 if test "${HAVE_GTK}" = "yes"; then
11572
11573 if test "$with_toolkit_scroll_bars" != no; then
11574 with_toolkit_scroll_bars=yes
11575 fi
11576
11577 HAVE_GTK_FILE_SELECTION=no
11578 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11579 #include <gtk/gtk.h>
11580 "
11581 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11582 HAVE_GTK_FILE_SELECTION=yes
11583 else
11584 HAVE_GTK_FILE_SELECTION=no
11585 fi
11586
11587 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11588 for ac_func in gtk_file_selection_new
11589 do :
11590 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11591 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11592 cat >>confdefs.h <<_ACEOF
11593 #define HAVE_GTK_FILE_SELECTION_NEW 1
11594 _ACEOF
11595
11596 fi
11597 done
11598
11599 fi
11600
11601 HAVE_GTK_HANDLE_BOX=no
11602 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11603 #include <gtk/gtk.h>
11604 "
11605 if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11606 HAVE_GTK_HANDLE_BOX=yes
11607 else
11608 HAVE_GTK_HANDLE_BOX=no
11609 fi
11610
11611 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11612 for ac_func in gtk_handle_box_new
11613 do :
11614 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11615 if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11616 cat >>confdefs.h <<_ACEOF
11617 #define HAVE_GTK_HANDLE_BOX_NEW 1
11618 _ACEOF
11619
11620 fi
11621 done
11622
11623 fi
11624
11625 HAVE_GTK_TEAROFF_MENU_ITEM=no
11626 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11627 #include <gtk/gtk.h>
11628 "
11629 if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11630 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11631 else
11632 HAVE_GTK_TEAROFF_MENU_ITEM=no
11633 fi
11634
11635 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11636 for ac_func in gtk_tearoff_menu_item_new
11637 do :
11638 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11639 if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11640 cat >>confdefs.h <<_ACEOF
11641 #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11642 _ACEOF
11643
11644 fi
11645 done
11646
11647 fi
11648
11649 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11650 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11651 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11652 gtk_orientable_set_orientation \
11653 gtk_window_set_has_resize_grip
11654 do :
11655 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11656 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11657 eval as_val=\$$as_ac_var
11658 if test "x$as_val" = x""yes; then :
11659 cat >>confdefs.h <<_ACEOF
11660 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11661 _ACEOF
11662
11663 fi
11664 done
11665
11666
11667 term_header=gtkutil.h
11668 fi
11669
11670 HAVE_DBUS=no
11671 DBUS_OBJ=
11672 if test "${with_dbus}" = "yes"; then
11673
11674 succeeded=no
11675
11676 if test "$PKG_CONFIG" = "no" ; then
11677 HAVE_DBUS=no
11678 else
11679 PKG_CONFIG_MIN_VERSION=0.9.0
11680 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11682 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11683
11684 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11685 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11686 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
11687 edit_cflags="
11688 s,///*,/,g
11689 s/^/ /
11690 s/ -I/ $isystem/g
11691 s/^ //
11692 "
11693 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11694 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11696 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11697 succeeded=yes
11698 else
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700 $as_echo "no" >&6; }
11701 DBUS_CFLAGS=""
11702 DBUS_LIBS=""
11703 ## If we have a custom action on failure, don't print errors, but
11704 ## do set a variable so people can do so. Do it in a subshell
11705 ## to capture any diagnostics in invoking pkg-config.
11706 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
11707
11708 fi
11709
11710
11711
11712 else
11713 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11714 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11715 fi
11716 fi
11717
11718 if test $succeeded = yes; then
11719 HAVE_DBUS=yes
11720 else
11721 HAVE_DBUS=no
11722 fi
11723
11724 if test "$HAVE_DBUS" = yes; then
11725 LIBS="$LIBS $DBUS_LIBS"
11726
11727 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11728
11729 for ac_func in dbus_watch_get_unix_fd \
11730 dbus_type_is_valid \
11731 dbus_validate_bus_name \
11732 dbus_validate_path \
11733 dbus_validate_interface \
11734 dbus_validate_member
11735 do :
11736 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11737 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11738 eval as_val=\$$as_ac_var
11739 if test "x$as_val" = x""yes; then :
11740 cat >>confdefs.h <<_ACEOF
11741 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11742 _ACEOF
11743
11744 fi
11745 done
11746
11747 DBUS_OBJ=dbusbind.o
11748 fi
11749 fi
11750
11751
11752 HAVE_GSETTINGS=no
11753 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11754
11755 succeeded=no
11756
11757 if test "$PKG_CONFIG" = "no" ; then
11758 HAVE_GSETTINGS=no
11759 else
11760 PKG_CONFIG_MIN_VERSION=0.9.0
11761 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11763 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11764
11765 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11766 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11767 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
11768 edit_cflags="
11769 s,///*,/,g
11770 s/^/ /
11771 s/ -I/ $isystem/g
11772 s/^ //
11773 "
11774 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11775 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11777 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11778 succeeded=yes
11779 else
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11781 $as_echo "no" >&6; }
11782 GSETTINGS_CFLAGS=""
11783 GSETTINGS_LIBS=""
11784 ## If we have a custom action on failure, don't print errors, but
11785 ## do set a variable so people can do so. Do it in a subshell
11786 ## to capture any diagnostics in invoking pkg-config.
11787 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
11788
11789 fi
11790
11791
11792
11793 else
11794 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11795 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11796 fi
11797 fi
11798
11799 if test $succeeded = yes; then
11800 HAVE_GSETTINGS=yes
11801 else
11802 HAVE_GSETTINGS=no
11803 fi
11804
11805 if test "$HAVE_GSETTINGS" = "yes"; then
11806
11807 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11808
11809 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11810 SETTINGS_LIBS="$GSETTINGS_LIBS"
11811 fi
11812 fi
11813
11814 HAVE_GCONF=no
11815 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11816
11817 succeeded=no
11818
11819 if test "$PKG_CONFIG" = "no" ; then
11820 HAVE_GCONF=no
11821 else
11822 PKG_CONFIG_MIN_VERSION=0.9.0
11823 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11825 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11826
11827 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11828 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11829 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
11830 edit_cflags="
11831 s,///*,/,g
11832 s/^/ /
11833 s/ -I/ $isystem/g
11834 s/^ //
11835 "
11836 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11837 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11839 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11840 succeeded=yes
11841 else
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11843 $as_echo "no" >&6; }
11844 GCONF_CFLAGS=""
11845 GCONF_LIBS=""
11846 ## If we have a custom action on failure, don't print errors, but
11847 ## do set a variable so people can do so. Do it in a subshell
11848 ## to capture any diagnostics in invoking pkg-config.
11849 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
11850
11851 fi
11852
11853
11854
11855 else
11856 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11857 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11858 fi
11859 fi
11860
11861 if test $succeeded = yes; then
11862 HAVE_GCONF=yes
11863 else
11864 HAVE_GCONF=no
11865 fi
11866
11867 if test "$HAVE_GCONF" = yes; then
11868
11869 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11870
11871 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11872 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11873 fi
11874 fi
11875
11876 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11877
11878 succeeded=no
11879
11880 if test "$PKG_CONFIG" = "no" ; then
11881 HAVE_GOBJECT=no
11882 else
11883 PKG_CONFIG_MIN_VERSION=0.9.0
11884 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11886 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11887
11888 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11889 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11890 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
11891 edit_cflags="
11892 s,///*,/,g
11893 s/^/ /
11894 s/ -I/ $isystem/g
11895 s/^ //
11896 "
11897 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11898 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11900 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11901 succeeded=yes
11902 else
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11904 $as_echo "no" >&6; }
11905 GOBJECT_CFLAGS=""
11906 GOBJECT_LIBS=""
11907 ## If we have a custom action on failure, don't print errors, but
11908 ## do set a variable so people can do so. Do it in a subshell
11909 ## to capture any diagnostics in invoking pkg-config.
11910 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
11911
11912 fi
11913
11914
11915
11916 else
11917 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11918 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11919 fi
11920 fi
11921
11922 if test $succeeded = yes; then
11923 HAVE_GOBJECT=yes
11924 else
11925 HAVE_GOBJECT=no
11926 fi
11927
11928 if test "$HAVE_GOBJECT" = "yes"; then
11929 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11930 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11931 fi
11932 SAVE_CFLAGS="$CFLAGS"
11933 SAVE_LIBS="$LIBS"
11934 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11935 LIBS="$SETTINGS_LIBS $LIBS"
11936 for ac_func in g_type_init
11937 do :
11938 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11939 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11940 cat >>confdefs.h <<_ACEOF
11941 #define HAVE_G_TYPE_INIT 1
11942 _ACEOF
11943
11944 fi
11945 done
11946
11947 CFLAGS="$SAVE_CFLAGS"
11948 LIBS="$SAVE_LIBS"
11949 fi
11950
11951
11952
11953
11954 HAVE_LIBSELINUX=no
11955 LIBSELINUX_LIBS=
11956 if test "${with_selinux}" = "yes"; then
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11958 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11959 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11960 $as_echo_n "(cached) " >&6
11961 else
11962 ac_check_lib_save_LIBS=$LIBS
11963 LIBS="-lselinux $LIBS"
11964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11965 /* end confdefs.h. */
11966
11967 /* Override any GCC internal prototype to avoid an error.
11968 Use char because int might match the return type of a GCC
11969 builtin and then its argument prototype would still apply. */
11970 #ifdef __cplusplus
11971 extern "C"
11972 #endif
11973 char lgetfilecon ();
11974 int
11975 main ()
11976 {
11977 return lgetfilecon ();
11978 ;
11979 return 0;
11980 }
11981 _ACEOF
11982 if ac_fn_c_try_link "$LINENO"; then :
11983 ac_cv_lib_selinux_lgetfilecon=yes
11984 else
11985 ac_cv_lib_selinux_lgetfilecon=no
11986 fi
11987 rm -f core conftest.err conftest.$ac_objext \
11988 conftest$ac_exeext conftest.$ac_ext
11989 LIBS=$ac_check_lib_save_LIBS
11990 fi
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11992 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11993 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11994 HAVE_LIBSELINUX=yes
11995 else
11996 HAVE_LIBSELINUX=no
11997 fi
11998
11999 if test "$HAVE_LIBSELINUX" = yes; then
12000
12001 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
12002
12003 LIBSELINUX_LIBS=-lselinux
12004 fi
12005 fi
12006
12007
12008 HAVE_GNUTLS=no
12009 if test "${with_gnutls}" = "yes" ; then
12010
12011 succeeded=no
12012
12013 if test "$PKG_CONFIG" = "no" ; then
12014 HAVE_GNUTLS=no
12015 else
12016 PKG_CONFIG_MIN_VERSION=0.9.0
12017 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
12019 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
12020
12021 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
12022 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
12023 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
12024 edit_cflags="
12025 s,///*,/,g
12026 s/^/ /
12027 s/ -I/ $isystem/g
12028 s/^ //
12029 "
12030 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
12031 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
12033 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
12034 succeeded=yes
12035 else
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12037 $as_echo "no" >&6; }
12038 LIBGNUTLS_CFLAGS=""
12039 LIBGNUTLS_LIBS=""
12040 ## If we have a custom action on failure, don't print errors, but
12041 ## do set a variable so people can do so. Do it in a subshell
12042 ## to capture any diagnostics in invoking pkg-config.
12043 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
12044
12045 fi
12046
12047
12048
12049 else
12050 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12051 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12052 fi
12053 fi
12054
12055 if test $succeeded = yes; then
12056 HAVE_GNUTLS=yes
12057 else
12058 HAVE_GNUTLS=no
12059 fi
12060
12061 if test "${HAVE_GNUTLS}" = "yes"; then
12062
12063 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
12064
12065 fi
12066
12067 # Windows loads GnuTLS dynamically
12068 if test "${opsys}" = "mingw32"; then
12069 LIBGNUTLS_LIBS=
12070 else
12071 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
12072 LIBS="$LIBGNUTLS_LIBS $LIBS"
12073 fi
12074 fi
12075
12076
12077
12078
12079 NOTIFY_OBJ=
12080 NOTIFY_SUMMARY=no
12081
12082 if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
12083 with_file_notification=no
12084 fi
12085
12086 case $with_file_notification,$opsys in
12087 w32,* | yes,mingw32)
12088 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12089 if test "x$ac_cv_header_windows_h" = x""yes; then :
12090
12091 fi
12092
12093
12094 if test "$ac_cv_header_windows_h" = yes ; then
12095
12096 $as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12097
12098 NOTIFY_OBJ=w32notify.o
12099 NOTIFY_SUMMARY="yes (w32)"
12100 fi ;;
12101 esac
12102
12103 case $with_file_notification,$NOTIFY_OBJ in
12104 gfile, | yes,)
12105
12106 succeeded=no
12107
12108 if test "$PKG_CONFIG" = "no" ; then
12109 HAVE_GFILENOTIFY=no
12110 else
12111 PKG_CONFIG_MIN_VERSION=0.9.0
12112 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12114 $as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12115
12116 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12117 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12118 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12119 edit_cflags="
12120 s,///*,/,g
12121 s/^/ /
12122 s/ -I/ $isystem/g
12123 s/^ //
12124 "
12125 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12126 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12128 $as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12129 succeeded=yes
12130 else
12131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132 $as_echo "no" >&6; }
12133 GFILENOTIFY_CFLAGS=""
12134 GFILENOTIFY_LIBS=""
12135 ## If we have a custom action on failure, don't print errors, but
12136 ## do set a variable so people can do so. Do it in a subshell
12137 ## to capture any diagnostics in invoking pkg-config.
12138 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12139
12140 fi
12141
12142
12143
12144 else
12145 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12146 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12147 fi
12148 fi
12149
12150 if test $succeeded = yes; then
12151 HAVE_GFILENOTIFY=yes
12152 else
12153 HAVE_GFILENOTIFY=no
12154 fi
12155
12156 if test "$HAVE_GFILENOTIFY" = "yes"; then
12157
12158 $as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12159
12160 NOTIFY_OBJ=gfilenotify.o
12161 NOTIFY_SUMMARY="yes -lgio (gfile)"
12162 fi ;;
12163 esac
12164
12165 case $with_file_notification,$NOTIFY_OBJ in
12166 inotify, | yes,)
12167 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
12168 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
12169
12170 fi
12171
12172
12173 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12174 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
12175 if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12176
12177 fi
12178
12179 if test "$ac_cv_func_inotify_init1" = yes; then
12180
12181 $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12182
12183 NOTIFY_OBJ=inotify.o
12184 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12185 fi
12186 fi ;;
12187 esac
12188
12189 case $with_file_notification,$NOTIFY_OBJ in
12190 yes,* | no,* | *,?*) ;;
12191 *) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
12192 esac
12193
12194 if test -n "$NOTIFY_OBJ"; then
12195
12196 $as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
12197
12198 fi
12199
12200
12201
12202
12203 HAVE_XAW3D=no
12204 LUCID_LIBW=
12205 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12206 if test "$with_xaw3d" != no; then
12207 if test "${emacs_cv_xaw3d+set}" = set; then :
12208 $as_echo_n "(cached) " >&6
12209 else
12210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12211 /* end confdefs.h. */
12212
12213 #include <X11/Intrinsic.h>
12214 #include <X11/Xaw3d/Simple.h>
12215 int
12216 main ()
12217 {
12218
12219 ;
12220 return 0;
12221 }
12222 _ACEOF
12223 if ac_fn_c_try_link "$LINENO"; then :
12224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12225 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12226 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12227 $as_echo_n "(cached) " >&6
12228 else
12229 ac_check_lib_save_LIBS=$LIBS
12230 LIBS="-lXaw3d $LIBS"
12231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12232 /* end confdefs.h. */
12233
12234 /* Override any GCC internal prototype to avoid an error.
12235 Use char because int might match the return type of a GCC
12236 builtin and then its argument prototype would still apply. */
12237 #ifdef __cplusplus
12238 extern "C"
12239 #endif
12240 char XawScrollbarSetThumb ();
12241 int
12242 main ()
12243 {
12244 return XawScrollbarSetThumb ();
12245 ;
12246 return 0;
12247 }
12248 _ACEOF
12249 if ac_fn_c_try_link "$LINENO"; then :
12250 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
12251 else
12252 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
12253 fi
12254 rm -f core conftest.err conftest.$ac_objext \
12255 conftest$ac_exeext conftest.$ac_ext
12256 LIBS=$ac_check_lib_save_LIBS
12257 fi
12258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12259 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12260 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12261 emacs_cv_xaw3d=yes
12262 else
12263 emacs_cv_xaw3d=no
12264 fi
12265
12266 else
12267 emacs_cv_xaw3d=no
12268 fi
12269 rm -f core conftest.err conftest.$ac_objext \
12270 conftest$ac_exeext conftest.$ac_ext
12271 fi
12272
12273 else
12274 emacs_cv_xaw3d=no
12275 fi
12276 if test $emacs_cv_xaw3d = yes; then
12277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12278 $as_echo_n "checking for xaw3d... " >&6; }
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12280 $as_echo "yes; using Lucid toolkit" >&6; }
12281 USE_X_TOOLKIT=LUCID
12282 HAVE_XAW3D=yes
12283 LUCID_LIBW=-lXaw3d
12284
12285 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
12286
12287 else
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12289 $as_echo_n "checking for xaw3d... " >&6; }
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12291 $as_echo "no" >&6; }
12292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12293 $as_echo_n "checking for libXaw... " >&6; }
12294 if test "${emacs_cv_xaw+set}" = set; then :
12295 $as_echo_n "(cached) " >&6
12296 else
12297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12298 /* end confdefs.h. */
12299
12300 #include <X11/Intrinsic.h>
12301 #include <X11/Xaw/Simple.h>
12302 int
12303 main ()
12304 {
12305
12306 ;
12307 return 0;
12308 }
12309 _ACEOF
12310 if ac_fn_c_try_link "$LINENO"; then :
12311 emacs_cv_xaw=yes
12312 else
12313 emacs_cv_xaw=no
12314 fi
12315 rm -f core conftest.err conftest.$ac_objext \
12316 conftest$ac_exeext conftest.$ac_ext
12317 fi
12318
12319 if test $emacs_cv_xaw = yes; then
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12321 $as_echo "yes; using Lucid toolkit" >&6; }
12322 USE_X_TOOLKIT=LUCID
12323 LUCID_LIBW=-lXaw
12324 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12325 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
12326 else
12327 as_fn_error "No X toolkit could be found.
12328 If you are sure you want Emacs compiled without an X toolkit, pass
12329 --with-x-toolkit=no
12330 to configure. Otherwise, install the development libraries for the toolkit
12331 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
12332 fi
12333 fi
12334 fi
12335
12336 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12337
12338 LIBXTR6=
12339 if test "${USE_X_TOOLKIT}" != "none"; then
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12341 $as_echo_n "checking X11 toolkit version... " >&6; }
12342 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
12343 $as_echo_n "(cached) " >&6
12344 else
12345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12346 /* end confdefs.h. */
12347 #include <X11/Intrinsic.h>
12348 int
12349 main ()
12350 {
12351 #if XtSpecificationRelease < 6
12352 fail;
12353 #endif
12354
12355 ;
12356 return 0;
12357 }
12358 _ACEOF
12359 if ac_fn_c_try_link "$LINENO"; then :
12360 emacs_cv_x11_toolkit_version_6=yes
12361 else
12362 emacs_cv_x11_toolkit_version_6=no
12363 fi
12364 rm -f core conftest.err conftest.$ac_objext \
12365 conftest$ac_exeext conftest.$ac_ext
12366 fi
12367
12368 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12369 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12371 $as_echo "6 or newer" >&6; }
12372
12373 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
12374
12375 LIBXTR6="-lSM -lICE"
12376 case "$opsys" in
12377 ## Use libw.a along with X11R6 Xt.
12378 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12379 esac
12380 else
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12382 $as_echo "before 6" >&6; }
12383 fi
12384
12385 OLDLIBS="$LIBS"
12386 if test x$HAVE_X11XTR6 = xyes; then
12387 LIBS="-lXt -lSM -lICE $LIBS"
12388 else
12389 LIBS="-lXt $LIBS"
12390 fi
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12392 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12393 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12394 $as_echo_n "(cached) " >&6
12395 else
12396 ac_check_lib_save_LIBS=$LIBS
12397 LIBS="-lXmu $LIBS"
12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399 /* end confdefs.h. */
12400
12401 /* Override any GCC internal prototype to avoid an error.
12402 Use char because int might match the return type of a GCC
12403 builtin and then its argument prototype would still apply. */
12404 #ifdef __cplusplus
12405 extern "C"
12406 #endif
12407 char XmuConvertStandardSelection ();
12408 int
12409 main ()
12410 {
12411 return XmuConvertStandardSelection ();
12412 ;
12413 return 0;
12414 }
12415 _ACEOF
12416 if ac_fn_c_try_link "$LINENO"; then :
12417 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12418 else
12419 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
12420 fi
12421 rm -f core conftest.err conftest.$ac_objext \
12422 conftest$ac_exeext conftest.$ac_ext
12423 LIBS=$ac_check_lib_save_LIBS
12424 fi
12425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12426 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12427 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12428 cat >>confdefs.h <<_ACEOF
12429 #define HAVE_LIBXMU 1
12430 _ACEOF
12431
12432 LIBS="-lXmu $LIBS"
12433
12434 fi
12435
12436 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12437 fi
12438
12439
12440 LIBXMU=-lXmu
12441 case $opsys in
12442 ## These systems don't supply Xmu.
12443 hpux* | aix4-2 )
12444 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12445 ;;
12446 mingw32 )
12447 LIBXMU=
12448 ;;
12449 esac
12450
12451
12452 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12453 if test "${HAVE_X11}" = "yes"; then
12454 if test "${USE_X_TOOLKIT}" != "none"; then
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12456 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12457 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
12458 $as_echo_n "(cached) " >&6
12459 else
12460 ac_check_lib_save_LIBS=$LIBS
12461 LIBS="-lXext $LIBS"
12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12463 /* end confdefs.h. */
12464
12465 /* Override any GCC internal prototype to avoid an error.
12466 Use char because int might match the return type of a GCC
12467 builtin and then its argument prototype would still apply. */
12468 #ifdef __cplusplus
12469 extern "C"
12470 #endif
12471 char XShapeQueryExtension ();
12472 int
12473 main ()
12474 {
12475 return XShapeQueryExtension ();
12476 ;
12477 return 0;
12478 }
12479 _ACEOF
12480 if ac_fn_c_try_link "$LINENO"; then :
12481 ac_cv_lib_Xext_XShapeQueryExtension=yes
12482 else
12483 ac_cv_lib_Xext_XShapeQueryExtension=no
12484 fi
12485 rm -f core conftest.err conftest.$ac_objext \
12486 conftest$ac_exeext conftest.$ac_ext
12487 LIBS=$ac_check_lib_save_LIBS
12488 fi
12489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12490 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12491 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12492 cat >>confdefs.h <<_ACEOF
12493 #define HAVE_LIBXEXT 1
12494 _ACEOF
12495
12496 LIBS="-lXext $LIBS"
12497
12498 fi
12499
12500 fi
12501 fi
12502
12503 LIBXP=
12504 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12505 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12506 if test -d /usr/include/openmotif; then
12507 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12508 emacs_cv_openmotif=yes
12509 case "$canonical" in
12510 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12511 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12512 ;;
12513 *)
12514 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12515 esac
12516 else
12517 emacs_cv_openmotif=no
12518 fi
12519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12520 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
12521 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
12522 $as_echo_n "(cached) " >&6
12523 else
12524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12525 /* end confdefs.h. */
12526 #include <Xm/Xm.h>
12527 int
12528 main ()
12529 {
12530 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12531 int x = 5;
12532 #else
12533 Motif version prior to 2.1.
12534 #endif
12535 ;
12536 return 0;
12537 }
12538 _ACEOF
12539 if ac_fn_c_try_compile "$LINENO"; then :
12540 emacs_cv_motif_version_2_1=yes
12541 else
12542 emacs_cv_motif_version_2_1=no
12543 fi
12544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12545 fi
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12547 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
12548 if test $emacs_cv_motif_version_2_1 = yes; then
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12550 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12551 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12552 $as_echo_n "(cached) " >&6
12553 else
12554 ac_check_lib_save_LIBS=$LIBS
12555 LIBS="-lXp $LIBS"
12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557 /* end confdefs.h. */
12558
12559 /* Override any GCC internal prototype to avoid an error.
12560 Use char because int might match the return type of a GCC
12561 builtin and then its argument prototype would still apply. */
12562 #ifdef __cplusplus
12563 extern "C"
12564 #endif
12565 char XpCreateContext ();
12566 int
12567 main ()
12568 {
12569 return XpCreateContext ();
12570 ;
12571 return 0;
12572 }
12573 _ACEOF
12574 if ac_fn_c_try_link "$LINENO"; then :
12575 ac_cv_lib_Xp_XpCreateContext=yes
12576 else
12577 ac_cv_lib_Xp_XpCreateContext=no
12578 fi
12579 rm -f core conftest.err conftest.$ac_objext \
12580 conftest$ac_exeext conftest.$ac_ext
12581 LIBS=$ac_check_lib_save_LIBS
12582 fi
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12584 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12585 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12586 LIBXP=-lXp
12587 fi
12588
12589 if test x$emacs_cv_openmotif = xyes; then
12590 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12591 fi
12592 else
12593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12594 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
12595 if test "${emacs_cv_lesstif+set}" = set; then :
12596 $as_echo_n "(cached) " >&6
12597 else
12598 # We put this in CFLAGS temporarily to precede other -I options
12599 # that might be in CFLAGS temporarily.
12600 # We put this in CPPFLAGS where it precedes the other -I options.
12601 OLD_CPPFLAGS=$CPPFLAGS
12602 OLD_CFLAGS=$CFLAGS
12603 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12604 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12606 /* end confdefs.h. */
12607 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12608 int
12609 main ()
12610 {
12611 int x = 5;
12612 ;
12613 return 0;
12614 }
12615 _ACEOF
12616 if ac_fn_c_try_compile "$LINENO"; then :
12617 emacs_cv_lesstif=yes
12618 else
12619 emacs_cv_lesstif=no
12620 fi
12621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12622 fi
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12624 $as_echo "$emacs_cv_lesstif" >&6; }
12625 if test $emacs_cv_lesstif = yes; then
12626 # Make sure this -I option remains in CPPFLAGS after it is set
12627 # back to REAL_CPPFLAGS.
12628 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12629 # have those other -I options anyway. Ultimately, having this
12630 # directory ultimately in CPPFLAGS will be enough.
12631 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12632 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12633 else
12634 CFLAGS=$OLD_CFLAGS
12635 CPPFLAGS=$OLD_CPPFLAGS
12636 fi
12637 fi
12638 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12639 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12640
12641 else
12642 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12643 fi
12644
12645
12646 fi
12647
12648
12649 USE_TOOLKIT_SCROLL_BARS=no
12650 if test "${with_toolkit_scroll_bars}" != "no"; then
12651 if test "${USE_X_TOOLKIT}" != "none"; then
12652 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12653 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12654
12655 HAVE_XAW3D=no
12656 USE_TOOLKIT_SCROLL_BARS=yes
12657 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12658 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12659
12660 USE_TOOLKIT_SCROLL_BARS=yes
12661 fi
12662 elif test "${HAVE_GTK}" = "yes"; then
12663 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12664
12665 USE_TOOLKIT_SCROLL_BARS=yes
12666 elif test "${HAVE_NS}" = "yes"; then
12667 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12668
12669 USE_TOOLKIT_SCROLL_BARS=yes
12670 elif test "${HAVE_W32}" = "yes"; then
12671 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12672
12673 USE_TOOLKIT_SCROLL_BARS=yes
12674 fi
12675 fi
12676
12677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678 /* end confdefs.h. */
12679
12680 #include <X11/Xlib.h>
12681 #include <X11/Xresource.h>
12682 int
12683 main ()
12684 {
12685 XIMProc callback;
12686 ;
12687 return 0;
12688 }
12689 _ACEOF
12690 if ac_fn_c_try_compile "$LINENO"; then :
12691 HAVE_XIM=yes
12692
12693 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12694
12695 else
12696 HAVE_XIM=no
12697 fi
12698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12699
12700
12701 if test "${with_xim}" != "no"; then
12702
12703 $as_echo "#define USE_XIM 1" >>confdefs.h
12704
12705 fi
12706
12707
12708 if test "${HAVE_XIM}" != "no"; then
12709 late_CFLAGS=$CFLAGS
12710 if test "$GCC" = yes; then
12711 CFLAGS="$CFLAGS --pedantic-errors"
12712 fi
12713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12714 /* end confdefs.h. */
12715
12716 #include <X11/Xlib.h>
12717 #include <X11/Xresource.h>
12718 int
12719 main ()
12720 {
12721 Display *display;
12722 XrmDatabase db;
12723 char *res_name;
12724 char *res_class;
12725 XIMProc callback;
12726 XPointer *client_data;
12727 #ifndef __GNUC__
12728 /* If we're not using GCC, it's probably not XFree86, and this is
12729 probably right, but we can't use something like --pedantic-errors. */
12730 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12731 char*, XIMProc, XPointer*);
12732 #endif
12733 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12734 client_data);
12735 ;
12736 return 0;
12737 }
12738 _ACEOF
12739 if ac_fn_c_try_compile "$LINENO"; then :
12740 emacs_cv_arg6_star=yes
12741 fi
12742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12743 if test "$emacs_cv_arg6_star" = yes; then
12744 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12745
12746 else
12747 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
12748
12749 fi
12750 CFLAGS=$late_CFLAGS
12751 fi
12752
12753 ### Start of font-backend (under any platform) section.
12754 # (nothing here yet -- this is a placeholder)
12755 ### End of font-backend (under any platform) section.
12756
12757 ### Start of font-backend (under X11) section.
12758 if test "${HAVE_X11}" = "yes"; then
12759
12760 succeeded=no
12761
12762 if test "$PKG_CONFIG" = "no" ; then
12763 HAVE_FC=no
12764 else
12765 PKG_CONFIG_MIN_VERSION=0.9.0
12766 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12768 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12769
12770 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12771 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12772 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
12773 edit_cflags="
12774 s,///*,/,g
12775 s/^/ /
12776 s/ -I/ $isystem/g
12777 s/^ //
12778 "
12779 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12780 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12782 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12783 succeeded=yes
12784 else
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12786 $as_echo "no" >&6; }
12787 FONTCONFIG_CFLAGS=""
12788 FONTCONFIG_LIBS=""
12789 ## If we have a custom action on failure, don't print errors, but
12790 ## do set a variable so people can do so. Do it in a subshell
12791 ## to capture any diagnostics in invoking pkg-config.
12792 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
12793
12794 fi
12795
12796
12797
12798 else
12799 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12800 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12801 fi
12802 fi
12803
12804 if test $succeeded = yes; then
12805 HAVE_FC=yes
12806 else
12807 HAVE_FC=no
12808 fi
12809
12810
12811 ## Use -lXft if available, unless `--with-xft=no'.
12812 HAVE_XFT=maybe
12813 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12814 with_xft="no";
12815 fi
12816 if test "x${with_xft}" != "xno"; then
12817
12818
12819 succeeded=no
12820
12821 if test "$PKG_CONFIG" = "no" ; then
12822 HAVE_XFT=no
12823 else
12824 PKG_CONFIG_MIN_VERSION=0.9.0
12825 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12827 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12828
12829 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12830 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12831 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
12832 edit_cflags="
12833 s,///*,/,g
12834 s/^/ /
12835 s/ -I/ $isystem/g
12836 s/^ //
12837 "
12838 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12839 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12841 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12842 succeeded=yes
12843 else
12844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845 $as_echo "no" >&6; }
12846 XFT_CFLAGS=""
12847 XFT_LIBS=""
12848 ## If we have a custom action on failure, don't print errors, but
12849 ## do set a variable so people can do so. Do it in a subshell
12850 ## to capture any diagnostics in invoking pkg-config.
12851 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
12852
12853 fi
12854
12855
12856
12857 else
12858 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12859 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12860 fi
12861 fi
12862
12863 if test $succeeded = yes; then
12864 :
12865 else
12866 HAVE_XFT=no
12867 fi
12868
12869 ## Because xftfont.c uses XRenderQueryExtension, we also
12870 ## need to link to -lXrender.
12871 HAVE_XRENDER=no
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12873 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12874 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12875 $as_echo_n "(cached) " >&6
12876 else
12877 ac_check_lib_save_LIBS=$LIBS
12878 LIBS="-lXrender $LIBS"
12879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880 /* end confdefs.h. */
12881
12882 /* Override any GCC internal prototype to avoid an error.
12883 Use char because int might match the return type of a GCC
12884 builtin and then its argument prototype would still apply. */
12885 #ifdef __cplusplus
12886 extern "C"
12887 #endif
12888 char XRenderQueryExtension ();
12889 int
12890 main ()
12891 {
12892 return XRenderQueryExtension ();
12893 ;
12894 return 0;
12895 }
12896 _ACEOF
12897 if ac_fn_c_try_link "$LINENO"; then :
12898 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12899 else
12900 ac_cv_lib_Xrender_XRenderQueryExtension=no
12901 fi
12902 rm -f core conftest.err conftest.$ac_objext \
12903 conftest$ac_exeext conftest.$ac_ext
12904 LIBS=$ac_check_lib_save_LIBS
12905 fi
12906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12907 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12908 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12909 HAVE_XRENDER=yes
12910 fi
12911
12912 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12913 OLD_CPPFLAGS="$CPPFLAGS"
12914 OLD_CFLAGS="$CFLAGS"
12915 OLD_LIBS="$LIBS"
12916 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12917 CFLAGS="$CFLAGS $XFT_CFLAGS"
12918 XFT_LIBS="-lXrender $XFT_LIBS"
12919 LIBS="$XFT_LIBS $LIBS"
12920 ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
12921 "
12922 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12924 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12925 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12926 $as_echo_n "(cached) " >&6
12927 else
12928 ac_check_lib_save_LIBS=$LIBS
12929 LIBS="-lXft $XFT_LIBS $LIBS"
12930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12931 /* end confdefs.h. */
12932
12933 /* Override any GCC internal prototype to avoid an error.
12934 Use char because int might match the return type of a GCC
12935 builtin and then its argument prototype would still apply. */
12936 #ifdef __cplusplus
12937 extern "C"
12938 #endif
12939 char XftFontOpen ();
12940 int
12941 main ()
12942 {
12943 return XftFontOpen ();
12944 ;
12945 return 0;
12946 }
12947 _ACEOF
12948 if ac_fn_c_try_link "$LINENO"; then :
12949 ac_cv_lib_Xft_XftFontOpen=yes
12950 else
12951 ac_cv_lib_Xft_XftFontOpen=no
12952 fi
12953 rm -f core conftest.err conftest.$ac_objext \
12954 conftest$ac_exeext conftest.$ac_ext
12955 LIBS=$ac_check_lib_save_LIBS
12956 fi
12957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12958 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12959 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12960 HAVE_XFT=yes
12961 fi
12962
12963 fi
12964
12965
12966
12967 if test "${HAVE_XFT}" = "yes"; then
12968
12969 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12970
12971
12972 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12973 else
12974 CPPFLAGS="$OLD_CPPFLAGS"
12975 CFLAGS="$OLD_CFLAGS"
12976 LIBS="$OLD_LIBS"
12977 fi # "${HAVE_XFT}" = "yes"
12978 fi # "$HAVE_XFT" != no
12979 fi # "x${with_xft}" != "xno"
12980
12981 ## We used to allow building with FreeType and without Xft.
12982 ## However, the ftx font backend driver is not in good shape.
12983 if test "$HAVE_XFT" != "yes"; then
12984 HAVE_XFT=no
12985 HAVE_FREETYPE=no
12986 else
12987
12988 succeeded=no
12989
12990 if test "$PKG_CONFIG" = "no" ; then
12991 HAVE_FREETYPE=no
12992 else
12993 PKG_CONFIG_MIN_VERSION=0.9.0
12994 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12996 $as_echo_n "checking for freetype2... " >&6; }
12997
12998 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12999 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
13000 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
13001 edit_cflags="
13002 s,///*,/,g
13003 s/^/ /
13004 s/ -I/ $isystem/g
13005 s/^ //
13006 "
13007 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
13008 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
13009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
13010 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
13011 succeeded=yes
13012 else
13013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13014 $as_echo "no" >&6; }
13015 FREETYPE_CFLAGS=""
13016 FREETYPE_LIBS=""
13017 ## If we have a custom action on failure, don't print errors, but
13018 ## do set a variable so people can do so. Do it in a subshell
13019 ## to capture any diagnostics in invoking pkg-config.
13020 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
13021
13022 fi
13023
13024
13025
13026 else
13027 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13028 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13029 fi
13030 fi
13031
13032 if test $succeeded = yes; then
13033 HAVE_FREETYPE=yes
13034 else
13035 HAVE_FREETYPE=no
13036 fi
13037
13038
13039 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
13040 fi
13041
13042 HAVE_LIBOTF=no
13043 if test "${HAVE_FREETYPE}" = "yes"; then
13044
13045 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
13046
13047 if test "${with_libotf}" != "no"; then
13048
13049 succeeded=no
13050
13051 if test "$PKG_CONFIG" = "no" ; then
13052 HAVE_LIBOTF=no
13053 else
13054 PKG_CONFIG_MIN_VERSION=0.9.0
13055 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
13057 $as_echo_n "checking for libotf... " >&6; }
13058
13059 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
13060 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
13061 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
13062 edit_cflags="
13063 s,///*,/,g
13064 s/^/ /
13065 s/ -I/ $isystem/g
13066 s/^ //
13067 "
13068 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
13069 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
13071 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
13072 succeeded=yes
13073 else
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13075 $as_echo "no" >&6; }
13076 LIBOTF_CFLAGS=""
13077 LIBOTF_LIBS=""
13078 ## If we have a custom action on failure, don't print errors, but
13079 ## do set a variable so people can do so. Do it in a subshell
13080 ## to capture any diagnostics in invoking pkg-config.
13081 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
13082
13083 fi
13084
13085
13086
13087 else
13088 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13089 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13090 fi
13091 fi
13092
13093 if test $succeeded = yes; then
13094 HAVE_LIBOTF=yes
13095 else
13096 HAVE_LIBOTF=no
13097 fi
13098
13099 if test "$HAVE_LIBOTF" = "yes"; then
13100
13101 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
13102
13103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13104 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13105 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
13106 $as_echo_n "(cached) " >&6
13107 else
13108 ac_check_lib_save_LIBS=$LIBS
13109 LIBS="-lotf $LIBS"
13110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13111 /* end confdefs.h. */
13112
13113 /* Override any GCC internal prototype to avoid an error.
13114 Use char because int might match the return type of a GCC
13115 builtin and then its argument prototype would still apply. */
13116 #ifdef __cplusplus
13117 extern "C"
13118 #endif
13119 char OTF_get_variation_glyphs ();
13120 int
13121 main ()
13122 {
13123 return OTF_get_variation_glyphs ();
13124 ;
13125 return 0;
13126 }
13127 _ACEOF
13128 if ac_fn_c_try_link "$LINENO"; then :
13129 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
13130 else
13131 ac_cv_lib_otf_OTF_get_variation_glyphs=no
13132 fi
13133 rm -f core conftest.err conftest.$ac_objext \
13134 conftest$ac_exeext conftest.$ac_ext
13135 LIBS=$ac_check_lib_save_LIBS
13136 fi
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13138 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13139 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13140 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13141 else
13142 HAVE_OTF_GET_VARIATION_GLYPHS=no
13143 fi
13144
13145 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13146
13147 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13148
13149 fi
13150 fi
13151 fi
13152 fi
13153
13154 HAVE_M17N_FLT=no
13155 if test "${HAVE_LIBOTF}" = yes; then
13156 if test "${with_m17n_flt}" != "no"; then
13157
13158 succeeded=no
13159
13160 if test "$PKG_CONFIG" = "no" ; then
13161 HAVE_M17N_FLT=no
13162 else
13163 PKG_CONFIG_MIN_VERSION=0.9.0
13164 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13166 $as_echo_n "checking for m17n-flt... " >&6; }
13167
13168 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13169 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13170 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
13171 edit_cflags="
13172 s,///*,/,g
13173 s/^/ /
13174 s/ -I/ $isystem/g
13175 s/^ //
13176 "
13177 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13178 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13180 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13181 succeeded=yes
13182 else
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13184 $as_echo "no" >&6; }
13185 M17N_FLT_CFLAGS=""
13186 M17N_FLT_LIBS=""
13187 ## If we have a custom action on failure, don't print errors, but
13188 ## do set a variable so people can do so. Do it in a subshell
13189 ## to capture any diagnostics in invoking pkg-config.
13190 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
13191
13192 fi
13193
13194
13195
13196 else
13197 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13198 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13199 fi
13200 fi
13201
13202 if test $succeeded = yes; then
13203 HAVE_M17N_FLT=yes
13204 else
13205 HAVE_M17N_FLT=no
13206 fi
13207
13208 if test "$HAVE_M17N_FLT" = "yes"; then
13209
13210 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13211
13212 fi
13213 fi
13214 fi
13215 else
13216 HAVE_XFT=no
13217 HAVE_FREETYPE=no
13218 HAVE_LIBOTF=no
13219 HAVE_M17N_FLT=no
13220 fi
13221
13222 ### End of font-backend (under X11) section.
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233 ### Use -lXpm if available, unless `--with-xpm=no'.
13234 ### mingw32 doesn't use -lXpm, since it loads the library dynamically.
13235 HAVE_XPM=no
13236 LIBXPM=
13237 if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
13238 if test "${with_xpm}" != "no"; then
13239 SAVE_CPPFLAGS="$CPPFLAGS"
13240 SAVE_LDFLAGS="$LDFLAGS"
13241 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13242 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13243 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13244 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13246 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13247 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13248 $as_echo_n "(cached) " >&6
13249 else
13250 ac_check_lib_save_LIBS=$LIBS
13251 LIBS="-lXpm $LIBS"
13252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13253 /* end confdefs.h. */
13254
13255 /* Override any GCC internal prototype to avoid an error.
13256 Use char because int might match the return type of a GCC
13257 builtin and then its argument prototype would still apply. */
13258 #ifdef __cplusplus
13259 extern "C"
13260 #endif
13261 char XpmReadFileToImage ();
13262 int
13263 main ()
13264 {
13265 return XpmReadFileToImage ();
13266 ;
13267 return 0;
13268 }
13269 _ACEOF
13270 if ac_fn_c_try_link "$LINENO"; then :
13271 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13272 else
13273 ac_cv_lib_Xpm_XpmReadFileToImage=no
13274 fi
13275 rm -f core conftest.err conftest.$ac_objext \
13276 conftest$ac_exeext conftest.$ac_ext
13277 LIBS=$ac_check_lib_save_LIBS
13278 fi
13279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13280 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13281 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13282 HAVE_XPM=yes
13283 fi
13284
13285 fi
13286
13287
13288 if test "${HAVE_XPM}" = "yes"; then
13289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13290 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13292 /* end confdefs.h. */
13293 #include "X11/xpm.h"
13294 #ifndef XpmReturnAllocPixels
13295 no_return_alloc_pixels
13296 #endif
13297
13298 _ACEOF
13299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13300 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13301 HAVE_XPM=no
13302 else
13303 HAVE_XPM=yes
13304 fi
13305 rm -f conftest*
13306
13307
13308 if test "${HAVE_XPM}" = "yes"; then
13309 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13311 $as_echo "yes" >&6; }
13312 else
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13314 $as_echo "no" >&6; }
13315 CPPFLAGS="$SAVE_CPPFLAGS"
13316 LDFLAGS="$SAVE_LDFLAGS"
13317 fi
13318 fi
13319 fi
13320
13321 if test "${HAVE_XPM}" = "yes"; then
13322
13323 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13324
13325 LIBXPM=-lXpm
13326 fi
13327 fi
13328
13329 if test "${HAVE_X11}" = "yes"; then
13330 if test "${with_xpm}" != "no"; then
13331 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13332 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13334 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13335 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
13336 $as_echo_n "(cached) " >&6
13337 else
13338 ac_check_lib_save_LIBS=$LIBS
13339 LIBS="-lXpm -lX11 $LIBS"
13340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13341 /* end confdefs.h. */
13342
13343 /* Override any GCC internal prototype to avoid an error.
13344 Use char because int might match the return type of a GCC
13345 builtin and then its argument prototype would still apply. */
13346 #ifdef __cplusplus
13347 extern "C"
13348 #endif
13349 char XpmReadFileToPixmap ();
13350 int
13351 main ()
13352 {
13353 return XpmReadFileToPixmap ();
13354 ;
13355 return 0;
13356 }
13357 _ACEOF
13358 if ac_fn_c_try_link "$LINENO"; then :
13359 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
13360 else
13361 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
13362 fi
13363 rm -f core conftest.err conftest.$ac_objext \
13364 conftest$ac_exeext conftest.$ac_ext
13365 LIBS=$ac_check_lib_save_LIBS
13366 fi
13367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13368 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13369 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13370 HAVE_XPM=yes
13371 fi
13372
13373 fi
13374
13375
13376 if test "${HAVE_XPM}" = "yes"; then
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13378 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13380 /* end confdefs.h. */
13381 #include "X11/xpm.h"
13382 #ifndef XpmReturnAllocPixels
13383 no_return_alloc_pixels
13384 #endif
13385
13386 _ACEOF
13387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13388 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13389 HAVE_XPM=no
13390 else
13391 HAVE_XPM=yes
13392 fi
13393 rm -f conftest*
13394
13395
13396 if test "${HAVE_XPM}" = "yes"; then
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13398 $as_echo "yes" >&6; }
13399 else
13400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13401 $as_echo "no" >&6; }
13402 fi
13403 fi
13404 fi
13405
13406 if test "${HAVE_XPM}" = "yes"; then
13407
13408 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13409
13410 LIBXPM=-lXpm
13411 fi
13412 fi
13413
13414 ### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13415 ### slightly different requirements wrt image libraries (it doesn't
13416 ### use -lXpm because it loads the xpm shared library dynamically at
13417 ### run time).
13418 if test "${opsys}" = "mingw32"; then
13419 if test "${with_xpm}" != "no"; then
13420 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13421 #define FOR_MSW 1
13422 "
13423 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13424 HAVE_XPM=yes
13425 else
13426 HAVE_XPM=no
13427 fi
13428
13429
13430 fi
13431
13432 if test "${HAVE_XPM}" = "yes"; then
13433
13434 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13435
13436 fi
13437 fi
13438
13439
13440
13441 ### Use -ljpeg if available, unless `--with-jpeg=no'.
13442 ### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
13443 HAVE_JPEG=no
13444 LIBJPEG=
13445 if test "${opsys}" = "mingw32"; then
13446 if test "${with_jpeg}" != "no"; then
13447 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13448 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13449 HAVE_JPEG=yes
13450 else
13451 HAVE_JPEG=no
13452 fi
13453
13454
13455 fi
13456 if test "${HAVE_JPEG}" = "yes"; then
13457 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13458
13459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13460 /* end confdefs.h. */
13461 #include <jpeglib.h>
13462 version=JPEG_LIB_VERSION
13463
13464 _ACEOF
13465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13466 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13467 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13468
13469 else
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13471 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13472 HAVE_JPEG=no
13473 fi
13474 rm -f conftest*
13475
13476 fi
13477 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13478 if test "${with_jpeg}" != "no"; then
13479 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13480 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13482 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13483 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
13484 $as_echo_n "(cached) " >&6
13485 else
13486 ac_check_lib_save_LIBS=$LIBS
13487 LIBS="-ljpeg $LIBS"
13488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13489 /* end confdefs.h. */
13490
13491 /* Override any GCC internal prototype to avoid an error.
13492 Use char because int might match the return type of a GCC
13493 builtin and then its argument prototype would still apply. */
13494 #ifdef __cplusplus
13495 extern "C"
13496 #endif
13497 char jpeg_destroy_compress ();
13498 int
13499 main ()
13500 {
13501 return jpeg_destroy_compress ();
13502 ;
13503 return 0;
13504 }
13505 _ACEOF
13506 if ac_fn_c_try_link "$LINENO"; then :
13507 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
13508 else
13509 ac_cv_lib_jpeg_jpeg_destroy_compress=no
13510 fi
13511 rm -f core conftest.err conftest.$ac_objext \
13512 conftest$ac_exeext conftest.$ac_ext
13513 LIBS=$ac_check_lib_save_LIBS
13514 fi
13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13516 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13517 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13518 HAVE_JPEG=yes
13519 fi
13520
13521 fi
13522
13523
13524 fi
13525
13526 if test "${HAVE_JPEG}" = "yes"; then
13527 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13528
13529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530 /* end confdefs.h. */
13531 #include <jpeglib.h>
13532 version=JPEG_LIB_VERSION
13533
13534 _ACEOF
13535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13536 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13537 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13538
13539 else
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13541 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13542 HAVE_JPEG=no
13543 fi
13544 rm -f conftest*
13545
13546 fi
13547 if test "${HAVE_JPEG}" = "yes"; then
13548 LIBJPEG=-ljpeg
13549 fi
13550 fi
13551
13552
13553 ### Use -lpng if available, unless `--with-png=no'.
13554 ### mingw32 doesn't use -lpng, since it loads the library dynamically.
13555 HAVE_PNG=no
13556 LIBPNG=
13557 if test "${opsys}" = "mingw32"; then
13558 if test "${with_png}" != "no"; then
13559 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13560 if test "x$ac_cv_header_png_h" = x""yes; then :
13561 HAVE_PNG=yes
13562 else
13563 HAVE_PNG=no
13564 fi
13565
13566
13567 fi
13568 if test "${HAVE_PNG}" = "yes"; then
13569
13570 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13571
13572
13573 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13574 # include <libpng/png.h>
13575 #else
13576 # include <png.h>
13577 #endif
13578
13579 "
13580 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13581
13582 else
13583
13584 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13585
13586 fi
13587
13588 fi
13589 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13590 if test "${with_png}" != "no"; then
13591 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13592 # in /usr/include/libpng.
13593 for ac_header in png.h libpng/png.h
13594 do :
13595 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13596 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13597 eval as_val=\$$as_ac_Header
13598 if test "x$as_val" = x""yes; then :
13599 cat >>confdefs.h <<_ACEOF
13600 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13601 _ACEOF
13602 break
13603 fi
13604
13605 done
13606
13607 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13609 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13610 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13611 $as_echo_n "(cached) " >&6
13612 else
13613 ac_check_lib_save_LIBS=$LIBS
13614 LIBS="-lpng -lz -lm $LIBS"
13615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13616 /* end confdefs.h. */
13617
13618 /* Override any GCC internal prototype to avoid an error.
13619 Use char because int might match the return type of a GCC
13620 builtin and then its argument prototype would still apply. */
13621 #ifdef __cplusplus
13622 extern "C"
13623 #endif
13624 char png_get_channels ();
13625 int
13626 main ()
13627 {
13628 return png_get_channels ();
13629 ;
13630 return 0;
13631 }
13632 _ACEOF
13633 if ac_fn_c_try_link "$LINENO"; then :
13634 ac_cv_lib_png_png_get_channels=yes
13635 else
13636 ac_cv_lib_png_png_get_channels=no
13637 fi
13638 rm -f core conftest.err conftest.$ac_objext \
13639 conftest$ac_exeext conftest.$ac_ext
13640 LIBS=$ac_check_lib_save_LIBS
13641 fi
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13643 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13644 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13645 HAVE_PNG=yes
13646 fi
13647
13648 fi
13649 fi
13650
13651 if test "${HAVE_PNG}" = "yes"; then
13652
13653 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13654
13655 LIBPNG="-lpng -lz -lm"
13656
13657 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13658 # include <libpng/png.h>
13659 #else
13660 # include <png.h>
13661 #endif
13662
13663 "
13664 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13665
13666 else
13667
13668 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13669
13670 fi
13671
13672 fi
13673 fi
13674
13675
13676 HAVE_ZLIB=no
13677 LIBZ=
13678 if test "${with_zlib}" != "no"; then
13679 OLIBS=$LIBS
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
13681 $as_echo_n "checking for library containing inflateEnd... " >&6; }
13682 if test "${ac_cv_search_inflateEnd+set}" = set; then :
13683 $as_echo_n "(cached) " >&6
13684 else
13685 ac_func_search_save_LIBS=$LIBS
13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687 /* end confdefs.h. */
13688
13689 /* Override any GCC internal prototype to avoid an error.
13690 Use char because int might match the return type of a GCC
13691 builtin and then its argument prototype would still apply. */
13692 #ifdef __cplusplus
13693 extern "C"
13694 #endif
13695 char inflateEnd ();
13696 int
13697 main ()
13698 {
13699 return inflateEnd ();
13700 ;
13701 return 0;
13702 }
13703 _ACEOF
13704 for ac_lib in '' z; do
13705 if test -z "$ac_lib"; then
13706 ac_res="none required"
13707 else
13708 ac_res=-l$ac_lib
13709 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13710 fi
13711 if ac_fn_c_try_link "$LINENO"; then :
13712 ac_cv_search_inflateEnd=$ac_res
13713 fi
13714 rm -f core conftest.err conftest.$ac_objext \
13715 conftest$ac_exeext
13716 if test "${ac_cv_search_inflateEnd+set}" = set; then :
13717 break
13718 fi
13719 done
13720 if test "${ac_cv_search_inflateEnd+set}" = set; then :
13721
13722 else
13723 ac_cv_search_inflateEnd=no
13724 fi
13725 rm conftest.$ac_ext
13726 LIBS=$ac_func_search_save_LIBS
13727 fi
13728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
13729 $as_echo "$ac_cv_search_inflateEnd" >&6; }
13730 ac_res=$ac_cv_search_inflateEnd
13731 if test "$ac_res" != no; then :
13732 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13733 HAVE_ZLIB=yes
13734 fi
13735
13736 LIBS=$OLIBS
13737 case $ac_cv_search_inflateEnd in
13738 -*) LIBZ=$ac_cv_search_inflateEnd ;;
13739 esac
13740 fi
13741 if test "${HAVE_ZLIB}" = "yes"; then
13742
13743 $as_echo "#define HAVE_ZLIB 1" >>confdefs.h
13744
13745 ### mingw32 doesn't use -lz, since it loads the library dynamically.
13746 if test "${opsys}" = "mingw32"; then
13747 LIBZ=
13748 fi
13749 fi
13750
13751
13752
13753 ### Use -ltiff if available, unless `--with-tiff=no'.
13754 ### mingw32 doesn't use -ltiff, since it loads the library dynamically.
13755 HAVE_TIFF=no
13756 LIBTIFF=
13757 if test "${opsys}" = "mingw32"; then
13758 if test "${with_tiff}" != "no"; then
13759 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13760 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13761 HAVE_TIFF=yes
13762 else
13763 HAVE_TIFF=no
13764 fi
13765
13766
13767 fi
13768 if test "${HAVE_TIFF}" = "yes"; then
13769
13770 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13771
13772 fi
13773 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13774 if test "${with_tiff}" != "no"; then
13775 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13776 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13777 tifflibs="-lz -lm"
13778 # At least one tiff package requires the jpeg library.
13779 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13781 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13782 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
13783 $as_echo_n "(cached) " >&6
13784 else
13785 ac_check_lib_save_LIBS=$LIBS
13786 LIBS="-ltiff $tifflibs $LIBS"
13787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13788 /* end confdefs.h. */
13789
13790 /* Override any GCC internal prototype to avoid an error.
13791 Use char because int might match the return type of a GCC
13792 builtin and then its argument prototype would still apply. */
13793 #ifdef __cplusplus
13794 extern "C"
13795 #endif
13796 char TIFFGetVersion ();
13797 int
13798 main ()
13799 {
13800 return TIFFGetVersion ();
13801 ;
13802 return 0;
13803 }
13804 _ACEOF
13805 if ac_fn_c_try_link "$LINENO"; then :
13806 ac_cv_lib_tiff_TIFFGetVersion=yes
13807 else
13808 ac_cv_lib_tiff_TIFFGetVersion=no
13809 fi
13810 rm -f core conftest.err conftest.$ac_objext \
13811 conftest$ac_exeext conftest.$ac_ext
13812 LIBS=$ac_check_lib_save_LIBS
13813 fi
13814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13815 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13816 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13817 HAVE_TIFF=yes
13818 fi
13819
13820 fi
13821
13822
13823 fi
13824
13825 if test "${HAVE_TIFF}" = "yes"; then
13826
13827 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13828
13829 LIBTIFF=-ltiff
13830 fi
13831 fi
13832
13833
13834 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
13835 ### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
13836 HAVE_GIF=no
13837 LIBGIF=
13838 if test "${opsys}" = "mingw32"; then
13839 if test "${with_gif}" != "no"; then
13840 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13841 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13842 HAVE_GIF=yes
13843 else
13844 HAVE_GIF=no
13845 fi
13846
13847
13848 fi
13849 if test "${HAVE_GIF}" = "yes"; then
13850
13851 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13852
13853 fi
13854 elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13855 || test "${HAVE_W32}" = "yes"; then
13856 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13857 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13858 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13859 # Earlier versions can crash Emacs.
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13861 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13862 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
13863 $as_echo_n "(cached) " >&6
13864 else
13865 ac_check_lib_save_LIBS=$LIBS
13866 LIBS="-lgif $LIBS"
13867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13868 /* end confdefs.h. */
13869
13870 /* Override any GCC internal prototype to avoid an error.
13871 Use char because int might match the return type of a GCC
13872 builtin and then its argument prototype would still apply. */
13873 #ifdef __cplusplus
13874 extern "C"
13875 #endif
13876 char EGifPutExtensionLast ();
13877 int
13878 main ()
13879 {
13880 return EGifPutExtensionLast ();
13881 ;
13882 return 0;
13883 }
13884 _ACEOF
13885 if ac_fn_c_try_link "$LINENO"; then :
13886 ac_cv_lib_gif_EGifPutExtensionLast=yes
13887 else
13888 ac_cv_lib_gif_EGifPutExtensionLast=no
13889 fi
13890 rm -f core conftest.err conftest.$ac_objext \
13891 conftest$ac_exeext conftest.$ac_ext
13892 LIBS=$ac_check_lib_save_LIBS
13893 fi
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13895 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13896 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13897 HAVE_GIF=yes
13898 else
13899 HAVE_GIF=maybe
13900 fi
13901
13902 fi
13903
13904
13905
13906 if test "$HAVE_GIF" = yes; then
13907 LIBGIF=-lgif
13908 elif test "$HAVE_GIF" = maybe; then
13909 # If gif_lib.h but no libgif, try libungif.
13910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13911 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13912 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
13913 $as_echo_n "(cached) " >&6
13914 else
13915 ac_check_lib_save_LIBS=$LIBS
13916 LIBS="-lungif $LIBS"
13917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13918 /* end confdefs.h. */
13919
13920 /* Override any GCC internal prototype to avoid an error.
13921 Use char because int might match the return type of a GCC
13922 builtin and then its argument prototype would still apply. */
13923 #ifdef __cplusplus
13924 extern "C"
13925 #endif
13926 char EGifPutExtensionLast ();
13927 int
13928 main ()
13929 {
13930 return EGifPutExtensionLast ();
13931 ;
13932 return 0;
13933 }
13934 _ACEOF
13935 if ac_fn_c_try_link "$LINENO"; then :
13936 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13937 else
13938 ac_cv_lib_ungif_EGifPutExtensionLast=no
13939 fi
13940 rm -f core conftest.err conftest.$ac_objext \
13941 conftest$ac_exeext conftest.$ac_ext
13942 LIBS=$ac_check_lib_save_LIBS
13943 fi
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13945 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13946 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13947 HAVE_GIF=yes
13948 else
13949 HAVE_GIF=no
13950 fi
13951
13952 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13953 fi
13954
13955 if test "${HAVE_GIF}" = "yes"; then
13956
13957 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13958
13959 fi
13960 fi
13961
13962
13963 if test "${HAVE_X11}" = "yes"; then
13964 MISSING=""
13965 WITH_NO=""
13966 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13967 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13968 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13969 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13970 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13971 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13972 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13973 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13974 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13975 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13976
13977 if test "X${MISSING}" != X; then
13978 as_fn_error "The following required libraries were not found:
13979 $MISSING
13980 Maybe some development libraries/packages are missing?
13981 If you don't want to link with them give
13982 $WITH_NO
13983 as options to configure" "$LINENO" 5
13984 fi
13985 fi
13986
13987 ### Use -lgpm if available, unless `--with-gpm=no'.
13988 HAVE_GPM=no
13989 LIBGPM=
13990 if test "${with_gpm}" != "no"; then
13991 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13992 if test "x$ac_cv_header_gpm_h" = x""yes; then :
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13994 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13995 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
13996 $as_echo_n "(cached) " >&6
13997 else
13998 ac_check_lib_save_LIBS=$LIBS
13999 LIBS="-lgpm $LIBS"
14000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14001 /* end confdefs.h. */
14002
14003 /* Override any GCC internal prototype to avoid an error.
14004 Use char because int might match the return type of a GCC
14005 builtin and then its argument prototype would still apply. */
14006 #ifdef __cplusplus
14007 extern "C"
14008 #endif
14009 char Gpm_Open ();
14010 int
14011 main ()
14012 {
14013 return Gpm_Open ();
14014 ;
14015 return 0;
14016 }
14017 _ACEOF
14018 if ac_fn_c_try_link "$LINENO"; then :
14019 ac_cv_lib_gpm_Gpm_Open=yes
14020 else
14021 ac_cv_lib_gpm_Gpm_Open=no
14022 fi
14023 rm -f core conftest.err conftest.$ac_objext \
14024 conftest$ac_exeext conftest.$ac_ext
14025 LIBS=$ac_check_lib_save_LIBS
14026 fi
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14028 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
14029 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
14030 HAVE_GPM=yes
14031 fi
14032
14033 fi
14034
14035
14036
14037 if test "${HAVE_GPM}" = "yes"; then
14038
14039 $as_echo "#define HAVE_GPM 1" >>confdefs.h
14040
14041 LIBGPM=-lgpm
14042 fi
14043 fi
14044
14045
14046
14047
14048
14049
14050 GNUSTEP_CFLAGS=
14051 ### Use NeXTstep API to implement GUI.
14052 if test "${HAVE_NS}" = "yes"; then
14053
14054 $as_echo "#define HAVE_NS 1" >>confdefs.h
14055
14056 if test "${NS_IMPL_COCOA}" = "yes"; then
14057
14058 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
14059
14060 fi
14061 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
14062
14063 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
14064
14065 # See also .m.o rule in Makefile.in */
14066 # FIXME: are all these flags really needed? Document here why. */
14067 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
14068 ## Extra CFLAGS applied to src/*.m files.
14069 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"
14070 fi
14071 # We also have mouse menus.
14072 HAVE_MENUS=yes
14073 OTHER_FILES=ns-app
14074 fi
14075
14076 if test "${HAVE_W32}" = "yes"; then
14077 HAVE_MENUS=yes
14078 fi
14079
14080 ### Use session management (-lSM -lICE) if available
14081 HAVE_X_SM=no
14082 LIBXSM=
14083 if test "${HAVE_X11}" = "yes"; then
14084 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
14085 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
14086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
14087 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
14088 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
14089 $as_echo_n "(cached) " >&6
14090 else
14091 ac_check_lib_save_LIBS=$LIBS
14092 LIBS="-lSM -lICE $LIBS"
14093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14094 /* end confdefs.h. */
14095
14096 /* Override any GCC internal prototype to avoid an error.
14097 Use char because int might match the return type of a GCC
14098 builtin and then its argument prototype would still apply. */
14099 #ifdef __cplusplus
14100 extern "C"
14101 #endif
14102 char SmcOpenConnection ();
14103 int
14104 main ()
14105 {
14106 return SmcOpenConnection ();
14107 ;
14108 return 0;
14109 }
14110 _ACEOF
14111 if ac_fn_c_try_link "$LINENO"; then :
14112 ac_cv_lib_SM_SmcOpenConnection=yes
14113 else
14114 ac_cv_lib_SM_SmcOpenConnection=no
14115 fi
14116 rm -f core conftest.err conftest.$ac_objext \
14117 conftest$ac_exeext conftest.$ac_ext
14118 LIBS=$ac_check_lib_save_LIBS
14119 fi
14120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14121 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
14122 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
14123 HAVE_X_SM=yes
14124 fi
14125
14126 fi
14127
14128
14129
14130 if test "${HAVE_X_SM}" = "yes"; then
14131
14132 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
14133
14134 LIBXSM="-lSM -lICE"
14135 case "$LIBS" in
14136 *-lSM*) ;;
14137 *) LIBS="$LIBXSM $LIBS" ;;
14138 esac
14139 fi
14140 fi
14141
14142
14143 ### Use XRandr (-lXrandr) if available
14144 HAVE_XRANDR=no
14145 if test "${HAVE_X11}" = "yes"; then
14146 XRANDR_REQUIRED=1.2.2
14147 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
14148
14149 succeeded=no
14150
14151 if test "$PKG_CONFIG" = "no" ; then
14152 HAVE_XRANDR=no
14153 else
14154 PKG_CONFIG_MIN_VERSION=0.9.0
14155 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
14157 $as_echo_n "checking for $XRANDR_MODULES... " >&6; }
14158
14159 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
14160 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
14161 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14162 edit_cflags="
14163 s,///*,/,g
14164 s/^/ /
14165 s/ -I/ $isystem/g
14166 s/^ //
14167 "
14168 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14169 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14171 $as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14172 succeeded=yes
14173 else
14174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14175 $as_echo "no" >&6; }
14176 XRANDR_CFLAGS=""
14177 XRANDR_LIBS=""
14178 ## If we have a custom action on failure, don't print errors, but
14179 ## do set a variable so people can do so. Do it in a subshell
14180 ## to capture any diagnostics in invoking pkg-config.
14181 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14182
14183 fi
14184
14185
14186
14187 else
14188 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14189 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14190 fi
14191 fi
14192
14193 if test $succeeded = yes; then
14194 HAVE_XRANDR=yes
14195 else
14196 HAVE_XRANDR=no
14197 fi
14198
14199 if test $HAVE_XRANDR = no; then
14200 # Test old way in case pkg-config doesn't have it (older machines).
14201 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14202 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14204 $as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14205 if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
14206 $as_echo_n "(cached) " >&6
14207 else
14208 ac_check_lib_save_LIBS=$LIBS
14209 LIBS="-lXrandr $LIBS"
14210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14211 /* end confdefs.h. */
14212
14213 /* Override any GCC internal prototype to avoid an error.
14214 Use char because int might match the return type of a GCC
14215 builtin and then its argument prototype would still apply. */
14216 #ifdef __cplusplus
14217 extern "C"
14218 #endif
14219 char XRRGetScreenResources ();
14220 int
14221 main ()
14222 {
14223 return XRRGetScreenResources ();
14224 ;
14225 return 0;
14226 }
14227 _ACEOF
14228 if ac_fn_c_try_link "$LINENO"; then :
14229 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
14230 else
14231 ac_cv_lib_Xrandr_XRRGetScreenResources=no
14232 fi
14233 rm -f core conftest.err conftest.$ac_objext \
14234 conftest$ac_exeext conftest.$ac_ext
14235 LIBS=$ac_check_lib_save_LIBS
14236 fi
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14238 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14239 if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
14240 HAVE_XRANDR=yes
14241 fi
14242
14243 fi
14244
14245
14246 if test $HAVE_XRANDR = yes; then
14247 XRANDR_LIBS=-lXrandr
14248
14249 fi
14250 fi
14251 if test $HAVE_XRANDR = yes; then
14252 SAVE_CFLAGS="$CFLAGS"
14253 SAVE_LIBS="$LIBS"
14254 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14255 LIBS="$XRANDR_LIBS $LIBS"
14256 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14257 do :
14258 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14259 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14260 eval as_val=\$$as_ac_var
14261 if test "x$as_val" = x""yes; then :
14262 cat >>confdefs.h <<_ACEOF
14263 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14264 _ACEOF
14265
14266 fi
14267 done
14268
14269 CFLAGS="$SAVE_CFLAGS"
14270 LIBS="$SAVE_LIBS"
14271
14272
14273 $as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14274
14275 fi
14276 fi
14277
14278 ### Use Xinerama (-lXinerama) if available
14279 HAVE_XINERAMA=no
14280 if test "${HAVE_X11}" = "yes"; then
14281 XINERAMA_REQUIRED=1.0.2
14282 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14283
14284 succeeded=no
14285
14286 if test "$PKG_CONFIG" = "no" ; then
14287 HAVE_XINERAMA=no
14288 else
14289 PKG_CONFIG_MIN_VERSION=0.9.0
14290 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14292 $as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14293
14294 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14295 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14296 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14297 edit_cflags="
14298 s,///*,/,g
14299 s/^/ /
14300 s/ -I/ $isystem/g
14301 s/^ //
14302 "
14303 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14304 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14306 $as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14307 succeeded=yes
14308 else
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14310 $as_echo "no" >&6; }
14311 XINERAMA_CFLAGS=""
14312 XINERAMA_LIBS=""
14313 ## If we have a custom action on failure, don't print errors, but
14314 ## do set a variable so people can do so. Do it in a subshell
14315 ## to capture any diagnostics in invoking pkg-config.
14316 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14317
14318 fi
14319
14320
14321
14322 else
14323 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14324 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14325 fi
14326 fi
14327
14328 if test $succeeded = yes; then
14329 HAVE_XINERAMA=yes
14330 else
14331 HAVE_XINERAMA=no
14332 fi
14333
14334 if test $HAVE_XINERAMA = no; then
14335 # Test old way in case pkg-config doesn't have it (older machines).
14336 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14337 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14339 $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14340 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14341 $as_echo_n "(cached) " >&6
14342 else
14343 ac_check_lib_save_LIBS=$LIBS
14344 LIBS="-lXinerama $LIBS"
14345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346 /* end confdefs.h. */
14347
14348 /* Override any GCC internal prototype to avoid an error.
14349 Use char because int might match the return type of a GCC
14350 builtin and then its argument prototype would still apply. */
14351 #ifdef __cplusplus
14352 extern "C"
14353 #endif
14354 char XineramaQueryExtension ();
14355 int
14356 main ()
14357 {
14358 return XineramaQueryExtension ();
14359 ;
14360 return 0;
14361 }
14362 _ACEOF
14363 if ac_fn_c_try_link "$LINENO"; then :
14364 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14365 else
14366 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14367 fi
14368 rm -f core conftest.err conftest.$ac_objext \
14369 conftest$ac_exeext conftest.$ac_ext
14370 LIBS=$ac_check_lib_save_LIBS
14371 fi
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14373 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14374 if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14375 HAVE_XINERAMA=yes
14376 fi
14377
14378 fi
14379
14380
14381 if test $HAVE_XINERAMA = yes; then
14382 XINERAMA_LIBS=-lXinerama
14383
14384 fi
14385 fi
14386 if test $HAVE_XINERAMA = yes; then
14387
14388 $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14389
14390 fi
14391 fi
14392
14393
14394 ### Use libxml (-lxml2) if available
14395 ### mingw32 doesn't use -lxml2, since it loads the library dynamically.
14396 HAVE_LIBXML2=no
14397 if test "${with_xml2}" != "no"; then
14398 ### I'm not sure what the version number should be, so I just guessed.
14399
14400 succeeded=no
14401
14402 if test "$PKG_CONFIG" = "no" ; then
14403 HAVE_LIBXML2=no
14404 else
14405 PKG_CONFIG_MIN_VERSION=0.9.0
14406 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14408 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
14409
14410 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14411 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14412 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
14413 edit_cflags="
14414 s,///*,/,g
14415 s/^/ /
14416 s/ -I/ $isystem/g
14417 s/^ //
14418 "
14419 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14420 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14422 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14423 succeeded=yes
14424 else
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14426 $as_echo "no" >&6; }
14427 LIBXML2_CFLAGS=""
14428 LIBXML2_LIBS=""
14429 ## If we have a custom action on failure, don't print errors, but
14430 ## do set a variable so people can do so. Do it in a subshell
14431 ## to capture any diagnostics in invoking pkg-config.
14432 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
14433
14434 fi
14435
14436
14437
14438 else
14439 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14440 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14441 fi
14442 fi
14443
14444 if test $succeeded = yes; then
14445 HAVE_LIBXML2=yes
14446 else
14447 HAVE_LIBXML2=no
14448 fi
14449
14450 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14451 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14452 SAVE_CPPFLAGS="$CPPFLAGS"
14453 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14454 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14455 if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14456 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14457 "
14458 if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14459 HAVE_LIBXML2=yes
14460 fi
14461
14462 fi
14463
14464
14465 CPPFLAGS="$SAVE_CPPFLAGS"
14466 if test "${HAVE_LIBXML2}" = "yes"; then
14467 LIBXML2_LIBS="-lxml2"
14468 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14469 fi
14470 fi
14471 if test "${HAVE_LIBXML2}" = "yes"; then
14472 if test "${opsys}" != "mingw32"; then
14473 LIBS="$LIBXML2_LIBS $LIBS"
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
14475 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14476 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
14477 $as_echo_n "(cached) " >&6
14478 else
14479 ac_check_lib_save_LIBS=$LIBS
14480 LIBS="-lxml2 $LIBS"
14481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14482 /* end confdefs.h. */
14483
14484 /* Override any GCC internal prototype to avoid an error.
14485 Use char because int might match the return type of a GCC
14486 builtin and then its argument prototype would still apply. */
14487 #ifdef __cplusplus
14488 extern "C"
14489 #endif
14490 char htmlReadMemory ();
14491 int
14492 main ()
14493 {
14494 return htmlReadMemory ();
14495 ;
14496 return 0;
14497 }
14498 _ACEOF
14499 if ac_fn_c_try_link "$LINENO"; then :
14500 ac_cv_lib_xml2_htmlReadMemory=yes
14501 else
14502 ac_cv_lib_xml2_htmlReadMemory=no
14503 fi
14504 rm -f core conftest.err conftest.$ac_objext \
14505 conftest$ac_exeext conftest.$ac_ext
14506 LIBS=$ac_check_lib_save_LIBS
14507 fi
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14509 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14510 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14511 HAVE_LIBXML2=yes
14512 else
14513 HAVE_LIBXML2=no
14514 fi
14515
14516 else
14517 LIBXML2_LIBS=""
14518 fi
14519 if test "${HAVE_LIBXML2}" = "yes"; then
14520
14521 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
14522
14523 else
14524 LIBXML2_LIBS=""
14525 LIBXML2_CFLAGS=""
14526 fi
14527 fi
14528 fi
14529
14530
14531
14532 # If netdb.h doesn't declare h_errno, we must declare it by hand.
14533 # On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14534 if test "${opsys}" = "mingw32"; then
14535 emacs_cv_netdb_declares_h_errno=yes
14536 fi
14537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14538 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
14539 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14540 $as_echo_n "(cached) " >&6
14541 else
14542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14543 /* end confdefs.h. */
14544 #include <netdb.h>
14545 int
14546 main ()
14547 {
14548 return h_errno;
14549 ;
14550 return 0;
14551 }
14552 _ACEOF
14553 if ac_fn_c_try_link "$LINENO"; then :
14554 emacs_cv_netdb_declares_h_errno=yes
14555 else
14556 emacs_cv_netdb_declares_h_errno=no
14557 fi
14558 rm -f core conftest.err conftest.$ac_objext \
14559 conftest$ac_exeext conftest.$ac_ext
14560 fi
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14562 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14563 if test $emacs_cv_netdb_declares_h_errno = yes; then
14564
14565 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
14566
14567 fi
14568
14569 # sqrt and other floating-point functions such as fmod and frexp
14570 # are found in -lm on most systems, but mingw32 doesn't use -lm.
14571 if test "${opsys}" != "mingw32"; then
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
14573 $as_echo_n "checking for sqrt in -lm... " >&6; }
14574 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14575 $as_echo_n "(cached) " >&6
14576 else
14577 ac_check_lib_save_LIBS=$LIBS
14578 LIBS="-lm $LIBS"
14579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14580 /* end confdefs.h. */
14581
14582 /* Override any GCC internal prototype to avoid an error.
14583 Use char because int might match the return type of a GCC
14584 builtin and then its argument prototype would still apply. */
14585 #ifdef __cplusplus
14586 extern "C"
14587 #endif
14588 char sqrt ();
14589 int
14590 main ()
14591 {
14592 return sqrt ();
14593 ;
14594 return 0;
14595 }
14596 _ACEOF
14597 if ac_fn_c_try_link "$LINENO"; then :
14598 ac_cv_lib_m_sqrt=yes
14599 else
14600 ac_cv_lib_m_sqrt=no
14601 fi
14602 rm -f core conftest.err conftest.$ac_objext \
14603 conftest$ac_exeext conftest.$ac_ext
14604 LIBS=$ac_check_lib_save_LIBS
14605 fi
14606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14607 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
14608 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14609 cat >>confdefs.h <<_ACEOF
14610 #define HAVE_LIBM 1
14611 _ACEOF
14612
14613 LIBS="-lm $LIBS"
14614
14615 fi
14616
14617 fi
14618
14619 # Check for mail-locking functions in a "mail" library. Probably this should
14620 # have the same check as for liblockfile below.
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14622 $as_echo_n "checking for maillock in -lmail... " >&6; }
14623 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
14624 $as_echo_n "(cached) " >&6
14625 else
14626 ac_check_lib_save_LIBS=$LIBS
14627 LIBS="-lmail $LIBS"
14628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14629 /* end confdefs.h. */
14630
14631 /* Override any GCC internal prototype to avoid an error.
14632 Use char because int might match the return type of a GCC
14633 builtin and then its argument prototype would still apply. */
14634 #ifdef __cplusplus
14635 extern "C"
14636 #endif
14637 char maillock ();
14638 int
14639 main ()
14640 {
14641 return maillock ();
14642 ;
14643 return 0;
14644 }
14645 _ACEOF
14646 if ac_fn_c_try_link "$LINENO"; then :
14647 ac_cv_lib_mail_maillock=yes
14648 else
14649 ac_cv_lib_mail_maillock=no
14650 fi
14651 rm -f core conftest.err conftest.$ac_objext \
14652 conftest$ac_exeext conftest.$ac_ext
14653 LIBS=$ac_check_lib_save_LIBS
14654 fi
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14656 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
14657 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14658 have_mail=yes
14659 else
14660 have_mail=no
14661 fi
14662
14663 if test $have_mail = yes; then
14664 LIBS_MAIL=-lmail
14665 LIBS="$LIBS_MAIL $LIBS"
14666
14667 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
14668
14669 else
14670 LIBS_MAIL=
14671 fi
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14673 $as_echo_n "checking for maillock in -llockfile... " >&6; }
14674 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
14675 $as_echo_n "(cached) " >&6
14676 else
14677 ac_check_lib_save_LIBS=$LIBS
14678 LIBS="-llockfile $LIBS"
14679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14680 /* end confdefs.h. */
14681
14682 /* Override any GCC internal prototype to avoid an error.
14683 Use char because int might match the return type of a GCC
14684 builtin and then its argument prototype would still apply. */
14685 #ifdef __cplusplus
14686 extern "C"
14687 #endif
14688 char maillock ();
14689 int
14690 main ()
14691 {
14692 return maillock ();
14693 ;
14694 return 0;
14695 }
14696 _ACEOF
14697 if ac_fn_c_try_link "$LINENO"; then :
14698 ac_cv_lib_lockfile_maillock=yes
14699 else
14700 ac_cv_lib_lockfile_maillock=no
14701 fi
14702 rm -f core conftest.err conftest.$ac_objext \
14703 conftest$ac_exeext conftest.$ac_ext
14704 LIBS=$ac_check_lib_save_LIBS
14705 fi
14706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14707 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14708 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14709 have_lockfile=yes
14710 else
14711 have_lockfile=no
14712 fi
14713
14714 if test $have_lockfile = yes; then
14715 LIBS_MAIL=-llockfile
14716 LIBS="$LIBS_MAIL $LIBS"
14717
14718 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
14719
14720 else
14721 # If we have the shared liblockfile, assume we must use it for mail
14722 # locking (e.g. Debian). If we couldn't link against liblockfile
14723 # (no liblockfile.a installed), ensure that we don't need to.
14724 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14725 set dummy liblockfile.so; ac_word=$2
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14727 $as_echo_n "checking for $ac_word... " >&6; }
14728 if test "${ac_cv_prog_liblockfile+set}" = set; then :
14729 $as_echo_n "(cached) " >&6
14730 else
14731 if test -n "$liblockfile"; then
14732 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14733 else
14734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14735 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14736 for as_dir in $as_dummy
14737 do
14738 IFS=$as_save_IFS
14739 test -z "$as_dir" && as_dir=.
14740 for ac_exec_ext in '' $ac_executable_extensions; do
14741 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14742 ac_cv_prog_liblockfile="yes"
14743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14744 break 2
14745 fi
14746 done
14747 done
14748 IFS=$as_save_IFS
14749
14750 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14751 fi
14752 fi
14753 liblockfile=$ac_cv_prog_liblockfile
14754 if test -n "$liblockfile"; then
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14756 $as_echo "$liblockfile" >&6; }
14757 else
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14759 $as_echo "no" >&6; }
14760 fi
14761
14762
14763 if test $ac_cv_prog_liblockfile = yes; then
14764 as_fn_error "Shared liblockfile found but can't link against it.
14765 This probably means that movemail could lose mail.
14766 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14767 fi
14768 fi
14769
14770
14771
14772
14773
14774 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14775 ## interlock access to the mail spool. The alternative is a lock file named
14776 ## /usr/spool/mail/$USER.lock.
14777 mail_lock=no
14778 case "$opsys" in
14779 aix4-2) mail_lock="lockf" ;;
14780
14781 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
14782
14783 ## On GNU/Linux systems, both methods are used by various mail programs.
14784 ## I assume most people are using newer mailers that have heard of flock.
14785 ## Change this if you need to.
14786 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14787 ## configure gets the right answers, and that means *NOT* using flock.
14788 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14789 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14790 ## Debian maintainer hasn't provided a clean fix for Emacs.
14791 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14792 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14793 ## correct logic. -- fx
14794 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14795 ## liblockfile is a Free Software replacement for libmail, used on
14796 ## Debian systems and elsewhere. -rfr.
14797 gnu-*)
14798 mail_lock="flock"
14799 if test $have_mail = yes || test $have_lockfile = yes; then
14800 test $ac_cv_header_maillock_h = yes && mail_lock=no
14801 fi
14802 ;;
14803
14804 mingw32)
14805 mail_lock="none-needed" ;;
14806 esac
14807
14808 BLESSMAIL_TARGET=
14809 case "$mail_lock" in
14810 flock)
14811 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14812 ;;
14813
14814 lockf)
14815 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14816 ;;
14817
14818 none-needed) ;;
14819
14820 *) BLESSMAIL_TARGET="need-blessmail" ;;
14821 esac
14822
14823
14824
14825 for ac_func in accept4 gethostname \
14826 getrusage get_current_dir_name \
14827 lrand48 \
14828 select getpagesize setlocale \
14829 getrlimit setrlimit shutdown getaddrinfo \
14830 strsignal setitimer \
14831 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
14832 gai_strerror getline getdelim sync \
14833 difftime posix_memalign \
14834 getpwent endpwent getgrent endgrent \
14835 touchlock \
14836 cfmakeraw cfsetspeed copysign __executable_start log2
14837 do :
14838 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14839 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14840 eval as_val=\$$as_ac_var
14841 if test "x$as_val" = x""yes; then :
14842 cat >>confdefs.h <<_ACEOF
14843 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14844 _ACEOF
14845
14846 fi
14847 done
14848
14849
14850 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
14851 ## has a broken `rint' in some library versions including math library
14852 ## version number A.09.05.
14853 ## You can fix the math library by installing patch number PHSS_4630.
14854 ## But we can fix it more reliably for Emacs by just not using rint.
14855 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
14856 case $opsys in
14857 hpux*) : ;;
14858 *) for ac_func in random rint
14859 do :
14860 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14861 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14862 eval as_val=\$$as_ac_var
14863 if test "x$as_val" = x""yes; then :
14864 cat >>confdefs.h <<_ACEOF
14865 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14866 _ACEOF
14867
14868 fi
14869 done
14870 ;;
14871 esac
14872
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14874 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
14875 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
14876 $as_echo_n "(cached) " >&6
14877 else
14878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14879 /* end confdefs.h. */
14880
14881 int
14882 main ()
14883 {
14884 __builtin_unwind_init ();
14885 ;
14886 return 0;
14887 }
14888 _ACEOF
14889 if ac_fn_c_try_link "$LINENO"; then :
14890 emacs_cv_func___builtin_unwind_init=yes
14891 else
14892 emacs_cv_func___builtin_unwind_init=no
14893 fi
14894 rm -f core conftest.err conftest.$ac_objext \
14895 conftest$ac_exeext conftest.$ac_ext
14896 fi
14897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14898 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14899 if test $emacs_cv_func___builtin_unwind_init = yes; then
14900
14901 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
14902
14903 fi
14904
14905
14906
14907
14908
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14910 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14911 if test "${ac_cv_sys_largefile_source+set}" = set; then :
14912 $as_echo_n "(cached) " >&6
14913 else
14914 while :; do
14915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14916 /* end confdefs.h. */
14917 #include <sys/types.h> /* for off_t */
14918 #include <stdio.h>
14919 int
14920 main ()
14921 {
14922 int (*fp) (FILE *, off_t, int) = fseeko;
14923 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14924 ;
14925 return 0;
14926 }
14927 _ACEOF
14928 if ac_fn_c_try_link "$LINENO"; then :
14929 ac_cv_sys_largefile_source=no; break
14930 fi
14931 rm -f core conftest.err conftest.$ac_objext \
14932 conftest$ac_exeext conftest.$ac_ext
14933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14934 /* end confdefs.h. */
14935 #define _LARGEFILE_SOURCE 1
14936 #include <sys/types.h> /* for off_t */
14937 #include <stdio.h>
14938 int
14939 main ()
14940 {
14941 int (*fp) (FILE *, off_t, int) = fseeko;
14942 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14943 ;
14944 return 0;
14945 }
14946 _ACEOF
14947 if ac_fn_c_try_link "$LINENO"; then :
14948 ac_cv_sys_largefile_source=1; break
14949 fi
14950 rm -f core conftest.err conftest.$ac_objext \
14951 conftest$ac_exeext conftest.$ac_ext
14952 ac_cv_sys_largefile_source=unknown
14953 break
14954 done
14955 fi
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14957 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14958 case $ac_cv_sys_largefile_source in #(
14959 no | unknown) ;;
14960 *)
14961 cat >>confdefs.h <<_ACEOF
14962 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14963 _ACEOF
14964 ;;
14965 esac
14966 rm -rf conftest*
14967
14968 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14969 # in glibc 2.1.3, but that breaks too many other things.
14970 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14971 if test $ac_cv_sys_largefile_source != unknown; then
14972
14973 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14974
14975 fi
14976
14977
14978 # UNIX98 PTYs.
14979 for ac_func in grantpt
14980 do :
14981 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14982 if test "x$ac_cv_func_grantpt" = x""yes; then :
14983 cat >>confdefs.h <<_ACEOF
14984 #define HAVE_GRANTPT 1
14985 _ACEOF
14986
14987 fi
14988 done
14989
14990
14991 # PTY-related GNU extensions.
14992 for ac_func in getpt posix_openpt
14993 do :
14994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14995 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14996 eval as_val=\$$as_ac_var
14997 if test "x$as_val" = x""yes; then :
14998 cat >>confdefs.h <<_ACEOF
14999 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15000 _ACEOF
15001
15002 fi
15003 done
15004
15005
15006 # Check this now, so that we will NOT find the above functions in ncurses.
15007 # That is because we have not set up to link ncurses in lib-src.
15008 # It's better to believe a function is not available
15009 # than to expect to find it in ncurses.
15010 # Also we need tputs and friends to be able to build at all.
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
15012 $as_echo_n "checking for library containing tputs... " >&6; }
15013 # Run a test program that contains a call to tputs, a call that is
15014 # never executed. This tests whether a pre-'main' dynamic linker
15015 # works with the library. It's too much trouble to actually call
15016 # tputs in the test program, due to portability hassles. When
15017 # cross-compiling, assume the test program will run if it links.
15018
15019 if test "${opsys}" = "mingw32"; then
15020 msg='none required'
15021 else
15022 # Maybe curses should be tried earlier?
15023 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
15024 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
15025 OLIBS=$LIBS
15026 if test -z "$tputs_library"; then
15027 LIBS_TERMCAP=
15028 msg='none required'
15029 else
15030 LIBS_TERMCAP=-l$tputs_library
15031 msg=$LIBS_TERMCAP
15032 LIBS="$LIBS_TERMCAP $LIBS"
15033 fi
15034 if test "$cross_compiling" = yes; then :
15035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036 /* end confdefs.h. */
15037
15038 extern void tputs (const char *, int, int (*)(int));
15039 int main (int argc, char **argv)
15040 {
15041 if (argc == 10000)
15042 tputs (argv[0], 0, 0);
15043 return 0;
15044 }
15045
15046 _ACEOF
15047 if ac_fn_c_try_link "$LINENO"; then :
15048
15049 else
15050 msg=no
15051 fi
15052 rm -f core conftest.err conftest.$ac_objext \
15053 conftest$ac_exeext conftest.$ac_ext
15054 else
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056 /* end confdefs.h. */
15057
15058 extern void tputs (const char *, int, int (*)(int));
15059 int main (int argc, char **argv)
15060 {
15061 if (argc == 10000)
15062 tputs (argv[0], 0, 0);
15063 return 0;
15064 }
15065
15066 _ACEOF
15067 if ac_fn_c_try_run "$LINENO"; then :
15068
15069 else
15070 msg=no
15071 fi
15072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15073 conftest.$ac_objext conftest.beam conftest.$ac_ext
15074 fi
15075
15076 LIBS=$OLIBS
15077 if test "X$msg" != Xno; then
15078 break
15079 fi
15080 done
15081 fi
15082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
15083 $as_echo "$msg" >&6; }
15084 if test "X$msg" = Xno; then
15085 as_fn_error "The required function \`tputs' was not found in any library.
15086 The following libraries were tried (in order):
15087 libtinfo, libncurses, libterminfo, libtermcap, libcurses
15088 Please try installing whichever of these libraries is most appropriate
15089 for your system, together with its header files.
15090 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
15091 fi
15092
15093 ## Use termcap instead of terminfo?
15094 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
15095 TERMINFO=yes
15096 ## FIXME? In the cases below where we unconditionally set
15097 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
15098 ## if that was found above to have tputs.
15099 ## Should we use the gnu* logic everywhere?
15100 case "$opsys" in
15101 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
15102 ## The ncurses library has been moved out of the System framework in
15103 ## Mac OS X 10.2. So if configure detects it, set the command-line
15104 ## option to use it.
15105 darwin) LIBS_TERMCAP="-lncurses" ;;
15106
15107 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
15108
15109 freebsd)
15110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
15111 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
15112 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
15113 $as_echo_n "(cached) " >&6
15114 else
15115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15116 /* end confdefs.h. */
15117 #include <osreldate.h>
15118 int
15119 main ()
15120 {
15121 #if __FreeBSD_version < 400000
15122 fail;
15123 #endif
15124
15125 ;
15126 return 0;
15127 }
15128 _ACEOF
15129 if ac_fn_c_try_link "$LINENO"; then :
15130 emacs_cv_freebsd_terminfo=yes
15131 else
15132 emacs_cv_freebsd_terminfo=no
15133 fi
15134 rm -f core conftest.err conftest.$ac_objext \
15135 conftest$ac_exeext conftest.$ac_ext
15136 fi
15137
15138
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
15140 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
15141
15142 if test $emacs_cv_freebsd_terminfo = yes; then
15143 LIBS_TERMCAP="-lncurses"
15144 else
15145 TERMINFO=no
15146 LIBS_TERMCAP="-ltermcap"
15147 fi
15148 ;;
15149
15150 mingw32)
15151 TERMINFO=no
15152 LIBS_TERMCAP=
15153 ;;
15154
15155 netbsd)
15156 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
15157 TERMINFO=no
15158 LIBS_TERMCAP="-ltermcap"
15159 fi
15160 ;;
15161
15162 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
15163
15164 ## hpux: Make sure we get select from libc rather than from libcurses
15165 ## because libcurses on HPUX 10.10 has a broken version of select.
15166 ## We used to use -lc -lcurses, but this may be cleaner.
15167 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15168 # set that way, now it uses the default). Isn't this a contradiction?
15169 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15170
15171 esac
15172
15173 TERMCAP_OBJ=tparam.o
15174 if test $TERMINFO = yes; then
15175
15176 $as_echo "#define TERMINFO 1" >>confdefs.h
15177
15178 TERMCAP_OBJ=terminfo.o
15179 fi
15180 if test "X$LIBS_TERMCAP" = "X-lncurses"; then
15181
15182 $as_echo "#define USE_NCURSES 1" >>confdefs.h
15183
15184 fi
15185
15186
15187
15188
15189 # Do we have res_init, for detecting changes in /etc/resolv.conf?
15190 # On Darwin, res_init appears not to be useful: see bug#562 and
15191 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15192 resolv=no
15193
15194 if test $opsys != darwin; then
15195
15196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15197 /* end confdefs.h. */
15198 #include <netinet/in.h>
15199 #include <arpa/nameser.h>
15200 #include <resolv.h>
15201 int
15202 main ()
15203 {
15204 return res_init();
15205 ;
15206 return 0;
15207 }
15208 _ACEOF
15209 if ac_fn_c_try_link "$LINENO"; then :
15210 have_res_init=yes
15211 else
15212 have_res_init=no
15213 fi
15214 rm -f core conftest.err conftest.$ac_objext \
15215 conftest$ac_exeext conftest.$ac_ext
15216 if test "$have_res_init" = no; then
15217 OLIBS="$LIBS"
15218 LIBS="$LIBS -lresolv"
15219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15220 $as_echo_n "checking for res_init with -lresolv... " >&6; }
15221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15222 /* end confdefs.h. */
15223 #include <netinet/in.h>
15224 #include <arpa/nameser.h>
15225 #include <resolv.h>
15226 int
15227 main ()
15228 {
15229 return res_init();
15230 ;
15231 return 0;
15232 }
15233 _ACEOF
15234 if ac_fn_c_try_link "$LINENO"; then :
15235 have_res_init=yes
15236 else
15237 have_res_init=no
15238 fi
15239 rm -f core conftest.err conftest.$ac_objext \
15240 conftest$ac_exeext conftest.$ac_ext
15241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15242 $as_echo "$have_res_init" >&6; }
15243 if test "$have_res_init" = yes ; then
15244 resolv=yes
15245 fi
15246 LIBS="$OLIBS"
15247 fi
15248
15249 if test "$have_res_init" = yes; then
15250
15251 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
15252
15253 fi
15254 fi
15255 # Do we need the Hesiod library to provide the support routines?
15256 LIBHESIOD=
15257 if test "$with_hesiod" != no ; then
15258 # Don't set $LIBS here -- see comments above. FIXME which comments?
15259 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15260 if test "x$ac_cv_func_res_send" = x""yes; then :
15261
15262 else
15263 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15264 if test "x$ac_cv_func___res_send" = x""yes; then :
15265
15266 else
15267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15268 $as_echo_n "checking for res_send in -lresolv... " >&6; }
15269 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
15270 $as_echo_n "(cached) " >&6
15271 else
15272 ac_check_lib_save_LIBS=$LIBS
15273 LIBS="-lresolv $LIBS"
15274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275 /* end confdefs.h. */
15276
15277 /* Override any GCC internal prototype to avoid an error.
15278 Use char because int might match the return type of a GCC
15279 builtin and then its argument prototype would still apply. */
15280 #ifdef __cplusplus
15281 extern "C"
15282 #endif
15283 char res_send ();
15284 int
15285 main ()
15286 {
15287 return res_send ();
15288 ;
15289 return 0;
15290 }
15291 _ACEOF
15292 if ac_fn_c_try_link "$LINENO"; then :
15293 ac_cv_lib_resolv_res_send=yes
15294 else
15295 ac_cv_lib_resolv_res_send=no
15296 fi
15297 rm -f core conftest.err conftest.$ac_objext \
15298 conftest$ac_exeext conftest.$ac_ext
15299 LIBS=$ac_check_lib_save_LIBS
15300 fi
15301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15302 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15303 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15304 resolv=yes
15305 else
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15307 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
15308 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
15309 $as_echo_n "(cached) " >&6
15310 else
15311 ac_check_lib_save_LIBS=$LIBS
15312 LIBS="-lresolv $LIBS"
15313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15314 /* end confdefs.h. */
15315
15316 /* Override any GCC internal prototype to avoid an error.
15317 Use char because int might match the return type of a GCC
15318 builtin and then its argument prototype would still apply. */
15319 #ifdef __cplusplus
15320 extern "C"
15321 #endif
15322 char __res_send ();
15323 int
15324 main ()
15325 {
15326 return __res_send ();
15327 ;
15328 return 0;
15329 }
15330 _ACEOF
15331 if ac_fn_c_try_link "$LINENO"; then :
15332 ac_cv_lib_resolv___res_send=yes
15333 else
15334 ac_cv_lib_resolv___res_send=no
15335 fi
15336 rm -f core conftest.err conftest.$ac_objext \
15337 conftest$ac_exeext conftest.$ac_ext
15338 LIBS=$ac_check_lib_save_LIBS
15339 fi
15340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15341 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15342 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15343 resolv=yes
15344 fi
15345
15346 fi
15347
15348 fi
15349
15350 fi
15351
15352 if test "$resolv" = yes ; then
15353 RESOLVLIB=-lresolv
15354 else
15355 RESOLVLIB=
15356 fi
15357 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15358 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15359
15360 else
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15362 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15363 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15364 $as_echo_n "(cached) " >&6
15365 else
15366 ac_check_lib_save_LIBS=$LIBS
15367 LIBS="-lhesiod $RESOLVLIB $LIBS"
15368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h. */
15370
15371 /* Override any GCC internal prototype to avoid an error.
15372 Use char because int might match the return type of a GCC
15373 builtin and then its argument prototype would still apply. */
15374 #ifdef __cplusplus
15375 extern "C"
15376 #endif
15377 char hes_getmailhost ();
15378 int
15379 main ()
15380 {
15381 return hes_getmailhost ();
15382 ;
15383 return 0;
15384 }
15385 _ACEOF
15386 if ac_fn_c_try_link "$LINENO"; then :
15387 ac_cv_lib_hesiod_hes_getmailhost=yes
15388 else
15389 ac_cv_lib_hesiod_hes_getmailhost=no
15390 fi
15391 rm -f core conftest.err conftest.$ac_objext \
15392 conftest$ac_exeext conftest.$ac_ext
15393 LIBS=$ac_check_lib_save_LIBS
15394 fi
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15396 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15397 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15398 hesiod=yes
15399 else
15400 :
15401 fi
15402
15403 fi
15404
15405
15406 if test x"$hesiod" = xyes; then
15407 LIBHESIOD=-lhesiod
15408 fi
15409 fi
15410
15411
15412 # Do we need libresolv (due to res_init or Hesiod)?
15413 if test "$resolv" = yes && test $opsys != darwin; then
15414 LIBRESOLV=-lresolv
15415 else
15416 LIBRESOLV=
15417 fi
15418
15419
15420 # These tell us which Kerberos-related libraries to use.
15421 COM_ERRLIB=
15422 CRYPTOLIB=
15423 KRB5LIB=
15424 DESLIB=
15425 KRB4LIB=
15426
15427 if test "${with_kerberos}" != no; then
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15429 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
15430 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15431 $as_echo_n "(cached) " >&6
15432 else
15433 ac_check_lib_save_LIBS=$LIBS
15434 LIBS="-lcom_err $LIBS"
15435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15436 /* end confdefs.h. */
15437
15438 /* Override any GCC internal prototype to avoid an error.
15439 Use char because int might match the return type of a GCC
15440 builtin and then its argument prototype would still apply. */
15441 #ifdef __cplusplus
15442 extern "C"
15443 #endif
15444 char com_err ();
15445 int
15446 main ()
15447 {
15448 return com_err ();
15449 ;
15450 return 0;
15451 }
15452 _ACEOF
15453 if ac_fn_c_try_link "$LINENO"; then :
15454 ac_cv_lib_com_err_com_err=yes
15455 else
15456 ac_cv_lib_com_err_com_err=no
15457 fi
15458 rm -f core conftest.err conftest.$ac_objext \
15459 conftest$ac_exeext conftest.$ac_ext
15460 LIBS=$ac_check_lib_save_LIBS
15461 fi
15462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15463 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15464 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15465 have_com_err=yes
15466 else
15467 have_com_err=no
15468 fi
15469
15470 if test $have_com_err = yes; then
15471 COM_ERRLIB=-lcom_err
15472 LIBS="$COM_ERRLIB $LIBS"
15473 fi
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15475 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15476 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15477 $as_echo_n "(cached) " >&6
15478 else
15479 ac_check_lib_save_LIBS=$LIBS
15480 LIBS="-lcrypto $LIBS"
15481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15482 /* end confdefs.h. */
15483
15484 /* Override any GCC internal prototype to avoid an error.
15485 Use char because int might match the return type of a GCC
15486 builtin and then its argument prototype would still apply. */
15487 #ifdef __cplusplus
15488 extern "C"
15489 #endif
15490 char mit_des_cbc_encrypt ();
15491 int
15492 main ()
15493 {
15494 return mit_des_cbc_encrypt ();
15495 ;
15496 return 0;
15497 }
15498 _ACEOF
15499 if ac_fn_c_try_link "$LINENO"; then :
15500 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15501 else
15502 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15503 fi
15504 rm -f core conftest.err conftest.$ac_objext \
15505 conftest$ac_exeext conftest.$ac_ext
15506 LIBS=$ac_check_lib_save_LIBS
15507 fi
15508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15509 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15510 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15511 have_crypto=yes
15512 else
15513 have_crypto=no
15514 fi
15515
15516 if test $have_crypto = yes; then
15517 CRYPTOLIB=-lcrypto
15518 LIBS="$CRYPTOLIB $LIBS"
15519 fi
15520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15521 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15522 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15523 $as_echo_n "(cached) " >&6
15524 else
15525 ac_check_lib_save_LIBS=$LIBS
15526 LIBS="-lk5crypto $LIBS"
15527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15528 /* end confdefs.h. */
15529
15530 /* Override any GCC internal prototype to avoid an error.
15531 Use char because int might match the return type of a GCC
15532 builtin and then its argument prototype would still apply. */
15533 #ifdef __cplusplus
15534 extern "C"
15535 #endif
15536 char mit_des_cbc_encrypt ();
15537 int
15538 main ()
15539 {
15540 return mit_des_cbc_encrypt ();
15541 ;
15542 return 0;
15543 }
15544 _ACEOF
15545 if ac_fn_c_try_link "$LINENO"; then :
15546 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15547 else
15548 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15549 fi
15550 rm -f core conftest.err conftest.$ac_objext \
15551 conftest$ac_exeext conftest.$ac_ext
15552 LIBS=$ac_check_lib_save_LIBS
15553 fi
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15555 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15556 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15557 have_k5crypto=yes
15558 else
15559 have_k5crypto=no
15560 fi
15561
15562 if test $have_k5crypto = yes; then
15563 CRYPTOLIB=-lk5crypto
15564 LIBS="$CRYPTOLIB $LIBS"
15565 fi
15566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15567 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15568 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15569 $as_echo_n "(cached) " >&6
15570 else
15571 ac_check_lib_save_LIBS=$LIBS
15572 LIBS="-lkrb5 $LIBS"
15573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15574 /* end confdefs.h. */
15575
15576 /* Override any GCC internal prototype to avoid an error.
15577 Use char because int might match the return type of a GCC
15578 builtin and then its argument prototype would still apply. */
15579 #ifdef __cplusplus
15580 extern "C"
15581 #endif
15582 char krb5_init_context ();
15583 int
15584 main ()
15585 {
15586 return krb5_init_context ();
15587 ;
15588 return 0;
15589 }
15590 _ACEOF
15591 if ac_fn_c_try_link "$LINENO"; then :
15592 ac_cv_lib_krb5_krb5_init_context=yes
15593 else
15594 ac_cv_lib_krb5_krb5_init_context=no
15595 fi
15596 rm -f core conftest.err conftest.$ac_objext \
15597 conftest$ac_exeext conftest.$ac_ext
15598 LIBS=$ac_check_lib_save_LIBS
15599 fi
15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15601 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15602 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15603 have_krb5=yes
15604 else
15605 have_krb5=no
15606 fi
15607
15608 if test $have_krb5=yes; then
15609 KRB5LIB=-lkrb5
15610 LIBS="$KRB5LIB $LIBS"
15611 fi
15612 if test "${with_kerberos5}" = no; then
15613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15614 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15615 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
15616 $as_echo_n "(cached) " >&6
15617 else
15618 ac_check_lib_save_LIBS=$LIBS
15619 LIBS="-ldes425 $LIBS"
15620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15621 /* end confdefs.h. */
15622
15623 /* Override any GCC internal prototype to avoid an error.
15624 Use char because int might match the return type of a GCC
15625 builtin and then its argument prototype would still apply. */
15626 #ifdef __cplusplus
15627 extern "C"
15628 #endif
15629 char des_cbc_encrypt ();
15630 int
15631 main ()
15632 {
15633 return des_cbc_encrypt ();
15634 ;
15635 return 0;
15636 }
15637 _ACEOF
15638 if ac_fn_c_try_link "$LINENO"; then :
15639 ac_cv_lib_des425_des_cbc_encrypt=yes
15640 else
15641 ac_cv_lib_des425_des_cbc_encrypt=no
15642 fi
15643 rm -f core conftest.err conftest.$ac_objext \
15644 conftest$ac_exeext conftest.$ac_ext
15645 LIBS=$ac_check_lib_save_LIBS
15646 fi
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15648 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15649 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15650 have_des425=yes
15651 else
15652 have_des425=no
15653 fi
15654
15655 if test $have_des425 = yes; then
15656 DESLIB=-ldes425
15657 LIBS="$DESLIB $LIBS"
15658 else
15659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15660 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15661 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15662 $as_echo_n "(cached) " >&6
15663 else
15664 ac_check_lib_save_LIBS=$LIBS
15665 LIBS="-ldes $LIBS"
15666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15667 /* end confdefs.h. */
15668
15669 /* Override any GCC internal prototype to avoid an error.
15670 Use char because int might match the return type of a GCC
15671 builtin and then its argument prototype would still apply. */
15672 #ifdef __cplusplus
15673 extern "C"
15674 #endif
15675 char des_cbc_encrypt ();
15676 int
15677 main ()
15678 {
15679 return des_cbc_encrypt ();
15680 ;
15681 return 0;
15682 }
15683 _ACEOF
15684 if ac_fn_c_try_link "$LINENO"; then :
15685 ac_cv_lib_des_des_cbc_encrypt=yes
15686 else
15687 ac_cv_lib_des_des_cbc_encrypt=no
15688 fi
15689 rm -f core conftest.err conftest.$ac_objext \
15690 conftest$ac_exeext conftest.$ac_ext
15691 LIBS=$ac_check_lib_save_LIBS
15692 fi
15693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15694 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15695 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15696 have_des=yes
15697 else
15698 have_des=no
15699 fi
15700
15701 if test $have_des = yes; then
15702 DESLIB=-ldes
15703 LIBS="$DESLIB $LIBS"
15704 fi
15705 fi
15706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15707 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15708 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
15709 $as_echo_n "(cached) " >&6
15710 else
15711 ac_check_lib_save_LIBS=$LIBS
15712 LIBS="-lkrb4 $LIBS"
15713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714 /* end confdefs.h. */
15715
15716 /* Override any GCC internal prototype to avoid an error.
15717 Use char because int might match the return type of a GCC
15718 builtin and then its argument prototype would still apply. */
15719 #ifdef __cplusplus
15720 extern "C"
15721 #endif
15722 char krb_get_cred ();
15723 int
15724 main ()
15725 {
15726 return krb_get_cred ();
15727 ;
15728 return 0;
15729 }
15730 _ACEOF
15731 if ac_fn_c_try_link "$LINENO"; then :
15732 ac_cv_lib_krb4_krb_get_cred=yes
15733 else
15734 ac_cv_lib_krb4_krb_get_cred=no
15735 fi
15736 rm -f core conftest.err conftest.$ac_objext \
15737 conftest$ac_exeext conftest.$ac_ext
15738 LIBS=$ac_check_lib_save_LIBS
15739 fi
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15741 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15742 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15743 have_krb4=yes
15744 else
15745 have_krb4=no
15746 fi
15747
15748 if test $have_krb4 = yes; then
15749 KRB4LIB=-lkrb4
15750 LIBS="$KRB4LIB $LIBS"
15751 else
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15753 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15754 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15755 $as_echo_n "(cached) " >&6
15756 else
15757 ac_check_lib_save_LIBS=$LIBS
15758 LIBS="-lkrb $LIBS"
15759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15760 /* end confdefs.h. */
15761
15762 /* Override any GCC internal prototype to avoid an error.
15763 Use char because int might match the return type of a GCC
15764 builtin and then its argument prototype would still apply. */
15765 #ifdef __cplusplus
15766 extern "C"
15767 #endif
15768 char krb_get_cred ();
15769 int
15770 main ()
15771 {
15772 return krb_get_cred ();
15773 ;
15774 return 0;
15775 }
15776 _ACEOF
15777 if ac_fn_c_try_link "$LINENO"; then :
15778 ac_cv_lib_krb_krb_get_cred=yes
15779 else
15780 ac_cv_lib_krb_krb_get_cred=no
15781 fi
15782 rm -f core conftest.err conftest.$ac_objext \
15783 conftest$ac_exeext conftest.$ac_ext
15784 LIBS=$ac_check_lib_save_LIBS
15785 fi
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15787 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15788 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15789 have_krb=yes
15790 else
15791 have_krb=no
15792 fi
15793
15794 if test $have_krb = yes; then
15795 KRB4LIB=-lkrb
15796 LIBS="$KRB4LIB $LIBS"
15797 fi
15798 fi
15799 fi
15800
15801 if test "${with_kerberos5}" != no; then
15802 for ac_header in krb5.h
15803 do :
15804 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15805 if test "x$ac_cv_header_krb5_h" = x""yes; then :
15806 cat >>confdefs.h <<_ACEOF
15807 #define HAVE_KRB5_H 1
15808 _ACEOF
15809 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15810 "
15811 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15812
15813 cat >>confdefs.h <<_ACEOF
15814 #define HAVE_KRB5_ERROR_TEXT 1
15815 _ACEOF
15816
15817
15818 fi
15819 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15820 "
15821 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
15822
15823 cat >>confdefs.h <<_ACEOF
15824 #define HAVE_KRB5_ERROR_E_TEXT 1
15825 _ACEOF
15826
15827
15828 fi
15829
15830 fi
15831
15832 done
15833
15834 else
15835 for ac_header in krb.h
15836 do :
15837 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15838 if test "x$ac_cv_header_krb_h" = x""yes; then :
15839 cat >>confdefs.h <<_ACEOF
15840 #define HAVE_KRB_H 1
15841 _ACEOF
15842
15843 else
15844 for ac_header in kerberosIV/krb.h
15845 do :
15846 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15847 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15848 cat >>confdefs.h <<_ACEOF
15849 #define HAVE_KERBEROSIV_KRB_H 1
15850 _ACEOF
15851
15852 else
15853 for ac_header in kerberos/krb.h
15854 do :
15855 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15856 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15857 cat >>confdefs.h <<_ACEOF
15858 #define HAVE_KERBEROS_KRB_H 1
15859 _ACEOF
15860
15861 fi
15862
15863 done
15864
15865 fi
15866
15867 done
15868
15869 fi
15870
15871 done
15872
15873 fi
15874 for ac_header in com_err.h
15875 do :
15876 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15877 if test "x$ac_cv_header_com_err_h" = x""yes; then :
15878 cat >>confdefs.h <<_ACEOF
15879 #define HAVE_COM_ERR_H 1
15880 _ACEOF
15881
15882 fi
15883
15884 done
15885
15886 fi
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897 for ac_func in $ac_func_list
15898 do :
15899 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15900 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15901 eval as_val=\$$as_ac_var
15902 if test "x$as_val" = x""yes; then :
15903 cat >>confdefs.h <<_ACEOF
15904 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15905 _ACEOF
15906
15907 fi
15908 done
15909
15910
15911
15912
15913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15914 $as_echo_n "checking whether localtime caches TZ... " >&6; }
15915 if test "${emacs_cv_localtime_cache+set}" = set; then :
15916 $as_echo_n "(cached) " >&6
15917 else
15918 if test x$ac_cv_func_tzset = xyes; then
15919 if test "$cross_compiling" = yes; then :
15920 # If we have tzset, assume the worst when cross-compiling.
15921 emacs_cv_localtime_cache=yes
15922 else
15923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15924 /* end confdefs.h. */
15925 #include <time.h>
15926 char TZ_GMT0[] = "TZ=GMT0";
15927 char TZ_PST8[] = "TZ=PST8";
15928 main()
15929 {
15930 time_t now = time ((time_t *) 0);
15931 int hour_GMT0, hour_unset;
15932 if (putenv (TZ_GMT0) != 0)
15933 exit (1);
15934 hour_GMT0 = localtime (&now)->tm_hour;
15935 unsetenv("TZ");
15936 hour_unset = localtime (&now)->tm_hour;
15937 if (putenv (TZ_PST8) != 0)
15938 exit (1);
15939 if (localtime (&now)->tm_hour == hour_GMT0)
15940 exit (1);
15941 unsetenv("TZ");
15942 if (localtime (&now)->tm_hour != hour_unset)
15943 exit (1);
15944 exit (0);
15945 }
15946 _ACEOF
15947 if ac_fn_c_try_run "$LINENO"; then :
15948 emacs_cv_localtime_cache=no
15949 else
15950 emacs_cv_localtime_cache=yes
15951 fi
15952 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15953 conftest.$ac_objext conftest.beam conftest.$ac_ext
15954 fi
15955
15956 else
15957 # If we lack tzset, report that localtime does not cache TZ,
15958 # since we can't invalidate the cache if we don't have tzset.
15959 emacs_cv_localtime_cache=no
15960 fi
15961 fi
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15963 $as_echo "$emacs_cv_localtime_cache" >&6; }
15964 if test $emacs_cv_localtime_cache = yes; then
15965
15966 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
15967
15968 fi
15969
15970 ok_so_far=yes
15971 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15972 if test "x$ac_cv_func_socket" = x""yes; then :
15973
15974 else
15975 ok_so_far=no
15976 fi
15977
15978 if test $ok_so_far = yes; then
15979 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15980 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
15981
15982 else
15983 ok_so_far=no
15984 fi
15985
15986
15987 fi
15988 if test $ok_so_far = yes; then
15989 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15990 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
15991
15992 else
15993 ok_so_far=no
15994 fi
15995
15996
15997 fi
15998 if test $ok_so_far = yes; then
15999
16000 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
16001
16002 fi
16003
16004 case $canonical in
16005 *-solaris2.4 | *-solaris2.4.*)
16006 : ${ac_cv_func_vfork_works=no};;
16007 esac
16008
16009 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
16010 if test "x$ac_cv_type_pid_t" = x""yes; then :
16011
16012 else
16013
16014 cat >>confdefs.h <<_ACEOF
16015 #define pid_t int
16016 _ACEOF
16017
16018 fi
16019
16020 for ac_header in vfork.h
16021 do :
16022 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
16023 if test "x$ac_cv_header_vfork_h" = x""yes; then :
16024 cat >>confdefs.h <<_ACEOF
16025 #define HAVE_VFORK_H 1
16026 _ACEOF
16027
16028 fi
16029
16030 done
16031
16032 for ac_func in fork vfork
16033 do :
16034 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16035 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16036 eval as_val=\$$as_ac_var
16037 if test "x$as_val" = x""yes; then :
16038 cat >>confdefs.h <<_ACEOF
16039 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16040 _ACEOF
16041
16042 fi
16043 done
16044
16045 if test "x$ac_cv_func_fork" = xyes; then
16046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16047 $as_echo_n "checking for working fork... " >&6; }
16048 if test "${ac_cv_func_fork_works+set}" = set; then :
16049 $as_echo_n "(cached) " >&6
16050 else
16051 if test "$cross_compiling" = yes; then :
16052 ac_cv_func_fork_works=cross
16053 else
16054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16055 /* end confdefs.h. */
16056 $ac_includes_default
16057 int
16058 main ()
16059 {
16060
16061 /* By Ruediger Kuhlmann. */
16062 return fork () < 0;
16063
16064 ;
16065 return 0;
16066 }
16067 _ACEOF
16068 if ac_fn_c_try_run "$LINENO"; then :
16069 ac_cv_func_fork_works=yes
16070 else
16071 ac_cv_func_fork_works=no
16072 fi
16073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16074 conftest.$ac_objext conftest.beam conftest.$ac_ext
16075 fi
16076
16077 fi
16078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16079 $as_echo "$ac_cv_func_fork_works" >&6; }
16080
16081 else
16082 ac_cv_func_fork_works=$ac_cv_func_fork
16083 fi
16084 if test "x$ac_cv_func_fork_works" = xcross; then
16085 case $host in
16086 *-*-amigaos* | *-*-msdosdjgpp*)
16087 # Override, as these systems have only a dummy fork() stub
16088 ac_cv_func_fork_works=no
16089 ;;
16090 *)
16091 ac_cv_func_fork_works=yes
16092 ;;
16093 esac
16094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16095 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16096 fi
16097 ac_cv_func_vfork_works=$ac_cv_func_vfork
16098 if test "x$ac_cv_func_vfork" = xyes; then
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16100 $as_echo_n "checking for working vfork... " >&6; }
16101 if test "${ac_cv_func_vfork_works+set}" = set; then :
16102 $as_echo_n "(cached) " >&6
16103 else
16104 if test "$cross_compiling" = yes; then :
16105 ac_cv_func_vfork_works=cross
16106 else
16107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108 /* end confdefs.h. */
16109 /* Thanks to Paul Eggert for this test. */
16110 $ac_includes_default
16111 #include <sys/wait.h>
16112 #ifdef HAVE_VFORK_H
16113 # include <vfork.h>
16114 #endif
16115 /* On some sparc systems, changes by the child to local and incoming
16116 argument registers are propagated back to the parent. The compiler
16117 is told about this with #include <vfork.h>, but some compilers
16118 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
16119 static variable whose address is put into a register that is
16120 clobbered by the vfork. */
16121 static void
16122 #ifdef __cplusplus
16123 sparc_address_test (int arg)
16124 # else
16125 sparc_address_test (arg) int arg;
16126 #endif
16127 {
16128 static pid_t child;
16129 if (!child) {
16130 child = vfork ();
16131 if (child < 0) {
16132 perror ("vfork");
16133 _exit(2);
16134 }
16135 if (!child) {
16136 arg = getpid();
16137 write(-1, "", 0);
16138 _exit (arg);
16139 }
16140 }
16141 }
16142
16143 int
16144 main ()
16145 {
16146 pid_t parent = getpid ();
16147 pid_t child;
16148
16149 sparc_address_test (0);
16150
16151 child = vfork ();
16152
16153 if (child == 0) {
16154 /* Here is another test for sparc vfork register problems. This
16155 test uses lots of local variables, at least as many local
16156 variables as main has allocated so far including compiler
16157 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
16158 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
16159 reuse the register of parent for one of the local variables,
16160 since it will think that parent can't possibly be used any more
16161 in this routine. Assigning to the local variable will thus
16162 munge parent in the parent process. */
16163 pid_t
16164 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16165 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16166 /* Convince the compiler that p..p7 are live; otherwise, it might
16167 use the same hardware register for all 8 local variables. */
16168 if (p != p1 || p != p2 || p != p3 || p != p4
16169 || p != p5 || p != p6 || p != p7)
16170 _exit(1);
16171
16172 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16173 from child file descriptors. If the child closes a descriptor
16174 before it execs or exits, this munges the parent's descriptor
16175 as well. Test for this by closing stdout in the child. */
16176 _exit(close(fileno(stdout)) != 0);
16177 } else {
16178 int status;
16179 struct stat st;
16180
16181 while (wait(&status) != child)
16182 ;
16183 return (
16184 /* Was there some problem with vforking? */
16185 child < 0
16186
16187 /* Did the child fail? (This shouldn't happen.) */
16188 || status
16189
16190 /* Did the vfork/compiler bug occur? */
16191 || parent != getpid()
16192
16193 /* Did the file descriptor bug occur? */
16194 || fstat(fileno(stdout), &st) != 0
16195 );
16196 }
16197 }
16198 _ACEOF
16199 if ac_fn_c_try_run "$LINENO"; then :
16200 ac_cv_func_vfork_works=yes
16201 else
16202 ac_cv_func_vfork_works=no
16203 fi
16204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16205 conftest.$ac_objext conftest.beam conftest.$ac_ext
16206 fi
16207
16208 fi
16209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16210 $as_echo "$ac_cv_func_vfork_works" >&6; }
16211
16212 fi;
16213 if test "x$ac_cv_func_fork_works" = xcross; then
16214 ac_cv_func_vfork_works=$ac_cv_func_vfork
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16216 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16217 fi
16218
16219 if test "x$ac_cv_func_vfork_works" = xyes; then
16220
16221 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
16222
16223 else
16224
16225 $as_echo "#define vfork fork" >>confdefs.h
16226
16227 fi
16228 if test "x$ac_cv_func_fork_works" = xyes; then
16229
16230 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
16231
16232 fi
16233
16234
16235 for ac_func in snprintf
16236 do :
16237 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16238 if test "x$ac_cv_func_snprintf" = x""yes; then :
16239 cat >>confdefs.h <<_ACEOF
16240 #define HAVE_SNPRINTF 1
16241 _ACEOF
16242
16243 fi
16244 done
16245
16246
16247 XGSELOBJ=
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16249 $as_echo_n "checking whether GLib is linked in... " >&6; }
16250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16251 /* end confdefs.h. */
16252 #include <glib.h>
16253
16254 int
16255 main ()
16256 {
16257 g_print ("Hello world");
16258 ;
16259 return 0;
16260 }
16261 _ACEOF
16262 if ac_fn_c_try_link "$LINENO"; then :
16263 links_glib=yes
16264 else
16265 links_glib=no
16266 fi
16267 rm -f core conftest.err conftest.$ac_objext \
16268 conftest$ac_exeext conftest.$ac_ext
16269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16270 $as_echo "$links_glib" >&6; }
16271 if test "${links_glib}" = "yes"; then
16272
16273 $as_echo "#define HAVE_GLIB 1" >>confdefs.h
16274
16275 if test "$HAVE_NS" = no;then
16276 XGSELOBJ=xgselect.o
16277 fi
16278 fi
16279
16280
16281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16282 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16283 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16284 $as_echo_n "(cached) " >&6
16285 else
16286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287 /* end confdefs.h. */
16288 #include <langinfo.h>
16289 int
16290 main ()
16291 {
16292 char* cs = nl_langinfo(CODESET);
16293 ;
16294 return 0;
16295 }
16296 _ACEOF
16297 if ac_fn_c_try_link "$LINENO"; then :
16298 emacs_cv_langinfo_codeset=yes
16299 else
16300 emacs_cv_langinfo_codeset=no
16301 fi
16302 rm -f core conftest.err conftest.$ac_objext \
16303 conftest$ac_exeext conftest.$ac_ext
16304
16305 fi
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16307 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
16308 if test $emacs_cv_langinfo_codeset = yes; then
16309
16310 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16311
16312 fi
16313
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16315 $as_echo_n "checking for mbstate_t... " >&6; }
16316 if test "${ac_cv_type_mbstate_t+set}" = set; then :
16317 $as_echo_n "(cached) " >&6
16318 else
16319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320 /* end confdefs.h. */
16321 $ac_includes_default
16322 # include <wchar.h>
16323 int
16324 main ()
16325 {
16326 mbstate_t x; return sizeof x;
16327 ;
16328 return 0;
16329 }
16330 _ACEOF
16331 if ac_fn_c_try_compile "$LINENO"; then :
16332 ac_cv_type_mbstate_t=yes
16333 else
16334 ac_cv_type_mbstate_t=no
16335 fi
16336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16337 fi
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16339 $as_echo "$ac_cv_type_mbstate_t" >&6; }
16340 if test $ac_cv_type_mbstate_t = yes; then
16341
16342 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
16343
16344 else
16345
16346 $as_echo "#define mbstate_t int" >>confdefs.h
16347
16348 fi
16349
16350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16351 $as_echo_n "checking for C restricted array declarations... " >&6; }
16352 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16353 $as_echo_n "(cached) " >&6
16354 else
16355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16356 /* end confdefs.h. */
16357 void fred (int x[__restrict]);
16358 int
16359 main ()
16360 {
16361
16362 ;
16363 return 0;
16364 }
16365 _ACEOF
16366 if ac_fn_c_try_compile "$LINENO"; then :
16367 emacs_cv_c_restrict_arr=yes
16368 else
16369 emacs_cv_c_restrict_arr=no
16370 fi
16371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16372 fi
16373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16374 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
16375 if test "$emacs_cv_c_restrict_arr" = yes; then
16376
16377 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
16378
16379 fi
16380
16381
16382 if test "${opsys}" != "mingw32"; then
16383
16384 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16385
16386 fi
16387
16388
16389 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
16390
16391
16392 ## Note: PTYs are broken on darwin <6. Use at your own risk.
16393 if test "${opsys}" != "mingw32"; then
16394
16395 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
16396
16397 fi
16398
16399
16400 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
16401
16402
16403
16404
16405
16406 if test "${opsys}" = "mingw32"; then
16407 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16408
16409 else
16410 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16411
16412 fi
16413
16414
16415 if test "${opsys}" = "mingw32"; then
16416 $as_echo "#define SEPCHAR ';'" >>confdefs.h
16417
16418 else
16419 $as_echo "#define SEPCHAR ':'" >>confdefs.h
16420
16421 fi
16422
16423
16424 $as_echo "#define subprocesses 1" >>confdefs.h
16425
16426
16427
16428 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16429
16430
16431
16432
16433 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16434
16435
16436 if test "${opsys}" = "mingw32"; then
16437
16438 $as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
16439
16440
16441
16442 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16443
16444
16445
16446 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16447
16448 else
16449
16450 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16451
16452
16453
16454 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16455
16456
16457
16458 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16459
16460 fi
16461
16462
16463
16464 case $opsys in
16465 aix4-2)
16466 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16467 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16468
16469 fi
16470 ;;
16471
16472 hpux*)
16473 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16474
16475 ;;
16476 esac
16477
16478
16479 case $opsys in
16480 irix6-5 | sol2* | unixware )
16481
16482 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
16483
16484 ;;
16485 esac
16486
16487 emacs_broken_SIGIO=no
16488
16489 case $opsys in
16490 hpux* | irix6-5 | openbsd | sol2* | unixware )
16491 emacs_broken_SIGIO=yes
16492 ;;
16493
16494 aix4-2)
16495
16496 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
16497
16498 ;;
16499
16500 freebsd)
16501
16502 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
16503
16504 ;;
16505 esac
16506
16507 case $opsys in
16508 gnu-* | sol2-10 )
16509
16510 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
16511
16512 ;;
16513 esac
16514
16515 case $opsys in
16516 darwin | dragonfly | freebsd | netbsd | openbsd )
16517
16518 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
16519
16520 ;;
16521 esac
16522
16523 case $opsys in
16524 netbsd | openbsd) sound_device="/dev/audio" ;;
16525 *) sound_device="/dev/dsp" ;;
16526 esac
16527
16528
16529 cat >>confdefs.h <<_ACEOF
16530 #define DEFAULT_SOUND_DEVICE "$sound_device"
16531 _ACEOF
16532
16533
16534
16535 case $opsys in
16536 darwin | gnu-linux | gnu-kfreebsd )
16537
16538 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
16539
16540 ;;
16541 esac
16542
16543
16544 case $opsys in
16545 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
16546
16547 $as_echo "#define NARROWPROTO 1" >>confdefs.h
16548
16549 ;;
16550 esac
16551
16552
16553
16554
16555
16556
16557
16558
16559 case $opsys in
16560 aix4-2 )
16561 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
16562
16563 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
16564
16565 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
16566
16567 ;;
16568
16569 cygwin )
16570 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16571
16572 $as_echo "#define PTY_OPEN do { int dummy; sigset_t blocked, procmask; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, &procmask); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; pthread_sigmask (SIG_SETMASK, &procmask, 0); if (fd >= 0) emacs_close (dummy); } while (0)" >>confdefs.h
16573
16574 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16575
16576 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16577
16578 ;;
16579
16580 darwin )
16581 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16582
16583 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16584
16585 $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)" >>confdefs.h
16586
16587 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16588
16589 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16590
16591 ;;
16592
16593 gnu | openbsd )
16594 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16595
16596 ;;
16597
16598 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
16599 if test "x$ac_cv_func_grantpt" = xyes; then
16600
16601 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
16602
16603 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16604
16605 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16606
16607 if test "x$ac_cv_func_posix_openpt" = xyes; then
16608 $as_echo "#define PTY_OPEN do { fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | O_NOCTTY); } while (0)" >>confdefs.h
16609
16610 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16611
16612 elif test "x$ac_cv_func_getpt" = xyes; then
16613 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
16614
16615 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16616
16617 else
16618 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16619
16620 fi
16621 else
16622 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16623
16624 fi
16625 ;;
16626
16627 hpux*)
16628 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16629
16630 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
16631
16632 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
16633
16634 ;;
16635
16636 irix6-5 )
16637 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
16638
16639 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
16640
16641 $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCHLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCHLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }" >>confdefs.h
16642
16643 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16644
16645 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16646
16647 ;;
16648
16649 sol2* )
16650 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16651
16652 ;;
16653
16654 unixware )
16655 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16656
16657 ;;
16658 esac
16659
16660
16661 case $opsys in
16662 sol2* | unixware )
16663 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16664
16665 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16666
16667
16668 $as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h
16669
16670 ;;
16671 esac
16672
16673
16674
16675
16676 case $opsys in
16677 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
16678 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16679
16680 ;;
16681
16682 gnu-linux | gnu-kfreebsd )
16683
16684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16685 $as_echo_n "checking for signals via characters... " >&6; }
16686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16687 /* end confdefs.h. */
16688
16689 #include <linux/version.h>
16690 #if LINUX_VERSION_CODE < 0x20400
16691 # error "Linux version too old"
16692 #endif
16693
16694 int
16695 main ()
16696 {
16697
16698 ;
16699 return 0;
16700 }
16701 _ACEOF
16702 if ac_fn_c_try_cpp "$LINENO"; then :
16703 emacs_signals_via_chars=yes
16704 else
16705 emacs_signals_via_chars=no
16706 fi
16707 rm -f conftest.err conftest.$ac_ext
16708
16709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16710 $as_echo "$emacs_signals_via_chars" >&6; }
16711 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16712
16713 ;;
16714 esac
16715
16716
16717
16718
16719 case $opsys in
16720 aix*)
16721 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
16722
16723 ;;
16724 hpux*)
16725 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
16726
16727 ;;
16728 irix6-5)
16729 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
16730
16731 ;;
16732 esac
16733
16734
16735
16736
16737 case $opsys in
16738 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16739 ;;
16740
16741 gnu | dragonfly | freebsd | netbsd | openbsd )
16742
16743 $as_echo "#define TABDLY OXTABS" >>confdefs.h
16744
16745 $as_echo "#define TAB3 OXTABS" >>confdefs.h
16746
16747 ;;
16748
16749 gnu-linux | gnu-kfreebsd )
16750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16751 /* end confdefs.h. */
16752
16753 #ifndef __ia64__
16754 # error "not ia64"
16755 #endif
16756
16757 int
16758 main ()
16759 {
16760
16761 ;
16762 return 0;
16763 }
16764 _ACEOF
16765 if ac_fn_c_try_cpp "$LINENO"; then :
16766
16767 $as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h
16768
16769 fi
16770 rm -f conftest.err conftest.$ac_ext
16771 ;;
16772
16773 hpux*)
16774
16775 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
16776
16777 ;;
16778 esac
16779
16780
16781
16782
16783
16784 case $opsys in
16785 gnu-linux | gnu-kfreebsd )
16786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16787 /* end confdefs.h. */
16788
16789 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16790 || defined __alpha__ || defined __mips__ || defined __s390__ \
16791 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16792 || defined __ia64__ || defined __sh__
16793 /* ok */
16794 #else
16795 # error "setjmp not known to work on this arch"
16796 #endif
16797
16798 int
16799 main ()
16800 {
16801
16802 ;
16803 return 0;
16804 }
16805 _ACEOF
16806 if ac_fn_c_try_cpp "$LINENO"; then :
16807 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16808
16809 fi
16810 rm -f conftest.err conftest.$ac_ext
16811 ;;
16812 esac
16813
16814
16815 if test x$GCC = xyes; then
16816 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16817
16818 else
16819 case $opsys in
16820 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
16821 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16822
16823 ;;
16824 esac
16825 fi
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
16827 $as_echo_n "checking for _setjmp... " >&6; }
16828 if test "${emacs_cv_func__setjmp+set}" = set; then :
16829 $as_echo_n "(cached) " >&6
16830 else
16831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16832 /* end confdefs.h. */
16833 #include <setjmp.h>
16834 #ifdef __MINGW32__
16835 # define _longjmp longjmp
16836 #endif
16837
16838 int
16839 main ()
16840 {
16841 jmp_buf j;
16842 if (! _setjmp (j))
16843 _longjmp (j, 1);
16844 ;
16845 return 0;
16846 }
16847 _ACEOF
16848 if ac_fn_c_try_link "$LINENO"; then :
16849 emacs_cv_func__setjmp=yes
16850 else
16851 emacs_cv_func__setjmp=no
16852 fi
16853 rm -f core conftest.err conftest.$ac_objext \
16854 conftest$ac_exeext conftest.$ac_ext
16855 fi
16856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
16857 $as_echo "$emacs_cv_func__setjmp" >&6; }
16858 if test $emacs_cv_func__setjmp = yes; then
16859
16860 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
16861
16862 else
16863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
16864 $as_echo_n "checking for sigsetjmp... " >&6; }
16865 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
16866 $as_echo_n "(cached) " >&6
16867 else
16868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16869 /* end confdefs.h. */
16870 #include <setjmp.h>
16871
16872 int
16873 main ()
16874 {
16875 sigjmp_buf j;
16876 if (! sigsetjmp (j, 1))
16877 siglongjmp (j, 1);
16878 ;
16879 return 0;
16880 }
16881 _ACEOF
16882 if ac_fn_c_try_link "$LINENO"; then :
16883 emacs_cv_func_sigsetjmp=yes
16884 else
16885 emacs_cv_func_sigsetjmp=no
16886 fi
16887 rm -f core conftest.err conftest.$ac_objext \
16888 conftest$ac_exeext conftest.$ac_ext
16889 fi
16890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
16891 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
16892 if test $emacs_cv_func_sigsetjmp = yes; then
16893
16894 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
16895
16896 fi
16897 fi
16898
16899 case $opsys in
16900 sol2* | unixware )
16901
16902 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
16903
16904 ;;
16905 esac
16906
16907
16908 case $opsys in
16909 hpux* | sol2* )
16910
16911 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
16912
16913 ;;
16914 esac
16915
16916
16917
16918
16919
16920
16921
16922 case $opsys in
16923 aix4-2)
16924 $as_echo "#define USG /**/" >>confdefs.h
16925
16926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16927 /* end confdefs.h. */
16928
16929 #ifndef _AIX
16930 # error "_AIX not defined"
16931 #endif
16932
16933 int
16934 main ()
16935 {
16936
16937 ;
16938 return 0;
16939 }
16940 _ACEOF
16941 if ac_fn_c_try_cpp "$LINENO"; then :
16942
16943 else
16944
16945 $as_echo "#define _AIX /**/" >>confdefs.h
16946
16947 fi
16948 rm -f conftest.err conftest.$ac_ext
16949 ;;
16950
16951 cygwin)
16952
16953 $as_echo "#define CYGWIN 1" >>confdefs.h
16954
16955 ;;
16956
16957 darwin)
16958
16959 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
16960
16961 ;;
16962
16963 gnu-linux | gnu-kfreebsd )
16964 $as_echo "#define USG /**/" >>confdefs.h
16965
16966
16967 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
16968
16969 ;;
16970
16971 hpux*)
16972 $as_echo "#define USG /**/" >>confdefs.h
16973
16974
16975 $as_echo "#define HPUX /**/" >>confdefs.h
16976
16977 ;;
16978
16979 irix6-5)
16980 $as_echo "#define USG /**/" >>confdefs.h
16981
16982 $as_echo "#define USG5_4 /**/" >>confdefs.h
16983
16984
16985 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
16986
16987 ;;
16988
16989 mingw32)
16990 $as_echo "#define DOS_NT /**/" >>confdefs.h
16991
16992
16993 $as_echo "#define WINDOWSNT 1" >>confdefs.h
16994
16995 if test "x$ac_enable_checking" != "x" ; then
16996
16997 $as_echo "#define EMACSDEBUG 1" >>confdefs.h
16998
16999 fi
17000 ;;
17001
17002 sol2*)
17003 $as_echo "#define USG /**/" >>confdefs.h
17004
17005 $as_echo "#define USG5_4 /**/" >>confdefs.h
17006
17007
17008 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
17009
17010 ;;
17011
17012 unixware)
17013 $as_echo "#define USG /**/" >>confdefs.h
17014
17015 $as_echo "#define USG5_4 /**/" >>confdefs.h
17016
17017 ;;
17018 esac
17019
17020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
17021 $as_echo_n "checking for usable FIONREAD... " >&6; }
17022 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
17023 $as_echo_n "(cached) " >&6
17024 else
17025 case $opsys in
17026 aix4-2)
17027 emacs_cv_usable_FIONREAD=no
17028 ;;
17029
17030 mingw32)
17031 emacs_cv_usable_FIONREAD=yes
17032 ;;
17033
17034 *)
17035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17036 /* end confdefs.h. */
17037 #include <sys/types.h>
17038 #include <sys/ioctl.h>
17039 #ifdef USG5_4
17040 # include <sys/filio.h>
17041 #endif
17042
17043 int
17044 main ()
17045 {
17046 int foo = ioctl (0, FIONREAD, &foo);
17047 ;
17048 return 0;
17049 }
17050 _ACEOF
17051 if ac_fn_c_try_compile "$LINENO"; then :
17052 emacs_cv_usable_FIONREAD=yes
17053 else
17054 emacs_cv_usable_FIONREAD=no
17055 fi
17056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17057 ;;
17058 esac
17059 fi
17060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
17061 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
17062 if test $emacs_cv_usable_FIONREAD = yes; then
17063
17064 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
17065
17066
17067 if test $emacs_broken_SIGIO = no; then
17068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
17069 $as_echo_n "checking for usable SIGIO... " >&6; }
17070 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
17071 $as_echo_n "(cached) " >&6
17072 else
17073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17074 /* end confdefs.h. */
17075 #include <fcntl.h>
17076 #include <signal.h>
17077
17078 int
17079 main ()
17080 {
17081 int foo = SIGIO | F_SETFL | FASYNC;
17082 ;
17083 return 0;
17084 }
17085 _ACEOF
17086 if ac_fn_c_try_compile "$LINENO"; then :
17087 emacs_cv_usable_SIGIO=yes
17088 else
17089 emacs_cv_usable_SIGIO=no
17090 fi
17091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17092 fi
17093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
17094 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
17095 if test $emacs_cv_usable_SIGIO = yes; then
17096
17097 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
17098
17099 fi
17100 fi
17101 fi
17102
17103
17104 case $opsys in
17105 cygwin)
17106
17107 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
17108
17109 ;;
17110
17111 hpux11)
17112
17113 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
17114
17115 ;;
17116
17117 irix6-5)
17118
17119 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
17120
17121 ;;
17122
17123 sol2-10)
17124
17125 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
17126
17127 ;;
17128 esac
17129
17130 # Set up the CFLAGS for real compilation, so we can substitute it.
17131 CFLAGS="$REAL_CFLAGS"
17132 CPPFLAGS="$REAL_CPPFLAGS"
17133
17134 ## Hack to detect a buggy GCC version.
17135 if test "x$GCC" = xyes \
17136 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
17137 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
17138 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
17139 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
17140 fi
17141
17142 version=$PACKAGE_VERSION
17143
17144 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
17145
17146 cat >>confdefs.h <<_ACEOF
17147 #define COPYRIGHT "$copyright"
17148 _ACEOF
17149
17150
17151
17152 ### Specify what sort of things we'll be editing into Makefile and config.h.
17153 ### Use configuration here uncanonicalized to avoid exceeding size limits.
17154
17155
17156 ## Unused?
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17180 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17181 ## end of LIBX_BASE, but nothing ever set it.
17182
17183
17184
17185
17186 ## Used in lwlib/Makefile.in.
17187
17188
17189
17190
17191
17192
17193
17194
17195 if test -n "${term_header}"; then
17196
17197 cat >>confdefs.h <<_ACEOF
17198 #define TERM_HEADER "${term_header}"
17199 _ACEOF
17200
17201 fi
17202
17203
17204 cat >>confdefs.h <<_ACEOF
17205 #define EMACS_CONFIGURATION "${canonical}"
17206 _ACEOF
17207
17208
17209 cat >>confdefs.h <<_ACEOF
17210 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
17211 _ACEOF
17212
17213
17214
17215 case $opsys in
17216 mingw32)
17217 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17218
17219 ;;
17220 esac
17221
17222 XMENU_OBJ=
17223 XOBJ=
17224 FONT_OBJ=
17225 if test "${HAVE_X_WINDOWS}" = "yes" ; then
17226
17227 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
17228
17229 XMENU_OBJ=xmenu.o
17230 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
17231 FONT_OBJ=xfont.o
17232 if test "$HAVE_XFT" = "yes"; then
17233 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17234 elif test "$HAVE_FREETYPE" = "yes"; then
17235 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17236 fi
17237
17238 fi
17239
17240
17241
17242
17243 WIDGET_OBJ=
17244 MOTIF_LIBW=
17245 if test "${USE_X_TOOLKIT}" != "none" ; then
17246 WIDGET_OBJ=widget.o
17247
17248 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17249
17250 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17251
17252 $as_echo "#define USE_LUCID 1" >>confdefs.h
17253
17254 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
17255
17256 $as_echo "#define USE_MOTIF 1" >>confdefs.h
17257
17258 MOTIF_LIBW=-lXm
17259 case "$opsys" in
17260 gnu-linux)
17261 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17262 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17263 ;;
17264
17265 unixware)
17266 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17267 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17268 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17269 ;;
17270
17271 aix4-2)
17272 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17273 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17274 ;;
17275 esac
17276 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17277 fi
17278 fi
17279
17280
17281 TOOLKIT_LIBW=
17282 case "$USE_X_TOOLKIT" in
17283 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17284 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17285 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17286 esac
17287
17288
17289 if test "${opsys}" != "mingw32"; then
17290 if test "$USE_X_TOOLKIT" = "none"; then
17291 LIBXT_OTHER="\$(LIBXSM)"
17292 OLDXMENU_TARGET="really-oldXMenu"
17293 else
17294 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17295 OLDXMENU_TARGET="really-lwlib"
17296 fi
17297 fi
17298
17299
17300 ## The X Menu stuff is present in the X10 distribution, but missing
17301 ## from X11. If we have X10, just use the installed library;
17302 ## otherwise, use our own copy.
17303 if test "${HAVE_X11}" = "yes" ; then
17304
17305 $as_echo "#define HAVE_X11 1" >>confdefs.h
17306
17307
17308 if test "$USE_X_TOOLKIT" = "none"; then
17309 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17310 else
17311 OLDXMENU="\${lwlibdir}/liblw.a"
17312 fi
17313 LIBXMENU="\$(OLDXMENU)"
17314 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17315 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
17316 else
17317 ## For a syntactically valid Makefile; not actually used for anything.
17318 ## See comments in src/Makefile.in.
17319 OLDXMENU=nothing
17320 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17321 if test "${HAVE_X_WINDOWS}" = "yes"; then
17322 LIBXMENU="-lXMenu"
17323 else
17324 LIBXMENU=
17325 fi
17326 LIBX_OTHER=
17327 OLDXMENU_DEPS=
17328 fi
17329
17330 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17331 OLDXMENU_TARGET=
17332 OLDXMENU=nothing
17333 LIBXMENU=
17334 OLDXMENU_DEPS=
17335 fi
17336
17337
17338
17339
17340
17341
17342
17343 if test "${HAVE_MENUS}" = "yes" ; then
17344
17345 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
17346
17347 fi
17348
17349 if test "${GNU_MALLOC}" = "yes" ; then
17350
17351 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
17352
17353 fi
17354
17355 RALLOC_OBJ=
17356 if test "${REL_ALLOC}" = "yes" ; then
17357
17358 $as_echo "#define REL_ALLOC 1" >>confdefs.h
17359
17360
17361 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17362 fi
17363
17364
17365 if test "$opsys" = "cygwin"; then
17366 CYGWIN_OBJ="sheap.o cygw32.o"
17367 ## Cygwin differs because of its unexec().
17368 PRE_ALLOC_OBJ=
17369 POST_ALLOC_OBJ=lastfile.o
17370 elif test "$opsys" = "mingw32"; then
17371 CYGWIN_OBJ=
17372 PRE_ALLOC_OBJ=
17373 POST_ALLOC_OBJ=lastfile.o
17374 else
17375 CYGWIN_OBJ=
17376 PRE_ALLOC_OBJ=lastfile.o
17377 POST_ALLOC_OBJ=
17378 fi
17379
17380
17381
17382
17383 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17384 # it temporarily reverts them to their pre-pkg-config values,
17385 # because gnulib needs to work with both src (which uses the
17386 # pkg-config stuff) and lib-src (which does not). For example, gnulib
17387 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17388 # and it therefore needs to run in an environment where LIBS does not
17389 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17390 # for some package unrelated to lib-src.
17391 SAVE_CFLAGS=$CFLAGS
17392 SAVE_LIBS=$LIBS
17393 CFLAGS=$pre_PKG_CONFIG_CFLAGS
17394 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406 LIBC_FATAL_STDERR_=1
17407 export LIBC_FATAL_STDERR_
17408
17409 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17410 # for constant arguments. Useless!
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17412 $as_echo_n "checking for working alloca.h... " >&6; }
17413 if test "${ac_cv_working_alloca_h+set}" = set; then :
17414 $as_echo_n "(cached) " >&6
17415 else
17416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17417 /* end confdefs.h. */
17418 #include <alloca.h>
17419 int
17420 main ()
17421 {
17422 char *p = (char *) alloca (2 * sizeof (int));
17423 if (p) return 0;
17424 ;
17425 return 0;
17426 }
17427 _ACEOF
17428 if ac_fn_c_try_link "$LINENO"; then :
17429 ac_cv_working_alloca_h=yes
17430 else
17431 ac_cv_working_alloca_h=no
17432 fi
17433 rm -f core conftest.err conftest.$ac_objext \
17434 conftest$ac_exeext conftest.$ac_ext
17435 fi
17436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17437 $as_echo "$ac_cv_working_alloca_h" >&6; }
17438 if test $ac_cv_working_alloca_h = yes; then
17439
17440 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
17441
17442 fi
17443
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17445 $as_echo_n "checking for alloca... " >&6; }
17446 if test "${ac_cv_func_alloca_works+set}" = set; then :
17447 $as_echo_n "(cached) " >&6
17448 else
17449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17450 /* end confdefs.h. */
17451 #ifdef __GNUC__
17452 # define alloca __builtin_alloca
17453 #else
17454 # ifdef _MSC_VER
17455 # include <malloc.h>
17456 # define alloca _alloca
17457 # else
17458 # ifdef HAVE_ALLOCA_H
17459 # include <alloca.h>
17460 # else
17461 # ifdef _AIX
17462 #pragma alloca
17463 # else
17464 # ifndef alloca /* predefined by HP cc +Olibcalls */
17465 char *alloca ();
17466 # endif
17467 # endif
17468 # endif
17469 # endif
17470 #endif
17471
17472 int
17473 main ()
17474 {
17475 char *p = (char *) alloca (1);
17476 if (p) return 0;
17477 ;
17478 return 0;
17479 }
17480 _ACEOF
17481 if ac_fn_c_try_link "$LINENO"; then :
17482 ac_cv_func_alloca_works=yes
17483 else
17484 ac_cv_func_alloca_works=no
17485 fi
17486 rm -f core conftest.err conftest.$ac_objext \
17487 conftest$ac_exeext conftest.$ac_ext
17488 fi
17489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17490 $as_echo "$ac_cv_func_alloca_works" >&6; }
17491
17492 if test $ac_cv_func_alloca_works = yes; then
17493
17494 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17495
17496 else
17497 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17498 # that cause trouble. Some versions do not even contain alloca or
17499 # contain a buggy version. If you still want to use their alloca,
17500 # use ar to extract alloca.o from them instead of compiling alloca.c.
17501
17502
17503
17504
17505
17506 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
17507
17508 $as_echo "#define C_ALLOCA 1" >>confdefs.h
17509
17510
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17512 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17513 if test "${ac_cv_os_cray+set}" = set; then :
17514 $as_echo_n "(cached) " >&6
17515 else
17516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17517 /* end confdefs.h. */
17518 #if defined CRAY && ! defined CRAY2
17519 webecray
17520 #else
17521 wenotbecray
17522 #endif
17523
17524 _ACEOF
17525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17526 $EGREP "webecray" >/dev/null 2>&1; then :
17527 ac_cv_os_cray=yes
17528 else
17529 ac_cv_os_cray=no
17530 fi
17531 rm -f conftest*
17532
17533 fi
17534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17535 $as_echo "$ac_cv_os_cray" >&6; }
17536 if test $ac_cv_os_cray = yes; then
17537 for ac_func in _getb67 GETB67 getb67; do
17538 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17539 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17540 eval as_val=\$$as_ac_var
17541 if test "x$as_val" = x""yes; then :
17542
17543 cat >>confdefs.h <<_ACEOF
17544 #define CRAY_STACKSEG_END $ac_func
17545 _ACEOF
17546
17547 break
17548 fi
17549
17550 done
17551 fi
17552
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17554 $as_echo_n "checking stack direction for C alloca... " >&6; }
17555 if test "${ac_cv_c_stack_direction+set}" = set; then :
17556 $as_echo_n "(cached) " >&6
17557 else
17558 if test "$cross_compiling" = yes; then :
17559 ac_cv_c_stack_direction=0
17560 else
17561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17562 /* end confdefs.h. */
17563 $ac_includes_default
17564 int
17565 find_stack_direction (int *addr, int depth)
17566 {
17567 int dir, dummy = 0;
17568 if (! addr)
17569 addr = &dummy;
17570 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17571 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17572 return dir + dummy;
17573 }
17574
17575 int
17576 main (int argc, char **argv)
17577 {
17578 return find_stack_direction (0, argc + !argv + 20) < 0;
17579 }
17580 _ACEOF
17581 if ac_fn_c_try_run "$LINENO"; then :
17582 ac_cv_c_stack_direction=1
17583 else
17584 ac_cv_c_stack_direction=-1
17585 fi
17586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17587 conftest.$ac_objext conftest.beam conftest.$ac_ext
17588 fi
17589
17590 fi
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17592 $as_echo "$ac_cv_c_stack_direction" >&6; }
17593 cat >>confdefs.h <<_ACEOF
17594 #define STACK_DIRECTION $ac_cv_c_stack_direction
17595 _ACEOF
17596
17597
17598 fi
17599
17600
17601
17602
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17604 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17605 if test "${ac_cv_c_bigendian+set}" = set; then :
17606 $as_echo_n "(cached) " >&6
17607 else
17608 ac_cv_c_bigendian=unknown
17609 # See if we're dealing with a universal compiler.
17610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17611 /* end confdefs.h. */
17612 #ifndef __APPLE_CC__
17613 not a universal capable compiler
17614 #endif
17615 typedef int dummy;
17616
17617 _ACEOF
17618 if ac_fn_c_try_compile "$LINENO"; then :
17619
17620 # Check for potential -arch flags. It is not universal unless
17621 # there are at least two -arch flags with different values.
17622 ac_arch=
17623 ac_prev=
17624 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17625 if test -n "$ac_prev"; then
17626 case $ac_word in
17627 i?86 | x86_64 | ppc | ppc64)
17628 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17629 ac_arch=$ac_word
17630 else
17631 ac_cv_c_bigendian=universal
17632 break
17633 fi
17634 ;;
17635 esac
17636 ac_prev=
17637 elif test "x$ac_word" = "x-arch"; then
17638 ac_prev=arch
17639 fi
17640 done
17641 fi
17642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17643 if test $ac_cv_c_bigendian = unknown; then
17644 # See if sys/param.h defines the BYTE_ORDER macro.
17645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17646 /* end confdefs.h. */
17647 #include <sys/types.h>
17648 #include <sys/param.h>
17649
17650 int
17651 main ()
17652 {
17653 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17654 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17655 && LITTLE_ENDIAN)
17656 bogus endian macros
17657 #endif
17658
17659 ;
17660 return 0;
17661 }
17662 _ACEOF
17663 if ac_fn_c_try_compile "$LINENO"; then :
17664 # It does; now see whether it defined to BIG_ENDIAN or not.
17665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17666 /* end confdefs.h. */
17667 #include <sys/types.h>
17668 #include <sys/param.h>
17669
17670 int
17671 main ()
17672 {
17673 #if BYTE_ORDER != BIG_ENDIAN
17674 not big endian
17675 #endif
17676
17677 ;
17678 return 0;
17679 }
17680 _ACEOF
17681 if ac_fn_c_try_compile "$LINENO"; then :
17682 ac_cv_c_bigendian=yes
17683 else
17684 ac_cv_c_bigendian=no
17685 fi
17686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17687 fi
17688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17689 fi
17690 if test $ac_cv_c_bigendian = unknown; then
17691 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17693 /* end confdefs.h. */
17694 #include <limits.h>
17695
17696 int
17697 main ()
17698 {
17699 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17700 bogus endian macros
17701 #endif
17702
17703 ;
17704 return 0;
17705 }
17706 _ACEOF
17707 if ac_fn_c_try_compile "$LINENO"; then :
17708 # It does; now see whether it defined to _BIG_ENDIAN or not.
17709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17710 /* end confdefs.h. */
17711 #include <limits.h>
17712
17713 int
17714 main ()
17715 {
17716 #ifndef _BIG_ENDIAN
17717 not big endian
17718 #endif
17719
17720 ;
17721 return 0;
17722 }
17723 _ACEOF
17724 if ac_fn_c_try_compile "$LINENO"; then :
17725 ac_cv_c_bigendian=yes
17726 else
17727 ac_cv_c_bigendian=no
17728 fi
17729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17730 fi
17731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17732 fi
17733 if test $ac_cv_c_bigendian = unknown; then
17734 # Compile a test program.
17735 if test "$cross_compiling" = yes; then :
17736 # Try to guess by grepping values from an object file.
17737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17738 /* end confdefs.h. */
17739 short int ascii_mm[] =
17740 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17741 short int ascii_ii[] =
17742 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17743 int use_ascii (int i) {
17744 return ascii_mm[i] + ascii_ii[i];
17745 }
17746 short int ebcdic_ii[] =
17747 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17748 short int ebcdic_mm[] =
17749 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17750 int use_ebcdic (int i) {
17751 return ebcdic_mm[i] + ebcdic_ii[i];
17752 }
17753 extern int foo;
17754
17755 int
17756 main ()
17757 {
17758 return use_ascii (foo) == use_ebcdic (foo);
17759 ;
17760 return 0;
17761 }
17762 _ACEOF
17763 if ac_fn_c_try_compile "$LINENO"; then :
17764 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17765 ac_cv_c_bigendian=yes
17766 fi
17767 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17768 if test "$ac_cv_c_bigendian" = unknown; then
17769 ac_cv_c_bigendian=no
17770 else
17771 # finding both strings is unlikely to happen, but who knows?
17772 ac_cv_c_bigendian=unknown
17773 fi
17774 fi
17775 fi
17776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17777 else
17778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17779 /* end confdefs.h. */
17780 $ac_includes_default
17781 int
17782 main ()
17783 {
17784
17785 /* Are we little or big endian? From Harbison&Steele. */
17786 union
17787 {
17788 long int l;
17789 char c[sizeof (long int)];
17790 } u;
17791 u.l = 1;
17792 return u.c[sizeof (long int) - 1] == 1;
17793
17794 ;
17795 return 0;
17796 }
17797 _ACEOF
17798 if ac_fn_c_try_run "$LINENO"; then :
17799 ac_cv_c_bigendian=no
17800 else
17801 ac_cv_c_bigendian=yes
17802 fi
17803 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17804 conftest.$ac_objext conftest.beam conftest.$ac_ext
17805 fi
17806
17807 fi
17808 fi
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17810 $as_echo "$ac_cv_c_bigendian" >&6; }
17811 case $ac_cv_c_bigendian in #(
17812 yes)
17813 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17814 ;; #(
17815 no)
17816 ;; #(
17817 universal)
17818
17819 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
17820
17821 ;; #(
17822 *)
17823 as_fn_error "unknown endianness
17824 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17825 esac
17826
17827
17828
17829 GNULIB_CHDIR=0;
17830 GNULIB_CHOWN=0;
17831 GNULIB_CLOSE=0;
17832 GNULIB_DUP=0;
17833 GNULIB_DUP2=0;
17834 GNULIB_DUP3=0;
17835 GNULIB_ENVIRON=0;
17836 GNULIB_EUIDACCESS=0;
17837 GNULIB_FACCESSAT=0;
17838 GNULIB_FCHDIR=0;
17839 GNULIB_FCHOWNAT=0;
17840 GNULIB_FDATASYNC=0;
17841 GNULIB_FSYNC=0;
17842 GNULIB_FTRUNCATE=0;
17843 GNULIB_GETCWD=0;
17844 GNULIB_GETDOMAINNAME=0;
17845 GNULIB_GETDTABLESIZE=0;
17846 GNULIB_GETGROUPS=0;
17847 GNULIB_GETHOSTNAME=0;
17848 GNULIB_GETLOGIN=0;
17849 GNULIB_GETLOGIN_R=0;
17850 GNULIB_GETPAGESIZE=0;
17851 GNULIB_GETUSERSHELL=0;
17852 GNULIB_GROUP_MEMBER=0;
17853 GNULIB_ISATTY=0;
17854 GNULIB_LCHOWN=0;
17855 GNULIB_LINK=0;
17856 GNULIB_LINKAT=0;
17857 GNULIB_LSEEK=0;
17858 GNULIB_PIPE=0;
17859 GNULIB_PIPE2=0;
17860 GNULIB_PREAD=0;
17861 GNULIB_PWRITE=0;
17862 GNULIB_READ=0;
17863 GNULIB_READLINK=0;
17864 GNULIB_READLINKAT=0;
17865 GNULIB_RMDIR=0;
17866 GNULIB_SETHOSTNAME=0;
17867 GNULIB_SLEEP=0;
17868 GNULIB_SYMLINK=0;
17869 GNULIB_SYMLINKAT=0;
17870 GNULIB_TTYNAME_R=0;
17871 GNULIB_UNISTD_H_NONBLOCKING=0;
17872 GNULIB_UNISTD_H_SIGPIPE=0;
17873 GNULIB_UNLINK=0;
17874 GNULIB_UNLINKAT=0;
17875 GNULIB_USLEEP=0;
17876 GNULIB_WRITE=0;
17877 HAVE_CHOWN=1;
17878 HAVE_DUP2=1;
17879 HAVE_DUP3=1;
17880 HAVE_EUIDACCESS=1;
17881 HAVE_FACCESSAT=1;
17882 HAVE_FCHDIR=1;
17883 HAVE_FCHOWNAT=1;
17884 HAVE_FDATASYNC=1;
17885 HAVE_FSYNC=1;
17886 HAVE_FTRUNCATE=1;
17887 HAVE_GETDTABLESIZE=1;
17888 HAVE_GETGROUPS=1;
17889 HAVE_GETHOSTNAME=1;
17890 HAVE_GETLOGIN=1;
17891 HAVE_GETPAGESIZE=1;
17892 HAVE_GROUP_MEMBER=1;
17893 HAVE_LCHOWN=1;
17894 HAVE_LINK=1;
17895 HAVE_LINKAT=1;
17896 HAVE_PIPE=1;
17897 HAVE_PIPE2=1;
17898 HAVE_PREAD=1;
17899 HAVE_PWRITE=1;
17900 HAVE_READLINK=1;
17901 HAVE_READLINKAT=1;
17902 HAVE_SETHOSTNAME=1;
17903 HAVE_SLEEP=1;
17904 HAVE_SYMLINK=1;
17905 HAVE_SYMLINKAT=1;
17906 HAVE_UNLINKAT=1;
17907 HAVE_USLEEP=1;
17908 HAVE_DECL_ENVIRON=1;
17909 HAVE_DECL_FCHDIR=1;
17910 HAVE_DECL_FDATASYNC=1;
17911 HAVE_DECL_GETDOMAINNAME=1;
17912 HAVE_DECL_GETLOGIN_R=1;
17913 HAVE_DECL_GETPAGESIZE=1;
17914 HAVE_DECL_GETUSERSHELL=1;
17915 HAVE_DECL_SETHOSTNAME=1;
17916 HAVE_DECL_TTYNAME_R=1;
17917 HAVE_OS_H=0;
17918 HAVE_SYS_PARAM_H=0;
17919 REPLACE_CHOWN=0;
17920 REPLACE_CLOSE=0;
17921 REPLACE_DUP=0;
17922 REPLACE_DUP2=0;
17923 REPLACE_FCHOWNAT=0;
17924 REPLACE_FTRUNCATE=0;
17925 REPLACE_GETCWD=0;
17926 REPLACE_GETDOMAINNAME=0;
17927 REPLACE_GETLOGIN_R=0;
17928 REPLACE_GETGROUPS=0;
17929 REPLACE_GETPAGESIZE=0;
17930 REPLACE_ISATTY=0;
17931 REPLACE_LCHOWN=0;
17932 REPLACE_LINK=0;
17933 REPLACE_LINKAT=0;
17934 REPLACE_LSEEK=0;
17935 REPLACE_PREAD=0;
17936 REPLACE_PWRITE=0;
17937 REPLACE_READ=0;
17938 REPLACE_READLINK=0;
17939 REPLACE_RMDIR=0;
17940 REPLACE_SLEEP=0;
17941 REPLACE_SYMLINK=0;
17942 REPLACE_TTYNAME_R=0;
17943 REPLACE_UNLINK=0;
17944 REPLACE_UNLINKAT=0;
17945 REPLACE_USLEEP=0;
17946 REPLACE_WRITE=0;
17947 UNISTD_H_HAVE_WINSOCK2_H=0;
17948 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
17949
17950
17951
17952 GNULIB_OPENDIR=0;
17953 GNULIB_READDIR=0;
17954 GNULIB_REWINDDIR=0;
17955 GNULIB_CLOSEDIR=0;
17956 GNULIB_DIRFD=0;
17957 GNULIB_FDOPENDIR=0;
17958 GNULIB_SCANDIR=0;
17959 GNULIB_ALPHASORT=0;
17960 HAVE_OPENDIR=1;
17961 HAVE_READDIR=1;
17962 HAVE_REWINDDIR=1;
17963 HAVE_CLOSEDIR=1;
17964 HAVE_DECL_DIRFD=1;
17965 HAVE_DECL_FDOPENDIR=1;
17966 HAVE_FDOPENDIR=1;
17967 HAVE_SCANDIR=1;
17968 HAVE_ALPHASORT=1;
17969 REPLACE_OPENDIR=0;
17970 REPLACE_CLOSEDIR=0;
17971 REPLACE_DIRFD=0;
17972 REPLACE_FDOPENDIR=0;
17973
17974
17975
17976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17977 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17978 if test "${gl_cv_have_include_next+set}" = set; then :
17979 $as_echo_n "(cached) " >&6
17980 else
17981 rm -rf conftestd1a conftestd1b conftestd2
17982 mkdir conftestd1a conftestd1b conftestd2
17983 cat <<EOF > conftestd1a/conftest.h
17984 #define DEFINED_IN_CONFTESTD1
17985 #include_next <conftest.h>
17986 #ifdef DEFINED_IN_CONFTESTD2
17987 int foo;
17988 #else
17989 #error "include_next doesn't work"
17990 #endif
17991 EOF
17992 cat <<EOF > conftestd1b/conftest.h
17993 #define DEFINED_IN_CONFTESTD1
17994 #include <stdio.h>
17995 #include_next <conftest.h>
17996 #ifdef DEFINED_IN_CONFTESTD2
17997 int foo;
17998 #else
17999 #error "include_next doesn't work"
18000 #endif
18001 EOF
18002 cat <<EOF > conftestd2/conftest.h
18003 #ifndef DEFINED_IN_CONFTESTD1
18004 #error "include_next test doesn't work"
18005 #endif
18006 #define DEFINED_IN_CONFTESTD2
18007 EOF
18008 gl_save_CPPFLAGS="$CPPFLAGS"
18009 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
18010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18011 /* end confdefs.h. */
18012 #include <conftest.h>
18013 _ACEOF
18014 if ac_fn_c_try_compile "$LINENO"; then :
18015 gl_cv_have_include_next=yes
18016 else
18017 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
18018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18019 /* end confdefs.h. */
18020 #include <conftest.h>
18021 _ACEOF
18022 if ac_fn_c_try_compile "$LINENO"; then :
18023 gl_cv_have_include_next=buggy
18024 else
18025 gl_cv_have_include_next=no
18026 fi
18027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18028
18029 fi
18030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18031 CPPFLAGS="$gl_save_CPPFLAGS"
18032 rm -rf conftestd1a conftestd1b conftestd2
18033
18034 fi
18035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
18036 $as_echo "$gl_cv_have_include_next" >&6; }
18037 PRAGMA_SYSTEM_HEADER=
18038 if test $gl_cv_have_include_next = yes; then
18039 INCLUDE_NEXT=include_next
18040 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18041 if test -n "$GCC"; then
18042 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
18043 fi
18044 else
18045 if test $gl_cv_have_include_next = buggy; then
18046 INCLUDE_NEXT=include
18047 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18048 else
18049 INCLUDE_NEXT=include
18050 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
18051 fi
18052 fi
18053
18054
18055
18056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
18057 $as_echo_n "checking whether system header files limit the line length... " >&6; }
18058 if test "${gl_cv_pragma_columns+set}" = set; then :
18059 $as_echo_n "(cached) " >&6
18060 else
18061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18062 /* end confdefs.h. */
18063
18064 #ifdef __TANDEM
18065 choke me
18066 #endif
18067
18068 _ACEOF
18069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18070 $EGREP "choke me" >/dev/null 2>&1; then :
18071 gl_cv_pragma_columns=yes
18072 else
18073 gl_cv_pragma_columns=no
18074 fi
18075 rm -f conftest*
18076
18077
18078 fi
18079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
18080 $as_echo "$gl_cv_pragma_columns" >&6; }
18081 if test $gl_cv_pragma_columns = yes; then
18082 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
18083 else
18084 PRAGMA_COLUMNS=
18085 fi
18086
18087
18088
18089
18090
18091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
18092 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
18093 if test "${gl_cv_func_c99_strtold+set}" = set; then :
18094 $as_echo_n "(cached) " >&6
18095 else
18096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18097 /* end confdefs.h. */
18098 /* On HP-UX before 11.23, strtold returns a struct instead of
18099 long double. Reject implementations like that, by requiring
18100 compatibility with the C99 prototype. */
18101 #include <stdlib.h>
18102 static long double (*p) (char const *, char **) = strtold;
18103 static long double
18104 test (char const *nptr, char **endptr)
18105 {
18106 long double r;
18107 r = strtold (nptr, endptr);
18108 return r;
18109 }
18110 int
18111 main ()
18112 {
18113 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
18114 ;
18115 return 0;
18116 }
18117 _ACEOF
18118 if ac_fn_c_try_link "$LINENO"; then :
18119 gl_cv_func_c99_strtold=yes
18120 else
18121 gl_cv_func_c99_strtold=no
18122 fi
18123 rm -f core conftest.err conftest.$ac_objext \
18124 conftest$ac_exeext conftest.$ac_ext
18125 fi
18126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
18127 $as_echo "$gl_cv_func_c99_strtold" >&6; }
18128 if test $gl_cv_func_c99_strtold = yes; then
18129
18130 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
18131
18132 fi
18133
18134
18135
18136
18137
18138
18139
18140
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
18142 $as_echo_n "checking if environ is properly declared... " >&6; }
18143 if test "${gt_cv_var_environ_declaration+set}" = set; then :
18144 $as_echo_n "(cached) " >&6
18145 else
18146
18147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18148 /* end confdefs.h. */
18149 #if HAVE_UNISTD_H
18150 #include <unistd.h>
18151 #endif
18152 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
18153 #include <stdlib.h>
18154
18155 extern struct { int foo; } environ;
18156 int
18157 main ()
18158 {
18159 environ.foo = 1;
18160 ;
18161 return 0;
18162 }
18163 _ACEOF
18164 if ac_fn_c_try_compile "$LINENO"; then :
18165 gt_cv_var_environ_declaration=no
18166 else
18167 gt_cv_var_environ_declaration=yes
18168 fi
18169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18170 fi
18171
18172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18173 $as_echo "$gt_cv_var_environ_declaration" >&6; }
18174 if test $gt_cv_var_environ_declaration = yes; then
18175
18176 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18177
18178 fi
18179
18180
18181 if test $gt_cv_var_environ_declaration != yes; then
18182 HAVE_DECL_ENVIRON=0
18183 fi
18184
18185
18186
18187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18188 $as_echo_n "checking for complete errno.h... " >&6; }
18189 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18190 $as_echo_n "(cached) " >&6
18191 else
18192
18193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18194 /* end confdefs.h. */
18195
18196 #include <errno.h>
18197 #if !defined ETXTBSY
18198 booboo
18199 #endif
18200 #if !defined ENOMSG
18201 booboo
18202 #endif
18203 #if !defined EIDRM
18204 booboo
18205 #endif
18206 #if !defined ENOLINK
18207 booboo
18208 #endif
18209 #if !defined EPROTO
18210 booboo
18211 #endif
18212 #if !defined EMULTIHOP
18213 booboo
18214 #endif
18215 #if !defined EBADMSG
18216 booboo
18217 #endif
18218 #if !defined EOVERFLOW
18219 booboo
18220 #endif
18221 #if !defined ENOTSUP
18222 booboo
18223 #endif
18224 #if !defined ENETRESET
18225 booboo
18226 #endif
18227 #if !defined ECONNABORTED
18228 booboo
18229 #endif
18230 #if !defined ESTALE
18231 booboo
18232 #endif
18233 #if !defined EDQUOT
18234 booboo
18235 #endif
18236 #if !defined ECANCELED
18237 booboo
18238 #endif
18239 #if !defined EOWNERDEAD
18240 booboo
18241 #endif
18242 #if !defined ENOTRECOVERABLE
18243 booboo
18244 #endif
18245 #if !defined EILSEQ
18246 booboo
18247 #endif
18248
18249 _ACEOF
18250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18251 $EGREP "booboo" >/dev/null 2>&1; then :
18252 gl_cv_header_errno_h_complete=no
18253 else
18254 gl_cv_header_errno_h_complete=yes
18255 fi
18256 rm -f conftest*
18257
18258
18259 fi
18260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18261 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
18262 if test $gl_cv_header_errno_h_complete = yes; then
18263 ERRNO_H=''
18264 else
18265
18266
18267
18268
18269
18270
18271
18272
18273 if test $gl_cv_have_include_next = yes; then
18274 gl_cv_next_errno_h='<'errno.h'>'
18275 else
18276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18277 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
18278 if test "${gl_cv_next_errno_h+set}" = set; then :
18279 $as_echo_n "(cached) " >&6
18280 else
18281
18282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18283 /* end confdefs.h. */
18284 #include <errno.h>
18285
18286 _ACEOF
18287 case "$host_os" in
18288 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18289 *) gl_absname_cpp="$ac_cpp" ;;
18290 esac
18291
18292 case "$host_os" in
18293 mingw*)
18294 gl_dirsep_regex='[/\\]'
18295 ;;
18296 *)
18297 gl_dirsep_regex='\/'
18298 ;;
18299 esac
18300 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18301
18302 gl_header_literal_regex=`echo 'errno.h' \
18303 | sed -e "$gl_make_literal_regex_sed"`
18304 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18305 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18306 s|^/[^/]|//&|
18307 p
18308 q
18309 }'
18310 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18311 sed -n "$gl_absolute_header_sed"`'"'
18312
18313
18314 fi
18315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18316 $as_echo "$gl_cv_next_errno_h" >&6; }
18317 fi
18318 NEXT_ERRNO_H=$gl_cv_next_errno_h
18319
18320 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18321 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18322 gl_next_as_first_directive='<'errno.h'>'
18323 else
18324 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18325 gl_next_as_first_directive=$gl_cv_next_errno_h
18326 fi
18327 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
18328
18329
18330
18331
18332 ERRNO_H='errno.h'
18333 fi
18334
18335 if test -n "$ERRNO_H"; then
18336 GL_GENERATE_ERRNO_H_TRUE=
18337 GL_GENERATE_ERRNO_H_FALSE='#'
18338 else
18339 GL_GENERATE_ERRNO_H_TRUE='#'
18340 GL_GENERATE_ERRNO_H_FALSE=
18341 fi
18342
18343
18344 if test -n "$ERRNO_H"; then
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18346 $as_echo_n "checking for EMULTIHOP value... " >&6; }
18347 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18348 $as_echo_n "(cached) " >&6
18349 else
18350
18351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18352 /* end confdefs.h. */
18353
18354 #include <errno.h>
18355 #ifdef EMULTIHOP
18356 yes
18357 #endif
18358
18359 _ACEOF
18360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18361 $EGREP "yes" >/dev/null 2>&1; then :
18362 gl_cv_header_errno_h_EMULTIHOP=yes
18363 else
18364 gl_cv_header_errno_h_EMULTIHOP=no
18365 fi
18366 rm -f conftest*
18367
18368 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18370 /* end confdefs.h. */
18371
18372 #define _XOPEN_SOURCE_EXTENDED 1
18373 #include <errno.h>
18374 #ifdef EMULTIHOP
18375 yes
18376 #endif
18377
18378 _ACEOF
18379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18380 $EGREP "yes" >/dev/null 2>&1; then :
18381 gl_cv_header_errno_h_EMULTIHOP=hidden
18382 fi
18383 rm -f conftest*
18384
18385 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18386 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18387 #define _XOPEN_SOURCE_EXTENDED 1
18388 #include <errno.h>
18389 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18390 #include <stdio.h>
18391 #include <stdlib.h>
18392 "; then :
18393
18394 fi
18395
18396 fi
18397 fi
18398
18399 fi
18400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18401 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18402 case $gl_cv_header_errno_h_EMULTIHOP in
18403 yes | no)
18404 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18405 ;;
18406 *)
18407 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18408 ;;
18409 esac
18410
18411
18412 fi
18413
18414
18415 if test -n "$ERRNO_H"; then
18416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18417 $as_echo_n "checking for ENOLINK value... " >&6; }
18418 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
18419 $as_echo_n "(cached) " >&6
18420 else
18421
18422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18423 /* end confdefs.h. */
18424
18425 #include <errno.h>
18426 #ifdef ENOLINK
18427 yes
18428 #endif
18429
18430 _ACEOF
18431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18432 $EGREP "yes" >/dev/null 2>&1; then :
18433 gl_cv_header_errno_h_ENOLINK=yes
18434 else
18435 gl_cv_header_errno_h_ENOLINK=no
18436 fi
18437 rm -f conftest*
18438
18439 if test $gl_cv_header_errno_h_ENOLINK = no; then
18440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18441 /* end confdefs.h. */
18442
18443 #define _XOPEN_SOURCE_EXTENDED 1
18444 #include <errno.h>
18445 #ifdef ENOLINK
18446 yes
18447 #endif
18448
18449 _ACEOF
18450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18451 $EGREP "yes" >/dev/null 2>&1; then :
18452 gl_cv_header_errno_h_ENOLINK=hidden
18453 fi
18454 rm -f conftest*
18455
18456 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18457 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18458 #define _XOPEN_SOURCE_EXTENDED 1
18459 #include <errno.h>
18460 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18461 #include <stdio.h>
18462 #include <stdlib.h>
18463 "; then :
18464
18465 fi
18466
18467 fi
18468 fi
18469
18470 fi
18471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18472 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18473 case $gl_cv_header_errno_h_ENOLINK in
18474 yes | no)
18475 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18476 ;;
18477 *)
18478 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18479 ;;
18480 esac
18481
18482
18483 fi
18484
18485
18486 if test -n "$ERRNO_H"; then
18487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18488 $as_echo_n "checking for EOVERFLOW value... " >&6; }
18489 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18490 $as_echo_n "(cached) " >&6
18491 else
18492
18493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18494 /* end confdefs.h. */
18495
18496 #include <errno.h>
18497 #ifdef EOVERFLOW
18498 yes
18499 #endif
18500
18501 _ACEOF
18502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18503 $EGREP "yes" >/dev/null 2>&1; then :
18504 gl_cv_header_errno_h_EOVERFLOW=yes
18505 else
18506 gl_cv_header_errno_h_EOVERFLOW=no
18507 fi
18508 rm -f conftest*
18509
18510 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18512 /* end confdefs.h. */
18513
18514 #define _XOPEN_SOURCE_EXTENDED 1
18515 #include <errno.h>
18516 #ifdef EOVERFLOW
18517 yes
18518 #endif
18519
18520 _ACEOF
18521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18522 $EGREP "yes" >/dev/null 2>&1; then :
18523 gl_cv_header_errno_h_EOVERFLOW=hidden
18524 fi
18525 rm -f conftest*
18526
18527 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18528 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18529 #define _XOPEN_SOURCE_EXTENDED 1
18530 #include <errno.h>
18531 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18532 #include <stdio.h>
18533 #include <stdlib.h>
18534 "; then :
18535
18536 fi
18537
18538 fi
18539 fi
18540
18541 fi
18542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18543 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18544 case $gl_cv_header_errno_h_EOVERFLOW in
18545 yes | no)
18546 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18547 ;;
18548 *)
18549 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18550 ;;
18551 esac
18552
18553
18554 fi
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565 GNULIB_FCNTL=0;
18566 GNULIB_NONBLOCKING=0;
18567 GNULIB_OPEN=0;
18568 GNULIB_OPENAT=0;
18569 HAVE_FCNTL=1;
18570 HAVE_OPENAT=1;
18571 REPLACE_FCNTL=0;
18572 REPLACE_OPEN=0;
18573 REPLACE_OPENAT=0;
18574
18575
18576
18577
18578 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18579 if test "x$ac_cv_type_mode_t" = x""yes; then :
18580
18581 else
18582
18583 cat >>confdefs.h <<_ACEOF
18584 #define mode_t int
18585 _ACEOF
18586
18587 fi
18588
18589 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18590 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18591 ac_have_decl=1
18592 else
18593 ac_have_decl=0
18594 fi
18595
18596 cat >>confdefs.h <<_ACEOF
18597 #define HAVE_DECL_FDATASYNC $ac_have_decl
18598 _ACEOF
18599
18600
18601
18602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18603 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18604 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18605 $as_echo_n "(cached) " >&6
18606 else
18607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18608 /* end confdefs.h. */
18609
18610 #include <sys/types.h>
18611 #include <sys/stat.h>
18612 int
18613 main ()
18614 {
18615 struct stat s; s.st_dm_mode;
18616 ;
18617 return 0;
18618 }
18619 _ACEOF
18620 if ac_fn_c_try_compile "$LINENO"; then :
18621 ac_cv_struct_st_dm_mode=yes
18622 else
18623 ac_cv_struct_st_dm_mode=no
18624 fi
18625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18626 fi
18627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18628 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18629
18630 if test $ac_cv_struct_st_dm_mode = yes; then
18631
18632 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18633
18634 fi
18635
18636
18637 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18638 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18639 ac_have_decl=1
18640 else
18641 ac_have_decl=0
18642 fi
18643
18644 cat >>confdefs.h <<_ACEOF
18645 #define HAVE_DECL_STRMODE $ac_have_decl
18646 _ACEOF
18647
18648
18649
18650
18651 GNULIB_FCHMODAT=0;
18652 GNULIB_FSTAT=0;
18653 GNULIB_FSTATAT=0;
18654 GNULIB_FUTIMENS=0;
18655 GNULIB_LCHMOD=0;
18656 GNULIB_LSTAT=0;
18657 GNULIB_MKDIRAT=0;
18658 GNULIB_MKFIFO=0;
18659 GNULIB_MKFIFOAT=0;
18660 GNULIB_MKNOD=0;
18661 GNULIB_MKNODAT=0;
18662 GNULIB_STAT=0;
18663 GNULIB_UTIMENSAT=0;
18664 HAVE_FCHMODAT=1;
18665 HAVE_FSTATAT=1;
18666 HAVE_FUTIMENS=1;
18667 HAVE_LCHMOD=1;
18668 HAVE_LSTAT=1;
18669 HAVE_MKDIRAT=1;
18670 HAVE_MKFIFO=1;
18671 HAVE_MKFIFOAT=1;
18672 HAVE_MKNOD=1;
18673 HAVE_MKNODAT=1;
18674 HAVE_UTIMENSAT=1;
18675 REPLACE_FSTAT=0;
18676 REPLACE_FSTATAT=0;
18677 REPLACE_FUTIMENS=0;
18678 REPLACE_LSTAT=0;
18679 REPLACE_MKDIR=0;
18680 REPLACE_MKFIFO=0;
18681 REPLACE_MKNOD=0;
18682 REPLACE_STAT=0;
18683 REPLACE_UTIMENSAT=0;
18684
18685
18686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18687 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18688 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18689 $as_echo_n "(cached) " >&6
18690 else
18691 rm -f conftest.sym conftest.file
18692 echo >conftest.file
18693 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18694 if test "$cross_compiling" = yes; then :
18695 case "$host_os" in
18696 # Guess yes on glibc systems.
18697 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18698 # If we don't know, assume the worst.
18699 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18700 esac
18701
18702 else
18703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18704 /* end confdefs.h. */
18705 $ac_includes_default
18706 int
18707 main ()
18708 {
18709 struct stat sbuf;
18710 /* Linux will dereference the symlink and fail, as required by
18711 POSIX. That is better in the sense that it means we will not
18712 have to compile and use the lstat wrapper. */
18713 return lstat ("conftest.sym/", &sbuf) == 0;
18714
18715 ;
18716 return 0;
18717 }
18718 _ACEOF
18719 if ac_fn_c_try_run "$LINENO"; then :
18720 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18721 else
18722 gl_cv_func_lstat_dereferences_slashed_symlink=no
18723 fi
18724 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18725 conftest.$ac_objext conftest.beam conftest.$ac_ext
18726 fi
18727
18728 else
18729 # If the 'ln -s' command failed, then we probably don't even
18730 # have an lstat function.
18731 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18732 fi
18733 rm -f conftest.sym conftest.file
18734
18735 fi
18736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18737 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18738 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18739 *yes)
18740
18741 cat >>confdefs.h <<_ACEOF
18742 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18743 _ACEOF
18744
18745 ;;
18746 esac
18747
18748
18749
18750
18751
18752
18753 GNULIB__EXIT=0;
18754 GNULIB_ATOLL=0;
18755 GNULIB_CALLOC_POSIX=0;
18756 GNULIB_CANONICALIZE_FILE_NAME=0;
18757 GNULIB_GETLOADAVG=0;
18758 GNULIB_GETSUBOPT=0;
18759 GNULIB_GRANTPT=0;
18760 GNULIB_MALLOC_POSIX=0;
18761 GNULIB_MBTOWC=0;
18762 GNULIB_MKDTEMP=0;
18763 GNULIB_MKOSTEMP=0;
18764 GNULIB_MKOSTEMPS=0;
18765 GNULIB_MKSTEMP=0;
18766 GNULIB_MKSTEMPS=0;
18767 GNULIB_POSIX_OPENPT=0;
18768 GNULIB_PTSNAME=0;
18769 GNULIB_PTSNAME_R=0;
18770 GNULIB_PUTENV=0;
18771 GNULIB_RANDOM=0;
18772 GNULIB_RANDOM_R=0;
18773 GNULIB_REALLOC_POSIX=0;
18774 GNULIB_REALPATH=0;
18775 GNULIB_RPMATCH=0;
18776 GNULIB_SECURE_GETENV=0;
18777 GNULIB_SETENV=0;
18778 GNULIB_STRTOD=0;
18779 GNULIB_STRTOLL=0;
18780 GNULIB_STRTOULL=0;
18781 GNULIB_SYSTEM_POSIX=0;
18782 GNULIB_UNLOCKPT=0;
18783 GNULIB_UNSETENV=0;
18784 GNULIB_WCTOMB=0;
18785 HAVE__EXIT=1;
18786 HAVE_ATOLL=1;
18787 HAVE_CANONICALIZE_FILE_NAME=1;
18788 HAVE_DECL_GETLOADAVG=1;
18789 HAVE_GETSUBOPT=1;
18790 HAVE_GRANTPT=1;
18791 HAVE_MKDTEMP=1;
18792 HAVE_MKOSTEMP=1;
18793 HAVE_MKOSTEMPS=1;
18794 HAVE_MKSTEMP=1;
18795 HAVE_MKSTEMPS=1;
18796 HAVE_POSIX_OPENPT=1;
18797 HAVE_PTSNAME=1;
18798 HAVE_PTSNAME_R=1;
18799 HAVE_RANDOM=1;
18800 HAVE_RANDOM_H=1;
18801 HAVE_RANDOM_R=1;
18802 HAVE_REALPATH=1;
18803 HAVE_RPMATCH=1;
18804 HAVE_SECURE_GETENV=1;
18805 HAVE_SETENV=1;
18806 HAVE_DECL_SETENV=1;
18807 HAVE_STRTOD=1;
18808 HAVE_STRTOLL=1;
18809 HAVE_STRTOULL=1;
18810 HAVE_STRUCT_RANDOM_DATA=1;
18811 HAVE_SYS_LOADAVG_H=0;
18812 HAVE_UNLOCKPT=1;
18813 HAVE_DECL_UNSETENV=1;
18814 REPLACE_CALLOC=0;
18815 REPLACE_CANONICALIZE_FILE_NAME=0;
18816 REPLACE_MALLOC=0;
18817 REPLACE_MBTOWC=0;
18818 REPLACE_MKSTEMP=0;
18819 REPLACE_PTSNAME=0;
18820 REPLACE_PTSNAME_R=0;
18821 REPLACE_PUTENV=0;
18822 REPLACE_RANDOM_R=0;
18823 REPLACE_REALLOC=0;
18824 REPLACE_REALPATH=0;
18825 REPLACE_SETENV=0;
18826 REPLACE_STRTOD=0;
18827 REPLACE_UNSETENV=0;
18828 REPLACE_WCTOMB=0;
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845 if test $gl_cv_have_include_next = yes; then
18846 gl_cv_next_getopt_h='<'getopt.h'>'
18847 else
18848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18849 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
18850 if test "${gl_cv_next_getopt_h+set}" = set; then :
18851 $as_echo_n "(cached) " >&6
18852 else
18853
18854 if test $ac_cv_header_getopt_h = yes; then
18855
18856
18857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18858 /* end confdefs.h. */
18859 #include <getopt.h>
18860
18861 _ACEOF
18862 case "$host_os" in
18863 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18864 *) gl_absname_cpp="$ac_cpp" ;;
18865 esac
18866
18867 case "$host_os" in
18868 mingw*)
18869 gl_dirsep_regex='[/\\]'
18870 ;;
18871 *)
18872 gl_dirsep_regex='\/'
18873 ;;
18874 esac
18875 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18876
18877 gl_header_literal_regex=`echo 'getopt.h' \
18878 | sed -e "$gl_make_literal_regex_sed"`
18879 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18880 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18881 s|^/[^/]|//&|
18882 p
18883 q
18884 }'
18885 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18886 sed -n "$gl_absolute_header_sed"`'"'
18887 else
18888 gl_cv_next_getopt_h='<'getopt.h'>'
18889 fi
18890
18891
18892 fi
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18894 $as_echo "$gl_cv_next_getopt_h" >&6; }
18895 fi
18896 NEXT_GETOPT_H=$gl_cv_next_getopt_h
18897
18898 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18899 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18900 gl_next_as_first_directive='<'getopt.h'>'
18901 else
18902 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18903 gl_next_as_first_directive=$gl_cv_next_getopt_h
18904 fi
18905 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
18906
18907
18908
18909
18910 if test $ac_cv_header_getopt_h = yes; then
18911 HAVE_GETOPT_H=1
18912 else
18913 HAVE_GETOPT_H=0
18914 fi
18915
18916
18917 gl_replace_getopt=
18918
18919 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18920 for ac_header in getopt.h
18921 do :
18922 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18923 if test "x$ac_cv_header_getopt_h" = x""yes; then :
18924 cat >>confdefs.h <<_ACEOF
18925 #define HAVE_GETOPT_H 1
18926 _ACEOF
18927
18928 else
18929 gl_replace_getopt=yes
18930 fi
18931
18932 done
18933
18934 fi
18935
18936 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18937 for ac_func in getopt_long_only
18938 do :
18939 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18940 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
18941 cat >>confdefs.h <<_ACEOF
18942 #define HAVE_GETOPT_LONG_ONLY 1
18943 _ACEOF
18944
18945 else
18946 gl_replace_getopt=yes
18947 fi
18948 done
18949
18950 fi
18951
18952 if test -z "$gl_replace_getopt"; then
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18954 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
18955 if test "${gl_cv_func_getopt_posix+set}" = set; then :
18956 $as_echo_n "(cached) " >&6
18957 else
18958
18959 if test $cross_compiling = no; then
18960 if test "$cross_compiling" = yes; then :
18961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18962 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18963 as_fn_error "cannot run test program while cross compiling
18964 See \`config.log' for more details." "$LINENO" 5; }
18965 else
18966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18967 /* end confdefs.h. */
18968
18969 #include <unistd.h>
18970 #include <stdlib.h>
18971 #include <string.h>
18972
18973 int
18974 main ()
18975 {
18976 static char program[] = "program";
18977 static char a[] = "-a";
18978 static char foo[] = "foo";
18979 static char bar[] = "bar";
18980 char *argv[] = { program, a, foo, bar, NULL };
18981 int c;
18982
18983 c = getopt (4, argv, "ab");
18984 if (!(c == 'a'))
18985 return 1;
18986 c = getopt (4, argv, "ab");
18987 if (!(c == -1))
18988 return 2;
18989 if (!(optind == 2))
18990 return 3;
18991 return 0;
18992 }
18993
18994 _ACEOF
18995 if ac_fn_c_try_run "$LINENO"; then :
18996 gl_cv_func_getopt_posix=maybe
18997 else
18998 gl_cv_func_getopt_posix=no
18999 fi
19000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19001 conftest.$ac_objext conftest.beam conftest.$ac_ext
19002 fi
19003
19004 if test $gl_cv_func_getopt_posix = maybe; then
19005 if test "$cross_compiling" = yes; then :
19006 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19007 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19008 as_fn_error "cannot run test program while cross compiling
19009 See \`config.log' for more details." "$LINENO" 5; }
19010 else
19011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19012 /* end confdefs.h. */
19013
19014 #include <unistd.h>
19015 #include <stdlib.h>
19016 #include <string.h>
19017
19018 int
19019 main ()
19020 {
19021 static char program[] = "program";
19022 static char donald[] = "donald";
19023 static char p[] = "-p";
19024 static char billy[] = "billy";
19025 static char duck[] = "duck";
19026 static char a[] = "-a";
19027 static char bar[] = "bar";
19028 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
19029 int c;
19030
19031 c = getopt (7, argv, "+abp:q:");
19032 if (!(c == -1))
19033 return 4;
19034 if (!(strcmp (argv[0], "program") == 0))
19035 return 5;
19036 if (!(strcmp (argv[1], "donald") == 0))
19037 return 6;
19038 if (!(strcmp (argv[2], "-p") == 0))
19039 return 7;
19040 if (!(strcmp (argv[3], "billy") == 0))
19041 return 8;
19042 if (!(strcmp (argv[4], "duck") == 0))
19043 return 9;
19044 if (!(strcmp (argv[5], "-a") == 0))
19045 return 10;
19046 if (!(strcmp (argv[6], "bar") == 0))
19047 return 11;
19048 if (!(optind == 1))
19049 return 12;
19050 return 0;
19051 }
19052
19053 _ACEOF
19054 if ac_fn_c_try_run "$LINENO"; then :
19055 gl_cv_func_getopt_posix=maybe
19056 else
19057 gl_cv_func_getopt_posix=no
19058 fi
19059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19060 conftest.$ac_objext conftest.beam conftest.$ac_ext
19061 fi
19062
19063 fi
19064 if test $gl_cv_func_getopt_posix = maybe; then
19065 if test "$cross_compiling" = yes; then :
19066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19068 as_fn_error "cannot run test program while cross compiling
19069 See \`config.log' for more details." "$LINENO" 5; }
19070 else
19071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19072 /* end confdefs.h. */
19073
19074 #include <unistd.h>
19075 #include <stdlib.h>
19076 #include <string.h>
19077
19078 int
19079 main ()
19080 {
19081 static char program[] = "program";
19082 static char ab[] = "-ab";
19083 char *argv[3] = { program, ab, NULL };
19084 if (getopt (2, argv, "ab:") != 'a')
19085 return 13;
19086 if (getopt (2, argv, "ab:") != '?')
19087 return 14;
19088 if (optopt != 'b')
19089 return 15;
19090 if (optind != 2)
19091 return 16;
19092 return 0;
19093 }
19094
19095 _ACEOF
19096 if ac_fn_c_try_run "$LINENO"; then :
19097 gl_cv_func_getopt_posix=yes
19098 else
19099 gl_cv_func_getopt_posix=no
19100 fi
19101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19102 conftest.$ac_objext conftest.beam conftest.$ac_ext
19103 fi
19104
19105 fi
19106 else
19107 case "$host_os" in
19108 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
19109 *) gl_cv_func_getopt_posix="guessing yes";;
19110 esac
19111 fi
19112
19113 fi
19114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
19115 $as_echo "$gl_cv_func_getopt_posix" >&6; }
19116 case "$gl_cv_func_getopt_posix" in
19117 *no) gl_replace_getopt=yes ;;
19118 esac
19119 fi
19120
19121 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
19123 $as_echo_n "checking for working GNU getopt function... " >&6; }
19124 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
19125 $as_echo_n "(cached) " >&6
19126 else
19127 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
19128 # optstring is necessary for programs like m4 that have POSIX-mandated
19129 # semantics for supporting options interspersed with files.
19130 # Also, since getopt_long is a GNU extension, we require optind=0.
19131 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
19132 # so take care to revert to the correct (non-)export state.
19133 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
19134 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
19135 xx) gl_had_POSIXLY_CORRECT=exported ;;
19136 x) gl_had_POSIXLY_CORRECT=yes ;;
19137 *) gl_had_POSIXLY_CORRECT= ;;
19138 esac
19139 POSIXLY_CORRECT=1
19140 export POSIXLY_CORRECT
19141 if test "$cross_compiling" = yes; then :
19142 gl_cv_func_getopt_gnu="guessing no"
19143
19144 else
19145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19146 /* end confdefs.h. */
19147 #include <getopt.h>
19148 #include <stddef.h>
19149 #include <string.h>
19150
19151 #include <stdlib.h>
19152 #if defined __MACH__ && defined __APPLE__
19153 /* Avoid a crash on Mac OS X. */
19154 #include <mach/mach.h>
19155 #include <mach/mach_error.h>
19156 #include <mach/thread_status.h>
19157 #include <mach/exception.h>
19158 #include <mach/task.h>
19159 #include <pthread.h>
19160 /* The exception port on which our thread listens. */
19161 static mach_port_t our_exception_port;
19162 /* The main function of the thread listening for exceptions of type
19163 EXC_BAD_ACCESS. */
19164 static void *
19165 mach_exception_thread (void *arg)
19166 {
19167 /* Buffer for a message to be received. */
19168 struct {
19169 mach_msg_header_t head;
19170 mach_msg_body_t msgh_body;
19171 char data[1024];
19172 } msg;
19173 mach_msg_return_t retval;
19174 /* Wait for a message on the exception port. */
19175 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19176 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19177 if (retval != MACH_MSG_SUCCESS)
19178 abort ();
19179 exit (1);
19180 }
19181 static void
19182 nocrash_init (void)
19183 {
19184 mach_port_t self = mach_task_self ();
19185 /* Allocate a port on which the thread shall listen for exceptions. */
19186 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19187 == KERN_SUCCESS) {
19188 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19189 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19190 MACH_MSG_TYPE_MAKE_SEND)
19191 == KERN_SUCCESS) {
19192 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19193 for us. */
19194 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19195 /* Create the thread listening on the exception port. */
19196 pthread_attr_t attr;
19197 pthread_t thread;
19198 if (pthread_attr_init (&attr) == 0
19199 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19200 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19201 pthread_attr_destroy (&attr);
19202 /* Replace the exception port info for these exceptions with our own.
19203 Note that we replace the exception port for the entire task, not only
19204 for a particular thread. This has the effect that when our exception
19205 port gets the message, the thread specific exception port has already
19206 been asked, and we don't need to bother about it.
19207 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19208 task_set_exception_ports (self, mask, our_exception_port,
19209 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19210 }
19211 }
19212 }
19213 }
19214 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19215 /* Avoid a crash on native Windows. */
19216 #define WIN32_LEAN_AND_MEAN
19217 #include <windows.h>
19218 #include <winerror.h>
19219 static LONG WINAPI
19220 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19221 {
19222 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19223 {
19224 case EXCEPTION_ACCESS_VIOLATION:
19225 case EXCEPTION_IN_PAGE_ERROR:
19226 case EXCEPTION_STACK_OVERFLOW:
19227 case EXCEPTION_GUARD_PAGE:
19228 case EXCEPTION_PRIV_INSTRUCTION:
19229 case EXCEPTION_ILLEGAL_INSTRUCTION:
19230 case EXCEPTION_DATATYPE_MISALIGNMENT:
19231 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19232 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19233 exit (1);
19234 }
19235 return EXCEPTION_CONTINUE_SEARCH;
19236 }
19237 static void
19238 nocrash_init (void)
19239 {
19240 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19241 }
19242 #else
19243 /* Avoid a crash on POSIX systems. */
19244 #include <signal.h>
19245 /* A POSIX signal handler. */
19246 static void
19247 exception_handler (int sig)
19248 {
19249 exit (1);
19250 }
19251 static void
19252 nocrash_init (void)
19253 {
19254 #ifdef SIGSEGV
19255 signal (SIGSEGV, exception_handler);
19256 #endif
19257 #ifdef SIGBUS
19258 signal (SIGBUS, exception_handler);
19259 #endif
19260 }
19261 #endif
19262
19263
19264 int
19265 main ()
19266 {
19267
19268 int result = 0;
19269
19270 nocrash_init();
19271
19272 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19273 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19274 OSF/1 5.1, Solaris 10. */
19275 {
19276 static char conftest[] = "conftest";
19277 static char plus[] = "-+";
19278 char *argv[3] = { conftest, plus, NULL };
19279 opterr = 0;
19280 if (getopt (2, argv, "+a") != '?')
19281 result |= 1;
19282 }
19283 /* This code succeeds on glibc 2.8, mingw,
19284 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19285 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19286 {
19287 static char program[] = "program";
19288 static char p[] = "-p";
19289 static char foo[] = "foo";
19290 static char bar[] = "bar";
19291 char *argv[] = { program, p, foo, bar, NULL };
19292
19293 optind = 1;
19294 if (getopt (4, argv, "p::") != 'p')
19295 result |= 2;
19296 else if (optarg != NULL)
19297 result |= 4;
19298 else if (getopt (4, argv, "p::") != -1)
19299 result |= 6;
19300 else if (optind != 2)
19301 result |= 8;
19302 }
19303 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19304 {
19305 static char program[] = "program";
19306 static char foo[] = "foo";
19307 static char p[] = "-p";
19308 char *argv[] = { program, foo, p, NULL };
19309 optind = 0;
19310 if (getopt (3, argv, "-p") != 1)
19311 result |= 16;
19312 else if (getopt (3, argv, "-p") != 'p')
19313 result |= 16;
19314 }
19315 /* This code fails on glibc 2.11. */
19316 {
19317 static char program[] = "program";
19318 static char b[] = "-b";
19319 static char a[] = "-a";
19320 char *argv[] = { program, b, a, NULL };
19321 optind = opterr = 0;
19322 if (getopt (3, argv, "+:a:b") != 'b')
19323 result |= 32;
19324 else if (getopt (3, argv, "+:a:b") != ':')
19325 result |= 32;
19326 }
19327 /* This code dumps core on glibc 2.14. */
19328 {
19329 static char program[] = "program";
19330 static char w[] = "-W";
19331 static char dummy[] = "dummy";
19332 char *argv[] = { program, w, dummy, NULL };
19333 optind = opterr = 1;
19334 if (getopt (3, argv, "W;") != 'W')
19335 result |= 64;
19336 }
19337 return result;
19338
19339 ;
19340 return 0;
19341 }
19342 _ACEOF
19343 if ac_fn_c_try_run "$LINENO"; then :
19344 gl_cv_func_getopt_gnu=yes
19345 else
19346 gl_cv_func_getopt_gnu=no
19347 fi
19348 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19349 conftest.$ac_objext conftest.beam conftest.$ac_ext
19350 fi
19351
19352 case $gl_had_POSIXLY_CORRECT in
19353 exported) ;;
19354 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19355 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19356 esac
19357
19358 fi
19359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19360 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
19361 if test "$gl_cv_func_getopt_gnu" != yes; then
19362 gl_replace_getopt=yes
19363 else
19364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19365 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
19366 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
19367 $as_echo_n "(cached) " >&6
19368 else
19369 if test "$cross_compiling" = yes; then :
19370 case "$host_os" in
19371 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19372 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19373 esac
19374
19375 else
19376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19377 /* end confdefs.h. */
19378 #include <getopt.h>
19379 #include <stddef.h>
19380 #include <string.h>
19381
19382 int
19383 main ()
19384 {
19385 static const struct option long_options[] =
19386 {
19387 { "xtremely-",no_argument, NULL, 1003 },
19388 { "xtra", no_argument, NULL, 1001 },
19389 { "xtreme", no_argument, NULL, 1002 },
19390 { "xtremely", no_argument, NULL, 1003 },
19391 { NULL, 0, NULL, 0 }
19392 };
19393 /* This code fails on OpenBSD 5.0. */
19394 {
19395 static char program[] = "program";
19396 static char xtremel[] = "--xtremel";
19397 char *argv[] = { program, xtremel, NULL };
19398 int option_index;
19399 optind = 1; opterr = 0;
19400 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19401 return 1;
19402 }
19403 return 0;
19404
19405 ;
19406 return 0;
19407 }
19408 _ACEOF
19409 if ac_fn_c_try_run "$LINENO"; then :
19410 gl_cv_func_getopt_long_gnu=yes
19411 else
19412 gl_cv_func_getopt_long_gnu=no
19413 fi
19414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19415 conftest.$ac_objext conftest.beam conftest.$ac_ext
19416 fi
19417
19418
19419 fi
19420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19421 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19422 case "$gl_cv_func_getopt_long_gnu" in
19423 *yes) ;;
19424 *) gl_replace_getopt=yes ;;
19425 esac
19426 fi
19427 fi
19428
19429
19430
19431
19432
19433
19434 REPLACE_GETOPT=0
19435 if test -n "$gl_replace_getopt"; then
19436 REPLACE_GETOPT=1
19437 fi
19438
19439 if test $REPLACE_GETOPT = 1; then
19440
19441 GETOPT_H=getopt.h
19442
19443 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
19444
19445
19446
19447 fi
19448
19449 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19450 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19451 ac_have_decl=1
19452 else
19453 ac_have_decl=0
19454 fi
19455
19456 cat >>confdefs.h <<_ACEOF
19457 #define HAVE_DECL_GETENV $ac_have_decl
19458 _ACEOF
19459
19460 :
19461
19462
19463
19464
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19466 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19467 if test "${ac_cv_c_restrict+set}" = set; then :
19468 $as_echo_n "(cached) " >&6
19469 else
19470 ac_cv_c_restrict=no
19471 # The order here caters to the fact that C++ does not require restrict.
19472 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19474 /* end confdefs.h. */
19475 typedef int * int_ptr;
19476 int foo (int_ptr $ac_kw ip) {
19477 return ip[0];
19478 }
19479 int
19480 main ()
19481 {
19482 int s[1];
19483 int * $ac_kw t = s;
19484 t[0] = 0;
19485 return foo(t)
19486 ;
19487 return 0;
19488 }
19489 _ACEOF
19490 if ac_fn_c_try_compile "$LINENO"; then :
19491 ac_cv_c_restrict=$ac_kw
19492 fi
19493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19494 test "$ac_cv_c_restrict" != no && break
19495 done
19496
19497 fi
19498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19499 $as_echo "$ac_cv_c_restrict" >&6; }
19500
19501 case $ac_cv_c_restrict in
19502 restrict) ;;
19503 no) $as_echo "#define restrict /**/" >>confdefs.h
19504 ;;
19505 *) cat >>confdefs.h <<_ACEOF
19506 #define restrict $ac_cv_c_restrict
19507 _ACEOF
19508 ;;
19509 esac
19510
19511
19512 GNULIB_GETTIMEOFDAY=0;
19513 HAVE_GETTIMEOFDAY=1;
19514 HAVE_STRUCT_TIMEVAL=1;
19515 HAVE_SYS_TIME_H=1;
19516 REPLACE_GETTIMEOFDAY=0;
19517 REPLACE_STRUCT_TIMEVAL=0;
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534 if test $gl_cv_have_include_next = yes; then
19535 gl_cv_next_sys_time_h='<'sys/time.h'>'
19536 else
19537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19538 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19539 if test "${gl_cv_next_sys_time_h+set}" = set; then :
19540 $as_echo_n "(cached) " >&6
19541 else
19542
19543 if test $ac_cv_header_sys_time_h = yes; then
19544
19545
19546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19547 /* end confdefs.h. */
19548 #include <sys/time.h>
19549
19550 _ACEOF
19551 case "$host_os" in
19552 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19553 *) gl_absname_cpp="$ac_cpp" ;;
19554 esac
19555
19556 case "$host_os" in
19557 mingw*)
19558 gl_dirsep_regex='[/\\]'
19559 ;;
19560 *)
19561 gl_dirsep_regex='\/'
19562 ;;
19563 esac
19564 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19565
19566 gl_header_literal_regex=`echo 'sys/time.h' \
19567 | sed -e "$gl_make_literal_regex_sed"`
19568 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19569 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19570 s|^/[^/]|//&|
19571 p
19572 q
19573 }'
19574 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19575 sed -n "$gl_absolute_header_sed"`'"'
19576 else
19577 gl_cv_next_sys_time_h='<'sys/time.h'>'
19578 fi
19579
19580
19581 fi
19582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19583 $as_echo "$gl_cv_next_sys_time_h" >&6; }
19584 fi
19585 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
19586
19587 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19588 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19589 gl_next_as_first_directive='<'sys/time.h'>'
19590 else
19591 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19592 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19593 fi
19594 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
19595
19596
19597
19598
19599
19600 if test $ac_cv_header_sys_time_h != yes; then
19601 HAVE_SYS_TIME_H=0
19602 fi
19603
19604
19605
19606
19607
19608 if test $ac_cv_header_sys_socket_h != yes; then
19609 for ac_header in winsock2.h
19610 do :
19611 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19612 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19613 cat >>confdefs.h <<_ACEOF
19614 #define HAVE_WINSOCK2_H 1
19615 _ACEOF
19616
19617 fi
19618
19619 done
19620
19621 fi
19622 if test "$ac_cv_header_winsock2_h" = yes; then
19623 HAVE_WINSOCK2_H=1
19624 UNISTD_H_HAVE_WINSOCK2_H=1
19625 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19626 else
19627 HAVE_WINSOCK2_H=0
19628 fi
19629
19630
19631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19632 $as_echo_n "checking for struct timeval... " >&6; }
19633 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19634 $as_echo_n "(cached) " >&6
19635 else
19636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19637 /* end confdefs.h. */
19638 #if HAVE_SYS_TIME_H
19639 #include <sys/time.h>
19640 #endif
19641 #include <time.h>
19642 #if HAVE_WINSOCK2_H
19643 # include <winsock2.h>
19644 #endif
19645
19646 int
19647 main ()
19648 {
19649 static struct timeval x; x.tv_sec = x.tv_usec;
19650 ;
19651 return 0;
19652 }
19653 _ACEOF
19654 if ac_fn_c_try_compile "$LINENO"; then :
19655 gl_cv_sys_struct_timeval=yes
19656 else
19657 gl_cv_sys_struct_timeval=no
19658 fi
19659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19660
19661 fi
19662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19663 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
19664 if test $gl_cv_sys_struct_timeval != yes; then
19665 HAVE_STRUCT_TIMEVAL=0
19666 else
19667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19668 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19669 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19670 $as_echo_n "(cached) " >&6
19671 else
19672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19673 /* end confdefs.h. */
19674 #if HAVE_SYS_TIME_H
19675 #include <sys/time.h>
19676 #endif
19677 #include <time.h>
19678 #if HAVE_WINSOCK2_H
19679 # include <winsock2.h>
19680 #endif
19681
19682 int
19683 main ()
19684 {
19685 static struct timeval x;
19686 typedef int verify_tv_sec_type[
19687 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
19688 ];
19689
19690 ;
19691 return 0;
19692 }
19693 _ACEOF
19694 if ac_fn_c_try_compile "$LINENO"; then :
19695 gl_cv_sys_struct_timeval_tv_sec=yes
19696 else
19697 gl_cv_sys_struct_timeval_tv_sec=no
19698 fi
19699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19700
19701 fi
19702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
19703 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
19704 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
19705 REPLACE_STRUCT_TIMEVAL=1
19706 fi
19707 fi
19708
19709
19710
19711
19712
19713
19714
19715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19716 $as_echo_n "checking for unsigned long long int... " >&6; }
19717 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
19718 $as_echo_n "(cached) " >&6
19719 else
19720 ac_cv_type_unsigned_long_long_int=yes
19721 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19723 /* end confdefs.h. */
19724
19725 /* For now, do not test the preprocessor; as of 2007 there are too many
19726 implementations with broken preprocessors. Perhaps this can
19727 be revisited in 2012. In the meantime, code should not expect
19728 #if to work with literals wider than 32 bits. */
19729 /* Test literals. */
19730 long long int ll = 9223372036854775807ll;
19731 long long int nll = -9223372036854775807LL;
19732 unsigned long long int ull = 18446744073709551615ULL;
19733 /* Test constant expressions. */
19734 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19735 ? 1 : -1)];
19736 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19737 ? 1 : -1)];
19738 int i = 63;
19739 int
19740 main ()
19741 {
19742 /* Test availability of runtime routines for shift and division. */
19743 long long int llmax = 9223372036854775807ll;
19744 unsigned long long int ullmax = 18446744073709551615ull;
19745 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19746 | (llmax / ll) | (llmax % ll)
19747 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19748 | (ullmax / ull) | (ullmax % ull));
19749 ;
19750 return 0;
19751 }
19752
19753 _ACEOF
19754 if ac_fn_c_try_link "$LINENO"; then :
19755
19756 else
19757 ac_cv_type_unsigned_long_long_int=no
19758 fi
19759 rm -f core conftest.err conftest.$ac_objext \
19760 conftest$ac_exeext conftest.$ac_ext
19761 fi
19762 fi
19763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19764 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19765 if test $ac_cv_type_unsigned_long_long_int = yes; then
19766
19767 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19768
19769 fi
19770
19771
19772
19773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19774 $as_echo_n "checking for long long int... " >&6; }
19775 if test "${ac_cv_type_long_long_int+set}" = set; then :
19776 $as_echo_n "(cached) " >&6
19777 else
19778 ac_cv_type_long_long_int=yes
19779 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19780 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19781 if test $ac_cv_type_long_long_int = yes; then
19782 if test "$cross_compiling" = yes; then :
19783 :
19784 else
19785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19786 /* end confdefs.h. */
19787 #include <limits.h>
19788 #ifndef LLONG_MAX
19789 # define HALF \
19790 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19791 # define LLONG_MAX (HALF - 1 + HALF)
19792 #endif
19793 int
19794 main ()
19795 {
19796 long long int n = 1;
19797 int i;
19798 for (i = 0; ; i++)
19799 {
19800 long long int m = n << i;
19801 if (m >> i != n)
19802 return 1;
19803 if (LLONG_MAX / 2 < m)
19804 break;
19805 }
19806 return 0;
19807 ;
19808 return 0;
19809 }
19810 _ACEOF
19811 if ac_fn_c_try_run "$LINENO"; then :
19812
19813 else
19814 ac_cv_type_long_long_int=no
19815 fi
19816 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19817 conftest.$ac_objext conftest.beam conftest.$ac_ext
19818 fi
19819
19820 fi
19821 fi
19822 fi
19823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19824 $as_echo "$ac_cv_type_long_long_int" >&6; }
19825 if test $ac_cv_type_long_long_int = yes; then
19826
19827 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
19828
19829 fi
19830
19831
19832
19833
19834
19835
19836 gl_cv_c_multiarch=no
19837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19838 /* end confdefs.h. */
19839 #ifndef __APPLE_CC__
19840 not a universal capable compiler
19841 #endif
19842 typedef int dummy;
19843
19844 _ACEOF
19845 if ac_fn_c_try_compile "$LINENO"; then :
19846
19847 arch=
19848 prev=
19849 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19850 if test -n "$prev"; then
19851 case $word in
19852 i?86 | x86_64 | ppc | ppc64)
19853 if test -z "$arch" || test "$arch" = "$word"; then
19854 arch="$word"
19855 else
19856 gl_cv_c_multiarch=yes
19857 fi
19858 ;;
19859 esac
19860 prev=
19861 else
19862 if test "x$word" = "x-arch"; then
19863 prev=arch
19864 fi
19865 fi
19866 done
19867
19868 fi
19869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19870 if test $gl_cv_c_multiarch = yes; then
19871 APPLE_UNIVERSAL_BUILD=1
19872 else
19873 APPLE_UNIVERSAL_BUILD=0
19874 fi
19875
19876
19877
19878
19879
19880 if test $ac_cv_type_long_long_int = yes; then
19881 HAVE_LONG_LONG_INT=1
19882 else
19883 HAVE_LONG_LONG_INT=0
19884 fi
19885
19886
19887 if test $ac_cv_type_unsigned_long_long_int = yes; then
19888 HAVE_UNSIGNED_LONG_LONG_INT=1
19889 else
19890 HAVE_UNSIGNED_LONG_LONG_INT=0
19891 fi
19892
19893
19894
19895 if test $ac_cv_header_wchar_h = yes; then
19896 HAVE_WCHAR_H=1
19897 else
19898 HAVE_WCHAR_H=0
19899 fi
19900
19901
19902 if test $ac_cv_header_inttypes_h = yes; then
19903 HAVE_INTTYPES_H=1
19904 else
19905 HAVE_INTTYPES_H=0
19906 fi
19907
19908
19909 if test $ac_cv_header_sys_types_h = yes; then
19910 HAVE_SYS_TYPES_H=1
19911 else
19912 HAVE_SYS_TYPES_H=0
19913 fi
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925 if test $gl_cv_have_include_next = yes; then
19926 gl_cv_next_stdint_h='<'stdint.h'>'
19927 else
19928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19929 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19930 if test "${gl_cv_next_stdint_h+set}" = set; then :
19931 $as_echo_n "(cached) " >&6
19932 else
19933
19934 if test $ac_cv_header_stdint_h = yes; then
19935
19936
19937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19938 /* end confdefs.h. */
19939 #include <stdint.h>
19940
19941 _ACEOF
19942 case "$host_os" in
19943 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19944 *) gl_absname_cpp="$ac_cpp" ;;
19945 esac
19946
19947 case "$host_os" in
19948 mingw*)
19949 gl_dirsep_regex='[/\\]'
19950 ;;
19951 *)
19952 gl_dirsep_regex='\/'
19953 ;;
19954 esac
19955 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19956
19957 gl_header_literal_regex=`echo 'stdint.h' \
19958 | sed -e "$gl_make_literal_regex_sed"`
19959 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19960 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19961 s|^/[^/]|//&|
19962 p
19963 q
19964 }'
19965 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19966 sed -n "$gl_absolute_header_sed"`'"'
19967 else
19968 gl_cv_next_stdint_h='<'stdint.h'>'
19969 fi
19970
19971
19972 fi
19973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19974 $as_echo "$gl_cv_next_stdint_h" >&6; }
19975 fi
19976 NEXT_STDINT_H=$gl_cv_next_stdint_h
19977
19978 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19979 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19980 gl_next_as_first_directive='<'stdint.h'>'
19981 else
19982 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19983 gl_next_as_first_directive=$gl_cv_next_stdint_h
19984 fi
19985 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
19986
19987
19988
19989
19990 if test $ac_cv_header_stdint_h = yes; then
19991 HAVE_STDINT_H=1
19992 else
19993 HAVE_STDINT_H=0
19994 fi
19995
19996
19997 if test $ac_cv_header_stdint_h = yes; then
19998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19999 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
20000 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
20001 $as_echo_n "(cached) " >&6
20002 else
20003 gl_cv_header_working_stdint_h=no
20004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20005 /* end confdefs.h. */
20006
20007
20008 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20009 #include <stdint.h>
20010 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
20011 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
20012 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20013 #endif
20014
20015
20016 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20017 included before <wchar.h>. */
20018 #include <stddef.h>
20019 #include <signal.h>
20020 #if HAVE_WCHAR_H
20021 # include <stdio.h>
20022 # include <time.h>
20023 # include <wchar.h>
20024 #endif
20025
20026
20027 #ifdef INT8_MAX
20028 int8_t a1 = INT8_MAX;
20029 int8_t a1min = INT8_MIN;
20030 #endif
20031 #ifdef INT16_MAX
20032 int16_t a2 = INT16_MAX;
20033 int16_t a2min = INT16_MIN;
20034 #endif
20035 #ifdef INT32_MAX
20036 int32_t a3 = INT32_MAX;
20037 int32_t a3min = INT32_MIN;
20038 #endif
20039 #ifdef INT64_MAX
20040 int64_t a4 = INT64_MAX;
20041 int64_t a4min = INT64_MIN;
20042 #endif
20043 #ifdef UINT8_MAX
20044 uint8_t b1 = UINT8_MAX;
20045 #else
20046 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20047 #endif
20048 #ifdef UINT16_MAX
20049 uint16_t b2 = UINT16_MAX;
20050 #endif
20051 #ifdef UINT32_MAX
20052 uint32_t b3 = UINT32_MAX;
20053 #endif
20054 #ifdef UINT64_MAX
20055 uint64_t b4 = UINT64_MAX;
20056 #endif
20057 int_least8_t c1 = INT8_C (0x7f);
20058 int_least8_t c1max = INT_LEAST8_MAX;
20059 int_least8_t c1min = INT_LEAST8_MIN;
20060 int_least16_t c2 = INT16_C (0x7fff);
20061 int_least16_t c2max = INT_LEAST16_MAX;
20062 int_least16_t c2min = INT_LEAST16_MIN;
20063 int_least32_t c3 = INT32_C (0x7fffffff);
20064 int_least32_t c3max = INT_LEAST32_MAX;
20065 int_least32_t c3min = INT_LEAST32_MIN;
20066 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20067 int_least64_t c4max = INT_LEAST64_MAX;
20068 int_least64_t c4min = INT_LEAST64_MIN;
20069 uint_least8_t d1 = UINT8_C (0xff);
20070 uint_least8_t d1max = UINT_LEAST8_MAX;
20071 uint_least16_t d2 = UINT16_C (0xffff);
20072 uint_least16_t d2max = UINT_LEAST16_MAX;
20073 uint_least32_t d3 = UINT32_C (0xffffffff);
20074 uint_least32_t d3max = UINT_LEAST32_MAX;
20075 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20076 uint_least64_t d4max = UINT_LEAST64_MAX;
20077 int_fast8_t e1 = INT_FAST8_MAX;
20078 int_fast8_t e1min = INT_FAST8_MIN;
20079 int_fast16_t e2 = INT_FAST16_MAX;
20080 int_fast16_t e2min = INT_FAST16_MIN;
20081 int_fast32_t e3 = INT_FAST32_MAX;
20082 int_fast32_t e3min = INT_FAST32_MIN;
20083 int_fast64_t e4 = INT_FAST64_MAX;
20084 int_fast64_t e4min = INT_FAST64_MIN;
20085 uint_fast8_t f1 = UINT_FAST8_MAX;
20086 uint_fast16_t f2 = UINT_FAST16_MAX;
20087 uint_fast32_t f3 = UINT_FAST32_MAX;
20088 uint_fast64_t f4 = UINT_FAST64_MAX;
20089 #ifdef INTPTR_MAX
20090 intptr_t g = INTPTR_MAX;
20091 intptr_t gmin = INTPTR_MIN;
20092 #endif
20093 #ifdef UINTPTR_MAX
20094 uintptr_t h = UINTPTR_MAX;
20095 #endif
20096 intmax_t i = INTMAX_MAX;
20097 uintmax_t j = UINTMAX_MAX;
20098
20099 #include <limits.h> /* for CHAR_BIT */
20100 #define TYPE_MINIMUM(t) \
20101 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
20102 #define TYPE_MAXIMUM(t) \
20103 ((t) ((t) 0 < (t) -1 \
20104 ? (t) -1 \
20105 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
20106 struct s {
20107 int check_PTRDIFF:
20108 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20109 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20110 ? 1 : -1;
20111 /* Detect bug in FreeBSD 6.0 / ia64. */
20112 int check_SIG_ATOMIC:
20113 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20114 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20115 ? 1 : -1;
20116 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20117 int check_WCHAR:
20118 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20119 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20120 ? 1 : -1;
20121 /* Detect bug in mingw. */
20122 int check_WINT:
20123 WINT_MIN == TYPE_MINIMUM (wint_t)
20124 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20125 ? 1 : -1;
20126
20127 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20128 int check_UINT8_C:
20129 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20130 int check_UINT16_C:
20131 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20132
20133 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20134 #ifdef UINT8_MAX
20135 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
20136 #endif
20137 #ifdef UINT16_MAX
20138 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20139 #endif
20140 #ifdef UINT32_MAX
20141 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20142 #endif
20143 #ifdef UINT64_MAX
20144 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20145 #endif
20146 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20147 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20148 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20149 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20150 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20151 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20152 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20153 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20154 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20155 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20156 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20157 };
20158
20159 int
20160 main ()
20161 {
20162
20163 ;
20164 return 0;
20165 }
20166 _ACEOF
20167 if ac_fn_c_try_compile "$LINENO"; then :
20168 if test "$cross_compiling" = yes; then :
20169 gl_cv_header_working_stdint_h=yes
20170
20171 else
20172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20173 /* end confdefs.h. */
20174
20175
20176 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20177 #include <stdint.h>
20178
20179
20180 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20181 included before <wchar.h>. */
20182 #include <stddef.h>
20183 #include <signal.h>
20184 #if HAVE_WCHAR_H
20185 # include <stdio.h>
20186 # include <time.h>
20187 # include <wchar.h>
20188 #endif
20189
20190
20191 #include <stdio.h>
20192 #include <string.h>
20193 #define MVAL(macro) MVAL1(macro)
20194 #define MVAL1(expression) #expression
20195 static const char *macro_values[] =
20196 {
20197 #ifdef INT8_MAX
20198 MVAL (INT8_MAX),
20199 #endif
20200 #ifdef INT16_MAX
20201 MVAL (INT16_MAX),
20202 #endif
20203 #ifdef INT32_MAX
20204 MVAL (INT32_MAX),
20205 #endif
20206 #ifdef INT64_MAX
20207 MVAL (INT64_MAX),
20208 #endif
20209 #ifdef UINT8_MAX
20210 MVAL (UINT8_MAX),
20211 #endif
20212 #ifdef UINT16_MAX
20213 MVAL (UINT16_MAX),
20214 #endif
20215 #ifdef UINT32_MAX
20216 MVAL (UINT32_MAX),
20217 #endif
20218 #ifdef UINT64_MAX
20219 MVAL (UINT64_MAX),
20220 #endif
20221 NULL
20222 };
20223
20224 int
20225 main ()
20226 {
20227
20228 const char **mv;
20229 for (mv = macro_values; *mv != NULL; mv++)
20230 {
20231 const char *value = *mv;
20232 /* Test whether it looks like a cast expression. */
20233 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20234 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20235 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20236 || strncmp (value, "((int)"/*)*/, 6) == 0
20237 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20238 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20239 return mv - macro_values + 1;
20240 }
20241 return 0;
20242
20243 ;
20244 return 0;
20245 }
20246 _ACEOF
20247 if ac_fn_c_try_run "$LINENO"; then :
20248 gl_cv_header_working_stdint_h=yes
20249 fi
20250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20251 conftest.$ac_objext conftest.beam conftest.$ac_ext
20252 fi
20253
20254
20255 fi
20256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20257
20258 fi
20259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20260 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
20261 fi
20262 if test "$gl_cv_header_working_stdint_h" = yes; then
20263 STDINT_H=
20264 else
20265 for ac_header in sys/inttypes.h sys/bitypes.h
20266 do :
20267 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20268 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20269 eval as_val=\$$as_ac_Header
20270 if test "x$as_val" = x""yes; then :
20271 cat >>confdefs.h <<_ACEOF
20272 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20273 _ACEOF
20274
20275 fi
20276
20277 done
20278
20279 if test $ac_cv_header_sys_inttypes_h = yes; then
20280 HAVE_SYS_INTTYPES_H=1
20281 else
20282 HAVE_SYS_INTTYPES_H=0
20283 fi
20284
20285 if test $ac_cv_header_sys_bitypes_h = yes; then
20286 HAVE_SYS_BITYPES_H=1
20287 else
20288 HAVE_SYS_BITYPES_H=0
20289 fi
20290
20291
20292
20293
20294 if test $APPLE_UNIVERSAL_BUILD = 0; then
20295
20296
20297 for gltype in ptrdiff_t size_t ; do
20298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20299 $as_echo_n "checking for bit size of $gltype... " >&6; }
20300 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20301 $as_echo_n "(cached) " >&6
20302 else
20303 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20304 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20305 included before <wchar.h>. */
20306 #include <stddef.h>
20307 #include <signal.h>
20308 #if HAVE_WCHAR_H
20309 # include <stdio.h>
20310 # include <time.h>
20311 # include <wchar.h>
20312 #endif
20313
20314 #include <limits.h>"; then :
20315
20316 else
20317 result=unknown
20318 fi
20319
20320 eval gl_cv_bitsizeof_${gltype}=\$result
20321
20322 fi
20323 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20325 $as_echo "$ac_res" >&6; }
20326 eval result=\$gl_cv_bitsizeof_${gltype}
20327 if test $result = unknown; then
20328 result=0
20329 fi
20330 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20331 cat >>confdefs.h <<_ACEOF
20332 #define BITSIZEOF_${GLTYPE} $result
20333 _ACEOF
20334
20335 eval BITSIZEOF_${GLTYPE}=\$result
20336 done
20337
20338
20339 fi
20340
20341
20342 for gltype in sig_atomic_t wchar_t wint_t ; do
20343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20344 $as_echo_n "checking for bit size of $gltype... " >&6; }
20345 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20346 $as_echo_n "(cached) " >&6
20347 else
20348 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20349 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20350 included before <wchar.h>. */
20351 #include <stddef.h>
20352 #include <signal.h>
20353 #if HAVE_WCHAR_H
20354 # include <stdio.h>
20355 # include <time.h>
20356 # include <wchar.h>
20357 #endif
20358
20359 #include <limits.h>"; then :
20360
20361 else
20362 result=unknown
20363 fi
20364
20365 eval gl_cv_bitsizeof_${gltype}=\$result
20366
20367 fi
20368 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20370 $as_echo "$ac_res" >&6; }
20371 eval result=\$gl_cv_bitsizeof_${gltype}
20372 if test $result = unknown; then
20373 result=0
20374 fi
20375 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20376 cat >>confdefs.h <<_ACEOF
20377 #define BITSIZEOF_${GLTYPE} $result
20378 _ACEOF
20379
20380 eval BITSIZEOF_${GLTYPE}=\$result
20381 done
20382
20383
20384
20385
20386 for gltype in sig_atomic_t wchar_t wint_t ; do
20387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20388 $as_echo_n "checking whether $gltype is signed... " >&6; }
20389 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
20390 $as_echo_n "(cached) " >&6
20391 else
20392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20393 /* end confdefs.h. */
20394
20395 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20396 included before <wchar.h>. */
20397 #include <stddef.h>
20398 #include <signal.h>
20399 #if HAVE_WCHAR_H
20400 # include <stdio.h>
20401 # include <time.h>
20402 # include <wchar.h>
20403 #endif
20404
20405 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20406 int
20407 main ()
20408 {
20409
20410 ;
20411 return 0;
20412 }
20413 _ACEOF
20414 if ac_fn_c_try_compile "$LINENO"; then :
20415 result=yes
20416 else
20417 result=no
20418 fi
20419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20420 eval gl_cv_type_${gltype}_signed=\$result
20421
20422 fi
20423 eval ac_res=\$gl_cv_type_${gltype}_signed
20424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20425 $as_echo "$ac_res" >&6; }
20426 eval result=\$gl_cv_type_${gltype}_signed
20427 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20428 if test "$result" = yes; then
20429 cat >>confdefs.h <<_ACEOF
20430 #define HAVE_SIGNED_${GLTYPE} 1
20431 _ACEOF
20432
20433 eval HAVE_SIGNED_${GLTYPE}=1
20434 else
20435 eval HAVE_SIGNED_${GLTYPE}=0
20436 fi
20437 done
20438
20439
20440 gl_cv_type_ptrdiff_t_signed=yes
20441 gl_cv_type_size_t_signed=no
20442 if test $APPLE_UNIVERSAL_BUILD = 0; then
20443
20444
20445 for gltype in ptrdiff_t size_t ; do
20446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20447 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20448 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20449 $as_echo_n "(cached) " >&6
20450 else
20451 eval gl_cv_type_${gltype}_suffix=no
20452 eval result=\$gl_cv_type_${gltype}_signed
20453 if test "$result" = yes; then
20454 glsufu=
20455 else
20456 glsufu=u
20457 fi
20458 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20459 case $glsuf in
20460 '') gltype1='int';;
20461 l) gltype1='long int';;
20462 ll) gltype1='long long int';;
20463 i64) gltype1='__int64';;
20464 u) gltype1='unsigned int';;
20465 ul) gltype1='unsigned long int';;
20466 ull) gltype1='unsigned long long int';;
20467 ui64)gltype1='unsigned __int64';;
20468 esac
20469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20470 /* end confdefs.h. */
20471
20472 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20473 included before <wchar.h>. */
20474 #include <stddef.h>
20475 #include <signal.h>
20476 #if HAVE_WCHAR_H
20477 # include <stdio.h>
20478 # include <time.h>
20479 # include <wchar.h>
20480 #endif
20481
20482 extern $gltype foo;
20483 extern $gltype1 foo;
20484 int
20485 main ()
20486 {
20487
20488 ;
20489 return 0;
20490 }
20491 _ACEOF
20492 if ac_fn_c_try_compile "$LINENO"; then :
20493 eval gl_cv_type_${gltype}_suffix=\$glsuf
20494 fi
20495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20496 eval result=\$gl_cv_type_${gltype}_suffix
20497 test "$result" != no && break
20498 done
20499 fi
20500 eval ac_res=\$gl_cv_type_${gltype}_suffix
20501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20502 $as_echo "$ac_res" >&6; }
20503 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20504 eval result=\$gl_cv_type_${gltype}_suffix
20505 test "$result" = no && result=
20506 eval ${GLTYPE}_SUFFIX=\$result
20507 cat >>confdefs.h <<_ACEOF
20508 #define ${GLTYPE}_SUFFIX $result
20509 _ACEOF
20510
20511 done
20512
20513
20514 fi
20515
20516
20517 for gltype in sig_atomic_t wchar_t wint_t ; do
20518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20519 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20520 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20521 $as_echo_n "(cached) " >&6
20522 else
20523 eval gl_cv_type_${gltype}_suffix=no
20524 eval result=\$gl_cv_type_${gltype}_signed
20525 if test "$result" = yes; then
20526 glsufu=
20527 else
20528 glsufu=u
20529 fi
20530 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20531 case $glsuf in
20532 '') gltype1='int';;
20533 l) gltype1='long int';;
20534 ll) gltype1='long long int';;
20535 i64) gltype1='__int64';;
20536 u) gltype1='unsigned int';;
20537 ul) gltype1='unsigned long int';;
20538 ull) gltype1='unsigned long long int';;
20539 ui64)gltype1='unsigned __int64';;
20540 esac
20541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20542 /* end confdefs.h. */
20543
20544 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20545 included before <wchar.h>. */
20546 #include <stddef.h>
20547 #include <signal.h>
20548 #if HAVE_WCHAR_H
20549 # include <stdio.h>
20550 # include <time.h>
20551 # include <wchar.h>
20552 #endif
20553
20554 extern $gltype foo;
20555 extern $gltype1 foo;
20556 int
20557 main ()
20558 {
20559
20560 ;
20561 return 0;
20562 }
20563 _ACEOF
20564 if ac_fn_c_try_compile "$LINENO"; then :
20565 eval gl_cv_type_${gltype}_suffix=\$glsuf
20566 fi
20567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20568 eval result=\$gl_cv_type_${gltype}_suffix
20569 test "$result" != no && break
20570 done
20571 fi
20572 eval ac_res=\$gl_cv_type_${gltype}_suffix
20573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20574 $as_echo "$ac_res" >&6; }
20575 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20576 eval result=\$gl_cv_type_${gltype}_suffix
20577 test "$result" = no && result=
20578 eval ${GLTYPE}_SUFFIX=\$result
20579 cat >>confdefs.h <<_ACEOF
20580 #define ${GLTYPE}_SUFFIX $result
20581 _ACEOF
20582
20583 done
20584
20585
20586
20587 if test $BITSIZEOF_WINT_T -lt 32; then
20588 BITSIZEOF_WINT_T=32
20589 fi
20590
20591 STDINT_H=stdint.h
20592 fi
20593
20594 if test -n "$STDINT_H"; then
20595 GL_GENERATE_STDINT_H_TRUE=
20596 GL_GENERATE_STDINT_H_FALSE='#'
20597 else
20598 GL_GENERATE_STDINT_H_TRUE='#'
20599 GL_GENERATE_STDINT_H_FALSE=
20600 fi
20601
20602
20603
20604
20605
20606 GNULIB_IMAXABS=0;
20607 GNULIB_IMAXDIV=0;
20608 GNULIB_STRTOIMAX=0;
20609 GNULIB_STRTOUMAX=0;
20610 HAVE_DECL_IMAXABS=1;
20611 HAVE_DECL_IMAXDIV=1;
20612 HAVE_DECL_STRTOIMAX=1;
20613 HAVE_DECL_STRTOUMAX=1;
20614 REPLACE_STRTOIMAX=0;
20615 INT32_MAX_LT_INTMAX_MAX=1;
20616 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20617 PRI_MACROS_BROKEN=0;
20618 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20619 UINT32_MAX_LT_UINTMAX_MAX=1;
20620 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636 if test $gl_cv_have_include_next = yes; then
20637 gl_cv_next_inttypes_h='<'inttypes.h'>'
20638 else
20639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20640 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20641 if test "${gl_cv_next_inttypes_h+set}" = set; then :
20642 $as_echo_n "(cached) " >&6
20643 else
20644
20645 if test $ac_cv_header_inttypes_h = yes; then
20646
20647
20648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20649 /* end confdefs.h. */
20650 #include <inttypes.h>
20651
20652 _ACEOF
20653 case "$host_os" in
20654 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20655 *) gl_absname_cpp="$ac_cpp" ;;
20656 esac
20657
20658 case "$host_os" in
20659 mingw*)
20660 gl_dirsep_regex='[/\\]'
20661 ;;
20662 *)
20663 gl_dirsep_regex='\/'
20664 ;;
20665 esac
20666 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20667
20668 gl_header_literal_regex=`echo 'inttypes.h' \
20669 | sed -e "$gl_make_literal_regex_sed"`
20670 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20671 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20672 s|^/[^/]|//&|
20673 p
20674 q
20675 }'
20676 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20677 sed -n "$gl_absolute_header_sed"`'"'
20678 else
20679 gl_cv_next_inttypes_h='<'inttypes.h'>'
20680 fi
20681
20682
20683 fi
20684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20685 $as_echo "$gl_cv_next_inttypes_h" >&6; }
20686 fi
20687 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
20688
20689 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20690 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20691 gl_next_as_first_directive='<'inttypes.h'>'
20692 else
20693 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20694 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20695 fi
20696 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708 case "$host_os" in
20709 mingw*)
20710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20711 $as_echo_n "checking for 64-bit off_t... " >&6; }
20712 if test "${gl_cv_type_off_t_64+set}" = set; then :
20713 $as_echo_n "(cached) " >&6
20714 else
20715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20716 /* end confdefs.h. */
20717 #include <sys/types.h>
20718 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20719
20720 int
20721 main ()
20722 {
20723
20724 ;
20725 return 0;
20726 }
20727 _ACEOF
20728 if ac_fn_c_try_compile "$LINENO"; then :
20729 gl_cv_type_off_t_64=yes
20730 else
20731 gl_cv_type_off_t_64=no
20732 fi
20733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20734
20735 fi
20736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20737 $as_echo "$gl_cv_type_off_t_64" >&6; }
20738 if test $gl_cv_type_off_t_64 = no; then
20739 WINDOWS_64_BIT_OFF_T=1
20740 else
20741 WINDOWS_64_BIT_OFF_T=0
20742 fi
20743 WINDOWS_64_BIT_ST_SIZE=1
20744 ;;
20745 *)
20746 WINDOWS_64_BIT_OFF_T=0
20747 WINDOWS_64_BIT_ST_SIZE=0
20748 ;;
20749 esac
20750
20751
20752
20753
20754 GNULIB_FFSL=0;
20755 GNULIB_FFSLL=0;
20756 GNULIB_MEMCHR=0;
20757 GNULIB_MEMMEM=0;
20758 GNULIB_MEMPCPY=0;
20759 GNULIB_MEMRCHR=0;
20760 GNULIB_RAWMEMCHR=0;
20761 GNULIB_STPCPY=0;
20762 GNULIB_STPNCPY=0;
20763 GNULIB_STRCHRNUL=0;
20764 GNULIB_STRDUP=0;
20765 GNULIB_STRNCAT=0;
20766 GNULIB_STRNDUP=0;
20767 GNULIB_STRNLEN=0;
20768 GNULIB_STRPBRK=0;
20769 GNULIB_STRSEP=0;
20770 GNULIB_STRSTR=0;
20771 GNULIB_STRCASESTR=0;
20772 GNULIB_STRTOK_R=0;
20773 GNULIB_MBSLEN=0;
20774 GNULIB_MBSNLEN=0;
20775 GNULIB_MBSCHR=0;
20776 GNULIB_MBSRCHR=0;
20777 GNULIB_MBSSTR=0;
20778 GNULIB_MBSCASECMP=0;
20779 GNULIB_MBSNCASECMP=0;
20780 GNULIB_MBSPCASECMP=0;
20781 GNULIB_MBSCASESTR=0;
20782 GNULIB_MBSCSPN=0;
20783 GNULIB_MBSPBRK=0;
20784 GNULIB_MBSSPN=0;
20785 GNULIB_MBSSEP=0;
20786 GNULIB_MBSTOK_R=0;
20787 GNULIB_STRERROR=0;
20788 GNULIB_STRERROR_R=0;
20789 GNULIB_STRSIGNAL=0;
20790 GNULIB_STRVERSCMP=0;
20791 HAVE_MBSLEN=0;
20792 HAVE_FFSL=1;
20793 HAVE_FFSLL=1;
20794 HAVE_MEMCHR=1;
20795 HAVE_DECL_MEMMEM=1;
20796 HAVE_MEMPCPY=1;
20797 HAVE_DECL_MEMRCHR=1;
20798 HAVE_RAWMEMCHR=1;
20799 HAVE_STPCPY=1;
20800 HAVE_STPNCPY=1;
20801 HAVE_STRCHRNUL=1;
20802 HAVE_DECL_STRDUP=1;
20803 HAVE_DECL_STRNDUP=1;
20804 HAVE_DECL_STRNLEN=1;
20805 HAVE_STRPBRK=1;
20806 HAVE_STRSEP=1;
20807 HAVE_STRCASESTR=1;
20808 HAVE_DECL_STRTOK_R=1;
20809 HAVE_DECL_STRERROR_R=1;
20810 HAVE_DECL_STRSIGNAL=1;
20811 HAVE_STRVERSCMP=1;
20812 REPLACE_MEMCHR=0;
20813 REPLACE_MEMMEM=0;
20814 REPLACE_STPNCPY=0;
20815 REPLACE_STRDUP=0;
20816 REPLACE_STRSTR=0;
20817 REPLACE_STRCASESTR=0;
20818 REPLACE_STRCHRNUL=0;
20819 REPLACE_STRERROR=0;
20820 REPLACE_STRERROR_R=0;
20821 REPLACE_STRNCAT=0;
20822 REPLACE_STRNDUP=0;
20823 REPLACE_STRNLEN=0;
20824 REPLACE_STRSIGNAL=0;
20825 REPLACE_STRTOK_R=0;
20826 UNDEFINE_STRTOK_R=0;
20827
20828 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
20829 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
20830 ac_have_decl=1
20831 else
20832 ac_have_decl=0
20833 fi
20834
20835 cat >>confdefs.h <<_ACEOF
20836 #define HAVE_DECL_MEMRCHR $ac_have_decl
20837 _ACEOF
20838
20839
20840
20841
20842 GNULIB_MKTIME=0;
20843 GNULIB_NANOSLEEP=0;
20844 GNULIB_STRPTIME=0;
20845 GNULIB_TIMEGM=0;
20846 GNULIB_TIME_R=0;
20847 HAVE_DECL_LOCALTIME_R=1;
20848 HAVE_NANOSLEEP=1;
20849 HAVE_STRPTIME=1;
20850 HAVE_TIMEGM=1;
20851 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20852 REPLACE_MKTIME=GNULIB_PORTCHECK;
20853 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20854 REPLACE_TIMEGM=GNULIB_PORTCHECK;
20855
20856 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
20857 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
20858 ac_have_decl=1
20859 else
20860 ac_have_decl=0
20861 fi
20862
20863 cat >>confdefs.h <<_ACEOF
20864 #define HAVE_DECL_ALARM $ac_have_decl
20865 _ACEOF
20866
20867
20868
20869
20870 GNULIB_PSELECT=0;
20871 GNULIB_SELECT=0;
20872 HAVE_PSELECT=1;
20873 REPLACE_PSELECT=0;
20874 REPLACE_SELECT=0;
20875
20876
20877
20878
20879
20880
20881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20882 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
20883 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
20884 $as_echo_n "(cached) " >&6
20885 else
20886
20887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20888 /* end confdefs.h. */
20889 #include <sys/select.h>
20890 int
20891 main ()
20892 {
20893 struct timeval b;
20894 ;
20895 return 0;
20896 }
20897 _ACEOF
20898 if ac_fn_c_try_compile "$LINENO"; then :
20899 gl_cv_header_sys_select_h_selfcontained=yes
20900 else
20901 gl_cv_header_sys_select_h_selfcontained=no
20902 fi
20903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20904 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20906 /* end confdefs.h. */
20907 #include <sys/select.h>
20908 int
20909 main ()
20910 {
20911 int memset; int bzero;
20912 ;
20913 return 0;
20914 }
20915
20916 _ACEOF
20917 if ac_fn_c_try_compile "$LINENO"; then :
20918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20919 /* end confdefs.h. */
20920 #include <sys/select.h>
20921 int
20922 main ()
20923 {
20924
20925 #undef memset
20926 #define memset nonexistent_memset
20927 extern
20928 #ifdef __cplusplus
20929 "C"
20930 #endif
20931 void *memset (void *, int, unsigned long);
20932 #undef bzero
20933 #define bzero nonexistent_bzero
20934 extern
20935 #ifdef __cplusplus
20936 "C"
20937 #endif
20938 void bzero (void *, unsigned long);
20939 fd_set fds;
20940 FD_ZERO (&fds);
20941
20942 ;
20943 return 0;
20944 }
20945
20946 _ACEOF
20947 if ac_fn_c_try_link "$LINENO"; then :
20948
20949 else
20950 gl_cv_header_sys_select_h_selfcontained=no
20951 fi
20952 rm -f core conftest.err conftest.$ac_objext \
20953 conftest$ac_exeext conftest.$ac_ext
20954
20955 fi
20956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20957 fi
20958
20959 fi
20960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20961 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971 if test $gl_cv_have_include_next = yes; then
20972 gl_cv_next_sys_select_h='<'sys/select.h'>'
20973 else
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20975 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
20976 if test "${gl_cv_next_sys_select_h+set}" = set; then :
20977 $as_echo_n "(cached) " >&6
20978 else
20979
20980 if test $ac_cv_header_sys_select_h = yes; then
20981
20982
20983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20984 /* end confdefs.h. */
20985 #include <sys/select.h>
20986
20987 _ACEOF
20988 case "$host_os" in
20989 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20990 *) gl_absname_cpp="$ac_cpp" ;;
20991 esac
20992
20993 case "$host_os" in
20994 mingw*)
20995 gl_dirsep_regex='[/\\]'
20996 ;;
20997 *)
20998 gl_dirsep_regex='\/'
20999 ;;
21000 esac
21001 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21002
21003 gl_header_literal_regex=`echo 'sys/select.h' \
21004 | sed -e "$gl_make_literal_regex_sed"`
21005 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21006 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21007 s|^/[^/]|//&|
21008 p
21009 q
21010 }'
21011 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21012 sed -n "$gl_absolute_header_sed"`'"'
21013 else
21014 gl_cv_next_sys_select_h='<'sys/select.h'>'
21015 fi
21016
21017
21018 fi
21019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
21020 $as_echo "$gl_cv_next_sys_select_h" >&6; }
21021 fi
21022 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
21023
21024 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21025 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21026 gl_next_as_first_directive='<'sys/select.h'>'
21027 else
21028 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21029 gl_next_as_first_directive=$gl_cv_next_sys_select_h
21030 fi
21031 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
21032
21033
21034
21035
21036 if test $ac_cv_header_sys_select_h = yes; then
21037 HAVE_SYS_SELECT_H=1
21038 else
21039 HAVE_SYS_SELECT_H=0
21040 fi
21041
21042
21043
21044
21045
21046 if test $ac_cv_header_sys_socket_h != yes; then
21047 for ac_header in winsock2.h
21048 do :
21049 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21050 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21051 cat >>confdefs.h <<_ACEOF
21052 #define HAVE_WINSOCK2_H 1
21053 _ACEOF
21054
21055 fi
21056
21057 done
21058
21059 fi
21060 if test "$ac_cv_header_winsock2_h" = yes; then
21061 HAVE_WINSOCK2_H=1
21062 UNISTD_H_HAVE_WINSOCK2_H=1
21063 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21064 else
21065 HAVE_WINSOCK2_H=0
21066 fi
21067
21068
21069
21070
21071
21072
21073
21074
21075 GNULIB_PTHREAD_SIGMASK=0;
21076 GNULIB_RAISE=0;
21077 GNULIB_SIGNAL_H_SIGPIPE=0;
21078 GNULIB_SIGPROCMASK=0;
21079 GNULIB_SIGACTION=0;
21080 HAVE_POSIX_SIGNALBLOCKING=1;
21081 HAVE_PTHREAD_SIGMASK=1;
21082 HAVE_RAISE=1;
21083 HAVE_SIGSET_T=1;
21084 HAVE_SIGINFO_T=1;
21085 HAVE_SIGACTION=1;
21086 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
21087
21088 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
21089
21090 HAVE_SIGHANDLER_T=1;
21091 REPLACE_PTHREAD_SIGMASK=0;
21092 REPLACE_RAISE=0;
21093
21094
21095
21096
21097
21098
21099
21100 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
21101 #include <signal.h>
21102 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
21103 #include <sys/types.h>
21104
21105 "
21106 if test "x$ac_cv_type_sigset_t" = x""yes; then :
21107
21108 cat >>confdefs.h <<_ACEOF
21109 #define HAVE_SIGSET_T 1
21110 _ACEOF
21111
21112 gl_cv_type_sigset_t=yes
21113 else
21114 gl_cv_type_sigset_t=no
21115 fi
21116
21117 if test $gl_cv_type_sigset_t != yes; then
21118 HAVE_SIGSET_T=0
21119 fi
21120
21121
21122
21123 if test $ac_cv_header_sys_socket_h = no; then
21124 for ac_header in ws2tcpip.h
21125 do :
21126 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
21127 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
21128 cat >>confdefs.h <<_ACEOF
21129 #define HAVE_WS2TCPIP_H 1
21130 _ACEOF
21131
21132 fi
21133
21134 done
21135
21136 fi
21137
21138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21139 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
21140 if test "${ac_cv_header_stdbool_h+set}" = set; then :
21141 $as_echo_n "(cached) " >&6
21142 else
21143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21144 /* end confdefs.h. */
21145
21146 #include <stdbool.h>
21147 #ifndef bool
21148 "error: bool is not defined"
21149 #endif
21150 #ifndef false
21151 "error: false is not defined"
21152 #endif
21153 #if false
21154 "error: false is not 0"
21155 #endif
21156 #ifndef true
21157 "error: true is not defined"
21158 #endif
21159 #if true != 1
21160 "error: true is not 1"
21161 #endif
21162 #ifndef __bool_true_false_are_defined
21163 "error: __bool_true_false_are_defined is not defined"
21164 #endif
21165
21166 struct s { _Bool s: 1; _Bool t; } s;
21167
21168 char a[true == 1 ? 1 : -1];
21169 char b[false == 0 ? 1 : -1];
21170 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21171 char d[(bool) 0.5 == true ? 1 : -1];
21172 /* See body of main program for 'e'. */
21173 char f[(_Bool) 0.0 == false ? 1 : -1];
21174 char g[true];
21175 char h[sizeof (_Bool)];
21176 char i[sizeof s.t];
21177 enum { j = false, k = true, l = false * true, m = true * 256 };
21178 /* The following fails for
21179 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21180 _Bool n[m];
21181 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21182 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21183 /* Catch a bug in an HP-UX C compiler. See
21184 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21185 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21186 */
21187 _Bool q = true;
21188 _Bool *pq = &q;
21189
21190 int
21191 main ()
21192 {
21193
21194 bool e = &s;
21195 *pq |= q;
21196 *pq |= ! q;
21197 /* Refer to every declared value, to avoid compiler optimizations. */
21198 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21199 + !m + !n + !o + !p + !q + !pq);
21200
21201 ;
21202 return 0;
21203 }
21204 _ACEOF
21205 if ac_fn_c_try_compile "$LINENO"; then :
21206 ac_cv_header_stdbool_h=yes
21207 else
21208 ac_cv_header_stdbool_h=no
21209 fi
21210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21211 fi
21212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21213 $as_echo "$ac_cv_header_stdbool_h" >&6; }
21214 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21215 if test "x$ac_cv_type__Bool" = x""yes; then :
21216
21217 cat >>confdefs.h <<_ACEOF
21218 #define HAVE__BOOL 1
21219 _ACEOF
21220
21221
21222 fi
21223
21224
21225
21226 REPLACE_NULL=0;
21227 HAVE_WCHAR_T=1;
21228
21229
21230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21231 $as_echo_n "checking for wchar_t... " >&6; }
21232 if test "${gt_cv_c_wchar_t+set}" = set; then :
21233 $as_echo_n "(cached) " >&6
21234 else
21235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21236 /* end confdefs.h. */
21237 #include <stddef.h>
21238 wchar_t foo = (wchar_t)'\0';
21239 int
21240 main ()
21241 {
21242
21243 ;
21244 return 0;
21245 }
21246 _ACEOF
21247 if ac_fn_c_try_compile "$LINENO"; then :
21248 gt_cv_c_wchar_t=yes
21249 else
21250 gt_cv_c_wchar_t=no
21251 fi
21252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21253 fi
21254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21255 $as_echo "$gt_cv_c_wchar_t" >&6; }
21256 if test $gt_cv_c_wchar_t = yes; then
21257
21258 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21259
21260 fi
21261
21262
21263 GNULIB_DPRINTF=0;
21264 GNULIB_FCLOSE=0;
21265 GNULIB_FDOPEN=0;
21266 GNULIB_FFLUSH=0;
21267 GNULIB_FGETC=0;
21268 GNULIB_FGETS=0;
21269 GNULIB_FOPEN=0;
21270 GNULIB_FPRINTF=0;
21271 GNULIB_FPRINTF_POSIX=0;
21272 GNULIB_FPURGE=0;
21273 GNULIB_FPUTC=0;
21274 GNULIB_FPUTS=0;
21275 GNULIB_FREAD=0;
21276 GNULIB_FREOPEN=0;
21277 GNULIB_FSCANF=0;
21278 GNULIB_FSEEK=0;
21279 GNULIB_FSEEKO=0;
21280 GNULIB_FTELL=0;
21281 GNULIB_FTELLO=0;
21282 GNULIB_FWRITE=0;
21283 GNULIB_GETC=0;
21284 GNULIB_GETCHAR=0;
21285 GNULIB_GETDELIM=0;
21286 GNULIB_GETLINE=0;
21287 GNULIB_OBSTACK_PRINTF=0;
21288 GNULIB_OBSTACK_PRINTF_POSIX=0;
21289 GNULIB_PCLOSE=0;
21290 GNULIB_PERROR=0;
21291 GNULIB_POPEN=0;
21292 GNULIB_PRINTF=0;
21293 GNULIB_PRINTF_POSIX=0;
21294 GNULIB_PUTC=0;
21295 GNULIB_PUTCHAR=0;
21296 GNULIB_PUTS=0;
21297 GNULIB_REMOVE=0;
21298 GNULIB_RENAME=0;
21299 GNULIB_RENAMEAT=0;
21300 GNULIB_SCANF=0;
21301 GNULIB_SNPRINTF=0;
21302 GNULIB_SPRINTF_POSIX=0;
21303 GNULIB_STDIO_H_NONBLOCKING=0;
21304 GNULIB_STDIO_H_SIGPIPE=0;
21305 GNULIB_TMPFILE=0;
21306 GNULIB_VASPRINTF=0;
21307 GNULIB_VFSCANF=0;
21308 GNULIB_VSCANF=0;
21309 GNULIB_VDPRINTF=0;
21310 GNULIB_VFPRINTF=0;
21311 GNULIB_VFPRINTF_POSIX=0;
21312 GNULIB_VPRINTF=0;
21313 GNULIB_VPRINTF_POSIX=0;
21314 GNULIB_VSNPRINTF=0;
21315 GNULIB_VSPRINTF_POSIX=0;
21316 HAVE_DECL_FPURGE=1;
21317 HAVE_DECL_FSEEKO=1;
21318 HAVE_DECL_FTELLO=1;
21319 HAVE_DECL_GETDELIM=1;
21320 HAVE_DECL_GETLINE=1;
21321 HAVE_DECL_OBSTACK_PRINTF=1;
21322 HAVE_DECL_SNPRINTF=1;
21323 HAVE_DECL_VSNPRINTF=1;
21324 HAVE_DPRINTF=1;
21325 HAVE_FSEEKO=1;
21326 HAVE_FTELLO=1;
21327 HAVE_PCLOSE=1;
21328 HAVE_POPEN=1;
21329 HAVE_RENAMEAT=1;
21330 HAVE_VASPRINTF=1;
21331 HAVE_VDPRINTF=1;
21332 REPLACE_DPRINTF=0;
21333 REPLACE_FCLOSE=0;
21334 REPLACE_FDOPEN=0;
21335 REPLACE_FFLUSH=0;
21336 REPLACE_FOPEN=0;
21337 REPLACE_FPRINTF=0;
21338 REPLACE_FPURGE=0;
21339 REPLACE_FREOPEN=0;
21340 REPLACE_FSEEK=0;
21341 REPLACE_FSEEKO=0;
21342 REPLACE_FTELL=0;
21343 REPLACE_FTELLO=0;
21344 REPLACE_GETDELIM=0;
21345 REPLACE_GETLINE=0;
21346 REPLACE_OBSTACK_PRINTF=0;
21347 REPLACE_PERROR=0;
21348 REPLACE_POPEN=0;
21349 REPLACE_PRINTF=0;
21350 REPLACE_REMOVE=0;
21351 REPLACE_RENAME=0;
21352 REPLACE_RENAMEAT=0;
21353 REPLACE_SNPRINTF=0;
21354 REPLACE_SPRINTF=0;
21355 REPLACE_STDIO_READ_FUNCS=0;
21356 REPLACE_STDIO_WRITE_FUNCS=0;
21357 REPLACE_TMPFILE=0;
21358 REPLACE_VASPRINTF=0;
21359 REPLACE_VDPRINTF=0;
21360 REPLACE_VFPRINTF=0;
21361 REPLACE_VPRINTF=0;
21362 REPLACE_VSNPRINTF=0;
21363 REPLACE_VSPRINTF=0;
21364
21365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21366 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21367 if test "${ac_cv_struct_tm+set}" = set; then :
21368 $as_echo_n "(cached) " >&6
21369 else
21370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21371 /* end confdefs.h. */
21372 #include <sys/types.h>
21373 #include <time.h>
21374
21375 int
21376 main ()
21377 {
21378 struct tm tm;
21379 int *p = &tm.tm_sec;
21380 return !p;
21381 ;
21382 return 0;
21383 }
21384 _ACEOF
21385 if ac_fn_c_try_compile "$LINENO"; then :
21386 ac_cv_struct_tm=time.h
21387 else
21388 ac_cv_struct_tm=sys/time.h
21389 fi
21390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21391 fi
21392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21393 $as_echo "$ac_cv_struct_tm" >&6; }
21394 if test $ac_cv_struct_tm = sys/time.h; then
21395
21396 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
21397
21398 fi
21399
21400 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21401 #include <$ac_cv_struct_tm>
21402
21403 "
21404 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
21405
21406 cat >>confdefs.h <<_ACEOF
21407 #define HAVE_STRUCT_TM_TM_ZONE 1
21408 _ACEOF
21409
21410
21411 fi
21412
21413 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21414
21415 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
21416
21417 else
21418 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21419 "
21420 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21421 ac_have_decl=1
21422 else
21423 ac_have_decl=0
21424 fi
21425
21426 cat >>confdefs.h <<_ACEOF
21427 #define HAVE_DECL_TZNAME $ac_have_decl
21428 _ACEOF
21429
21430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21431 $as_echo_n "checking for tzname... " >&6; }
21432 if test "${ac_cv_var_tzname+set}" = set; then :
21433 $as_echo_n "(cached) " >&6
21434 else
21435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21436 /* end confdefs.h. */
21437 #include <time.h>
21438 #if !HAVE_DECL_TZNAME
21439 extern char *tzname[];
21440 #endif
21441
21442 int
21443 main ()
21444 {
21445 return tzname[0][0];
21446 ;
21447 return 0;
21448 }
21449 _ACEOF
21450 if ac_fn_c_try_link "$LINENO"; then :
21451 ac_cv_var_tzname=yes
21452 else
21453 ac_cv_var_tzname=no
21454 fi
21455 rm -f core conftest.err conftest.$ac_objext \
21456 conftest$ac_exeext conftest.$ac_ext
21457 fi
21458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21459 $as_echo "$ac_cv_var_tzname" >&6; }
21460 if test $ac_cv_var_tzname = yes; then
21461
21462 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
21463
21464 fi
21465 fi
21466
21467
21468 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21469 "
21470 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21471
21472 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
21473
21474 fi
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488 if test $gl_cv_have_include_next = yes; then
21489 gl_cv_next_string_h='<'string.h'>'
21490 else
21491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21492 $as_echo_n "checking absolute name of <string.h>... " >&6; }
21493 if test "${gl_cv_next_string_h+set}" = set; then :
21494 $as_echo_n "(cached) " >&6
21495 else
21496
21497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21498 /* end confdefs.h. */
21499 #include <string.h>
21500
21501 _ACEOF
21502 case "$host_os" in
21503 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21504 *) gl_absname_cpp="$ac_cpp" ;;
21505 esac
21506
21507 case "$host_os" in
21508 mingw*)
21509 gl_dirsep_regex='[/\\]'
21510 ;;
21511 *)
21512 gl_dirsep_regex='\/'
21513 ;;
21514 esac
21515 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21516
21517 gl_header_literal_regex=`echo 'string.h' \
21518 | sed -e "$gl_make_literal_regex_sed"`
21519 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21520 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21521 s|^/[^/]|//&|
21522 p
21523 q
21524 }'
21525 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21526 sed -n "$gl_absolute_header_sed"`'"'
21527
21528
21529 fi
21530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21531 $as_echo "$gl_cv_next_string_h" >&6; }
21532 fi
21533 NEXT_STRING_H=$gl_cv_next_string_h
21534
21535 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21536 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21537 gl_next_as_first_directive='<'string.h'>'
21538 else
21539 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21540 gl_next_as_first_directive=$gl_cv_next_string_h
21541 fi
21542 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21553 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21554 ac_have_decl=1
21555 else
21556 ac_have_decl=0
21557 fi
21558
21559 cat >>confdefs.h <<_ACEOF
21560 #define HAVE_DECL_STRTOIMAX $ac_have_decl
21561 _ACEOF
21562
21563
21564
21565 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21566 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21567 ac_have_decl=1
21568 else
21569 ac_have_decl=0
21570 fi
21571
21572 cat >>confdefs.h <<_ACEOF
21573 #define HAVE_DECL_STRTOUMAX $ac_have_decl
21574 _ACEOF
21575
21576
21577
21578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21579 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21580 if test "${ac_cv_header_stat_broken+set}" = set; then :
21581 $as_echo_n "(cached) " >&6
21582 else
21583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21584 /* end confdefs.h. */
21585 #include <sys/types.h>
21586 #include <sys/stat.h>
21587
21588 #if defined S_ISBLK && defined S_IFDIR
21589 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21590 #endif
21591
21592 #if defined S_ISBLK && defined S_IFCHR
21593 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21594 #endif
21595
21596 #if defined S_ISLNK && defined S_IFREG
21597 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21598 #endif
21599
21600 #if defined S_ISSOCK && defined S_IFREG
21601 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21602 #endif
21603
21604 _ACEOF
21605 if ac_fn_c_try_compile "$LINENO"; then :
21606 ac_cv_header_stat_broken=no
21607 else
21608 ac_cv_header_stat_broken=yes
21609 fi
21610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21611 fi
21612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21613 $as_echo "$ac_cv_header_stat_broken" >&6; }
21614 if test $ac_cv_header_stat_broken = yes; then
21615
21616 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
21617
21618 fi
21619
21620
21621
21622
21623
21624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21625 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21626 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21627 $as_echo_n "(cached) " >&6
21628 else
21629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21630 /* end confdefs.h. */
21631 #include <time.h>
21632
21633 int
21634 main ()
21635 {
21636 static struct timespec x; x.tv_sec = x.tv_nsec;
21637 ;
21638 return 0;
21639 }
21640 _ACEOF
21641 if ac_fn_c_try_compile "$LINENO"; then :
21642 gl_cv_sys_struct_timespec_in_time_h=yes
21643 else
21644 gl_cv_sys_struct_timespec_in_time_h=no
21645 fi
21646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21647 fi
21648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21649 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21650
21651 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21652 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21653 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21654 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21655 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21656 else
21657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21658 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21659 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21660 $as_echo_n "(cached) " >&6
21661 else
21662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21663 /* end confdefs.h. */
21664 #include <sys/time.h>
21665
21666 int
21667 main ()
21668 {
21669 static struct timespec x; x.tv_sec = x.tv_nsec;
21670 ;
21671 return 0;
21672 }
21673 _ACEOF
21674 if ac_fn_c_try_compile "$LINENO"; then :
21675 gl_cv_sys_struct_timespec_in_sys_time_h=yes
21676 else
21677 gl_cv_sys_struct_timespec_in_sys_time_h=no
21678 fi
21679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21680 fi
21681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21682 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21683 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21684 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21685 else
21686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21687 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21688 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
21689 $as_echo_n "(cached) " >&6
21690 else
21691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21692 /* end confdefs.h. */
21693 #include <pthread.h>
21694
21695 int
21696 main ()
21697 {
21698 static struct timespec x; x.tv_sec = x.tv_nsec;
21699 ;
21700 return 0;
21701 }
21702 _ACEOF
21703 if ac_fn_c_try_compile "$LINENO"; then :
21704 gl_cv_sys_struct_timespec_in_pthread_h=yes
21705 else
21706 gl_cv_sys_struct_timespec_in_pthread_h=no
21707 fi
21708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21709 fi
21710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21711 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21712 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21713 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21714 fi
21715 fi
21716 fi
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732 if test $gl_cv_have_include_next = yes; then
21733 gl_cv_next_time_h='<'time.h'>'
21734 else
21735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21736 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21737 if test "${gl_cv_next_time_h+set}" = set; then :
21738 $as_echo_n "(cached) " >&6
21739 else
21740
21741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21742 /* end confdefs.h. */
21743 #include <time.h>
21744
21745 _ACEOF
21746 case "$host_os" in
21747 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21748 *) gl_absname_cpp="$ac_cpp" ;;
21749 esac
21750
21751 case "$host_os" in
21752 mingw*)
21753 gl_dirsep_regex='[/\\]'
21754 ;;
21755 *)
21756 gl_dirsep_regex='\/'
21757 ;;
21758 esac
21759 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21760
21761 gl_header_literal_regex=`echo 'time.h' \
21762 | sed -e "$gl_make_literal_regex_sed"`
21763 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21764 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21765 s|^/[^/]|//&|
21766 p
21767 q
21768 }'
21769 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21770 sed -n "$gl_absolute_header_sed"`'"'
21771
21772
21773 fi
21774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21775 $as_echo "$gl_cv_next_time_h" >&6; }
21776 fi
21777 NEXT_TIME_H=$gl_cv_next_time_h
21778
21779 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21780 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21781 gl_next_as_first_directive='<'time.h'>'
21782 else
21783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21784 gl_next_as_first_directive=$gl_cv_next_time_h
21785 fi
21786 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21802 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21803 ac_have_decl=1
21804 else
21805 ac_have_decl=0
21806 fi
21807
21808 cat >>confdefs.h <<_ACEOF
21809 #define HAVE_DECL_UNSETENV $ac_have_decl
21810 _ACEOF
21811
21812
21813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21814 $as_echo_n "checking whether the utimes function works... " >&6; }
21815 if test "${gl_cv_func_working_utimes+set}" = set; then :
21816 $as_echo_n "(cached) " >&6
21817 else
21818
21819 if test "$cross_compiling" = yes; then :
21820 gl_cv_func_working_utimes=no
21821 else
21822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21823 /* end confdefs.h. */
21824
21825 #include <sys/types.h>
21826 #include <sys/stat.h>
21827 #include <fcntl.h>
21828 #include <sys/time.h>
21829 #include <time.h>
21830 #include <unistd.h>
21831 #include <stdlib.h>
21832 #include <stdio.h>
21833 #include <utime.h>
21834
21835 static int
21836 inorder (time_t a, time_t b, time_t c)
21837 {
21838 return a <= b && b <= c;
21839 }
21840
21841 int
21842 main ()
21843 {
21844 int result = 0;
21845 char const *file = "conftest.utimes";
21846 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
21847
21848 /* Test whether utimes() essentially works. */
21849 {
21850 struct stat sbuf;
21851 FILE *f = fopen (file, "w");
21852 if (f == NULL)
21853 result |= 1;
21854 else if (fclose (f) != 0)
21855 result |= 1;
21856 else if (utimes (file, timeval) != 0)
21857 result |= 2;
21858 else if (lstat (file, &sbuf) != 0)
21859 result |= 1;
21860 else if (!(sbuf.st_atime == timeval[0].tv_sec
21861 && sbuf.st_mtime == timeval[1].tv_sec))
21862 result |= 4;
21863 if (unlink (file) != 0)
21864 result |= 1;
21865 }
21866
21867 /* Test whether utimes() with a NULL argument sets the file's timestamp
21868 to the current time. Use 'fstat' as well as 'time' to
21869 determine the "current" time, to accommodate NFS file systems
21870 if there is a time skew between the host and the NFS server. */
21871 {
21872 int fd = open (file, O_WRONLY|O_CREAT, 0644);
21873 if (fd < 0)
21874 result |= 1;
21875 else
21876 {
21877 time_t t0, t2;
21878 struct stat st0, st1, st2;
21879 if (time (&t0) == (time_t) -1)
21880 result |= 1;
21881 else if (fstat (fd, &st0) != 0)
21882 result |= 1;
21883 else if (utimes (file, timeval) != 0)
21884 result |= 2;
21885 else if (utimes (file, NULL) != 0)
21886 result |= 8;
21887 else if (fstat (fd, &st1) != 0)
21888 result |= 1;
21889 else if (write (fd, "\n", 1) != 1)
21890 result |= 1;
21891 else if (fstat (fd, &st2) != 0)
21892 result |= 1;
21893 else if (time (&t2) == (time_t) -1)
21894 result |= 1;
21895 else
21896 {
21897 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
21898 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
21899 if (! (st1.st_atime == st1.st_mtime))
21900 result |= 16;
21901 if (! (m_ok_POSIX || m_ok_NFS))
21902 result |= 32;
21903 }
21904 if (close (fd) != 0)
21905 result |= 1;
21906 }
21907 if (unlink (file) != 0)
21908 result |= 1;
21909 }
21910
21911 /* Test whether utimes() with a NULL argument works on read-only files. */
21912 {
21913 int fd = open (file, O_WRONLY|O_CREAT, 0444);
21914 if (fd < 0)
21915 result |= 1;
21916 else if (close (fd) != 0)
21917 result |= 1;
21918 else if (utimes (file, NULL) != 0)
21919 result |= 64;
21920 if (unlink (file) != 0)
21921 result |= 1;
21922 }
21923
21924 return result;
21925 }
21926
21927 _ACEOF
21928 if ac_fn_c_try_run "$LINENO"; then :
21929 gl_cv_func_working_utimes=yes
21930 else
21931 gl_cv_func_working_utimes=no
21932 fi
21933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21934 conftest.$ac_objext conftest.beam conftest.$ac_ext
21935 fi
21936
21937 fi
21938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
21939 $as_echo "$gl_cv_func_working_utimes" >&6; }
21940
21941 if test $gl_cv_func_working_utimes = yes; then
21942
21943 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
21944
21945 fi
21946
21947
21948
21949
21950
21951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
21952 $as_echo_n "checking for struct utimbuf... " >&6; }
21953 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
21954 $as_echo_n "(cached) " >&6
21955 else
21956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21957 /* end confdefs.h. */
21958 #if HAVE_SYS_TIME_H
21959 #include <sys/time.h>
21960 #endif
21961 #include <time.h>
21962 #ifdef HAVE_UTIME_H
21963 #include <utime.h>
21964 #endif
21965
21966 int
21967 main ()
21968 {
21969 static struct utimbuf x; x.actime = x.modtime;
21970 ;
21971 return 0;
21972 }
21973 _ACEOF
21974 if ac_fn_c_try_compile "$LINENO"; then :
21975 gl_cv_sys_struct_utimbuf=yes
21976 else
21977 gl_cv_sys_struct_utimbuf=no
21978 fi
21979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21980 fi
21981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
21982 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
21983
21984 if test $gl_cv_sys_struct_utimbuf = yes; then
21985
21986 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
21987
21988 fi
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
22001 $as_echo_n "checking type of array argument to getgroups... " >&6; }
22002 if test "${ac_cv_type_getgroups+set}" = set; then :
22003 $as_echo_n "(cached) " >&6
22004 else
22005 if test "$cross_compiling" = yes; then :
22006 ac_cv_type_getgroups=cross
22007 else
22008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22009 /* end confdefs.h. */
22010 /* Thanks to Mike Rendell for this test. */
22011 $ac_includes_default
22012 #define NGID 256
22013 #undef MAX
22014 #define MAX(x, y) ((x) > (y) ? (x) : (y))
22015
22016 int
22017 main ()
22018 {
22019 gid_t gidset[NGID];
22020 int i, n;
22021 union { gid_t gval; long int lval; } val;
22022
22023 val.lval = -1;
22024 for (i = 0; i < NGID; i++)
22025 gidset[i] = val.gval;
22026 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
22027 gidset);
22028 /* Exit non-zero if getgroups seems to require an array of ints. This
22029 happens when gid_t is short int but getgroups modifies an array
22030 of ints. */
22031 return n > 0 && gidset[n] != val.gval;
22032 }
22033 _ACEOF
22034 if ac_fn_c_try_run "$LINENO"; then :
22035 ac_cv_type_getgroups=gid_t
22036 else
22037 ac_cv_type_getgroups=int
22038 fi
22039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22040 conftest.$ac_objext conftest.beam conftest.$ac_ext
22041 fi
22042
22043 if test $ac_cv_type_getgroups = cross; then
22044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22045 /* end confdefs.h. */
22046 #include <unistd.h>
22047
22048 _ACEOF
22049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22050 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
22051 ac_cv_type_getgroups=gid_t
22052 else
22053 ac_cv_type_getgroups=int
22054 fi
22055 rm -f conftest*
22056
22057 fi
22058 fi
22059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
22060 $as_echo "$ac_cv_type_getgroups" >&6; }
22061
22062 cat >>confdefs.h <<_ACEOF
22063 #define GETGROUPS_T $ac_cv_type_getgroups
22064 _ACEOF
22065
22066
22067
22068
22069
22070
22071
22072
22073 if false; then
22074 GL_COND_LIBTOOL_TRUE=
22075 GL_COND_LIBTOOL_FALSE='#'
22076 else
22077 GL_COND_LIBTOOL_TRUE='#'
22078 GL_COND_LIBTOOL_FALSE=
22079 fi
22080
22081 gl_cond_libtool=false
22082 gl_libdeps=
22083 gl_ltlibdeps=
22084 gl_m4_base='m4'
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094 gl_source_base='lib'
22095
22096
22097 if test $ac_cv_func_alloca_works = no; then
22098 :
22099 fi
22100
22101 # Define an additional variable used in the Makefile substitution.
22102 if test $ac_cv_working_alloca_h = yes; then
22103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
22104 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
22105 if test "${gl_cv_rpl_alloca+set}" = set; then :
22106 $as_echo_n "(cached) " >&6
22107 else
22108
22109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22110 /* end confdefs.h. */
22111
22112 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
22113 Need own alloca
22114 #endif
22115
22116 _ACEOF
22117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22118 $EGREP "Need own alloca" >/dev/null 2>&1; then :
22119 gl_cv_rpl_alloca=yes
22120 else
22121 gl_cv_rpl_alloca=no
22122 fi
22123 rm -f conftest*
22124
22125
22126 fi
22127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22128 $as_echo "$gl_cv_rpl_alloca" >&6; }
22129 if test $gl_cv_rpl_alloca = yes; then
22130
22131 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
22132
22133 ALLOCA_H=alloca.h
22134 else
22135 ALLOCA_H=
22136 fi
22137 else
22138 ALLOCA_H=alloca.h
22139 fi
22140
22141 if test -n "$ALLOCA_H"; then
22142 GL_GENERATE_ALLOCA_H_TRUE=
22143 GL_GENERATE_ALLOCA_H_FALSE='#'
22144 else
22145 GL_GENERATE_ALLOCA_H_TRUE='#'
22146 GL_GENERATE_ALLOCA_H_FALSE=
22147 fi
22148
22149
22150
22151
22152
22153
22154 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
22155 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
22156
22157 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
22158 # programs in the package would end up linked with that potentially-shared
22159 # library, inducing unnecessary run-time overhead.
22160 LIB_CLOCK_GETTIME=
22161
22162 gl_saved_libs=$LIBS
22163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22164 $as_echo_n "checking for library containing clock_gettime... " >&6; }
22165 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22166 $as_echo_n "(cached) " >&6
22167 else
22168 ac_func_search_save_LIBS=$LIBS
22169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22170 /* end confdefs.h. */
22171
22172 /* Override any GCC internal prototype to avoid an error.
22173 Use char because int might match the return type of a GCC
22174 builtin and then its argument prototype would still apply. */
22175 #ifdef __cplusplus
22176 extern "C"
22177 #endif
22178 char clock_gettime ();
22179 int
22180 main ()
22181 {
22182 return clock_gettime ();
22183 ;
22184 return 0;
22185 }
22186 _ACEOF
22187 for ac_lib in '' rt posix4; do
22188 if test -z "$ac_lib"; then
22189 ac_res="none required"
22190 else
22191 ac_res=-l$ac_lib
22192 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22193 fi
22194 if ac_fn_c_try_link "$LINENO"; then :
22195 ac_cv_search_clock_gettime=$ac_res
22196 fi
22197 rm -f core conftest.err conftest.$ac_objext \
22198 conftest$ac_exeext
22199 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22200 break
22201 fi
22202 done
22203 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22204
22205 else
22206 ac_cv_search_clock_gettime=no
22207 fi
22208 rm conftest.$ac_ext
22209 LIBS=$ac_func_search_save_LIBS
22210 fi
22211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22212 $as_echo "$ac_cv_search_clock_gettime" >&6; }
22213 ac_res=$ac_cv_search_clock_gettime
22214 if test "$ac_res" != no; then :
22215 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22216 test "$ac_cv_search_clock_gettime" = "none required" ||
22217 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22218 fi
22219
22220 for ac_func in clock_gettime clock_settime
22221 do :
22222 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22223 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22224 eval as_val=\$$as_ac_var
22225 if test "x$as_val" = x""yes; then :
22226 cat >>confdefs.h <<_ACEOF
22227 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22228 _ACEOF
22229
22230 fi
22231 done
22232
22233 LIBS=$gl_saved_libs
22234
22235
22236 :
22237
22238
22239
22240 cat >>confdefs.h <<_ACEOF
22241 #define GNULIB_CLOSE_STREAM 1
22242 _ACEOF
22243
22244
22245
22246
22247 :
22248
22249
22250
22251 :
22252
22253
22254
22255 :
22256
22257
22258
22259 :
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273 if test $gl_cv_have_include_next = yes; then
22274 gl_cv_next_dirent_h='<'dirent.h'>'
22275 else
22276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22277 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22278 if test "${gl_cv_next_dirent_h+set}" = set; then :
22279 $as_echo_n "(cached) " >&6
22280 else
22281
22282 if test $ac_cv_header_dirent_h = yes; then
22283
22284
22285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22286 /* end confdefs.h. */
22287 #include <dirent.h>
22288
22289 _ACEOF
22290 case "$host_os" in
22291 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22292 *) gl_absname_cpp="$ac_cpp" ;;
22293 esac
22294
22295 case "$host_os" in
22296 mingw*)
22297 gl_dirsep_regex='[/\\]'
22298 ;;
22299 *)
22300 gl_dirsep_regex='\/'
22301 ;;
22302 esac
22303 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22304
22305 gl_header_literal_regex=`echo 'dirent.h' \
22306 | sed -e "$gl_make_literal_regex_sed"`
22307 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22308 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22309 s|^/[^/]|//&|
22310 p
22311 q
22312 }'
22313 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22314 sed -n "$gl_absolute_header_sed"`'"'
22315 else
22316 gl_cv_next_dirent_h='<'dirent.h'>'
22317 fi
22318
22319
22320 fi
22321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22322 $as_echo "$gl_cv_next_dirent_h" >&6; }
22323 fi
22324 NEXT_DIRENT_H=$gl_cv_next_dirent_h
22325
22326 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22327 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22328 gl_next_as_first_directive='<'dirent.h'>'
22329 else
22330 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22331 gl_next_as_first_directive=$gl_cv_next_dirent_h
22332 fi
22333 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
22334
22335
22336
22337
22338 if test $ac_cv_header_dirent_h = yes; then
22339 HAVE_DIRENT_H=1
22340 else
22341 HAVE_DIRENT_H=0
22342 fi
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
22354
22355
22356 if test $HAVE_DUP2 = 1; then
22357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22358 $as_echo_n "checking whether dup2 works... " >&6; }
22359 if test "${gl_cv_func_dup2_works+set}" = set; then :
22360 $as_echo_n "(cached) " >&6
22361 else
22362 if test "$cross_compiling" = yes; then :
22363 case "$host_os" in
22364 mingw*) # on this platform, dup2 always returns 0 for success
22365 gl_cv_func_dup2_works="guessing no" ;;
22366 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22367 gl_cv_func_dup2_works="guessing no" ;;
22368 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22369 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22370 gl_cv_func_dup2_works="guessing no" ;;
22371 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22372 gl_cv_func_dup2_works="guessing no" ;;
22373 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22374 gl_cv_func_dup2_works="guessing no" ;;
22375 *) gl_cv_func_dup2_works="guessing yes" ;;
22376 esac
22377 else
22378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22379 /* end confdefs.h. */
22380
22381 #include <unistd.h>
22382 #include <fcntl.h>
22383 #include <errno.h>
22384 int
22385 main ()
22386 {
22387 int result = 0;
22388 #ifdef FD_CLOEXEC
22389 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22390 result |= 1;
22391 #endif
22392 if (dup2 (1, 1) == 0)
22393 result |= 2;
22394 #ifdef FD_CLOEXEC
22395 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22396 result |= 4;
22397 #endif
22398 close (0);
22399 if (dup2 (0, 0) != -1)
22400 result |= 8;
22401 /* Many gnulib modules require POSIX conformance of EBADF. */
22402 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22403 result |= 16;
22404 /* Flush out a cygwin core dump. */
22405 if (dup2 (2, -1) != -1 || errno != EBADF)
22406 result |= 32;
22407 return result;
22408
22409 ;
22410 return 0;
22411 }
22412
22413 _ACEOF
22414 if ac_fn_c_try_run "$LINENO"; then :
22415 gl_cv_func_dup2_works=yes
22416 else
22417 gl_cv_func_dup2_works=no
22418 fi
22419 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22420 conftest.$ac_objext conftest.beam conftest.$ac_ext
22421 fi
22422
22423
22424 fi
22425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22426 $as_echo "$gl_cv_func_dup2_works" >&6; }
22427 case "$gl_cv_func_dup2_works" in
22428 *yes) ;;
22429 *)
22430 REPLACE_DUP2=1
22431 ;;
22432 esac
22433 fi
22434
22435
22436 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22437
22438
22439
22440
22441
22442
22443
22444
22445 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22446
22447
22448 fi
22449
22450
22451
22452
22453
22454 GNULIB_DUP2=1
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466 GNULIB_ENVIRON=1
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476 LIB_EXECINFO=''
22477 EXECINFO_H='execinfo.h'
22478
22479 if test $ac_cv_header_execinfo_h = yes; then
22480 gl_saved_libs=$LIBS
22481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22482 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22483 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22484 $as_echo_n "(cached) " >&6
22485 else
22486 ac_func_search_save_LIBS=$LIBS
22487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22488 /* end confdefs.h. */
22489
22490 /* Override any GCC internal prototype to avoid an error.
22491 Use char because int might match the return type of a GCC
22492 builtin and then its argument prototype would still apply. */
22493 #ifdef __cplusplus
22494 extern "C"
22495 #endif
22496 char backtrace_symbols_fd ();
22497 int
22498 main ()
22499 {
22500 return backtrace_symbols_fd ();
22501 ;
22502 return 0;
22503 }
22504 _ACEOF
22505 for ac_lib in '' execinfo; do
22506 if test -z "$ac_lib"; then
22507 ac_res="none required"
22508 else
22509 ac_res=-l$ac_lib
22510 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22511 fi
22512 if ac_fn_c_try_link "$LINENO"; then :
22513 ac_cv_search_backtrace_symbols_fd=$ac_res
22514 fi
22515 rm -f core conftest.err conftest.$ac_objext \
22516 conftest$ac_exeext
22517 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22518 break
22519 fi
22520 done
22521 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22522
22523 else
22524 ac_cv_search_backtrace_symbols_fd=no
22525 fi
22526 rm conftest.$ac_ext
22527 LIBS=$ac_func_search_save_LIBS
22528 fi
22529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22530 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22531 ac_res=$ac_cv_search_backtrace_symbols_fd
22532 if test "$ac_res" != no; then :
22533 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22534 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22535 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22536 fi
22537
22538 LIBS=$gl_saved_libs
22539 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22540 fi
22541
22542 if test -n "$EXECINFO_H"; then
22543
22544
22545
22546
22547
22548
22549
22550
22551 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22552
22553 fi
22554
22555
22556
22557 if test -n "$EXECINFO_H"; then
22558 GL_GENERATE_EXECINFO_H_TRUE=
22559 GL_GENERATE_EXECINFO_H_FALSE='#'
22560 else
22561 GL_GENERATE_EXECINFO_H_TRUE='#'
22562 GL_GENERATE_EXECINFO_H_FALSE=
22563 fi
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573 if test $ac_cv_func_faccessat = no; then
22574 HAVE_FACCESSAT=0
22575 fi
22576
22577 if test $HAVE_FACCESSAT = 0; then
22578
22579
22580
22581
22582
22583
22584
22585
22586 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22587
22588
22589 for ac_func in access
22590 do :
22591 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22592 if test "x$ac_cv_func_access" = x""yes; then :
22593 cat >>confdefs.h <<_ACEOF
22594 #define HAVE_ACCESS 1
22595 _ACEOF
22596
22597 fi
22598 done
22599
22600
22601 fi
22602
22603
22604 cat >>confdefs.h <<_ACEOF
22605 #define GNULIB_FACCESSAT 1
22606 _ACEOF
22607
22608
22609
22610
22611
22612
22613
22614 GNULIB_FACCESSAT=1
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625 if test $ac_cv_func_fcntl = no; then
22626
22627
22628
22629 if test $ac_cv_func_fcntl = no; then
22630 HAVE_FCNTL=0
22631 else
22632 REPLACE_FCNTL=1
22633 fi
22634
22635 else
22636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22637 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22638 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
22639 $as_echo_n "(cached) " >&6
22640 else
22641 if test "$cross_compiling" = yes; then :
22642 # Guess that it works on glibc systems
22643 case $host_os in #((
22644 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22645 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22646 esac
22647 else
22648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22649 /* end confdefs.h. */
22650
22651 #include <fcntl.h>
22652 #include <errno.h>
22653
22654 int
22655 main ()
22656 {
22657 int result = 0;
22658 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22659 if (errno != EINVAL) result |= 2;
22660 return result;
22661
22662 ;
22663 return 0;
22664 }
22665 _ACEOF
22666 if ac_fn_c_try_run "$LINENO"; then :
22667 gl_cv_func_fcntl_f_dupfd_works=yes
22668 else
22669 gl_cv_func_fcntl_f_dupfd_works=no
22670 fi
22671 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22672 conftest.$ac_objext conftest.beam conftest.$ac_ext
22673 fi
22674
22675 fi
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22677 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22678 case $gl_cv_func_fcntl_f_dupfd_works in
22679 *yes) ;;
22680 *)
22681
22682
22683 if test $ac_cv_func_fcntl = no; then
22684 HAVE_FCNTL=0
22685 else
22686 REPLACE_FCNTL=1
22687 fi
22688
22689
22690 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22691 ;;
22692 esac
22693
22694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22695 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22696 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
22697 $as_echo_n "(cached) " >&6
22698 else
22699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22700 /* end confdefs.h. */
22701
22702 #include <fcntl.h>
22703 #ifndef F_DUPFD_CLOEXEC
22704 choke me
22705 #endif
22706
22707 int
22708 main ()
22709 {
22710
22711 ;
22712 return 0;
22713 }
22714 _ACEOF
22715 if ac_fn_c_try_compile "$LINENO"; then :
22716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22717 /* end confdefs.h. */
22718
22719 #ifdef __linux__
22720 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22721 it to support the semantics on older kernels that failed with EINVAL. */
22722 choke me
22723 #endif
22724
22725 int
22726 main ()
22727 {
22728
22729 ;
22730 return 0;
22731 }
22732 _ACEOF
22733 if ac_fn_c_try_compile "$LINENO"; then :
22734 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22735 else
22736 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22737 fi
22738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22739 else
22740 gl_cv_func_fcntl_f_dupfd_cloexec=no
22741 fi
22742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22743 fi
22744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22745 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22746 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22747
22748
22749
22750 if test $ac_cv_func_fcntl = no; then
22751 HAVE_FCNTL=0
22752 else
22753 REPLACE_FCNTL=1
22754 fi
22755
22756 fi
22757 fi
22758
22759
22760 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22761
22762
22763
22764
22765
22766
22767
22768
22769 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22770
22771 fi
22772
22773
22774
22775
22776
22777 GNULIB_FCNTL=1
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794 if test $gl_cv_have_include_next = yes; then
22795 gl_cv_next_fcntl_h='<'fcntl.h'>'
22796 else
22797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22798 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22799 if test "${gl_cv_next_fcntl_h+set}" = set; then :
22800 $as_echo_n "(cached) " >&6
22801 else
22802
22803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22804 /* end confdefs.h. */
22805 #include <fcntl.h>
22806
22807 _ACEOF
22808 case "$host_os" in
22809 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22810 *) gl_absname_cpp="$ac_cpp" ;;
22811 esac
22812
22813 case "$host_os" in
22814 mingw*)
22815 gl_dirsep_regex='[/\\]'
22816 ;;
22817 *)
22818 gl_dirsep_regex='\/'
22819 ;;
22820 esac
22821 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22822
22823 gl_header_literal_regex=`echo 'fcntl.h' \
22824 | sed -e "$gl_make_literal_regex_sed"`
22825 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22826 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22827 s|^/[^/]|//&|
22828 p
22829 q
22830 }'
22831 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22832 sed -n "$gl_absolute_header_sed"`'"'
22833
22834
22835 fi
22836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22837 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22838 fi
22839 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22840
22841 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22842 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22843 gl_next_as_first_directive='<'fcntl.h'>'
22844 else
22845 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22846 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22847 fi
22848 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864 LIB_FDATASYNC=
22865
22866
22867 if test $ac_cv_have_decl_fdatasync = no; then
22868 HAVE_DECL_FDATASYNC=0
22869 for ac_func in fdatasync
22870 do :
22871 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
22872 if test "x$ac_cv_func_fdatasync" = x""yes; then :
22873 cat >>confdefs.h <<_ACEOF
22874 #define HAVE_FDATASYNC 1
22875 _ACEOF
22876
22877 fi
22878 done
22879
22880 if test $ac_cv_func_fdatasync = no; then
22881 HAVE_FDATASYNC=0
22882 fi
22883 else
22884 gl_saved_libs=$LIBS
22885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
22886 $as_echo_n "checking for library containing fdatasync... " >&6; }
22887 if test "${ac_cv_search_fdatasync+set}" = set; then :
22888 $as_echo_n "(cached) " >&6
22889 else
22890 ac_func_search_save_LIBS=$LIBS
22891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22892 /* end confdefs.h. */
22893
22894 /* Override any GCC internal prototype to avoid an error.
22895 Use char because int might match the return type of a GCC
22896 builtin and then its argument prototype would still apply. */
22897 #ifdef __cplusplus
22898 extern "C"
22899 #endif
22900 char fdatasync ();
22901 int
22902 main ()
22903 {
22904 return fdatasync ();
22905 ;
22906 return 0;
22907 }
22908 _ACEOF
22909 for ac_lib in '' rt posix4; do
22910 if test -z "$ac_lib"; then
22911 ac_res="none required"
22912 else
22913 ac_res=-l$ac_lib
22914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22915 fi
22916 if ac_fn_c_try_link "$LINENO"; then :
22917 ac_cv_search_fdatasync=$ac_res
22918 fi
22919 rm -f core conftest.err conftest.$ac_objext \
22920 conftest$ac_exeext
22921 if test "${ac_cv_search_fdatasync+set}" = set; then :
22922 break
22923 fi
22924 done
22925 if test "${ac_cv_search_fdatasync+set}" = set; then :
22926
22927 else
22928 ac_cv_search_fdatasync=no
22929 fi
22930 rm conftest.$ac_ext
22931 LIBS=$ac_func_search_save_LIBS
22932 fi
22933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
22934 $as_echo "$ac_cv_search_fdatasync" >&6; }
22935 ac_res=$ac_cv_search_fdatasync
22936 if test "$ac_res" != no; then :
22937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22938 test "$ac_cv_search_fdatasync" = "none required" ||
22939 LIB_FDATASYNC=$ac_cv_search_fdatasync
22940 fi
22941
22942 LIBS=$gl_saved_libs
22943 fi
22944
22945 if test $HAVE_FDATASYNC = 0; then
22946
22947
22948
22949
22950
22951
22952
22953
22954 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
22955
22956 fi
22957
22958
22959
22960
22961
22962 GNULIB_FDATASYNC=1
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22974 #include <dirent.h>
22975
22976 "
22977 if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
22978 ac_have_decl=1
22979 else
22980 ac_have_decl=0
22981 fi
22982
22983 cat >>confdefs.h <<_ACEOF
22984 #define HAVE_DECL_FDOPENDIR $ac_have_decl
22985 _ACEOF
22986 if test $ac_have_decl = 1; then :
22987
22988 else
22989 HAVE_DECL_FDOPENDIR=0
22990 fi
22991
22992
22993 if test $ac_cv_func_fdopendir = no; then
22994 HAVE_FDOPENDIR=0
22995 else
22996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22997 $as_echo_n "checking whether fdopendir works... " >&6; }
22998 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
22999 $as_echo_n "(cached) " >&6
23000 else
23001 if test "$cross_compiling" = yes; then :
23002 case "$host_os" in
23003 # Guess yes on glibc systems.
23004 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
23005 # If we don't know, assume the worst.
23006 *) gl_cv_func_fdopendir_works="guessing no" ;;
23007 esac
23008
23009 else
23010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23011 /* end confdefs.h. */
23012
23013 #include <dirent.h>
23014 #include <fcntl.h>
23015 #include <unistd.h>
23016 #if !HAVE_DECL_FDOPENDIR
23017 extern
23018 # ifdef __cplusplus
23019 "C"
23020 # endif
23021 DIR *fdopendir (int);
23022 #endif
23023
23024 int
23025 main ()
23026 {
23027 int result = 0;
23028 int fd = open ("conftest.c", O_RDONLY);
23029 if (fd < 0) result |= 1;
23030 if (fdopendir (fd)) result |= 2;
23031 if (close (fd)) result |= 4;
23032 return result;
23033 ;
23034 return 0;
23035 }
23036 _ACEOF
23037 if ac_fn_c_try_run "$LINENO"; then :
23038 gl_cv_func_fdopendir_works=yes
23039 else
23040 gl_cv_func_fdopendir_works=no
23041 fi
23042 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23043 conftest.$ac_objext conftest.beam conftest.$ac_ext
23044 fi
23045
23046 fi
23047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
23048 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
23049 case "$gl_cv_func_fdopendir_works" in
23050 *yes) ;;
23051 *)
23052 REPLACE_FDOPENDIR=1
23053 ;;
23054 esac
23055 fi
23056
23057 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
23058
23059
23060
23061
23062
23063
23064
23065
23066 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
23067
23068 fi
23069
23070
23071
23072
23073
23074 GNULIB_FDOPENDIR=1
23075
23076
23077
23078
23079
23080
23081
23082 cat >>confdefs.h <<_ACEOF
23083 #define GNULIB_FDOPENDIR 1
23084 _ACEOF
23085
23086
23087
23088
23089
23090
23091
23092
23093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
23094 $as_echo_n "checking for __fpending... " >&6; }
23095 if test "${gl_cv_func___fpending+set}" = set; then :
23096 $as_echo_n "(cached) " >&6
23097 else
23098
23099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23100 /* end confdefs.h. */
23101 #include <stdio.h>
23102 #if HAVE_STDIO_EXT_H
23103 # include <stdio_ext.h>
23104 #endif
23105
23106 int
23107 main ()
23108 {
23109 return ! __fpending (stdin);
23110 ;
23111 return 0;
23112 }
23113 _ACEOF
23114 if ac_fn_c_try_link "$LINENO"; then :
23115 gl_cv_func___fpending=yes
23116 else
23117 gl_cv_func___fpending=no
23118 fi
23119 rm -f core conftest.err conftest.$ac_objext \
23120 conftest$ac_exeext conftest.$ac_ext
23121
23122 fi
23123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
23124 $as_echo "$gl_cv_func___fpending" >&6; }
23125
23126 if test $gl_cv_func___fpending = no; then
23127
23128
23129
23130
23131
23132
23133
23134
23135 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
23136
23137
23138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
23139 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23140 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
23141 $as_echo_n "(cached) " >&6
23142 else
23143
23144 for ac_expr in \
23145 \
23146 '# glibc2' \
23147 'fp->_IO_write_ptr - fp->_IO_write_base' \
23148 \
23149 '# traditional Unix' \
23150 'fp->_ptr - fp->_base' \
23151 \
23152 '# BSD' \
23153 'fp->_p - fp->_bf._base' \
23154 \
23155 '# SCO, Unixware' \
23156 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
23157 \
23158 '# QNX' \
23159 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23160 \
23161 '# old glibc?' \
23162 'fp->__bufp - fp->__buffer' \
23163 \
23164 '# old glibc iostream?' \
23165 'fp->_pptr - fp->_pbase' \
23166 \
23167 '# emx+gcc' \
23168 'fp->_ptr - fp->_buffer' \
23169 \
23170 '# Minix' \
23171 'fp->_ptr - fp->_buf' \
23172 \
23173 '# Plan9' \
23174 'fp->wp - fp->buf' \
23175 \
23176 '# VMS' \
23177 '(*fp)->_ptr - (*fp)->_base' \
23178 \
23179 '# e.g., DGUX R4.11; the info is not available' \
23180 1 \
23181 ; do
23182
23183 # Skip each embedded comment.
23184 case "$ac_expr" in '#'*) continue;; esac
23185
23186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23187 /* end confdefs.h. */
23188 #include <stdio.h>
23189 int
23190 main ()
23191 {
23192 FILE *fp = stdin; (void) ($ac_expr);
23193 ;
23194 return 0;
23195 }
23196 _ACEOF
23197 if ac_fn_c_try_compile "$LINENO"; then :
23198 fp_done=yes
23199
23200 fi
23201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23202 test "$fp_done" = yes && break
23203 done
23204
23205 ac_cv_sys_pending_output_n_bytes=$ac_expr
23206
23207
23208 fi
23209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23210 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23211
23212 cat >>confdefs.h <<_ACEOF
23213 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23214 _ACEOF
23215
23216
23217 fi
23218
23219
23220
23221
23222
23223
23224 if test $ac_cv_func_fstatat = no; then
23225 HAVE_FSTATAT=0
23226 else
23227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23228 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23229 if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23230 $as_echo_n "(cached) " >&6
23231 else
23232 if test "$cross_compiling" = yes; then :
23233 case "$host_os" in
23234 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23235 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23236 esac
23237
23238 else
23239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23240 /* end confdefs.h. */
23241
23242 #include <fcntl.h>
23243 #include <sys/stat.h>
23244 int
23245 main (void)
23246 {
23247 struct stat a;
23248 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23249 }
23250
23251 _ACEOF
23252 if ac_fn_c_try_run "$LINENO"; then :
23253 gl_cv_func_fstatat_zero_flag=yes
23254 else
23255 gl_cv_func_fstatat_zero_flag=no
23256 fi
23257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23258 conftest.$ac_objext conftest.beam conftest.$ac_ext
23259 fi
23260
23261
23262 fi
23263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23264 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23265
23266 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23267 *yes+*yes) ;;
23268 *) REPLACE_FSTATAT=1
23269 case $gl_cv_func_fstatat_zero_flag in
23270 *yes)
23271
23272 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23273
23274 ;;
23275 esac
23276 ;;
23277 esac
23278 fi
23279
23280 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23281
23282
23283
23284
23285
23286
23287
23288
23289 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23290
23291 fi
23292
23293
23294
23295
23296
23297 GNULIB_FSTATAT=1
23298
23299
23300
23301
23302
23303
23304
23305
23306 if test $ac_cv_func_fsync = no; then
23307 HAVE_FSYNC=0
23308 fi
23309
23310 if test $HAVE_FSYNC = 0; then
23311
23312
23313
23314
23315
23316
23317
23318
23319 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23320
23321 :
23322 fi
23323
23324
23325
23326
23327
23328 GNULIB_FSYNC=1
23329
23330
23331
23332
23333
23334
23335
23336 # Persuade glibc <stdlib.h> to declare getloadavg().
23337
23338
23339 gl_save_LIBS=$LIBS
23340
23341 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23342 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23343 HAVE_GETLOADAVG=1
23344 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23345 if test "x$ac_cv_func_getloadavg" = x""yes; then :
23346
23347 else
23348 gl_func_getloadavg_done=no
23349
23350 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23351 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23352 # to get the right answer into the cache.
23353 # For kstat on solaris, we need to test for libelf and libkvm to force the
23354 # definition of SVR4 below.
23355 if test $gl_func_getloadavg_done = no; then
23356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23357 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
23358 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
23359 $as_echo_n "(cached) " >&6
23360 else
23361 ac_check_lib_save_LIBS=$LIBS
23362 LIBS="-lelf $LIBS"
23363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23364 /* end confdefs.h. */
23365
23366 /* Override any GCC internal prototype to avoid an error.
23367 Use char because int might match the return type of a GCC
23368 builtin and then its argument prototype would still apply. */
23369 #ifdef __cplusplus
23370 extern "C"
23371 #endif
23372 char elf_begin ();
23373 int
23374 main ()
23375 {
23376 return elf_begin ();
23377 ;
23378 return 0;
23379 }
23380 _ACEOF
23381 if ac_fn_c_try_link "$LINENO"; then :
23382 ac_cv_lib_elf_elf_begin=yes
23383 else
23384 ac_cv_lib_elf_elf_begin=no
23385 fi
23386 rm -f core conftest.err conftest.$ac_objext \
23387 conftest$ac_exeext conftest.$ac_ext
23388 LIBS=$ac_check_lib_save_LIBS
23389 fi
23390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23391 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23392 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23393 LIBS="-lelf $LIBS"
23394 fi
23395
23396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23397 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23398 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
23399 $as_echo_n "(cached) " >&6
23400 else
23401 ac_check_lib_save_LIBS=$LIBS
23402 LIBS="-lkvm $LIBS"
23403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23404 /* end confdefs.h. */
23405
23406 /* Override any GCC internal prototype to avoid an error.
23407 Use char because int might match the return type of a GCC
23408 builtin and then its argument prototype would still apply. */
23409 #ifdef __cplusplus
23410 extern "C"
23411 #endif
23412 char kvm_open ();
23413 int
23414 main ()
23415 {
23416 return kvm_open ();
23417 ;
23418 return 0;
23419 }
23420 _ACEOF
23421 if ac_fn_c_try_link "$LINENO"; then :
23422 ac_cv_lib_kvm_kvm_open=yes
23423 else
23424 ac_cv_lib_kvm_kvm_open=no
23425 fi
23426 rm -f core conftest.err conftest.$ac_objext \
23427 conftest$ac_exeext conftest.$ac_ext
23428 LIBS=$ac_check_lib_save_LIBS
23429 fi
23430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23431 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23432 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23433 LIBS="-lkvm $LIBS"
23434 fi
23435
23436 # Check for the 4.4BSD definition of getloadavg.
23437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23438 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
23439 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
23440 $as_echo_n "(cached) " >&6
23441 else
23442 ac_check_lib_save_LIBS=$LIBS
23443 LIBS="-lutil $LIBS"
23444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23445 /* end confdefs.h. */
23446
23447 /* Override any GCC internal prototype to avoid an error.
23448 Use char because int might match the return type of a GCC
23449 builtin and then its argument prototype would still apply. */
23450 #ifdef __cplusplus
23451 extern "C"
23452 #endif
23453 char getloadavg ();
23454 int
23455 main ()
23456 {
23457 return getloadavg ();
23458 ;
23459 return 0;
23460 }
23461 _ACEOF
23462 if ac_fn_c_try_link "$LINENO"; then :
23463 ac_cv_lib_util_getloadavg=yes
23464 else
23465 ac_cv_lib_util_getloadavg=no
23466 fi
23467 rm -f core conftest.err conftest.$ac_objext \
23468 conftest$ac_exeext conftest.$ac_ext
23469 LIBS=$ac_check_lib_save_LIBS
23470 fi
23471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23472 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23473 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23474 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
23475 fi
23476
23477 fi
23478
23479 if test $gl_func_getloadavg_done = no; then
23480 # There is a commonly available library for RS/6000 AIX.
23481 # Since it is not a standard part of AIX, it might be installed locally.
23482 gl_getloadavg_LIBS=$LIBS
23483 LIBS="-L/usr/local/lib $LIBS"
23484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23485 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23486 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
23487 $as_echo_n "(cached) " >&6
23488 else
23489 ac_check_lib_save_LIBS=$LIBS
23490 LIBS="-lgetloadavg $LIBS"
23491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23492 /* end confdefs.h. */
23493
23494 /* Override any GCC internal prototype to avoid an error.
23495 Use char because int might match the return type of a GCC
23496 builtin and then its argument prototype would still apply. */
23497 #ifdef __cplusplus
23498 extern "C"
23499 #endif
23500 char getloadavg ();
23501 int
23502 main ()
23503 {
23504 return getloadavg ();
23505 ;
23506 return 0;
23507 }
23508 _ACEOF
23509 if ac_fn_c_try_link "$LINENO"; then :
23510 ac_cv_lib_getloadavg_getloadavg=yes
23511 else
23512 ac_cv_lib_getloadavg_getloadavg=no
23513 fi
23514 rm -f core conftest.err conftest.$ac_objext \
23515 conftest$ac_exeext conftest.$ac_ext
23516 LIBS=$ac_check_lib_save_LIBS
23517 fi
23518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23519 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23520 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23521 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23522 else
23523 LIBS=$gl_getloadavg_LIBS
23524 fi
23525
23526 fi
23527
23528 # Set up the replacement function if necessary.
23529 if test $gl_func_getloadavg_done = no; then
23530 HAVE_GETLOADAVG=0
23531
23532 # Solaris has libkstat which does not require root.
23533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23534 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23535 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
23536 $as_echo_n "(cached) " >&6
23537 else
23538 ac_check_lib_save_LIBS=$LIBS
23539 LIBS="-lkstat $LIBS"
23540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23541 /* end confdefs.h. */
23542
23543 /* Override any GCC internal prototype to avoid an error.
23544 Use char because int might match the return type of a GCC
23545 builtin and then its argument prototype would still apply. */
23546 #ifdef __cplusplus
23547 extern "C"
23548 #endif
23549 char kstat_open ();
23550 int
23551 main ()
23552 {
23553 return kstat_open ();
23554 ;
23555 return 0;
23556 }
23557 _ACEOF
23558 if ac_fn_c_try_link "$LINENO"; then :
23559 ac_cv_lib_kstat_kstat_open=yes
23560 else
23561 ac_cv_lib_kstat_kstat_open=no
23562 fi
23563 rm -f core conftest.err conftest.$ac_objext \
23564 conftest$ac_exeext conftest.$ac_ext
23565 LIBS=$ac_check_lib_save_LIBS
23566 fi
23567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23568 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23569 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
23570 cat >>confdefs.h <<_ACEOF
23571 #define HAVE_LIBKSTAT 1
23572 _ACEOF
23573
23574 LIBS="-lkstat $LIBS"
23575
23576 fi
23577
23578 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
23579
23580 # AIX has libperfstat which does not require root
23581 if test $gl_func_getloadavg_done = no; then
23582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23583 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23584 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
23585 $as_echo_n "(cached) " >&6
23586 else
23587 ac_check_lib_save_LIBS=$LIBS
23588 LIBS="-lperfstat $LIBS"
23589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23590 /* end confdefs.h. */
23591
23592 /* Override any GCC internal prototype to avoid an error.
23593 Use char because int might match the return type of a GCC
23594 builtin and then its argument prototype would still apply. */
23595 #ifdef __cplusplus
23596 extern "C"
23597 #endif
23598 char perfstat_cpu_total ();
23599 int
23600 main ()
23601 {
23602 return perfstat_cpu_total ();
23603 ;
23604 return 0;
23605 }
23606 _ACEOF
23607 if ac_fn_c_try_link "$LINENO"; then :
23608 ac_cv_lib_perfstat_perfstat_cpu_total=yes
23609 else
23610 ac_cv_lib_perfstat_perfstat_cpu_total=no
23611 fi
23612 rm -f core conftest.err conftest.$ac_objext \
23613 conftest$ac_exeext conftest.$ac_ext
23614 LIBS=$ac_check_lib_save_LIBS
23615 fi
23616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23617 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23618 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23619 cat >>confdefs.h <<_ACEOF
23620 #define HAVE_LIBPERFSTAT 1
23621 _ACEOF
23622
23623 LIBS="-lperfstat $LIBS"
23624
23625 fi
23626
23627 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23628 fi
23629
23630 if test $gl_func_getloadavg_done = no; then
23631 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23632 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23633 gl_func_getloadavg_done=yes
23634
23635 $as_echo "#define DGUX 1" >>confdefs.h
23636
23637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23638 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23639 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
23640 $as_echo_n "(cached) " >&6
23641 else
23642 ac_check_lib_save_LIBS=$LIBS
23643 LIBS="-ldgc $LIBS"
23644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23645 /* end confdefs.h. */
23646
23647 /* Override any GCC internal prototype to avoid an error.
23648 Use char because int might match the return type of a GCC
23649 builtin and then its argument prototype would still apply. */
23650 #ifdef __cplusplus
23651 extern "C"
23652 #endif
23653 char dg_sys_info ();
23654 int
23655 main ()
23656 {
23657 return dg_sys_info ();
23658 ;
23659 return 0;
23660 }
23661 _ACEOF
23662 if ac_fn_c_try_link "$LINENO"; then :
23663 ac_cv_lib_dgc_dg_sys_info=yes
23664 else
23665 ac_cv_lib_dgc_dg_sys_info=no
23666 fi
23667 rm -f core conftest.err conftest.$ac_objext \
23668 conftest$ac_exeext conftest.$ac_ext
23669 LIBS=$ac_check_lib_save_LIBS
23670 fi
23671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23672 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23673 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23674 cat >>confdefs.h <<_ACEOF
23675 #define HAVE_LIBDGC 1
23676 _ACEOF
23677
23678 LIBS="-ldgc $LIBS"
23679
23680 fi
23681
23682 fi
23683
23684
23685 fi
23686 fi
23687 fi
23688
23689
23690 if test "x$gl_save_LIBS" = x; then
23691 GETLOADAVG_LIBS=$LIBS
23692 else
23693 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
23694 fi
23695 LIBS=$gl_save_LIBS
23696
23697
23698 # Test whether the system declares getloadavg. Solaris has the function
23699 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
23700 for ac_header in sys/loadavg.h
23701 do :
23702 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
23703 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
23704 cat >>confdefs.h <<_ACEOF
23705 #define HAVE_SYS_LOADAVG_H 1
23706 _ACEOF
23707
23708 fi
23709
23710 done
23711
23712 if test $ac_cv_header_sys_loadavg_h = yes; then
23713 HAVE_SYS_LOADAVG_H=1
23714 else
23715 HAVE_SYS_LOADAVG_H=0
23716 fi
23717 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
23718 # include <sys/loadavg.h>
23719 #endif
23720 #include <stdlib.h>
23721 "
23722 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
23723
23724 else
23725 HAVE_DECL_GETLOADAVG=0
23726 fi
23727
23728
23729 if test $HAVE_GETLOADAVG = 0; then
23730
23731
23732
23733
23734
23735
23736
23737
23738 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
23739
23740
23741 # Figure out what our getloadavg.c needs.
23742
23743
23744
23745 # On HPUX9, an unprivileged user can get load averages this way.
23746 if test $gl_func_getloadavg_done = no; then
23747 for ac_func in pstat_getdynamic
23748 do :
23749 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
23750 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
23751 cat >>confdefs.h <<_ACEOF
23752 #define HAVE_PSTAT_GETDYNAMIC 1
23753 _ACEOF
23754 gl_func_getloadavg_done=yes
23755 fi
23756 done
23757
23758 fi
23759
23760 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
23761 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
23762 # Irix 4.0.5F has the header but not the library.
23763 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
23764 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
23765 gl_func_getloadavg_done=yes
23766
23767 $as_echo "#define SVR4 1" >>confdefs.h
23768
23769 fi
23770
23771 if test $gl_func_getloadavg_done = no; then
23772 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
23773 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
23774 gl_func_getloadavg_done=yes
23775
23776 $as_echo "#define UMAX 1" >>confdefs.h
23777
23778
23779 $as_echo "#define UMAX4_3 1" >>confdefs.h
23780
23781 fi
23782
23783
23784 fi
23785
23786 if test $gl_func_getloadavg_done = no; then
23787 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
23788 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
23789 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
23790
23791 fi
23792
23793
23794 fi
23795
23796 if test $gl_func_getloadavg_done = no; then
23797 for ac_header in mach/mach.h
23798 do :
23799 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
23800 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
23801 cat >>confdefs.h <<_ACEOF
23802 #define HAVE_MACH_MACH_H 1
23803 _ACEOF
23804
23805 fi
23806
23807 done
23808
23809 fi
23810
23811 for ac_header in nlist.h
23812 do :
23813 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
23814 if test "x$ac_cv_header_nlist_h" = x""yes; then :
23815 cat >>confdefs.h <<_ACEOF
23816 #define HAVE_NLIST_H 1
23817 _ACEOF
23818 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
23819 "
23820 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
23821
23822 cat >>confdefs.h <<_ACEOF
23823 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
23824 _ACEOF
23825
23826
23827 fi
23828
23829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23830 /* end confdefs.h. */
23831 #include <nlist.h>
23832 int
23833 main ()
23834 {
23835 struct nlist x;
23836 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
23837 x.n_un.n_name = "";
23838 #else
23839 x.n_name = "";
23840 #endif
23841 ;
23842 return 0;
23843 }
23844 _ACEOF
23845 if ac_fn_c_try_link "$LINENO"; then :
23846
23847 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
23848
23849 fi
23850 rm -f core conftest.err conftest.$ac_objext \
23851 conftest$ac_exeext conftest.$ac_ext
23852
23853 fi
23854
23855 done
23856
23857 fi
23858
23859
23860
23861
23862
23863 GNULIB_GETLOADAVG=1
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874 if test $REPLACE_GETOPT = 1; then
23875
23876
23877
23878
23879
23880
23881
23882
23883 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23894
23895
23896
23897
23898 GNULIB_GL_UNISTD_H_GETOPT=1
23899 fi
23900
23901
23902
23903
23904
23905
23906
23907 REPLACE_GETOPT=0
23908 if test -n "$gl_replace_getopt"; then
23909 REPLACE_GETOPT=1
23910 fi
23911
23912 if test $REPLACE_GETOPT = 1; then
23913
23914 GETOPT_H=getopt.h
23915
23916 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23917
23918
23919
23920 fi
23921
23922 if test $REPLACE_GETOPT = 1; then
23923
23924
23925
23926
23927
23928
23929
23930
23931 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23942
23943
23944
23945
23946 GNULIB_GL_UNISTD_H_GETOPT=1
23947 fi
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960 gl_gettimeofday_timezone=void
23961 if test $ac_cv_func_gettimeofday != yes; then
23962 HAVE_GETTIMEOFDAY=0
23963 else
23964
23965
23966
23967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23968 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23969 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
23970 $as_echo_n "(cached) " >&6
23971 else
23972 if test "$cross_compiling" = yes; then :
23973 # When cross-compiling:
23974 case "$host_os" in
23975 # Guess all is fine on glibc systems.
23976 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23977 # If we don't know, assume the worst.
23978 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23979 esac
23980
23981 else
23982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23983 /* end confdefs.h. */
23984 #include <string.h>
23985 #include <sys/time.h>
23986 #include <time.h>
23987 #include <stdlib.h>
23988
23989 int
23990 main ()
23991 {
23992
23993 time_t t = 0;
23994 struct tm *lt;
23995 struct tm saved_lt;
23996 struct timeval tv;
23997 lt = localtime (&t);
23998 saved_lt = *lt;
23999 gettimeofday (&tv, NULL);
24000 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
24001
24002 ;
24003 return 0;
24004 }
24005 _ACEOF
24006 if ac_fn_c_try_run "$LINENO"; then :
24007 gl_cv_func_gettimeofday_clobber=no
24008 else
24009 gl_cv_func_gettimeofday_clobber=yes
24010 fi
24011 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24012 conftest.$ac_objext conftest.beam conftest.$ac_ext
24013 fi
24014
24015 fi
24016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
24017 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
24018
24019 case "$gl_cv_func_gettimeofday_clobber" in
24020 *yes)
24021 REPLACE_GETTIMEOFDAY=1
24022
24023
24024 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
24025
24026
24027 $as_echo "#define localtime rpl_localtime" >>confdefs.h
24028
24029
24030
24031 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
24032
24033 ;;
24034 esac
24035
24036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
24037 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
24038 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
24039 $as_echo_n "(cached) " >&6
24040 else
24041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24042 /* end confdefs.h. */
24043 #include <sys/time.h>
24044 struct timeval c;
24045 int gettimeofday (struct timeval *restrict, void *restrict);
24046
24047 int
24048 main ()
24049 {
24050 /* glibc uses struct timezone * rather than the POSIX void *
24051 if _GNU_SOURCE is defined. However, since the only portable
24052 use of gettimeofday uses NULL as the second parameter, and
24053 since the glibc definition is actually more typesafe, it is
24054 not worth wrapping this to get a compliant signature. */
24055 int (*f) (struct timeval *restrict, void *restrict)
24056 = gettimeofday;
24057 int x = f (&c, 0);
24058 return !(x | c.tv_sec | c.tv_usec);
24059
24060 ;
24061 return 0;
24062 }
24063 _ACEOF
24064 if ac_fn_c_try_compile "$LINENO"; then :
24065 gl_cv_func_gettimeofday_posix_signature=yes
24066 else
24067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24068 /* end confdefs.h. */
24069 #include <sys/time.h>
24070 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
24071
24072 int
24073 main ()
24074 {
24075
24076 ;
24077 return 0;
24078 }
24079 _ACEOF
24080 if ac_fn_c_try_compile "$LINENO"; then :
24081 gl_cv_func_gettimeofday_posix_signature=almost
24082 else
24083 gl_cv_func_gettimeofday_posix_signature=no
24084 fi
24085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24086 fi
24087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24088 fi
24089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
24090 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
24091 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
24092 gl_gettimeofday_timezone='struct timezone'
24093 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
24094 REPLACE_GETTIMEOFDAY=1
24095 fi
24096 if test $REPLACE_STRUCT_TIMEVAL = 1; then
24097 REPLACE_GETTIMEOFDAY=1
24098 fi
24099
24100 fi
24101
24102 cat >>confdefs.h <<_ACEOF
24103 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
24104 _ACEOF
24105
24106
24107 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
24108
24109
24110
24111
24112
24113
24114
24115
24116 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
24117
24118
24119 for ac_header in sys/timeb.h
24120 do :
24121 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
24122 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
24123 cat >>confdefs.h <<_ACEOF
24124 #define HAVE_SYS_TIMEB_H 1
24125 _ACEOF
24126
24127 fi
24128
24129 done
24130
24131 for ac_func in _ftime
24132 do :
24133 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
24134 if test "x$ac_cv_func__ftime" = x""yes; then :
24135 cat >>confdefs.h <<_ACEOF
24136 #define HAVE__FTIME 1
24137 _ACEOF
24138
24139 fi
24140 done
24141
24142
24143 fi
24144
24145
24146
24147
24148
24149 GNULIB_GETTIMEOFDAY=1
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160 if test $ac_cv_func_lstat = yes; then
24161
24162 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24163 *no)
24164 REPLACE_LSTAT=1
24165 ;;
24166 esac
24167 else
24168 HAVE_LSTAT=0
24169 fi
24170
24171 if test $REPLACE_LSTAT = 1; then
24172
24173
24174
24175
24176
24177
24178
24179
24180 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24181
24182 :
24183 fi
24184
24185
24186
24187
24188
24189 GNULIB_LSTAT=1
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200 if test $ac_cv_have_decl_memrchr = no; then
24201 HAVE_DECL_MEMRCHR=0
24202 fi
24203
24204 for ac_func in memrchr
24205 do :
24206 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24207 if test "x$ac_cv_func_memrchr" = x""yes; then :
24208 cat >>confdefs.h <<_ACEOF
24209 #define HAVE_MEMRCHR 1
24210 _ACEOF
24211
24212 fi
24213 done
24214
24215
24216 if test $ac_cv_func_memrchr = no; then
24217
24218
24219
24220
24221
24222
24223
24224
24225 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24226
24227 :
24228 fi
24229
24230
24231
24232
24233
24234 GNULIB_MEMRCHR=1
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246 if test $ac_cv_func_mkostemp != yes; then
24247 HAVE_MKOSTEMP=0
24248 fi
24249
24250 if test $HAVE_MKOSTEMP = 0; then
24251
24252
24253
24254
24255
24256
24257
24258
24259 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
24260
24261
24262
24263 fi
24264
24265
24266 cat >>confdefs.h <<_ACEOF
24267 #define GNULIB_MKOSTEMP 1
24268 _ACEOF
24269
24270
24271
24272
24273
24274
24275
24276 GNULIB_MKOSTEMP=1
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288 if test $APPLE_UNIVERSAL_BUILD = 1; then
24289 # A universal build on Apple Mac OS X platforms.
24290 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24291 # But we need a configuration result that is valid in both modes.
24292 gl_cv_func_working_mktime=no
24293 fi
24294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24295 $as_echo_n "checking for working mktime... " >&6; }
24296 if test "${gl_cv_func_working_mktime+set}" = set; then :
24297 $as_echo_n "(cached) " >&6
24298 else
24299 if test "$cross_compiling" = yes; then :
24300 gl_cv_func_working_mktime=no
24301 else
24302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24303 /* end confdefs.h. */
24304 /* Test program from Paul Eggert and Tony Leneis. */
24305 #include <limits.h>
24306 #include <stdlib.h>
24307 #include <time.h>
24308
24309 #ifdef HAVE_UNISTD_H
24310 # include <unistd.h>
24311 #endif
24312
24313 #if HAVE_DECL_ALARM
24314 # include <signal.h>
24315 #endif
24316
24317 /* Work around redefinition to rpl_putenv by other config tests. */
24318 #undef putenv
24319
24320 static time_t time_t_max;
24321 static time_t time_t_min;
24322
24323 /* Values we'll use to set the TZ environment variable. */
24324 static char *tz_strings[] = {
24325 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24326 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24327 };
24328 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24329
24330 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
24331 Based on a problem report from Andreas Jaeger. */
24332 static int
24333 spring_forward_gap ()
24334 {
24335 /* glibc (up to about 1998-10-07) failed this test. */
24336 struct tm tm;
24337
24338 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24339 instead of "TZ=America/Vancouver" in order to detect the bug even
24340 on systems that don't support the Olson extension, or don't have the
24341 full zoneinfo tables installed. */
24342 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24343
24344 tm.tm_year = 98;
24345 tm.tm_mon = 3;
24346 tm.tm_mday = 5;
24347 tm.tm_hour = 2;
24348 tm.tm_min = 0;
24349 tm.tm_sec = 0;
24350 tm.tm_isdst = -1;
24351 return mktime (&tm) != (time_t) -1;
24352 }
24353
24354 static int
24355 mktime_test1 (time_t now)
24356 {
24357 struct tm *lt;
24358 return ! (lt = localtime (&now)) || mktime (lt) == now;
24359 }
24360
24361 static int
24362 mktime_test (time_t now)
24363 {
24364 return (mktime_test1 (now)
24365 && mktime_test1 ((time_t) (time_t_max - now))
24366 && mktime_test1 ((time_t) (time_t_min + now)));
24367 }
24368
24369 static int
24370 irix_6_4_bug ()
24371 {
24372 /* Based on code from Ariel Faigon. */
24373 struct tm tm;
24374 tm.tm_year = 96;
24375 tm.tm_mon = 3;
24376 tm.tm_mday = 0;
24377 tm.tm_hour = 0;
24378 tm.tm_min = 0;
24379 tm.tm_sec = 0;
24380 tm.tm_isdst = -1;
24381 mktime (&tm);
24382 return tm.tm_mon == 2 && tm.tm_mday == 31;
24383 }
24384
24385 static int
24386 bigtime_test (int j)
24387 {
24388 struct tm tm;
24389 time_t now;
24390 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24391 now = mktime (&tm);
24392 if (now != (time_t) -1)
24393 {
24394 struct tm *lt = localtime (&now);
24395 if (! (lt
24396 && lt->tm_year == tm.tm_year
24397 && lt->tm_mon == tm.tm_mon
24398 && lt->tm_mday == tm.tm_mday
24399 && lt->tm_hour == tm.tm_hour
24400 && lt->tm_min == tm.tm_min
24401 && lt->tm_sec == tm.tm_sec
24402 && lt->tm_yday == tm.tm_yday
24403 && lt->tm_wday == tm.tm_wday
24404 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24405 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24406 return 0;
24407 }
24408 return 1;
24409 }
24410
24411 static int
24412 year_2050_test ()
24413 {
24414 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24415 ignoring leap seconds. */
24416 unsigned long int answer = 2527315200UL;
24417
24418 struct tm tm;
24419 time_t t;
24420 tm.tm_year = 2050 - 1900;
24421 tm.tm_mon = 2 - 1;
24422 tm.tm_mday = 1;
24423 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24424 tm.tm_isdst = -1;
24425
24426 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24427 instead of "TZ=America/Vancouver" in order to detect the bug even
24428 on systems that don't support the Olson extension, or don't have the
24429 full zoneinfo tables installed. */
24430 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24431
24432 t = mktime (&tm);
24433
24434 /* Check that the result is either a failure, or close enough
24435 to the correct answer that we can assume the discrepancy is
24436 due to leap seconds. */
24437 return (t == (time_t) -1
24438 || (0 < t && answer - 120 <= t && t <= answer + 120));
24439 }
24440
24441 int
24442 main ()
24443 {
24444 int result = 0;
24445 time_t t, delta;
24446 int i, j;
24447 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24448 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24449
24450 #if HAVE_DECL_ALARM
24451 /* This test makes some buggy mktime implementations loop.
24452 Give up after 60 seconds; a mktime slower than that
24453 isn't worth using anyway. */
24454 signal (SIGALRM, SIG_DFL);
24455 alarm (60);
24456 #endif
24457
24458 time_t_max = (! time_t_signed
24459 ? (time_t) -1
24460 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24461 * 2 + 1));
24462 time_t_min = (! time_t_signed
24463 ? (time_t) 0
24464 : time_t_signed_magnitude
24465 ? ~ (time_t) 0
24466 : ~ time_t_max);
24467
24468 delta = time_t_max / 997; /* a suitable prime number */
24469 for (i = 0; i < N_STRINGS; i++)
24470 {
24471 if (tz_strings[i])
24472 putenv (tz_strings[i]);
24473
24474 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24475 if (! mktime_test (t))
24476 result |= 1;
24477 if ((result & 2) == 0
24478 && ! (mktime_test ((time_t) 1)
24479 && mktime_test ((time_t) (60 * 60))
24480 && mktime_test ((time_t) (60 * 60 * 24))))
24481 result |= 2;
24482
24483 for (j = 1; (result & 4) == 0; j <<= 1)
24484 {
24485 if (! bigtime_test (j))
24486 result |= 4;
24487 if (INT_MAX / 2 < j)
24488 break;
24489 }
24490 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24491 result |= 8;
24492 }
24493 if (! irix_6_4_bug ())
24494 result |= 16;
24495 if (! spring_forward_gap ())
24496 result |= 32;
24497 if (! year_2050_test ())
24498 result |= 64;
24499 return result;
24500 }
24501 _ACEOF
24502 if ac_fn_c_try_run "$LINENO"; then :
24503 gl_cv_func_working_mktime=yes
24504 else
24505 gl_cv_func_working_mktime=no
24506 fi
24507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24508 conftest.$ac_objext conftest.beam conftest.$ac_ext
24509 fi
24510
24511
24512 fi
24513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24514 $as_echo "$gl_cv_func_working_mktime" >&6; }
24515
24516 if test $gl_cv_func_working_mktime = no; then
24517 REPLACE_MKTIME=1
24518 else
24519 REPLACE_MKTIME=0
24520 fi
24521
24522 if test $REPLACE_MKTIME = 1; then
24523
24524
24525
24526
24527
24528
24529
24530
24531 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24532
24533 :
24534 fi
24535
24536
24537
24538
24539
24540 GNULIB_MKTIME=1
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553 if test $ac_cv_func_pipe2 != yes; then
24554 HAVE_PIPE2=0
24555 fi
24556
24557
24558
24559
24560
24561
24562 GNULIB_PIPE2=1
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573 if test $ac_cv_func_pselect = yes; then
24574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24575 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24576 if test "${gl_cv_sig_pselect+set}" = set; then :
24577 $as_echo_n "(cached) " >&6
24578 else
24579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24580 /* end confdefs.h. */
24581 #include <sys/select.h>
24582
24583 int
24584 main ()
24585 {
24586 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24587 struct timespec const *restrict,
24588 sigset_t const *restrict) = pselect;
24589 return !p;
24590 ;
24591 return 0;
24592 }
24593 _ACEOF
24594 if ac_fn_c_try_link "$LINENO"; then :
24595 gl_cv_sig_pselect=yes
24596 else
24597 gl_cv_sig_pselect=no
24598 fi
24599 rm -f core conftest.err conftest.$ac_objext \
24600 conftest$ac_exeext conftest.$ac_ext
24601 fi
24602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24603 $as_echo "$gl_cv_sig_pselect" >&6; }
24604
24605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24606 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24607 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24608 $as_echo_n "(cached) " >&6
24609 else
24610
24611 if test "$cross_compiling" = yes; then :
24612
24613 case "$host_os" in
24614 # Guess yes on glibc systems.
24615 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24616 # If we don't know, assume the worst.
24617 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24618 esac
24619
24620 else
24621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24622 /* end confdefs.h. */
24623
24624 #include <sys/types.h>
24625 #include <sys/time.h>
24626 #if HAVE_SYS_SELECT_H
24627 # include <sys/select.h>
24628 #endif
24629 #include <unistd.h>
24630 #include <errno.h>
24631
24632 int
24633 main ()
24634 {
24635
24636 fd_set set;
24637 dup2(0, 16);
24638 FD_ZERO(&set);
24639 FD_SET(16, &set);
24640 close(16);
24641 struct timespec timeout;
24642 timeout.tv_sec = 0;
24643 timeout.tv_nsec = 5000;
24644 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24645
24646 ;
24647 return 0;
24648 }
24649 _ACEOF
24650 if ac_fn_c_try_run "$LINENO"; then :
24651 gl_cv_func_pselect_detects_ebadf=yes
24652 else
24653 gl_cv_func_pselect_detects_ebadf=no
24654 fi
24655 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24656 conftest.$ac_objext conftest.beam conftest.$ac_ext
24657 fi
24658
24659
24660 fi
24661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24662 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24663 case $gl_cv_func_pselect_detects_ebadf in
24664 *yes) ;;
24665 *) REPLACE_PSELECT=1 ;;
24666 esac
24667 fi
24668
24669 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24670 REPLACE_PSELECT=1
24671 fi
24672
24673 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
24674
24675
24676
24677
24678
24679
24680
24681
24682 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
24683
24684 fi
24685
24686
24687
24688
24689
24690 GNULIB_PSELECT=1
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700 LIB_PTHREAD_SIGMASK=
24701
24702
24703
24704
24705 if test "$gl_threads_api" = posix; then
24706 if test $ac_cv_func_pthread_sigmask = yes; then
24707 :
24708 else
24709 if test -n "$LIBMULTITHREAD"; then
24710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
24711 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
24712 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
24713 $as_echo_n "(cached) " >&6
24714 else
24715 gl_save_LIBS="$LIBS"
24716 LIBS="$LIBS $LIBMULTITHREAD"
24717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24718 /* end confdefs.h. */
24719 #include <pthread.h>
24720 #include <signal.h>
24721
24722 int
24723 main ()
24724 {
24725 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
24726 ;
24727 return 0;
24728 }
24729
24730 _ACEOF
24731 if ac_fn_c_try_link "$LINENO"; then :
24732 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
24733 else
24734 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
24735 fi
24736 rm -f core conftest.err conftest.$ac_objext \
24737 conftest$ac_exeext conftest.$ac_ext
24738 LIBS="$gl_save_LIBS"
24739
24740 fi
24741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
24742 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
24743 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
24744 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
24745 else
24746 HAVE_PTHREAD_SIGMASK=0
24747 fi
24748 else
24749 HAVE_PTHREAD_SIGMASK=0
24750 fi
24751 fi
24752 else
24753 if test $ac_cv_func_pthread_sigmask = yes; then
24754 REPLACE_PTHREAD_SIGMASK=1
24755 else
24756 HAVE_PTHREAD_SIGMASK=0
24757 fi
24758 fi
24759
24760
24761
24762
24763 if test $HAVE_PTHREAD_SIGMASK = 1; then
24764
24765
24766 if test -z "$LIB_PTHREAD_SIGMASK"; then
24767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
24768 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
24769 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
24770 $as_echo_n "(cached) " >&6
24771 else
24772
24773 if test "$cross_compiling" = yes; then :
24774
24775 case "$host_os" in
24776 freebsd* | hpux* | solaris | solaris2.[2-9]*)
24777 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
24778 *)
24779 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
24780 esac
24781
24782 else
24783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24784 /* end confdefs.h. */
24785
24786 #include <pthread.h>
24787 #include <signal.h>
24788 #include <stddef.h>
24789 int main ()
24790 {
24791 sigset_t set;
24792 sigemptyset (&set);
24793 return pthread_sigmask (1729, &set, NULL) != 0;
24794 }
24795 _ACEOF
24796 if ac_fn_c_try_run "$LINENO"; then :
24797 gl_cv_func_pthread_sigmask_in_libc_works=no
24798 else
24799 gl_cv_func_pthread_sigmask_in_libc_works=yes
24800 fi
24801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24802 conftest.$ac_objext conftest.beam conftest.$ac_ext
24803 fi
24804
24805
24806 fi
24807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
24808 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
24809 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
24810 *no)
24811 REPLACE_PTHREAD_SIGMASK=1
24812
24813 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
24814
24815 ;;
24816 esac
24817 fi
24818
24819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
24820 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
24821 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
24822 $as_echo_n "(cached) " >&6
24823 else
24824
24825 gl_save_LIBS="$LIBS"
24826 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
24827 if test "$cross_compiling" = yes; then :
24828 case "$host_os" in
24829 cygwin*)
24830 gl_cv_func_pthread_sigmask_return_works="guessing no";;
24831 *)
24832 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
24833 esac
24834
24835 else
24836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24837 /* end confdefs.h. */
24838
24839 #include <pthread.h>
24840 #include <signal.h>
24841 #include <stddef.h>
24842 int main ()
24843 {
24844 sigset_t set;
24845 sigemptyset (&set);
24846 if (pthread_sigmask (1729, &set, NULL) == -1)
24847 return 1;
24848 return 0;
24849 }
24850 _ACEOF
24851 if ac_fn_c_try_run "$LINENO"; then :
24852 gl_cv_func_pthread_sigmask_return_works=yes
24853 else
24854 gl_cv_func_pthread_sigmask_return_works=no
24855 fi
24856 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24857 conftest.$ac_objext conftest.beam conftest.$ac_ext
24858 fi
24859
24860 LIBS="$gl_save_LIBS"
24861
24862 fi
24863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
24864 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
24865 case "$gl_cv_func_pthread_sigmask_return_works" in
24866 *no)
24867 REPLACE_PTHREAD_SIGMASK=1
24868
24869 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
24870
24871 ;;
24872 esac
24873
24874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
24875 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
24876 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
24877 $as_echo_n "(cached) " >&6
24878 else
24879
24880 case "$host_os" in
24881 irix*)
24882 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
24883 *)
24884 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
24885 esac
24886 gl_save_LIBS="$LIBS"
24887 LIBS="$LIBS $LIBMULTITHREAD"
24888 if test "$cross_compiling" = yes; then :
24889 :
24890 else
24891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24892 /* end confdefs.h. */
24893
24894 #include <pthread.h>
24895 #include <signal.h>
24896 #include <stdio.h>
24897 #include <stdlib.h>
24898 #include <unistd.h>
24899 static volatile int sigint_occurred;
24900 static void
24901 sigint_handler (int sig)
24902 {
24903 sigint_occurred++;
24904 }
24905 int main ()
24906 {
24907 sigset_t set;
24908 int pid = getpid ();
24909 char command[80];
24910 signal (SIGINT, sigint_handler);
24911 sigemptyset (&set);
24912 sigaddset (&set, SIGINT);
24913 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
24914 return 1;
24915 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
24916 if (!(system (command) == 0))
24917 return 2;
24918 sleep (2);
24919 if (!(sigint_occurred == 0))
24920 return 3;
24921 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
24922 return 4;
24923 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
24924 return 5;
24925 return 0;
24926 }
24927 _ACEOF
24928 if ac_fn_c_try_run "$LINENO"; then :
24929 :
24930 else
24931 gl_cv_func_pthread_sigmask_unblock_works=no
24932 fi
24933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24934 conftest.$ac_objext conftest.beam conftest.$ac_ext
24935 fi
24936
24937 LIBS="$gl_save_LIBS"
24938
24939 fi
24940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
24941 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
24942 case "$gl_cv_func_pthread_sigmask_unblock_works" in
24943 *no)
24944 REPLACE_PTHREAD_SIGMASK=1
24945
24946 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
24947
24948 ;;
24949 esac
24950 fi
24951
24952 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
24953
24954
24955
24956
24957
24958
24959
24960
24961 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
24962
24963
24964 if test $HAVE_PTHREAD_SIGMASK = 1; then
24965
24966 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
24967
24968 fi
24969
24970 fi
24971
24972
24973
24974
24975
24976 GNULIB_PTHREAD_SIGMASK=1
24977
24978
24979
24980
24981
24982
24983
24984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
24985 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
24986 if test "${gl_cv_func_svid_putenv+set}" = set; then :
24987 $as_echo_n "(cached) " >&6
24988 else
24989 if test "$cross_compiling" = yes; then :
24990 case "$host_os" in
24991 # Guess yes on glibc systems.
24992 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
24993 # If we don't know, assume the worst.
24994 *) gl_cv_func_svid_putenv="guessing no" ;;
24995 esac
24996
24997 else
24998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24999 /* end confdefs.h. */
25000 $ac_includes_default
25001 int
25002 main ()
25003 {
25004
25005 /* Put it in env. */
25006 if (putenv ("CONFTEST_putenv=val"))
25007 return 1;
25008
25009 /* Try to remove it. */
25010 if (putenv ("CONFTEST_putenv"))
25011 return 2;
25012
25013 /* Make sure it was deleted. */
25014 if (getenv ("CONFTEST_putenv") != 0)
25015 return 3;
25016
25017 return 0;
25018
25019 ;
25020 return 0;
25021 }
25022 _ACEOF
25023 if ac_fn_c_try_run "$LINENO"; then :
25024 gl_cv_func_svid_putenv=yes
25025 else
25026 gl_cv_func_svid_putenv=no
25027 fi
25028 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25029 conftest.$ac_objext conftest.beam conftest.$ac_ext
25030 fi
25031
25032
25033 fi
25034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
25035 $as_echo "$gl_cv_func_svid_putenv" >&6; }
25036 case "$gl_cv_func_svid_putenv" in
25037 *yes) ;;
25038 *)
25039 REPLACE_PUTENV=1
25040 ;;
25041 esac
25042
25043 if test $REPLACE_PUTENV = 1; then
25044
25045
25046
25047
25048
25049
25050
25051
25052 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
25053
25054
25055 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
25056 if test "x$ac_cv_have_decl__putenv" = x""yes; then :
25057 ac_have_decl=1
25058 else
25059 ac_have_decl=0
25060 fi
25061
25062 cat >>confdefs.h <<_ACEOF
25063 #define HAVE_DECL__PUTENV $ac_have_decl
25064 _ACEOF
25065
25066
25067 fi
25068
25069
25070
25071
25072
25073 GNULIB_PUTENV=1
25074
25075
25076
25077
25078
25079
25080 # Check whether --enable-acl was given.
25081 if test "${enable_acl+set}" = set; then :
25082 enableval=$enable_acl;
25083 else
25084 enable_acl=auto
25085 fi
25086
25087
25088 LIB_ACL=
25089 use_acl=0
25090 if test "x$enable_acl" != "xno"; then
25091 for ac_header in sys/acl.h
25092 do :
25093 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25094 if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
25095 cat >>confdefs.h <<_ACEOF
25096 #define HAVE_SYS_ACL_H 1
25097 _ACEOF
25098
25099 fi
25100
25101 done
25102
25103 if test $ac_cv_header_sys_acl_h = yes; then
25104 ac_save_LIBS=$LIBS
25105
25106 if test $use_acl = 0; then
25107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25108 $as_echo_n "checking for library containing acl_get_file... " >&6; }
25109 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25110 $as_echo_n "(cached) " >&6
25111 else
25112 ac_func_search_save_LIBS=$LIBS
25113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25114 /* end confdefs.h. */
25115
25116 /* Override any GCC internal prototype to avoid an error.
25117 Use char because int might match the return type of a GCC
25118 builtin and then its argument prototype would still apply. */
25119 #ifdef __cplusplus
25120 extern "C"
25121 #endif
25122 char acl_get_file ();
25123 int
25124 main ()
25125 {
25126 return acl_get_file ();
25127 ;
25128 return 0;
25129 }
25130 _ACEOF
25131 for ac_lib in '' acl pacl; do
25132 if test -z "$ac_lib"; then
25133 ac_res="none required"
25134 else
25135 ac_res=-l$ac_lib
25136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25137 fi
25138 if ac_fn_c_try_link "$LINENO"; then :
25139 ac_cv_search_acl_get_file=$ac_res
25140 fi
25141 rm -f core conftest.err conftest.$ac_objext \
25142 conftest$ac_exeext
25143 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25144 break
25145 fi
25146 done
25147 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25148
25149 else
25150 ac_cv_search_acl_get_file=no
25151 fi
25152 rm conftest.$ac_ext
25153 LIBS=$ac_func_search_save_LIBS
25154 fi
25155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25156 $as_echo "$ac_cv_search_acl_get_file" >&6; }
25157 ac_res=$ac_cv_search_acl_get_file
25158 if test "$ac_res" != no; then :
25159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25160 if test "$ac_cv_search_acl_get_file" != "none required"; then
25161 LIB_ACL=$ac_cv_search_acl_get_file
25162 fi
25163 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25164 acl_free acl_from_mode acl_from_text \
25165 acl_delete_def_file acl_extended_file \
25166 acl_delete_fd_np acl_delete_file_np \
25167 acl_copy_ext_native acl_create_entry_np \
25168 acl_to_short_text acl_free_text
25169 do :
25170 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25172 eval as_val=\$$as_ac_var
25173 if test "x$as_val" = x""yes; then :
25174 cat >>confdefs.h <<_ACEOF
25175 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25176 _ACEOF
25177
25178 fi
25179 done
25180
25181 # If the acl_get_file bug is detected, don't enable the ACL support.
25182
25183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25184 $as_echo_n "checking for working acl_get_file... " >&6; }
25185 if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
25186 $as_echo_n "(cached) " >&6
25187 else
25188 if test "$cross_compiling" = yes; then :
25189 gl_cv_func_working_acl_get_file=cross-compiling
25190 else
25191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25192 /* end confdefs.h. */
25193 #include <sys/types.h>
25194 #include <sys/acl.h>
25195 #include <errno.h>
25196
25197 int
25198 main ()
25199 {
25200 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25201 return 1;
25202 return 0;
25203
25204 ;
25205 return 0;
25206 }
25207 _ACEOF
25208 if ac_fn_c_try_run "$LINENO"; then :
25209 gl_cv_func_working_acl_get_file=yes
25210 else
25211 gl_cv_func_working_acl_get_file=no
25212 fi
25213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25214 conftest.$ac_objext conftest.beam conftest.$ac_ext
25215 fi
25216
25217 fi
25218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25219 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25220
25221 if test $gl_cv_func_working_acl_get_file = yes; then :
25222 use_acl=1
25223 fi
25224
25225 if test $use_acl = 1; then
25226 for ac_header in acl/libacl.h
25227 do :
25228 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25229 if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
25230 cat >>confdefs.h <<_ACEOF
25231 #define HAVE_ACL_LIBACL_H 1
25232 _ACEOF
25233
25234 fi
25235
25236 done
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246 for ac_func in acl_entries
25247 do :
25248 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25249 if test "x$ac_cv_func_acl_entries" = x""yes; then :
25250 cat >>confdefs.h <<_ACEOF
25251 #define HAVE_ACL_ENTRIES 1
25252 _ACEOF
25253
25254 else
25255
25256 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25257
25258 fi
25259 done
25260
25261
25262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25263 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25264 if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
25265 $as_echo_n "(cached) " >&6
25266 else
25267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25268 /* end confdefs.h. */
25269 #include <sys/types.h>
25270 #include <sys/acl.h>
25271 int type = ACL_FIRST_ENTRY;
25272 int
25273 main ()
25274 {
25275
25276 ;
25277 return 0;
25278 }
25279 _ACEOF
25280 if ac_fn_c_try_compile "$LINENO"; then :
25281 gl_cv_acl_ACL_FIRST_ENTRY=yes
25282 else
25283 gl_cv_acl_ACL_FIRST_ENTRY=no
25284 fi
25285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25286 fi
25287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25288 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25289 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25290
25291 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25292
25293 fi
25294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25295 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25296 if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25297 $as_echo_n "(cached) " >&6
25298 else
25299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25300 /* end confdefs.h. */
25301 #include <sys/types.h>
25302 #include <sys/acl.h>
25303 int type = ACL_TYPE_EXTENDED;
25304 int
25305 main ()
25306 {
25307
25308 ;
25309 return 0;
25310 }
25311 _ACEOF
25312 if ac_fn_c_try_compile "$LINENO"; then :
25313 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25314 else
25315 gl_cv_acl_ACL_TYPE_EXTENDED=no
25316 fi
25317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25318 fi
25319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25320 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25321 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25322
25323 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25324
25325 fi
25326 else
25327 LIB_ACL=
25328 fi
25329
25330 fi
25331
25332 fi
25333
25334 if test $use_acl = 0; then
25335 for ac_func in facl
25336 do :
25337 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25338 if test "x$ac_cv_func_facl" = x""yes; then :
25339 cat >>confdefs.h <<_ACEOF
25340 #define HAVE_FACL 1
25341 _ACEOF
25342
25343 fi
25344 done
25345
25346 if test $ac_cv_func_facl = yes; then
25347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25348 $as_echo_n "checking for library containing acl_trivial... " >&6; }
25349 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25350 $as_echo_n "(cached) " >&6
25351 else
25352 ac_func_search_save_LIBS=$LIBS
25353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25354 /* end confdefs.h. */
25355
25356 /* Override any GCC internal prototype to avoid an error.
25357 Use char because int might match the return type of a GCC
25358 builtin and then its argument prototype would still apply. */
25359 #ifdef __cplusplus
25360 extern "C"
25361 #endif
25362 char acl_trivial ();
25363 int
25364 main ()
25365 {
25366 return acl_trivial ();
25367 ;
25368 return 0;
25369 }
25370 _ACEOF
25371 for ac_lib in '' sec; do
25372 if test -z "$ac_lib"; then
25373 ac_res="none required"
25374 else
25375 ac_res=-l$ac_lib
25376 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25377 fi
25378 if ac_fn_c_try_link "$LINENO"; then :
25379 ac_cv_search_acl_trivial=$ac_res
25380 fi
25381 rm -f core conftest.err conftest.$ac_objext \
25382 conftest$ac_exeext
25383 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25384 break
25385 fi
25386 done
25387 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25388
25389 else
25390 ac_cv_search_acl_trivial=no
25391 fi
25392 rm conftest.$ac_ext
25393 LIBS=$ac_func_search_save_LIBS
25394 fi
25395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25396 $as_echo "$ac_cv_search_acl_trivial" >&6; }
25397 ac_res=$ac_cv_search_acl_trivial
25398 if test "$ac_res" != no; then :
25399 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25400 if test "$ac_cv_search_acl_trivial" != "none required"; then
25401 LIB_ACL=$ac_cv_search_acl_trivial
25402 fi
25403
25404 fi
25405
25406 for ac_func in acl_trivial
25407 do :
25408 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25409 if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25410 cat >>confdefs.h <<_ACEOF
25411 #define HAVE_ACL_TRIVIAL 1
25412 _ACEOF
25413
25414 fi
25415 done
25416
25417 use_acl=1
25418 fi
25419 fi
25420
25421 if test $use_acl = 0; then
25422 for ac_func in getacl
25423 do :
25424 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25425 if test "x$ac_cv_func_getacl" = x""yes; then :
25426 cat >>confdefs.h <<_ACEOF
25427 #define HAVE_GETACL 1
25428 _ACEOF
25429
25430 fi
25431 done
25432
25433 if test $ac_cv_func_getacl = yes; then
25434 use_acl=1
25435 fi
25436 for ac_header in aclv.h
25437 do :
25438 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25439 "
25440 if test "x$ac_cv_header_aclv_h" = x""yes; then :
25441 cat >>confdefs.h <<_ACEOF
25442 #define HAVE_ACLV_H 1
25443 _ACEOF
25444
25445 fi
25446
25447 done
25448
25449 fi
25450
25451 if test $use_acl = 0; then
25452 for ac_func in aclx_get
25453 do :
25454 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25455 if test "x$ac_cv_func_aclx_get" = x""yes; then :
25456 cat >>confdefs.h <<_ACEOF
25457 #define HAVE_ACLX_GET 1
25458 _ACEOF
25459
25460 fi
25461 done
25462
25463 if test $ac_cv_func_aclx_get = yes; then
25464 use_acl=1
25465 fi
25466 fi
25467
25468 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25469 for ac_func in statacl
25470 do :
25471 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25472 if test "x$ac_cv_func_statacl" = x""yes; then :
25473 cat >>confdefs.h <<_ACEOF
25474 #define HAVE_STATACL 1
25475 _ACEOF
25476
25477 fi
25478 done
25479
25480 if test $ac_cv_func_statacl = yes; then
25481 use_acl=1
25482 fi
25483 fi
25484
25485 if test $use_acl = 0; then
25486 for ac_func in aclsort
25487 do :
25488 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25489 if test "x$ac_cv_func_aclsort" = x""yes; then :
25490 cat >>confdefs.h <<_ACEOF
25491 #define HAVE_ACLSORT 1
25492 _ACEOF
25493
25494 fi
25495 done
25496
25497 if test $ac_cv_func_aclsort = yes; then
25498 use_acl=1
25499 fi
25500 fi
25501
25502 LIBS=$ac_save_LIBS
25503 fi
25504 if test "x$enable_acl$use_acl" = "xyes0"; then
25505 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25506 elif test "x$enable_acl$use_acl" = "xauto0"; then
25507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25508 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25510 $as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25511 fi
25512 fi
25513
25514
25515 cat >>confdefs.h <<_ACEOF
25516 #define USE_ACL $use_acl
25517 _ACEOF
25518
25519 USE_ACL=$use_acl
25520
25521
25522
25523
25524
25525 if test $ac_cv_func_readlink = no; then
25526 HAVE_READLINK=0
25527 else
25528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25529 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25530 if test "${gl_cv_decl_readlink_works+set}" = set; then :
25531 $as_echo_n "(cached) " >&6
25532 else
25533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25534 /* end confdefs.h. */
25535 #include <unistd.h>
25536 /* Cause compilation failure if original declaration has wrong type. */
25537 ssize_t readlink (const char *, char *, size_t);
25538 int
25539 main ()
25540 {
25541
25542 ;
25543 return 0;
25544 }
25545 _ACEOF
25546 if ac_fn_c_try_compile "$LINENO"; then :
25547 gl_cv_decl_readlink_works=yes
25548 else
25549 gl_cv_decl_readlink_works=no
25550 fi
25551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25552 fi
25553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25554 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25556 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25557 if test "${gl_cv_func_readlink_works+set}" = set; then :
25558 $as_echo_n "(cached) " >&6
25559 else
25560 # We have readlink, so assume ln -s works.
25561 ln -s conftest.no-such conftest.link
25562 ln -s conftest.link conftest.lnk2
25563 if test "$cross_compiling" = yes; then :
25564 case "$host_os" in
25565 # Guess yes on glibc systems.
25566 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25567 # If we don't know, assume the worst.
25568 *) gl_cv_func_readlink_works="guessing no" ;;
25569 esac
25570
25571 else
25572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25573 /* end confdefs.h. */
25574 #include <unistd.h>
25575
25576 int
25577 main ()
25578 {
25579 char buf[20];
25580 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25581 ;
25582 return 0;
25583 }
25584 _ACEOF
25585 if ac_fn_c_try_run "$LINENO"; then :
25586 gl_cv_func_readlink_works=yes
25587 else
25588 gl_cv_func_readlink_works=no
25589 fi
25590 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25591 conftest.$ac_objext conftest.beam conftest.$ac_ext
25592 fi
25593
25594 rm -f conftest.link conftest.lnk2
25595 fi
25596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25597 $as_echo "$gl_cv_func_readlink_works" >&6; }
25598 case "$gl_cv_func_readlink_works" in
25599 *yes)
25600 if test "$gl_cv_decl_readlink_works" != yes; then
25601 REPLACE_READLINK=1
25602 fi
25603 ;;
25604 *)
25605
25606 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25607
25608 REPLACE_READLINK=1
25609 ;;
25610 esac
25611 fi
25612
25613 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25614
25615
25616
25617
25618
25619
25620
25621
25622 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25623
25624
25625 :
25626
25627 fi
25628
25629
25630
25631
25632
25633 GNULIB_READLINK=1
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643 if test $ac_cv_func_readlinkat = no; then
25644 HAVE_READLINKAT=0
25645 fi
25646
25647 if test $HAVE_READLINKAT = 0; then
25648
25649
25650
25651
25652
25653
25654
25655
25656 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25657
25658 fi
25659
25660
25661
25662
25663
25664 GNULIB_READLINKAT=1
25665
25666
25667
25668
25669
25670
25671 for ac_func in sig2str
25672 do :
25673 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25674 if test "x$ac_cv_func_sig2str" = x""yes; then :
25675 cat >>confdefs.h <<_ACEOF
25676 #define HAVE_SIG2STR 1
25677 _ACEOF
25678
25679 fi
25680 done
25681
25682
25683 if test $ac_cv_func_sig2str = no; then
25684
25685
25686
25687
25688
25689
25690
25691
25692 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
25693
25694
25695 :
25696
25697 fi
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709 if test $gl_cv_have_include_next = yes; then
25710 gl_cv_next_signal_h='<'signal.h'>'
25711 else
25712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25713 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
25714 if test "${gl_cv_next_signal_h+set}" = set; then :
25715 $as_echo_n "(cached) " >&6
25716 else
25717
25718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25719 /* end confdefs.h. */
25720 #include <signal.h>
25721
25722 _ACEOF
25723 case "$host_os" in
25724 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25725 *) gl_absname_cpp="$ac_cpp" ;;
25726 esac
25727
25728 case "$host_os" in
25729 mingw*)
25730 gl_dirsep_regex='[/\\]'
25731 ;;
25732 *)
25733 gl_dirsep_regex='\/'
25734 ;;
25735 esac
25736 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25737
25738 gl_header_literal_regex=`echo 'signal.h' \
25739 | sed -e "$gl_make_literal_regex_sed"`
25740 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25741 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25742 s|^/[^/]|//&|
25743 p
25744 q
25745 }'
25746 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25747 sed -n "$gl_absolute_header_sed"`'"'
25748
25749
25750 fi
25751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25752 $as_echo "$gl_cv_next_signal_h" >&6; }
25753 fi
25754 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25755
25756 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25758 gl_next_as_first_directive='<'signal.h'>'
25759 else
25760 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25761 gl_next_as_first_directive=$gl_cv_next_signal_h
25762 fi
25763 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25764
25765
25766
25767
25768
25769 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25770 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25771 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25772 #include <signal.h>
25773
25774 "
25775 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
25776
25777 else
25778 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25779 fi
25780
25781
25782
25783
25784
25785
25786
25787 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25788 #include <signal.h>
25789
25790 "
25791 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
25792
25793 else
25794 HAVE_SIGHANDLER_T=0
25795 fi
25796
25797
25798
25799
25800 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25801 /* <sys/types.h> is not needed according to POSIX, but the
25802 <sys/socket.h> in i386-unknown-freebsd4.10 and
25803 powerpc-apple-darwin5.5 required it. */
25804 #include <sys/types.h>
25805 #if HAVE_SYS_SOCKET_H
25806 # include <sys/socket.h>
25807 #elif HAVE_WS2TCPIP_H
25808 # include <ws2tcpip.h>
25809 #endif
25810
25811 "
25812 if test "x$ac_cv_type_socklen_t" = x""yes; then :
25813
25814 else
25815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25816 $as_echo_n "checking for socklen_t equivalent... " >&6; }
25817 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
25818 $as_echo_n "(cached) " >&6
25819 else
25820 # Systems have either "struct sockaddr *" or
25821 # "void *" as the second argument to getpeername
25822 gl_cv_socklen_t_equiv=
25823 for arg2 in "struct sockaddr" void; do
25824 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25826 /* end confdefs.h. */
25827 #include <sys/types.h>
25828 #include <sys/socket.h>
25829
25830 int getpeername (int, $arg2 *, $t *);
25831 int
25832 main ()
25833 {
25834 $t len;
25835 getpeername (0, 0, &len);
25836 ;
25837 return 0;
25838 }
25839 _ACEOF
25840 if ac_fn_c_try_compile "$LINENO"; then :
25841 gl_cv_socklen_t_equiv="$t"
25842 fi
25843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25844 test "$gl_cv_socklen_t_equiv" != "" && break
25845 done
25846 test "$gl_cv_socklen_t_equiv" != "" && break
25847 done
25848
25849 fi
25850
25851 if test "$gl_cv_socklen_t_equiv" = ""; then
25852 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25853 fi
25854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25855 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
25856
25857 cat >>confdefs.h <<_ACEOF
25858 #define socklen_t $gl_cv_socklen_t_equiv
25859 _ACEOF
25860
25861 fi
25862
25863
25864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25865 $as_echo_n "checking for ssize_t... " >&6; }
25866 if test "${gt_cv_ssize_t+set}" = set; then :
25867 $as_echo_n "(cached) " >&6
25868 else
25869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25870 /* end confdefs.h. */
25871 #include <sys/types.h>
25872 int
25873 main ()
25874 {
25875 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25876 return !x;
25877 ;
25878 return 0;
25879 }
25880 _ACEOF
25881 if ac_fn_c_try_compile "$LINENO"; then :
25882 gt_cv_ssize_t=yes
25883 else
25884 gt_cv_ssize_t=no
25885 fi
25886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25887 fi
25888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25889 $as_echo "$gt_cv_ssize_t" >&6; }
25890 if test $gt_cv_ssize_t = no; then
25891
25892 $as_echo "#define ssize_t int" >>confdefs.h
25893
25894 fi
25895
25896
25897
25898
25899
25900 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
25901 #include <sys/stat.h>
25902 "
25903 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
25904
25905 cat >>confdefs.h <<_ACEOF
25906 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25907 _ACEOF
25908
25909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25910 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25911 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
25912 $as_echo_n "(cached) " >&6
25913 else
25914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25915 /* end confdefs.h. */
25916
25917 #include <sys/types.h>
25918 #include <sys/stat.h>
25919 #if HAVE_SYS_TIME_H
25920 # include <sys/time.h>
25921 #endif
25922 #include <time.h>
25923 struct timespec ts;
25924 struct stat st;
25925
25926 int
25927 main ()
25928 {
25929
25930 st.st_atim = ts;
25931
25932 ;
25933 return 0;
25934 }
25935 _ACEOF
25936 if ac_fn_c_try_compile "$LINENO"; then :
25937 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25938 else
25939 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25940 fi
25941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25942 fi
25943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25944 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25945 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25946
25947 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25948
25949 fi
25950 else
25951 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
25952 #include <sys/stat.h>
25953 "
25954 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
25955
25956 cat >>confdefs.h <<_ACEOF
25957 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25958 _ACEOF
25959
25960
25961 else
25962 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25963 #include <sys/stat.h>
25964 "
25965 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
25966
25967 cat >>confdefs.h <<_ACEOF
25968 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25969 _ACEOF
25970
25971
25972 else
25973 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
25974 #include <sys/stat.h>
25975 "
25976 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
25977
25978 cat >>confdefs.h <<_ACEOF
25979 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25980 _ACEOF
25981
25982
25983 fi
25984
25985 fi
25986
25987 fi
25988
25989 fi
25990
25991
25992
25993
25994
25995 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
25996 #include <sys/stat.h>
25997 "
25998 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
25999
26000 cat >>confdefs.h <<_ACEOF
26001 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
26002 _ACEOF
26003
26004
26005 else
26006 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26007 #include <sys/stat.h>
26008 "
26009 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
26010
26011 cat >>confdefs.h <<_ACEOF
26012 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
26013 _ACEOF
26014
26015
26016 else
26017 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
26018 #include <sys/stat.h>
26019 "
26020 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
26021
26022 cat >>confdefs.h <<_ACEOF
26023 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
26024 _ACEOF
26025
26026
26027 fi
26028
26029 fi
26030
26031 fi
26032
26033
26034
26035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
26036 $as_echo_n "checking for working stdalign.h... " >&6; }
26037 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
26038 $as_echo_n "(cached) " >&6
26039 else
26040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26041 /* end confdefs.h. */
26042 #include <stdalign.h>
26043 #include <stddef.h>
26044
26045 /* Test that alignof yields a result consistent with offsetof.
26046 This catches GCC bug 52023
26047 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
26048 #ifdef __cplusplus
26049 template <class t> struct alignof_helper { char a; t b; };
26050 # define ao(type) offsetof (alignof_helper<type>, b)
26051 #else
26052 # define ao(type) offsetof (struct { char a; type b; }, b)
26053 #endif
26054 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
26055 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
26056 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
26057
26058 /* Test _Alignas only on platforms where gnulib can help. */
26059 #if \
26060 ((defined __cplusplus && 201103 <= __cplusplus) \
26061 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
26062 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
26063 struct alignas_test { char c; char alignas (8) alignas_8; };
26064 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
26065 ? 1 : -1];
26066 #endif
26067
26068 int
26069 main ()
26070 {
26071
26072 ;
26073 return 0;
26074 }
26075 _ACEOF
26076 if ac_fn_c_try_compile "$LINENO"; then :
26077 gl_cv_header_working_stdalign_h=yes
26078 else
26079 gl_cv_header_working_stdalign_h=no
26080 fi
26081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26082 fi
26083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
26084 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
26085
26086 if test $gl_cv_header_working_stdalign_h = yes; then
26087 STDALIGN_H=''
26088 else
26089 STDALIGN_H='stdalign.h'
26090 fi
26091
26092
26093 if test -n "$STDALIGN_H"; then
26094 GL_GENERATE_STDALIGN_H_TRUE=
26095 GL_GENERATE_STDALIGN_H_FALSE='#'
26096 else
26097 GL_GENERATE_STDALIGN_H_TRUE='#'
26098 GL_GENERATE_STDALIGN_H_FALSE=
26099 fi
26100
26101
26102
26103 STDARG_H=''
26104 NEXT_STDARG_H='<stdarg.h>'
26105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
26106 $as_echo_n "checking for va_copy... " >&6; }
26107 if test "${gl_cv_func_va_copy+set}" = set; then :
26108 $as_echo_n "(cached) " >&6
26109 else
26110
26111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26112 /* end confdefs.h. */
26113 #include <stdarg.h>
26114 int
26115 main ()
26116 {
26117
26118 #ifndef va_copy
26119 void (*func) (va_list, va_list) = va_copy;
26120 #endif
26121
26122 ;
26123 return 0;
26124 }
26125 _ACEOF
26126 if ac_fn_c_try_compile "$LINENO"; then :
26127 gl_cv_func_va_copy=yes
26128 else
26129 gl_cv_func_va_copy=no
26130 fi
26131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26132 fi
26133
26134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
26135 $as_echo "$gl_cv_func_va_copy" >&6; }
26136 if test $gl_cv_func_va_copy = no; then
26137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26138 /* end confdefs.h. */
26139 #if defined _AIX && !defined __GNUC__
26140 AIX vaccine
26141 #endif
26142
26143 _ACEOF
26144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26145 $EGREP "vaccine" >/dev/null 2>&1; then :
26146 gl_aixcc=yes
26147 else
26148 gl_aixcc=no
26149 fi
26150 rm -f conftest*
26151
26152 if test $gl_aixcc = yes; then
26153 STDARG_H=stdarg.h
26154
26155
26156
26157
26158
26159
26160
26161
26162 if test $gl_cv_have_include_next = yes; then
26163 gl_cv_next_stdarg_h='<'stdarg.h'>'
26164 else
26165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
26166 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
26167 if test "${gl_cv_next_stdarg_h+set}" = set; then :
26168 $as_echo_n "(cached) " >&6
26169 else
26170
26171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26172 /* end confdefs.h. */
26173 #include <stdarg.h>
26174
26175 _ACEOF
26176 case "$host_os" in
26177 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26178 *) gl_absname_cpp="$ac_cpp" ;;
26179 esac
26180
26181 case "$host_os" in
26182 mingw*)
26183 gl_dirsep_regex='[/\\]'
26184 ;;
26185 *)
26186 gl_dirsep_regex='\/'
26187 ;;
26188 esac
26189 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26190
26191 gl_header_literal_regex=`echo 'stdarg.h' \
26192 | sed -e "$gl_make_literal_regex_sed"`
26193 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26194 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26195 s|^/[^/]|//&|
26196 p
26197 q
26198 }'
26199 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26200 sed -n "$gl_absolute_header_sed"`'"'
26201
26202
26203 fi
26204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
26205 $as_echo "$gl_cv_next_stdarg_h" >&6; }
26206 fi
26207 NEXT_STDARG_H=$gl_cv_next_stdarg_h
26208
26209 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26210 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26211 gl_next_as_first_directive='<'stdarg.h'>'
26212 else
26213 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26214 gl_next_as_first_directive=$gl_cv_next_stdarg_h
26215 fi
26216 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
26217
26218
26219
26220
26221 if test "$gl_cv_next_stdarg_h" = '""'; then
26222 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
26223 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
26224 fi
26225 else
26226
26227 saved_as_echo_n="$as_echo_n"
26228 as_echo_n=':'
26229 if test "${gl_cv_func___va_copy+set}" = set; then :
26230 $as_echo_n "(cached) " >&6
26231 else
26232
26233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26234 /* end confdefs.h. */
26235 #include <stdarg.h>
26236 int
26237 main ()
26238 {
26239
26240 #ifndef __va_copy
26241 error, bail out
26242 #endif
26243
26244 ;
26245 return 0;
26246 }
26247 _ACEOF
26248 if ac_fn_c_try_compile "$LINENO"; then :
26249 gl_cv_func___va_copy=yes
26250 else
26251 gl_cv_func___va_copy=no
26252 fi
26253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26254 fi
26255
26256 as_echo_n="$saved_as_echo_n"
26257
26258 if test $gl_cv_func___va_copy = yes; then
26259
26260 $as_echo "#define va_copy __va_copy" >>confdefs.h
26261
26262 else
26263
26264
26265 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
26266
26267 fi
26268 fi
26269 fi
26270
26271 if test -n "$STDARG_H"; then
26272 GL_GENERATE_STDARG_H_TRUE=
26273 GL_GENERATE_STDARG_H_FALSE='#'
26274 else
26275 GL_GENERATE_STDARG_H_TRUE='#'
26276 GL_GENERATE_STDARG_H_FALSE=
26277 fi
26278
26279
26280
26281
26282
26283
26284 # Define two additional variables used in the Makefile substitution.
26285
26286 if test "$ac_cv_header_stdbool_h" = yes; then
26287 STDBOOL_H=''
26288 else
26289 STDBOOL_H='stdbool.h'
26290 fi
26291
26292 if test -n "$STDBOOL_H"; then
26293 GL_GENERATE_STDBOOL_H_TRUE=
26294 GL_GENERATE_STDBOOL_H_FALSE='#'
26295 else
26296 GL_GENERATE_STDBOOL_H_TRUE='#'
26297 GL_GENERATE_STDBOOL_H_FALSE=
26298 fi
26299
26300
26301 if test "$ac_cv_type__Bool" = yes; then
26302 HAVE__BOOL=1
26303 else
26304 HAVE__BOOL=0
26305 fi
26306
26307
26308
26309
26310
26311 STDDEF_H=
26312 if test $gt_cv_c_wchar_t = no; then
26313 HAVE_WCHAR_T=0
26314 STDDEF_H=stddef.h
26315 fi
26316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26317 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26318 if test "${gl_cv_decl_null_works+set}" = set; then :
26319 $as_echo_n "(cached) " >&6
26320 else
26321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26322 /* end confdefs.h. */
26323 #include <stddef.h>
26324 int test[2 * (sizeof NULL == sizeof (void *)) -1];
26325
26326 int
26327 main ()
26328 {
26329
26330 ;
26331 return 0;
26332 }
26333 _ACEOF
26334 if ac_fn_c_try_compile "$LINENO"; then :
26335 gl_cv_decl_null_works=yes
26336 else
26337 gl_cv_decl_null_works=no
26338 fi
26339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26340 fi
26341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26342 $as_echo "$gl_cv_decl_null_works" >&6; }
26343 if test $gl_cv_decl_null_works = no; then
26344 REPLACE_NULL=1
26345 STDDEF_H=stddef.h
26346 fi
26347
26348 if test -n "$STDDEF_H"; then
26349 GL_GENERATE_STDDEF_H_TRUE=
26350 GL_GENERATE_STDDEF_H_FALSE='#'
26351 else
26352 GL_GENERATE_STDDEF_H_TRUE='#'
26353 GL_GENERATE_STDDEF_H_FALSE=
26354 fi
26355
26356 if test -n "$STDDEF_H"; then
26357
26358
26359
26360
26361
26362
26363
26364
26365 if test $gl_cv_have_include_next = yes; then
26366 gl_cv_next_stddef_h='<'stddef.h'>'
26367 else
26368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26369 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26370 if test "${gl_cv_next_stddef_h+set}" = set; then :
26371 $as_echo_n "(cached) " >&6
26372 else
26373
26374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26375 /* end confdefs.h. */
26376 #include <stddef.h>
26377
26378 _ACEOF
26379 case "$host_os" in
26380 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26381 *) gl_absname_cpp="$ac_cpp" ;;
26382 esac
26383
26384 case "$host_os" in
26385 mingw*)
26386 gl_dirsep_regex='[/\\]'
26387 ;;
26388 *)
26389 gl_dirsep_regex='\/'
26390 ;;
26391 esac
26392 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26393
26394 gl_header_literal_regex=`echo 'stddef.h' \
26395 | sed -e "$gl_make_literal_regex_sed"`
26396 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26397 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26398 s|^/[^/]|//&|
26399 p
26400 q
26401 }'
26402 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26403 sed -n "$gl_absolute_header_sed"`'"'
26404
26405
26406 fi
26407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26408 $as_echo "$gl_cv_next_stddef_h" >&6; }
26409 fi
26410 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26411
26412 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26413 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26414 gl_next_as_first_directive='<'stddef.h'>'
26415 else
26416 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26417 gl_next_as_first_directive=$gl_cv_next_stddef_h
26418 fi
26419 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26420
26421
26422
26423
26424 fi
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437 if test $gl_cv_have_include_next = yes; then
26438 gl_cv_next_stdio_h='<'stdio.h'>'
26439 else
26440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26441 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26442 if test "${gl_cv_next_stdio_h+set}" = set; then :
26443 $as_echo_n "(cached) " >&6
26444 else
26445
26446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26447 /* end confdefs.h. */
26448 #include <stdio.h>
26449
26450 _ACEOF
26451 case "$host_os" in
26452 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26453 *) gl_absname_cpp="$ac_cpp" ;;
26454 esac
26455
26456 case "$host_os" in
26457 mingw*)
26458 gl_dirsep_regex='[/\\]'
26459 ;;
26460 *)
26461 gl_dirsep_regex='\/'
26462 ;;
26463 esac
26464 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26465
26466 gl_header_literal_regex=`echo 'stdio.h' \
26467 | sed -e "$gl_make_literal_regex_sed"`
26468 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26469 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26470 s|^/[^/]|//&|
26471 p
26472 q
26473 }'
26474 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26475 sed -n "$gl_absolute_header_sed"`'"'
26476
26477
26478 fi
26479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26480 $as_echo "$gl_cv_next_stdio_h" >&6; }
26481 fi
26482 NEXT_STDIO_H=$gl_cv_next_stdio_h
26483
26484 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26485 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26486 gl_next_as_first_directive='<'stdio.h'>'
26487 else
26488 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26489 gl_next_as_first_directive=$gl_cv_next_stdio_h
26490 fi
26491 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26492
26493
26494
26495
26496
26497 GNULIB_FSCANF=1
26498
26499
26500 cat >>confdefs.h <<_ACEOF
26501 #define GNULIB_FSCANF 1
26502 _ACEOF
26503
26504
26505 GNULIB_SCANF=1
26506
26507
26508 cat >>confdefs.h <<_ACEOF
26509 #define GNULIB_SCANF 1
26510 _ACEOF
26511
26512
26513 GNULIB_FGETC=1
26514 GNULIB_GETC=1
26515 GNULIB_GETCHAR=1
26516 GNULIB_FGETS=1
26517 GNULIB_FREAD=1
26518
26519
26520 GNULIB_FPRINTF=1
26521 GNULIB_PRINTF=1
26522 GNULIB_VFPRINTF=1
26523 GNULIB_VPRINTF=1
26524 GNULIB_FPUTC=1
26525 GNULIB_PUTC=1
26526 GNULIB_PUTCHAR=1
26527 GNULIB_FPUTS=1
26528 GNULIB_PUTS=1
26529 GNULIB_FWRITE=1
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545 if test $gl_cv_have_include_next = yes; then
26546 gl_cv_next_stdlib_h='<'stdlib.h'>'
26547 else
26548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26549 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26550 if test "${gl_cv_next_stdlib_h+set}" = set; then :
26551 $as_echo_n "(cached) " >&6
26552 else
26553
26554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26555 /* end confdefs.h. */
26556 #include <stdlib.h>
26557
26558 _ACEOF
26559 case "$host_os" in
26560 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26561 *) gl_absname_cpp="$ac_cpp" ;;
26562 esac
26563
26564 case "$host_os" in
26565 mingw*)
26566 gl_dirsep_regex='[/\\]'
26567 ;;
26568 *)
26569 gl_dirsep_regex='\/'
26570 ;;
26571 esac
26572 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26573
26574 gl_header_literal_regex=`echo 'stdlib.h' \
26575 | sed -e "$gl_make_literal_regex_sed"`
26576 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26577 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26578 s|^/[^/]|//&|
26579 p
26580 q
26581 }'
26582 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26583 sed -n "$gl_absolute_header_sed"`'"'
26584
26585
26586 fi
26587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26588 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26589 fi
26590 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26591
26592 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26593 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26594 gl_next_as_first_directive='<'stdlib.h'>'
26595 else
26596 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26597 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26598 fi
26599 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
26610
26611
26612
26613
26614
26615
26616
26617 $as_echo "#define my_strftime nstrftime" >>confdefs.h
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629 if test "$ac_cv_have_decl_strtoimax" != yes; then
26630 HAVE_DECL_STRTOIMAX=0
26631 fi
26632
26633 if test $ac_cv_func_strtoimax = yes; then
26634 HAVE_STRTOIMAX=1
26635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26636 $as_echo_n "checking whether strtoimax works... " >&6; }
26637 if test "${gl_cv_func_strtoimax+set}" = set; then :
26638 $as_echo_n "(cached) " >&6
26639 else
26640 if test "$cross_compiling" = yes; then :
26641 case "$host_os" in
26642 # Guess no on AIX 5.
26643 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26644 # Guess yes otherwise.
26645 *) gl_cv_func_strtoimax="guessing yes" ;;
26646 esac
26647
26648 else
26649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26650 /* end confdefs.h. */
26651
26652 #include <errno.h>
26653 #include <string.h>
26654 #include <inttypes.h>
26655 int main ()
26656 {
26657 if (sizeof (intmax_t) > sizeof (int))
26658 {
26659 const char *s = "4294967295";
26660 char *p;
26661 intmax_t res;
26662 errno = 0;
26663 res = strtoimax (s, &p, 10);
26664 if (p != s + strlen (s))
26665 return 1;
26666 if (errno != 0)
26667 return 2;
26668 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26669 return 3;
26670 }
26671 else
26672 {
26673 const char *s = "2147483647";
26674 char *p;
26675 intmax_t res;
26676 errno = 0;
26677 res = strtoimax (s, &p, 10);
26678 if (p != s + strlen (s))
26679 return 1;
26680 if (errno != 0)
26681 return 2;
26682 if (res != 2147483647)
26683 return 3;
26684 }
26685 return 0;
26686 }
26687
26688 _ACEOF
26689 if ac_fn_c_try_run "$LINENO"; then :
26690 gl_cv_func_strtoimax=yes
26691 else
26692 gl_cv_func_strtoimax=no
26693 fi
26694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26695 conftest.$ac_objext conftest.beam conftest.$ac_ext
26696 fi
26697
26698
26699 fi
26700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
26701 $as_echo "$gl_cv_func_strtoimax" >&6; }
26702 case "$gl_cv_func_strtoimax" in
26703 *no) REPLACE_STRTOIMAX=1 ;;
26704 esac
26705 else
26706 HAVE_STRTOIMAX=0
26707 fi
26708
26709 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
26710
26711
26712
26713
26714
26715
26716
26717
26718 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
26719
26720
26721 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
26722 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
26723 ac_have_decl=1
26724 else
26725 ac_have_decl=0
26726 fi
26727
26728 cat >>confdefs.h <<_ACEOF
26729 #define HAVE_DECL_STRTOLL $ac_have_decl
26730 _ACEOF
26731
26732
26733
26734 fi
26735
26736
26737
26738
26739
26740 GNULIB_STRTOIMAX=1
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750 if test "$ac_cv_have_decl_strtoumax" != yes; then
26751 HAVE_DECL_STRTOUMAX=0
26752 fi
26753
26754 if test $ac_cv_func_strtoumax = no; then
26755
26756
26757
26758
26759
26760
26761
26762
26763 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
26764
26765
26766 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
26767 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
26768 ac_have_decl=1
26769 else
26770 ac_have_decl=0
26771 fi
26772
26773 cat >>confdefs.h <<_ACEOF
26774 #define HAVE_DECL_STRTOULL $ac_have_decl
26775 _ACEOF
26776
26777
26778
26779 fi
26780
26781
26782
26783
26784
26785 GNULIB_STRTOUMAX=1
26786
26787
26788
26789
26790
26791
26792
26793 if test $ac_cv_func_symlink = no; then
26794 HAVE_SYMLINK=0
26795 else
26796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
26797 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
26798 if test "${gl_cv_func_symlink_works+set}" = set; then :
26799 $as_echo_n "(cached) " >&6
26800 else
26801 if test "$cross_compiling" = yes; then :
26802 case "$host_os" in
26803 # Guess yes on glibc systems.
26804 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
26805 # If we don't know, assume the worst.
26806 *) gl_cv_func_symlink_works="guessing no" ;;
26807 esac
26808
26809 else
26810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26811 /* end confdefs.h. */
26812 #include <unistd.h>
26813
26814 int
26815 main ()
26816 {
26817 int result = 0;
26818 if (!symlink ("a", "conftest.link/"))
26819 result |= 1;
26820 if (symlink ("conftest.f", "conftest.lnk2"))
26821 result |= 2;
26822 else if (!symlink ("a", "conftest.lnk2/"))
26823 result |= 4;
26824 return result;
26825
26826 ;
26827 return 0;
26828 }
26829 _ACEOF
26830 if ac_fn_c_try_run "$LINENO"; then :
26831 gl_cv_func_symlink_works=yes
26832 else
26833 gl_cv_func_symlink_works=no
26834 fi
26835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26836 conftest.$ac_objext conftest.beam conftest.$ac_ext
26837 fi
26838
26839 rm -f conftest.f conftest.link conftest.lnk2
26840 fi
26841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
26842 $as_echo "$gl_cv_func_symlink_works" >&6; }
26843 case "$gl_cv_func_symlink_works" in
26844 *yes) ;;
26845 *)
26846 REPLACE_SYMLINK=1
26847 ;;
26848 esac
26849 fi
26850
26851 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
26852
26853
26854
26855
26856
26857
26858
26859
26860 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
26861
26862 fi
26863
26864
26865
26866
26867
26868 GNULIB_SYMLINK=1
26869
26870
26871
26872
26873
26874
26875
26876
26877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
26878 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
26879 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
26880 $as_echo_n "(cached) " >&6
26881 else
26882
26883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26884 /* end confdefs.h. */
26885 #include <sys/select.h>
26886 int
26887 main ()
26888 {
26889 struct timeval b;
26890 ;
26891 return 0;
26892 }
26893 _ACEOF
26894 if ac_fn_c_try_compile "$LINENO"; then :
26895 gl_cv_header_sys_select_h_selfcontained=yes
26896 else
26897 gl_cv_header_sys_select_h_selfcontained=no
26898 fi
26899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26900 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
26901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26902 /* end confdefs.h. */
26903 #include <sys/select.h>
26904 int
26905 main ()
26906 {
26907 int memset; int bzero;
26908 ;
26909 return 0;
26910 }
26911
26912 _ACEOF
26913 if ac_fn_c_try_compile "$LINENO"; then :
26914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26915 /* end confdefs.h. */
26916 #include <sys/select.h>
26917 int
26918 main ()
26919 {
26920
26921 #undef memset
26922 #define memset nonexistent_memset
26923 extern
26924 #ifdef __cplusplus
26925 "C"
26926 #endif
26927 void *memset (void *, int, unsigned long);
26928 #undef bzero
26929 #define bzero nonexistent_bzero
26930 extern
26931 #ifdef __cplusplus
26932 "C"
26933 #endif
26934 void bzero (void *, unsigned long);
26935 fd_set fds;
26936 FD_ZERO (&fds);
26937
26938 ;
26939 return 0;
26940 }
26941
26942 _ACEOF
26943 if ac_fn_c_try_link "$LINENO"; then :
26944
26945 else
26946 gl_cv_header_sys_select_h_selfcontained=no
26947 fi
26948 rm -f core conftest.err conftest.$ac_objext \
26949 conftest$ac_exeext conftest.$ac_ext
26950
26951 fi
26952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26953 fi
26954
26955 fi
26956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
26957 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967 if test $gl_cv_have_include_next = yes; then
26968 gl_cv_next_sys_select_h='<'sys/select.h'>'
26969 else
26970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
26971 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
26972 if test "${gl_cv_next_sys_select_h+set}" = set; then :
26973 $as_echo_n "(cached) " >&6
26974 else
26975
26976 if test $ac_cv_header_sys_select_h = yes; then
26977
26978
26979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26980 /* end confdefs.h. */
26981 #include <sys/select.h>
26982
26983 _ACEOF
26984 case "$host_os" in
26985 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26986 *) gl_absname_cpp="$ac_cpp" ;;
26987 esac
26988
26989 case "$host_os" in
26990 mingw*)
26991 gl_dirsep_regex='[/\\]'
26992 ;;
26993 *)
26994 gl_dirsep_regex='\/'
26995 ;;
26996 esac
26997 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26998
26999 gl_header_literal_regex=`echo 'sys/select.h' \
27000 | sed -e "$gl_make_literal_regex_sed"`
27001 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27002 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27003 s|^/[^/]|//&|
27004 p
27005 q
27006 }'
27007 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27008 sed -n "$gl_absolute_header_sed"`'"'
27009 else
27010 gl_cv_next_sys_select_h='<'sys/select.h'>'
27011 fi
27012
27013
27014 fi
27015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
27016 $as_echo "$gl_cv_next_sys_select_h" >&6; }
27017 fi
27018 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
27019
27020 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27021 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27022 gl_next_as_first_directive='<'sys/select.h'>'
27023 else
27024 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27025 gl_next_as_first_directive=$gl_cv_next_sys_select_h
27026 fi
27027 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
27028
27029
27030
27031
27032 if test $ac_cv_header_sys_select_h = yes; then
27033 HAVE_SYS_SELECT_H=1
27034 else
27035 HAVE_SYS_SELECT_H=0
27036 fi
27037
27038
27039
27040
27041
27042 if test $ac_cv_header_sys_socket_h != yes; then
27043 for ac_header in winsock2.h
27044 do :
27045 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27046 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
27047 cat >>confdefs.h <<_ACEOF
27048 #define HAVE_WINSOCK2_H 1
27049 _ACEOF
27050
27051 fi
27052
27053 done
27054
27055 fi
27056 if test "$ac_cv_header_winsock2_h" = yes; then
27057 HAVE_WINSOCK2_H=1
27058 UNISTD_H_HAVE_WINSOCK2_H=1
27059 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27060 else
27061 HAVE_WINSOCK2_H=0
27062 fi
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083 if test $gl_cv_have_include_next = yes; then
27084 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27085 else
27086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27087 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27088 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
27089 $as_echo_n "(cached) " >&6
27090 else
27091
27092 if test $ac_cv_header_sys_stat_h = yes; then
27093
27094
27095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27096 /* end confdefs.h. */
27097 #include <sys/stat.h>
27098
27099 _ACEOF
27100 case "$host_os" in
27101 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27102 *) gl_absname_cpp="$ac_cpp" ;;
27103 esac
27104
27105 case "$host_os" in
27106 mingw*)
27107 gl_dirsep_regex='[/\\]'
27108 ;;
27109 *)
27110 gl_dirsep_regex='\/'
27111 ;;
27112 esac
27113 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27114
27115 gl_header_literal_regex=`echo 'sys/stat.h' \
27116 | sed -e "$gl_make_literal_regex_sed"`
27117 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27118 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27119 s|^/[^/]|//&|
27120 p
27121 q
27122 }'
27123 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27124 sed -n "$gl_absolute_header_sed"`'"'
27125 else
27126 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27127 fi
27128
27129
27130 fi
27131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27132 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
27133 fi
27134 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
27135
27136 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27137 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27138 gl_next_as_first_directive='<'sys/stat.h'>'
27139 else
27140 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27141 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27142 fi
27143 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
27156
27157 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
27158
27159 fi
27160
27161 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27162 #include <sys/stat.h>
27163 "
27164 if test "x$ac_cv_type_nlink_t" = x""yes; then :
27165
27166 else
27167
27168 $as_echo "#define nlink_t int" >>confdefs.h
27169
27170 fi
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27190 "
27191 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
27192 ac_have_decl=1
27193 else
27194 ac_have_decl=0
27195 fi
27196
27197 cat >>confdefs.h <<_ACEOF
27198 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
27199 _ACEOF
27200
27201 if test $ac_cv_have_decl_localtime_r = no; then
27202 HAVE_DECL_LOCALTIME_R=0
27203 fi
27204
27205
27206 if test $ac_cv_func_localtime_r = yes; then
27207 HAVE_LOCALTIME_R=1
27208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27209 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27210 if test "${gl_cv_time_r_posix+set}" = set; then :
27211 $as_echo_n "(cached) " >&6
27212 else
27213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27214 /* end confdefs.h. */
27215 #include <time.h>
27216 int
27217 main ()
27218 {
27219 /* We don't need to append 'restrict's to the argument types,
27220 even though the POSIX signature has the 'restrict's,
27221 since C99 says they can't affect type compatibility. */
27222 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27223 if (ptr) return 0;
27224 /* Check the return type is a pointer.
27225 On HP-UX 10 it is 'int'. */
27226 *localtime_r (0, 0);
27227 ;
27228 return 0;
27229 }
27230
27231 _ACEOF
27232 if ac_fn_c_try_compile "$LINENO"; then :
27233 gl_cv_time_r_posix=yes
27234 else
27235 gl_cv_time_r_posix=no
27236 fi
27237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27238
27239 fi
27240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27241 $as_echo "$gl_cv_time_r_posix" >&6; }
27242 if test $gl_cv_time_r_posix = yes; then
27243 REPLACE_LOCALTIME_R=0
27244 else
27245 REPLACE_LOCALTIME_R=1
27246 fi
27247 else
27248 HAVE_LOCALTIME_R=0
27249 fi
27250
27251 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
27252
27253
27254
27255
27256
27257
27258
27259
27260 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27261
27262
27263 :
27264
27265 fi
27266
27267
27268
27269
27270
27271 GNULIB_TIME_R=1
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282 LIB_TIMER_TIME=
27283
27284 gl_saved_libs=$LIBS
27285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27286 $as_echo_n "checking for library containing timer_settime... " >&6; }
27287 if test "${ac_cv_search_timer_settime+set}" = set; then :
27288 $as_echo_n "(cached) " >&6
27289 else
27290 ac_func_search_save_LIBS=$LIBS
27291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27292 /* end confdefs.h. */
27293
27294 /* Override any GCC internal prototype to avoid an error.
27295 Use char because int might match the return type of a GCC
27296 builtin and then its argument prototype would still apply. */
27297 #ifdef __cplusplus
27298 extern "C"
27299 #endif
27300 char timer_settime ();
27301 int
27302 main ()
27303 {
27304 return timer_settime ();
27305 ;
27306 return 0;
27307 }
27308 _ACEOF
27309 for ac_lib in '' rt posix4; do
27310 if test -z "$ac_lib"; then
27311 ac_res="none required"
27312 else
27313 ac_res=-l$ac_lib
27314 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27315 fi
27316 if ac_fn_c_try_link "$LINENO"; then :
27317 ac_cv_search_timer_settime=$ac_res
27318 fi
27319 rm -f core conftest.err conftest.$ac_objext \
27320 conftest$ac_exeext
27321 if test "${ac_cv_search_timer_settime+set}" = set; then :
27322 break
27323 fi
27324 done
27325 if test "${ac_cv_search_timer_settime+set}" = set; then :
27326
27327 else
27328 ac_cv_search_timer_settime=no
27329 fi
27330 rm conftest.$ac_ext
27331 LIBS=$ac_func_search_save_LIBS
27332 fi
27333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27334 $as_echo "$ac_cv_search_timer_settime" >&6; }
27335 ac_res=$ac_cv_search_timer_settime
27336 if test "$ac_res" != no; then :
27337 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27338 test "$ac_cv_search_timer_settime" = "none required" ||
27339 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27340 fi
27341
27342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27343 /* end confdefs.h. */
27344
27345 #include <features.h>
27346 #ifdef __GNU_LIBRARY__
27347 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27348 && !defined __UCLIBC__
27349 Thread emulation available
27350 #endif
27351 #endif
27352
27353 _ACEOF
27354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27355 $EGREP "Thread" >/dev/null 2>&1; then :
27356 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27357 fi
27358 rm -f conftest*
27359
27360 for ac_func in timer_settime
27361 do :
27362 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27363 if test "x$ac_cv_func_timer_settime" = x""yes; then :
27364 cat >>confdefs.h <<_ACEOF
27365 #define HAVE_TIMER_SETTIME 1
27366 _ACEOF
27367
27368 fi
27369 done
27370
27371 LIBS=$gl_saved_libs
27372
27373 :
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386 if test $gl_cv_have_include_next = yes; then
27387 gl_cv_next_unistd_h='<'unistd.h'>'
27388 else
27389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27390 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27391 if test "${gl_cv_next_unistd_h+set}" = set; then :
27392 $as_echo_n "(cached) " >&6
27393 else
27394
27395 if test $ac_cv_header_unistd_h = yes; then
27396
27397
27398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27399 /* end confdefs.h. */
27400 #include <unistd.h>
27401
27402 _ACEOF
27403 case "$host_os" in
27404 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27405 *) gl_absname_cpp="$ac_cpp" ;;
27406 esac
27407
27408 case "$host_os" in
27409 mingw*)
27410 gl_dirsep_regex='[/\\]'
27411 ;;
27412 *)
27413 gl_dirsep_regex='\/'
27414 ;;
27415 esac
27416 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27417
27418 gl_header_literal_regex=`echo 'unistd.h' \
27419 | sed -e "$gl_make_literal_regex_sed"`
27420 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27421 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27422 s|^/[^/]|//&|
27423 p
27424 q
27425 }'
27426 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27427 sed -n "$gl_absolute_header_sed"`'"'
27428 else
27429 gl_cv_next_unistd_h='<'unistd.h'>'
27430 fi
27431
27432
27433 fi
27434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27435 $as_echo "$gl_cv_next_unistd_h" >&6; }
27436 fi
27437 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27438
27439 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27440 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27441 gl_next_as_first_directive='<'unistd.h'>'
27442 else
27443 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27444 gl_next_as_first_directive=$gl_cv_next_unistd_h
27445 fi
27446 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27447
27448
27449
27450
27451 if test $ac_cv_header_unistd_h = yes; then
27452 HAVE_UNISTD_H=1
27453 else
27454 HAVE_UNISTD_H=0
27455 fi
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467 if test $ac_cv_have_decl_unsetenv = no; then
27468 HAVE_DECL_UNSETENV=0
27469 fi
27470 for ac_func in unsetenv
27471 do :
27472 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27473 if test "x$ac_cv_func_unsetenv" = x""yes; then :
27474 cat >>confdefs.h <<_ACEOF
27475 #define HAVE_UNSETENV 1
27476 _ACEOF
27477
27478 fi
27479 done
27480
27481 if test $ac_cv_func_unsetenv = no; then
27482 HAVE_UNSETENV=0
27483 else
27484 HAVE_UNSETENV=1
27485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27486 $as_echo_n "checking for unsetenv() return type... " >&6; }
27487 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27488 $as_echo_n "(cached) " >&6
27489 else
27490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27491 /* end confdefs.h. */
27492
27493 #undef _BSD
27494 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27495 #include <stdlib.h>
27496 extern
27497 #ifdef __cplusplus
27498 "C"
27499 #endif
27500 int unsetenv (const char *name);
27501
27502 int
27503 main ()
27504 {
27505
27506 ;
27507 return 0;
27508 }
27509 _ACEOF
27510 if ac_fn_c_try_compile "$LINENO"; then :
27511 gt_cv_func_unsetenv_ret='int'
27512 else
27513 gt_cv_func_unsetenv_ret='void'
27514 fi
27515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27516 fi
27517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27518 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27519 if test $gt_cv_func_unsetenv_ret = 'void'; then
27520
27521 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27522
27523 REPLACE_UNSETENV=1
27524 fi
27525
27526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27527 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27528 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27529 $as_echo_n "(cached) " >&6
27530 else
27531 if test "$cross_compiling" = yes; then :
27532 case "$host_os" in
27533 # Guess yes on glibc systems.
27534 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27535 # If we don't know, assume the worst.
27536 *) gl_cv_func_unsetenv_works="guessing no" ;;
27537 esac
27538
27539 else
27540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27541 /* end confdefs.h. */
27542
27543 #include <stdlib.h>
27544 #include <errno.h>
27545 extern char **environ;
27546
27547 int
27548 main ()
27549 {
27550
27551 char entry1[] = "a=1";
27552 char entry2[] = "b=2";
27553 char *env[] = { entry1, entry2, NULL };
27554 if (putenv ((char *) "a=1")) return 1;
27555 if (putenv (entry2)) return 2;
27556 entry2[0] = 'a';
27557 unsetenv ("a");
27558 if (getenv ("a")) return 3;
27559 if (!unsetenv ("") || errno != EINVAL) return 4;
27560 entry2[0] = 'b';
27561 environ = env;
27562 if (!getenv ("a")) return 5;
27563 entry2[0] = 'a';
27564 unsetenv ("a");
27565 if (getenv ("a")) return 6;
27566
27567 ;
27568 return 0;
27569 }
27570 _ACEOF
27571 if ac_fn_c_try_run "$LINENO"; then :
27572 gl_cv_func_unsetenv_works=yes
27573 else
27574 gl_cv_func_unsetenv_works=no
27575 fi
27576 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27577 conftest.$ac_objext conftest.beam conftest.$ac_ext
27578 fi
27579
27580 fi
27581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27582 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27583 case "$gl_cv_func_unsetenv_works" in
27584 *yes) ;;
27585 *)
27586 REPLACE_UNSETENV=1
27587 ;;
27588 esac
27589 fi
27590
27591 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27592
27593
27594
27595
27596
27597
27598
27599
27600 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27601
27602
27603
27604
27605
27606 fi
27607
27608
27609
27610
27611
27612 GNULIB_UNSETENV=1
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27626 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27627 if test "${gl_cv_func_futimesat_works+set}" = set; then :
27628 $as_echo_n "(cached) " >&6
27629 else
27630 touch conftest.file
27631 if test "$cross_compiling" = yes; then :
27632 case "$host_os" in
27633 # Guess yes on glibc systems.
27634 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27635 # If we don't know, assume the worst.
27636 *) gl_cv_func_futimesat_works="guessing no" ;;
27637 esac
27638
27639 else
27640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27641 /* end confdefs.h. */
27642
27643 #include <stddef.h>
27644 #include <sys/times.h>
27645 #include <fcntl.h>
27646
27647 int
27648 main ()
27649 {
27650 int fd = open ("conftest.file", O_RDWR);
27651 if (fd < 0) return 1;
27652 if (futimesat (fd, NULL, NULL)) return 2;
27653
27654 ;
27655 return 0;
27656 }
27657 _ACEOF
27658 if ac_fn_c_try_run "$LINENO"; then :
27659 gl_cv_func_futimesat_works=yes
27660 else
27661 gl_cv_func_futimesat_works=no
27662 fi
27663 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27664 conftest.$ac_objext conftest.beam conftest.$ac_ext
27665 fi
27666
27667 rm -f conftest.file
27668 fi
27669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27670 $as_echo "$gl_cv_func_futimesat_works" >&6; }
27671 case "$gl_cv_func_futimesat_works" in
27672 *yes) ;;
27673 *)
27674
27675 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
27676
27677 ;;
27678 esac
27679 fi
27680
27681 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
27682 gl_gnulib_enabled_dosname=false
27683 gl_gnulib_enabled_euidaccess=false
27684 gl_gnulib_enabled_getdtablesize=false
27685 gl_gnulib_enabled_getgroups=false
27686 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
27687 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
27688 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
27689 gl_gnulib_enabled_pathmax=false
27690 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
27691 gl_gnulib_enabled_secure_getenv=false
27692 gl_gnulib_enabled_stat=false
27693 gl_gnulib_enabled_strtoll=false
27694 gl_gnulib_enabled_strtoull=false
27695 gl_gnulib_enabled_tempname=false
27696 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
27697 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
27698 {
27699 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27700
27701
27702
27703
27704
27705
27706
27707
27708 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
27709
27710 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
27711 fi
27712 }
27713 func_gl_gnulib_m4code_dosname ()
27714 {
27715 if ! $gl_gnulib_enabled_dosname; then
27716 gl_gnulib_enabled_dosname=true
27717 fi
27718 }
27719 func_gl_gnulib_m4code_euidaccess ()
27720 {
27721 if ! $gl_gnulib_enabled_euidaccess; then
27722
27723
27724
27725
27726
27727 for ac_func in euidaccess
27728 do :
27729 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
27730 if test "x$ac_cv_func_euidaccess" = x""yes; then :
27731 cat >>confdefs.h <<_ACEOF
27732 #define HAVE_EUIDACCESS 1
27733 _ACEOF
27734
27735 fi
27736 done
27737
27738 if test $ac_cv_func_euidaccess = no; then
27739 HAVE_EUIDACCESS=0
27740 fi
27741
27742 if test $HAVE_EUIDACCESS = 0; then
27743
27744
27745
27746
27747
27748
27749
27750
27751 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
27752
27753
27754
27755 for ac_header in libgen.h
27756 do :
27757 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
27758 if test "x$ac_cv_header_libgen_h" = x""yes; then :
27759 cat >>confdefs.h <<_ACEOF
27760 #define HAVE_LIBGEN_H 1
27761 _ACEOF
27762
27763 fi
27764
27765 done
27766
27767
27768 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27769 if test "x$ac_cv_func_getgroups" = x""yes; then :
27770
27771 fi
27772
27773
27774 # If we don't yet have getgroups, see if it's in -lbsd.
27775 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27776 ac_save_LIBS=$LIBS
27777 if test $ac_cv_func_getgroups = no; then
27778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27779 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27780 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27781 $as_echo_n "(cached) " >&6
27782 else
27783 ac_check_lib_save_LIBS=$LIBS
27784 LIBS="-lbsd $LIBS"
27785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27786 /* end confdefs.h. */
27787
27788 /* Override any GCC internal prototype to avoid an error.
27789 Use char because int might match the return type of a GCC
27790 builtin and then its argument prototype would still apply. */
27791 #ifdef __cplusplus
27792 extern "C"
27793 #endif
27794 char getgroups ();
27795 int
27796 main ()
27797 {
27798 return getgroups ();
27799 ;
27800 return 0;
27801 }
27802 _ACEOF
27803 if ac_fn_c_try_link "$LINENO"; then :
27804 ac_cv_lib_bsd_getgroups=yes
27805 else
27806 ac_cv_lib_bsd_getgroups=no
27807 fi
27808 rm -f core conftest.err conftest.$ac_objext \
27809 conftest$ac_exeext conftest.$ac_ext
27810 LIBS=$ac_check_lib_save_LIBS
27811 fi
27812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27813 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27814 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27815 GETGROUPS_LIB=-lbsd
27816 fi
27817
27818 fi
27819
27820 # Run the program to test the functionality of the system-supplied
27821 # getgroups function only if there is such a function.
27822 if test $ac_cv_func_getgroups = yes; then
27823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27824 $as_echo_n "checking for working getgroups... " >&6; }
27825 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27826 $as_echo_n "(cached) " >&6
27827 else
27828 if test "$cross_compiling" = yes; then :
27829 case "$host_os" in # ((
27830 # Guess yes on glibc systems.
27831 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27832 # If we don't know, assume the worst.
27833 *) ac_cv_func_getgroups_works="guessing no" ;;
27834 esac
27835
27836 else
27837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27838 /* end confdefs.h. */
27839 $ac_includes_default
27840 int
27841 main ()
27842 {
27843 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27844 return getgroups (0, 0) == -1;
27845 ;
27846 return 0;
27847 }
27848
27849 _ACEOF
27850 if ac_fn_c_try_run "$LINENO"; then :
27851 ac_cv_func_getgroups_works=yes
27852 else
27853 ac_cv_func_getgroups_works=no
27854 fi
27855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27856 conftest.$ac_objext conftest.beam conftest.$ac_ext
27857 fi
27858
27859
27860 fi
27861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27862 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27863 else
27864 ac_cv_func_getgroups_works=no
27865 fi
27866 case "$ac_cv_func_getgroups_works" in
27867 *yes)
27868
27869 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27870
27871 ;;
27872 esac
27873 LIBS=$ac_save_LIBS
27874
27875
27876 # Solaris 9 and 10 need -lgen to get the eaccess function.
27877 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
27878 # programs in the package would end up linked with that potentially-shared
27879 # library, inducing unnecessary run-time overhead.
27880 LIB_EACCESS=
27881
27882 gl_saved_libs=$LIBS
27883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
27884 $as_echo_n "checking for library containing eaccess... " >&6; }
27885 if test "${ac_cv_search_eaccess+set}" = set; then :
27886 $as_echo_n "(cached) " >&6
27887 else
27888 ac_func_search_save_LIBS=$LIBS
27889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27890 /* end confdefs.h. */
27891
27892 /* Override any GCC internal prototype to avoid an error.
27893 Use char because int might match the return type of a GCC
27894 builtin and then its argument prototype would still apply. */
27895 #ifdef __cplusplus
27896 extern "C"
27897 #endif
27898 char eaccess ();
27899 int
27900 main ()
27901 {
27902 return eaccess ();
27903 ;
27904 return 0;
27905 }
27906 _ACEOF
27907 for ac_lib in '' gen; do
27908 if test -z "$ac_lib"; then
27909 ac_res="none required"
27910 else
27911 ac_res=-l$ac_lib
27912 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27913 fi
27914 if ac_fn_c_try_link "$LINENO"; then :
27915 ac_cv_search_eaccess=$ac_res
27916 fi
27917 rm -f core conftest.err conftest.$ac_objext \
27918 conftest$ac_exeext
27919 if test "${ac_cv_search_eaccess+set}" = set; then :
27920 break
27921 fi
27922 done
27923 if test "${ac_cv_search_eaccess+set}" = set; then :
27924
27925 else
27926 ac_cv_search_eaccess=no
27927 fi
27928 rm conftest.$ac_ext
27929 LIBS=$ac_func_search_save_LIBS
27930 fi
27931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
27932 $as_echo "$ac_cv_search_eaccess" >&6; }
27933 ac_res=$ac_cv_search_eaccess
27934 if test "$ac_res" != no; then :
27935 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27936 test "$ac_cv_search_eaccess" = "none required" ||
27937 LIB_EACCESS=$ac_cv_search_eaccess
27938 fi
27939
27940 for ac_func in eaccess
27941 do :
27942 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
27943 if test "x$ac_cv_func_eaccess" = x""yes; then :
27944 cat >>confdefs.h <<_ACEOF
27945 #define HAVE_EACCESS 1
27946 _ACEOF
27947
27948 fi
27949 done
27950
27951 LIBS=$gl_saved_libs
27952
27953 fi
27954
27955
27956
27957
27958
27959 GNULIB_EUIDACCESS=1
27960
27961
27962
27963
27964
27965 gl_gnulib_enabled_euidaccess=true
27966 if test $HAVE_EUIDACCESS = 0; then
27967 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
27968 fi
27969 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
27970 if test $HAVE_EUIDACCESS = 0; then
27971 func_gl_gnulib_m4code_stat
27972 fi
27973 fi
27974 }
27975 func_gl_gnulib_m4code_getdtablesize ()
27976 {
27977 if ! $gl_gnulib_enabled_getdtablesize; then
27978
27979
27980
27981 if test $ac_cv_func_getdtablesize != yes; then
27982 HAVE_GETDTABLESIZE=0
27983 fi
27984
27985 if test $HAVE_GETDTABLESIZE = 0; then
27986
27987
27988
27989
27990
27991
27992
27993
27994 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
27995
27996 :
27997 fi
27998
27999
28000
28001
28002
28003 GNULIB_GETDTABLESIZE=1
28004
28005
28006
28007
28008
28009 gl_gnulib_enabled_getdtablesize=true
28010 fi
28011 }
28012 func_gl_gnulib_m4code_getgroups ()
28013 {
28014 if ! $gl_gnulib_enabled_getgroups; then
28015
28016
28017
28018
28019
28020 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28021 if test "x$ac_cv_func_getgroups" = x""yes; then :
28022
28023 fi
28024
28025
28026 # If we don't yet have getgroups, see if it's in -lbsd.
28027 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28028 ac_save_LIBS=$LIBS
28029 if test $ac_cv_func_getgroups = no; then
28030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28031 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
28032 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
28033 $as_echo_n "(cached) " >&6
28034 else
28035 ac_check_lib_save_LIBS=$LIBS
28036 LIBS="-lbsd $LIBS"
28037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28038 /* end confdefs.h. */
28039
28040 /* Override any GCC internal prototype to avoid an error.
28041 Use char because int might match the return type of a GCC
28042 builtin and then its argument prototype would still apply. */
28043 #ifdef __cplusplus
28044 extern "C"
28045 #endif
28046 char getgroups ();
28047 int
28048 main ()
28049 {
28050 return getgroups ();
28051 ;
28052 return 0;
28053 }
28054 _ACEOF
28055 if ac_fn_c_try_link "$LINENO"; then :
28056 ac_cv_lib_bsd_getgroups=yes
28057 else
28058 ac_cv_lib_bsd_getgroups=no
28059 fi
28060 rm -f core conftest.err conftest.$ac_objext \
28061 conftest$ac_exeext conftest.$ac_ext
28062 LIBS=$ac_check_lib_save_LIBS
28063 fi
28064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28065 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28066 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28067 GETGROUPS_LIB=-lbsd
28068 fi
28069
28070 fi
28071
28072 # Run the program to test the functionality of the system-supplied
28073 # getgroups function only if there is such a function.
28074 if test $ac_cv_func_getgroups = yes; then
28075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28076 $as_echo_n "checking for working getgroups... " >&6; }
28077 if test "${ac_cv_func_getgroups_works+set}" = set; then :
28078 $as_echo_n "(cached) " >&6
28079 else
28080 if test "$cross_compiling" = yes; then :
28081 case "$host_os" in # ((
28082 # Guess yes on glibc systems.
28083 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
28084 # If we don't know, assume the worst.
28085 *) ac_cv_func_getgroups_works="guessing no" ;;
28086 esac
28087
28088 else
28089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28090 /* end confdefs.h. */
28091 $ac_includes_default
28092 int
28093 main ()
28094 {
28095 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
28096 return getgroups (0, 0) == -1;
28097 ;
28098 return 0;
28099 }
28100
28101 _ACEOF
28102 if ac_fn_c_try_run "$LINENO"; then :
28103 ac_cv_func_getgroups_works=yes
28104 else
28105 ac_cv_func_getgroups_works=no
28106 fi
28107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28108 conftest.$ac_objext conftest.beam conftest.$ac_ext
28109 fi
28110
28111
28112 fi
28113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28114 $as_echo "$ac_cv_func_getgroups_works" >&6; }
28115 else
28116 ac_cv_func_getgroups_works=no
28117 fi
28118 case "$ac_cv_func_getgroups_works" in
28119 *yes)
28120
28121 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28122
28123 ;;
28124 esac
28125 LIBS=$ac_save_LIBS
28126
28127 if test $ac_cv_func_getgroups != yes; then
28128 HAVE_GETGROUPS=0
28129 else
28130 if test "$ac_cv_type_getgroups" != gid_t \
28131 || { case "$ac_cv_func_getgroups_works" in
28132 *yes) false;;
28133 *) true;;
28134 esac
28135 }; then
28136 REPLACE_GETGROUPS=1
28137
28138 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28139
28140 else
28141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
28142 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
28143 if test "${gl_cv_func_getgroups_works+set}" = set; then :
28144 $as_echo_n "(cached) " >&6
28145 else
28146 if test "$cross_compiling" = yes; then :
28147 case "$host_os" in
28148 # Guess yes on glibc systems.
28149 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
28150 # If we don't know, assume the worst.
28151 *) gl_cv_func_getgroups_works="guessing no" ;;
28152 esac
28153
28154 else
28155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28156 /* end confdefs.h. */
28157 $ac_includes_default
28158 int
28159 main ()
28160 {
28161 int size = getgroups (0, 0);
28162 gid_t *list = malloc (size * sizeof *list);
28163 return getgroups (-1, list) != -1;
28164 ;
28165 return 0;
28166 }
28167 _ACEOF
28168 if ac_fn_c_try_run "$LINENO"; then :
28169 gl_cv_func_getgroups_works=yes
28170 else
28171 gl_cv_func_getgroups_works=no
28172 fi
28173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28174 conftest.$ac_objext conftest.beam conftest.$ac_ext
28175 fi
28176
28177 fi
28178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
28179 $as_echo "$gl_cv_func_getgroups_works" >&6; }
28180 case "$gl_cv_func_getgroups_works" in
28181 *yes) ;;
28182 *) REPLACE_GETGROUPS=1 ;;
28183 esac
28184 fi
28185 fi
28186 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
28187
28188 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
28189
28190
28191
28192
28193
28194
28195
28196
28197 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
28198
28199 fi
28200
28201
28202
28203
28204
28205 GNULIB_GETGROUPS=1
28206
28207
28208
28209
28210
28211 gl_gnulib_enabled_getgroups=true
28212 fi
28213 }
28214 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
28215 {
28216 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28217
28218
28219 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
28220 fi
28221 }
28222 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
28223 {
28224 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28225
28226
28227
28228
28229
28230 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
28231 if test "x$ac_cv_func_group_member" = x""yes; then :
28232
28233 else
28234
28235 HAVE_GROUP_MEMBER=0
28236
28237 fi
28238
28239
28240 if test $HAVE_GROUP_MEMBER = 0; then
28241
28242
28243
28244
28245
28246
28247
28248
28249 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
28250
28251
28252
28253
28254 fi
28255
28256
28257
28258
28259
28260 GNULIB_GROUP_MEMBER=1
28261
28262
28263
28264
28265
28266 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
28267 if test $HAVE_GROUP_MEMBER = 0; then
28268 func_gl_gnulib_m4code_getgroups
28269 fi
28270 if test $HAVE_GROUP_MEMBER = 0; then
28271 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
28272 fi
28273 fi
28274 }
28275 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
28276 {
28277 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28278 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
28279 fi
28280 }
28281 func_gl_gnulib_m4code_pathmax ()
28282 {
28283 if ! $gl_gnulib_enabled_pathmax; then
28284
28285
28286
28287 gl_gnulib_enabled_pathmax=true
28288 fi
28289 }
28290 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
28291 {
28292 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28293 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
28294 fi
28295 }
28296 func_gl_gnulib_m4code_secure_getenv ()
28297 {
28298 if ! $gl_gnulib_enabled_secure_getenv; then
28299
28300
28301
28302
28303
28304 if test $ac_cv_func_secure_getenv = no; then
28305 HAVE_SECURE_GETENV=0
28306 fi
28307
28308 if test $HAVE_SECURE_GETENV = 0; then
28309
28310
28311
28312
28313
28314
28315
28316
28317 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
28318
28319
28320 for ac_func in __secure_getenv
28321 do :
28322 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28323 if test "x$ac_cv_func___secure_getenv" = x""yes; then :
28324 cat >>confdefs.h <<_ACEOF
28325 #define HAVE___SECURE_GETENV 1
28326 _ACEOF
28327
28328 fi
28329 done
28330
28331 if test $ac_cv_func___secure_getenv = no; then
28332 for ac_func in issetugid
28333 do :
28334 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28335 if test "x$ac_cv_func_issetugid" = x""yes; then :
28336 cat >>confdefs.h <<_ACEOF
28337 #define HAVE_ISSETUGID 1
28338 _ACEOF
28339
28340 fi
28341 done
28342
28343 fi
28344
28345 fi
28346
28347
28348
28349
28350
28351 GNULIB_SECURE_GETENV=1
28352
28353
28354
28355
28356
28357 gl_gnulib_enabled_secure_getenv=true
28358 fi
28359 }
28360 func_gl_gnulib_m4code_stat ()
28361 {
28362 if ! $gl_gnulib_enabled_stat; then
28363
28364
28365
28366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28367 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28368 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
28369 $as_echo_n "(cached) " >&6
28370 else
28371 if test "$cross_compiling" = yes; then :
28372 case $host_os in
28373 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28374 *) gl_cv_func_stat_dir_slash="guessing yes";;
28375 esac
28376 else
28377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28378 /* end confdefs.h. */
28379 #include <sys/stat.h>
28380
28381 int
28382 main ()
28383 {
28384 struct stat st; return stat (".", &st) != stat ("./", &st);
28385 ;
28386 return 0;
28387 }
28388 _ACEOF
28389 if ac_fn_c_try_run "$LINENO"; then :
28390 gl_cv_func_stat_dir_slash=yes
28391 else
28392 gl_cv_func_stat_dir_slash=no
28393 fi
28394 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28395 conftest.$ac_objext conftest.beam conftest.$ac_ext
28396 fi
28397
28398 fi
28399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28400 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28402 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28403 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28404 $as_echo_n "(cached) " >&6
28405 else
28406 touch conftest.tmp
28407 # Assume that if we have lstat, we can also check symlinks.
28408 if test $ac_cv_func_lstat = yes; then
28409 ln -s conftest.tmp conftest.lnk
28410 fi
28411 if test "$cross_compiling" = yes; then :
28412 case "$host_os" in
28413 # Guess yes on glibc systems.
28414 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28415 # If we don't know, assume the worst.
28416 *) gl_cv_func_stat_file_slash="guessing no" ;;
28417 esac
28418
28419 else
28420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28421 /* end confdefs.h. */
28422 #include <sys/stat.h>
28423
28424 int
28425 main ()
28426 {
28427 int result = 0;
28428 struct stat st;
28429 if (!stat ("conftest.tmp/", &st))
28430 result |= 1;
28431 #if HAVE_LSTAT
28432 if (!stat ("conftest.lnk/", &st))
28433 result |= 2;
28434 #endif
28435 return result;
28436
28437 ;
28438 return 0;
28439 }
28440 _ACEOF
28441 if ac_fn_c_try_run "$LINENO"; then :
28442 gl_cv_func_stat_file_slash=yes
28443 else
28444 gl_cv_func_stat_file_slash=no
28445 fi
28446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28447 conftest.$ac_objext conftest.beam conftest.$ac_ext
28448 fi
28449
28450 rm -f conftest.tmp conftest.lnk
28451 fi
28452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28453 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28454 case $gl_cv_func_stat_dir_slash in
28455 *no) REPLACE_STAT=1
28456
28457 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28458 ;;
28459 esac
28460 case $gl_cv_func_stat_file_slash in
28461 *no) REPLACE_STAT=1
28462
28463 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28464 ;;
28465 esac
28466
28467 if test $REPLACE_STAT = 1; then
28468
28469
28470
28471
28472
28473
28474
28475
28476 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28477
28478 :
28479 fi
28480
28481
28482
28483
28484
28485 GNULIB_STAT=1
28486
28487
28488
28489
28490
28491 gl_gnulib_enabled_stat=true
28492 if test $REPLACE_STAT = 1; then
28493 func_gl_gnulib_m4code_dosname
28494 fi
28495 if test $REPLACE_STAT = 1; then
28496 func_gl_gnulib_m4code_pathmax
28497 fi
28498 fi
28499 }
28500 func_gl_gnulib_m4code_strtoll ()
28501 {
28502 if ! $gl_gnulib_enabled_strtoll; then
28503
28504
28505
28506 if test "$ac_cv_type_long_long_int" = yes; then
28507 for ac_func in strtoll
28508 do :
28509 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28510 if test "x$ac_cv_func_strtoll" = x""yes; then :
28511 cat >>confdefs.h <<_ACEOF
28512 #define HAVE_STRTOLL 1
28513 _ACEOF
28514
28515 fi
28516 done
28517
28518 if test $ac_cv_func_strtoll = no; then
28519 HAVE_STRTOLL=0
28520 fi
28521 fi
28522
28523 if test $HAVE_STRTOLL = 0; then
28524
28525
28526
28527
28528
28529
28530
28531
28532 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
28533
28534
28535 :
28536
28537 fi
28538
28539
28540
28541
28542
28543 GNULIB_STRTOLL=1
28544
28545
28546
28547
28548
28549 gl_gnulib_enabled_strtoll=true
28550 fi
28551 }
28552 func_gl_gnulib_m4code_strtoull ()
28553 {
28554 if ! $gl_gnulib_enabled_strtoull; then
28555
28556
28557
28558 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28559 for ac_func in strtoull
28560 do :
28561 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28562 if test "x$ac_cv_func_strtoull" = x""yes; then :
28563 cat >>confdefs.h <<_ACEOF
28564 #define HAVE_STRTOULL 1
28565 _ACEOF
28566
28567 fi
28568 done
28569
28570 if test $ac_cv_func_strtoull = no; then
28571 HAVE_STRTOULL=0
28572 fi
28573 fi
28574
28575 if test $HAVE_STRTOULL = 0; then
28576
28577
28578
28579
28580
28581
28582
28583
28584 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
28585
28586
28587 :
28588
28589 fi
28590
28591
28592
28593
28594
28595 GNULIB_STRTOULL=1
28596
28597
28598
28599
28600
28601 gl_gnulib_enabled_strtoull=true
28602 fi
28603 }
28604 func_gl_gnulib_m4code_tempname ()
28605 {
28606 if ! $gl_gnulib_enabled_tempname; then
28607
28608
28609 :
28610
28611
28612 gl_gnulib_enabled_tempname=true
28613 func_gl_gnulib_m4code_secure_getenv
28614 fi
28615 }
28616 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28617 {
28618 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28619 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28620 fi
28621 }
28622 if test $HAVE_FACCESSAT = 0; then
28623 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28624 fi
28625 if test $HAVE_FACCESSAT = 0; then
28626 func_gl_gnulib_m4code_dosname
28627 fi
28628 if test $HAVE_FACCESSAT = 0; then
28629 func_gl_gnulib_m4code_euidaccess
28630 fi
28631 if test $HAVE_FACCESSAT = 0; then
28632 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28633 fi
28634 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
28635 func_gl_gnulib_m4code_getdtablesize
28636 fi
28637 if test $HAVE_FDOPENDIR = 0; then
28638 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28639 fi
28640 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28641 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28642 fi
28643 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28644 func_gl_gnulib_m4code_dosname
28645 fi
28646 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28647 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28648 fi
28649 if test $REPLACE_GETOPT = 1; then
28650 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
28651 fi
28652 if test $REPLACE_LSTAT = 1; then
28653 func_gl_gnulib_m4code_dosname
28654 fi
28655 if test $REPLACE_LSTAT = 1; then
28656 func_gl_gnulib_m4code_stat
28657 fi
28658 if test $HAVE_MKOSTEMP = 0; then
28659 func_gl_gnulib_m4code_tempname
28660 fi
28661 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
28662 func_gl_gnulib_m4code_stat
28663 fi
28664 if test $HAVE_READLINKAT = 0; then
28665 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28666 fi
28667 if test $HAVE_READLINKAT = 0; then
28668 func_gl_gnulib_m4code_dosname
28669 fi
28670 if test $HAVE_READLINKAT = 0; then
28671 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28672 fi
28673 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
28674 func_gl_gnulib_m4code_strtoll
28675 fi
28676 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
28677 func_gl_gnulib_m4code_strtoull
28678 fi
28679
28680 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28681 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
28682 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
28683 else
28684 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
28685 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
28686 fi
28687
28688 if $gl_gnulib_enabled_dosname; then
28689 gl_GNULIB_ENABLED_dosname_TRUE=
28690 gl_GNULIB_ENABLED_dosname_FALSE='#'
28691 else
28692 gl_GNULIB_ENABLED_dosname_TRUE='#'
28693 gl_GNULIB_ENABLED_dosname_FALSE=
28694 fi
28695
28696 if $gl_gnulib_enabled_euidaccess; then
28697 gl_GNULIB_ENABLED_euidaccess_TRUE=
28698 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
28699 else
28700 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
28701 gl_GNULIB_ENABLED_euidaccess_FALSE=
28702 fi
28703
28704 if $gl_gnulib_enabled_getdtablesize; then
28705 gl_GNULIB_ENABLED_getdtablesize_TRUE=
28706 gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
28707 else
28708 gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
28709 gl_GNULIB_ENABLED_getdtablesize_FALSE=
28710 fi
28711
28712 if $gl_gnulib_enabled_getgroups; then
28713 gl_GNULIB_ENABLED_getgroups_TRUE=
28714 gl_GNULIB_ENABLED_getgroups_FALSE='#'
28715 else
28716 gl_GNULIB_ENABLED_getgroups_TRUE='#'
28717 gl_GNULIB_ENABLED_getgroups_FALSE=
28718 fi
28719
28720 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28721 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
28722 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
28723 else
28724 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
28725 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
28726 fi
28727
28728 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28729 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
28730 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
28731 else
28732 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
28733 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
28734 fi
28735
28736 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28737 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
28738 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
28739 else
28740 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
28741 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
28742 fi
28743
28744 if $gl_gnulib_enabled_pathmax; then
28745 gl_GNULIB_ENABLED_pathmax_TRUE=
28746 gl_GNULIB_ENABLED_pathmax_FALSE='#'
28747 else
28748 gl_GNULIB_ENABLED_pathmax_TRUE='#'
28749 gl_GNULIB_ENABLED_pathmax_FALSE=
28750 fi
28751
28752 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28753 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
28754 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
28755 else
28756 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
28757 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
28758 fi
28759
28760 if $gl_gnulib_enabled_secure_getenv; then
28761 gl_GNULIB_ENABLED_secure_getenv_TRUE=
28762 gl_GNULIB_ENABLED_secure_getenv_FALSE='#'
28763 else
28764 gl_GNULIB_ENABLED_secure_getenv_TRUE='#'
28765 gl_GNULIB_ENABLED_secure_getenv_FALSE=
28766 fi
28767
28768 if $gl_gnulib_enabled_stat; then
28769 gl_GNULIB_ENABLED_stat_TRUE=
28770 gl_GNULIB_ENABLED_stat_FALSE='#'
28771 else
28772 gl_GNULIB_ENABLED_stat_TRUE='#'
28773 gl_GNULIB_ENABLED_stat_FALSE=
28774 fi
28775
28776 if $gl_gnulib_enabled_strtoll; then
28777 gl_GNULIB_ENABLED_strtoll_TRUE=
28778 gl_GNULIB_ENABLED_strtoll_FALSE='#'
28779 else
28780 gl_GNULIB_ENABLED_strtoll_TRUE='#'
28781 gl_GNULIB_ENABLED_strtoll_FALSE=
28782 fi
28783
28784 if $gl_gnulib_enabled_strtoull; then
28785 gl_GNULIB_ENABLED_strtoull_TRUE=
28786 gl_GNULIB_ENABLED_strtoull_FALSE='#'
28787 else
28788 gl_GNULIB_ENABLED_strtoull_TRUE='#'
28789 gl_GNULIB_ENABLED_strtoull_FALSE=
28790 fi
28791
28792 if $gl_gnulib_enabled_tempname; then
28793 gl_GNULIB_ENABLED_tempname_TRUE=
28794 gl_GNULIB_ENABLED_tempname_FALSE='#'
28795 else
28796 gl_GNULIB_ENABLED_tempname_TRUE='#'
28797 gl_GNULIB_ENABLED_tempname_FALSE=
28798 fi
28799
28800 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28801 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
28802 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
28803 else
28804 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
28805 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
28806 fi
28807
28808 # End of code from modules
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818 gltests_libdeps=
28819 gltests_ltlibdeps=
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829 gl_source_base='tests'
28830 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
28831
28832 gl_module_indicator_condition=$gltests_WITNESS
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843 LIBGNU_LIBDEPS="$gl_libdeps"
28844
28845 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28846
28847
28848 CFLAGS=$SAVE_CFLAGS
28849 LIBS=$SAVE_LIBS
28850
28851 if test "${opsys}" = "mingw32"; then
28852 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
28853 # Remove unneeded switches from the value of CC that goes to Makefiles
28854 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
28855 fi
28856
28857 case "$opsys" in
28858 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
28859
28860 darwin)
28861 ## The -headerpad option tells ld (see man page) to leave room at the
28862 ## end of the header for adding load commands. Needed for dumping.
28863 ## 0x690 is the total size of 30 segment load commands (at 56
28864 ## each); under Cocoa 31 commands are required.
28865 if test "$HAVE_NS" = "yes"; then
28866 libs_nsgui="-framework AppKit"
28867 if test "$NS_IMPL_COCOA" = "yes"; then
28868 libs_nsgui="$libs_nsgui -framework IOKit"
28869 fi
28870 headerpad_extra=6C8
28871 else
28872 libs_nsgui=
28873 headerpad_extra=690
28874 fi
28875 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
28876
28877 ## This is here because src/Makefile.in did some extra fiddling around
28878 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
28879 ## LD_SWITCH_SYSTEM_TEMACS instead,
28880 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
28881 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
28882 ;;
28883
28884 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
28885 ## find X at run-time.
28886 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
28887 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
28888 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
28889 ## had different values in configure (in ac_link) and src/Makefile.in.
28890 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
28891 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
28892
28893 mingw32)
28894 ## MinGW64 does not prepend an underscore to symbols, so we must
28895 ## pass a different -entry switch to linker. FIXME: It is better
28896 ## to make the entry points the same by changing unexw32.c.
28897 case "$canonical" in
28898 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
28899 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
28900 esac
28901 ;;
28902
28903 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
28904
28905 *) LD_SWITCH_SYSTEM_TEMACS= ;;
28906 esac
28907
28908 if test x$ac_enable_profiling != x ; then
28909 case $opsys in
28910 *freebsd | gnu-linux) ;;
28911 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
28912 esac
28913 fi
28914
28915
28916
28917 ## MinGW-specific post-link processing of temacs.
28918 TEMACS_POST_LINK=":"
28919 ADDSECTION=
28920 EMACS_HEAPSIZE=
28921 if test "${opsys}" = "mingw32"; then
28922 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
28923 ADDSECTION="../nt/addsection\$(EXEEXT)"
28924 ## Preload heap size of temacs.exe in MB.
28925 case "$canonical" in
28926 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
28927 *) EMACS_HEAPSIZE=27 ;;
28928 esac
28929 fi
28930
28931
28932
28933
28934
28935 ## Common for all window systems
28936 if test "$window_system" != "none"; then
28937
28938 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
28939
28940 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
28941 fi
28942
28943
28944
28945
28946
28947 #### Report on what we decided to do.
28948 #### Report GTK as a toolkit, even if it doesn't use Xt.
28949 #### It makes printing result more understandable as using GTK sets
28950 #### toolkit_scroll_bars to yes by default.
28951 if test "${HAVE_GTK}" = "yes"; then
28952 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
28953 fi
28954
28955 if test $USE_ACL -ne 0; then
28956 acl_summary="yes $LIB_ACL"
28957 else
28958 acl_summary=no
28959 fi
28960
28961 echo "
28962 Configured for \`${canonical}'.
28963
28964 Where should the build process find the source code? ${srcdir}
28965 What compiler should emacs be built with? ${CC} ${CFLAGS}
28966 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
28967 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
28968 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
28969 What window system should Emacs use? ${window_system}
28970 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
28971
28972 if test -n "${x_includes}"; then
28973 echo " Where do we find X Windows header files? ${x_includes}"
28974 else
28975 echo " Where do we find X Windows header files? Standard dirs"
28976 fi
28977 if test -n "${x_libraries}"; then
28978 echo " Where do we find X Windows libraries? ${x_libraries}"
28979 else
28980 echo " Where do we find X Windows libraries? Standard dirs"
28981 fi
28982
28983 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
28984 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
28985 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
28986 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
28987 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
28988 echo " Does Emacs use -lpng? ${HAVE_PNG}"
28989 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
28990 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
28991
28992 echo " Does Emacs support sound? ${HAVE_SOUND}"
28993
28994 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
28995 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
28996 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
28997 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
28998 echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
28999 echo " Does Emacs use access control lists? ${acl_summary}"
29000 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
29001 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
29002 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
29003
29004 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
29005 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
29006 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
29007 echo " Does Emacs use -lxft? ${HAVE_XFT}"
29008 echo " Does Emacs directly use zlib? ${HAVE_ZLIB}"
29009
29010 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
29011 echo
29012
29013 if test -n "${EMACSDATA}"; then
29014 echo " Environment variable EMACSDATA set to: $EMACSDATA"
29015 fi
29016 if test -n "${EMACSDOC}"; then
29017 echo " Environment variable EMACSDOC set to: $EMACSDOC"
29018 fi
29019
29020 echo
29021
29022 if test "$HAVE_NS" = "yes"; then
29023 echo
29024 echo "You must run \"${MAKE-make} install\" in order to test the built application.
29025 The installed application will go to nextstep/Emacs.app and can be
29026 run or moved from there."
29027 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
29028 echo "The application will be fully self-contained."
29029 else
29030 echo "The lisp resources for the application will be installed under ${prefix}.
29031 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
29032 to run if these resources are not installed."
29033 fi
29034 echo
29035 fi
29036
29037 if test "${opsys}" = "cygwin"; then
29038 case `uname -r` in
29039 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
29040 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
29041 echo
29042 ;;
29043 esac
29044 fi
29045
29046 # Remove any trailing slashes in these variables.
29047 test "${prefix}" != NONE &&
29048 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
29049 test "${exec_prefix}" != NONE &&
29050 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
29051
29052 if test "$HAVE_NS" = "yes"; then
29053 if test "$NS_IMPL_GNUSTEP" = yes; then
29054 ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in"
29055
29056 else
29057 ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in"
29058
29059 fi
29060 fi
29061
29062 SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
29063
29064 ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
29065
29066
29067 opt_makefile=test/automated/Makefile
29068
29069 if test -f "$srcdir/$opt_makefile.in"; then
29070 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
29071 ac_config_files="$ac_config_files test/automated/Makefile"
29072
29073 fi
29074
29075
29076 opt_makefile=admin/unidata/Makefile
29077
29078 if test -f "$srcdir/$opt_makefile.in"; then
29079 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
29080 ac_config_files="$ac_config_files admin/unidata/Makefile"
29081
29082 fi
29083
29084
29085 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
29086
29087
29088
29089 ac_config_commands="$ac_config_commands src/epaths.h"
29090
29091
29092 ac_config_commands="$ac_config_commands src/.gdbinit"
29093
29094
29095 cat >confcache <<\_ACEOF
29096 # This file is a shell script that caches the results of configure
29097 # tests run on this system so they can be shared between configure
29098 # scripts and configure runs, see configure's option --config-cache.
29099 # It is not useful on other systems. If it contains results you don't
29100 # want to keep, you may remove or edit it.
29101 #
29102 # config.status only pays attention to the cache file if you give it
29103 # the --recheck option to rerun configure.
29104 #
29105 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29106 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29107 # following values.
29108
29109 _ACEOF
29110
29111 # The following way of writing the cache mishandles newlines in values,
29112 # but we know of no workaround that is simple, portable, and efficient.
29113 # So, we kill variables containing newlines.
29114 # Ultrix sh set writes to stderr and can't be redirected directly,
29115 # and sets the high bit in the cache file unless we assign to the vars.
29116 (
29117 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29118 eval ac_val=\$$ac_var
29119 case $ac_val in #(
29120 *${as_nl}*)
29121 case $ac_var in #(
29122 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29123 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29124 esac
29125 case $ac_var in #(
29126 _ | IFS | as_nl) ;; #(
29127 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29128 *) { eval $ac_var=; unset $ac_var;} ;;
29129 esac ;;
29130 esac
29131 done
29132
29133 (set) 2>&1 |
29134 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29135 *${as_nl}ac_space=\ *)
29136 # `set' does not quote correctly, so add quotes: double-quote
29137 # substitution turns \\\\ into \\, and sed turns \\ into \.
29138 sed -n \
29139 "s/'/'\\\\''/g;
29140 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29141 ;; #(
29142 *)
29143 # `set' quotes correctly as required by POSIX, so do not add quotes.
29144 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29145 ;;
29146 esac |
29147 sort
29148 ) |
29149 sed '
29150 /^ac_cv_env_/b end
29151 t clear
29152 :clear
29153 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29154 t end
29155 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29156 :end' >>confcache
29157 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29158 if test -w "$cache_file"; then
29159 test "x$cache_file" != "x/dev/null" &&
29160 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29161 $as_echo "$as_me: updating cache $cache_file" >&6;}
29162 cat confcache >$cache_file
29163 else
29164 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29165 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29166 fi
29167 fi
29168 rm -f confcache
29169
29170 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29171 # Let make expand exec_prefix.
29172 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29173
29174 DEFS=-DHAVE_CONFIG_H
29175
29176 ac_libobjs=
29177 ac_ltlibobjs=
29178 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29179 # 1. Remove the extension, and $U if already installed.
29180 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29181 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29182 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29183 # will be set to the directory where LIBOBJS objects are built.
29184 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29185 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29186 done
29187 LIBOBJS=$ac_libobjs
29188
29189 LTLIBOBJS=$ac_ltlibobjs
29190
29191
29192 if test -n "$EXEEXT"; then
29193 am__EXEEXT_TRUE=
29194 am__EXEEXT_FALSE='#'
29195 else
29196 am__EXEEXT_TRUE='#'
29197 am__EXEEXT_FALSE=
29198 fi
29199
29200 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29201 as_fn_error "conditional \"AMDEP\" was never defined.
29202 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29203 fi
29204 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29205 as_fn_error "conditional \"am__fastdepCC\" was never defined.
29206 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29207 fi
29208 if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
29209 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
29210 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29211 fi
29212 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
29213 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
29214 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29215 fi
29216 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
29217 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29218 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29219 fi
29220
29221 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29222 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29223 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29224 fi
29225 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
29226 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
29227 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29228 fi
29229 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29230 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29231 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29232 fi
29233 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29234 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29235 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29236 fi
29237 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
29238 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
29239 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29240 fi
29241 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29242 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29243 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29244 fi
29245 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29246 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29247 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29248 fi
29249 if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
29250 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
29251 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29252 fi
29253 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
29254 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
29255 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29256 fi
29257 if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
29258 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
29259 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29260 fi
29261 if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
29262 as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
29263 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29264 fi
29265 if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
29266 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
29267 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29268 fi
29269 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
29270 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
29271 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29272 fi
29273 if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
29274 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
29275 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29276 fi
29277 if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
29278 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
29279 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29280 fi
29281 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
29282 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
29283 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29284 fi
29285 if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
29286 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
29287 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29288 fi
29289 if test -z "${gl_GNULIB_ENABLED_secure_getenv_TRUE}" && test -z "${gl_GNULIB_ENABLED_secure_getenv_FALSE}"; then
29290 as_fn_error "conditional \"gl_GNULIB_ENABLED_secure_getenv\" was never defined.
29291 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29292 fi
29293 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
29294 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
29295 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29296 fi
29297 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
29298 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
29299 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29300 fi
29301 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
29302 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
29303 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29304 fi
29305 if test -z "${gl_GNULIB_ENABLED_tempname_TRUE}" && test -z "${gl_GNULIB_ENABLED_tempname_FALSE}"; then
29306 as_fn_error "conditional \"gl_GNULIB_ENABLED_tempname\" was never defined.
29307 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29308 fi
29309 if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
29310 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
29311 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29312 fi
29313
29314 gl_libobjs=
29315 gl_ltlibobjs=
29316 if test -n "$gl_LIBOBJS"; then
29317 # Remove the extension.
29318 sed_drop_objext='s/\.o$//;s/\.obj$//'
29319 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29320 gl_libobjs="$gl_libobjs $i.$ac_objext"
29321 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29322 done
29323 fi
29324 gl_LIBOBJS=$gl_libobjs
29325
29326 gl_LTLIBOBJS=$gl_ltlibobjs
29327
29328
29329
29330 gltests_libobjs=
29331 gltests_ltlibobjs=
29332 if test -n "$gltests_LIBOBJS"; then
29333 # Remove the extension.
29334 sed_drop_objext='s/\.o$//;s/\.obj$//'
29335 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29336 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29337 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29338 done
29339 fi
29340 gltests_LIBOBJS=$gltests_libobjs
29341
29342 gltests_LTLIBOBJS=$gltests_ltlibobjs
29343
29344
29345
29346 : ${CONFIG_STATUS=./config.status}
29347 ac_write_fail=0
29348 ac_clean_files_save=$ac_clean_files
29349 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29350 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29351 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29352 as_write_fail=0
29353 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29354 #! $SHELL
29355 # Generated by $as_me.
29356 # Run this file to recreate the current configuration.
29357 # Compiler output produced by configure, useful for debugging
29358 # configure, is in config.log if it exists.
29359
29360 debug=false
29361 ac_cs_recheck=false
29362 ac_cs_silent=false
29363
29364 SHELL=\${CONFIG_SHELL-$SHELL}
29365 export SHELL
29366 _ASEOF
29367 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29368 ## -------------------- ##
29369 ## M4sh Initialization. ##
29370 ## -------------------- ##
29371
29372 # Be more Bourne compatible
29373 DUALCASE=1; export DUALCASE # for MKS sh
29374 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29375 emulate sh
29376 NULLCMD=:
29377 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29378 # is contrary to our usage. Disable this feature.
29379 alias -g '${1+"$@"}'='"$@"'
29380 setopt NO_GLOB_SUBST
29381 else
29382 case `(set -o) 2>/dev/null` in #(
29383 *posix*) :
29384 set -o posix ;; #(
29385 *) :
29386 ;;
29387 esac
29388 fi
29389
29390
29391 as_nl='
29392 '
29393 export as_nl
29394 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29395 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29396 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29397 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29398 # Prefer a ksh shell builtin over an external printf program on Solaris,
29399 # but without wasting forks for bash or zsh.
29400 if test -z "$BASH_VERSION$ZSH_VERSION" \
29401 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29402 as_echo='print -r --'
29403 as_echo_n='print -rn --'
29404 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29405 as_echo='printf %s\n'
29406 as_echo_n='printf %s'
29407 else
29408 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29409 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29410 as_echo_n='/usr/ucb/echo -n'
29411 else
29412 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29413 as_echo_n_body='eval
29414 arg=$1;
29415 case $arg in #(
29416 *"$as_nl"*)
29417 expr "X$arg" : "X\\(.*\\)$as_nl";
29418 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29419 esac;
29420 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29421 '
29422 export as_echo_n_body
29423 as_echo_n='sh -c $as_echo_n_body as_echo'
29424 fi
29425 export as_echo_body
29426 as_echo='sh -c $as_echo_body as_echo'
29427 fi
29428
29429 # The user is always right.
29430 if test "${PATH_SEPARATOR+set}" != set; then
29431 PATH_SEPARATOR=:
29432 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29433 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29434 PATH_SEPARATOR=';'
29435 }
29436 fi
29437
29438
29439 # IFS
29440 # We need space, tab and new line, in precisely that order. Quoting is
29441 # there to prevent editors from complaining about space-tab.
29442 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29443 # splitting by setting IFS to empty value.)
29444 IFS=" "" $as_nl"
29445
29446 # Find who we are. Look in the path if we contain no directory separator.
29447 case $0 in #((
29448 *[\\/]* ) as_myself=$0 ;;
29449 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29450 for as_dir in $PATH
29451 do
29452 IFS=$as_save_IFS
29453 test -z "$as_dir" && as_dir=.
29454 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29455 done
29456 IFS=$as_save_IFS
29457
29458 ;;
29459 esac
29460 # We did not find ourselves, most probably we were run as `sh COMMAND'
29461 # in which case we are not to be found in the path.
29462 if test "x$as_myself" = x; then
29463 as_myself=$0
29464 fi
29465 if test ! -f "$as_myself"; then
29466 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29467 exit 1
29468 fi
29469
29470 # Unset variables that we do not need and which cause bugs (e.g. in
29471 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29472 # suppresses any "Segmentation fault" message there. '((' could
29473 # trigger a bug in pdksh 5.2.14.
29474 for as_var in BASH_ENV ENV MAIL MAILPATH
29475 do eval test x\${$as_var+set} = xset \
29476 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29477 done
29478 PS1='$ '
29479 PS2='> '
29480 PS4='+ '
29481
29482 # NLS nuisances.
29483 LC_ALL=C
29484 export LC_ALL
29485 LANGUAGE=C
29486 export LANGUAGE
29487
29488 # CDPATH.
29489 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29490
29491
29492 # as_fn_error ERROR [LINENO LOG_FD]
29493 # ---------------------------------
29494 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29495 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29496 # script with status $?, using 1 if that was 0.
29497 as_fn_error ()
29498 {
29499 as_status=$?; test $as_status -eq 0 && as_status=1
29500 if test "$3"; then
29501 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29502 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
29503 fi
29504 $as_echo "$as_me: error: $1" >&2
29505 as_fn_exit $as_status
29506 } # as_fn_error
29507
29508
29509 # as_fn_set_status STATUS
29510 # -----------------------
29511 # Set $? to STATUS, without forking.
29512 as_fn_set_status ()
29513 {
29514 return $1
29515 } # as_fn_set_status
29516
29517 # as_fn_exit STATUS
29518 # -----------------
29519 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29520 as_fn_exit ()
29521 {
29522 set +e
29523 as_fn_set_status $1
29524 exit $1
29525 } # as_fn_exit
29526
29527 # as_fn_unset VAR
29528 # ---------------
29529 # Portably unset VAR.
29530 as_fn_unset ()
29531 {
29532 { eval $1=; unset $1;}
29533 }
29534 as_unset=as_fn_unset
29535 # as_fn_append VAR VALUE
29536 # ----------------------
29537 # Append the text in VALUE to the end of the definition contained in VAR. Take
29538 # advantage of any shell optimizations that allow amortized linear growth over
29539 # repeated appends, instead of the typical quadratic growth present in naive
29540 # implementations.
29541 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29542 eval 'as_fn_append ()
29543 {
29544 eval $1+=\$2
29545 }'
29546 else
29547 as_fn_append ()
29548 {
29549 eval $1=\$$1\$2
29550 }
29551 fi # as_fn_append
29552
29553 # as_fn_arith ARG...
29554 # ------------------
29555 # Perform arithmetic evaluation on the ARGs, and store the result in the
29556 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29557 # must be portable across $(()) and expr.
29558 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29559 eval 'as_fn_arith ()
29560 {
29561 as_val=$(( $* ))
29562 }'
29563 else
29564 as_fn_arith ()
29565 {
29566 as_val=`expr "$@" || test $? -eq 1`
29567 }
29568 fi # as_fn_arith
29569
29570
29571 if expr a : '\(a\)' >/dev/null 2>&1 &&
29572 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29573 as_expr=expr
29574 else
29575 as_expr=false
29576 fi
29577
29578 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29579 as_basename=basename
29580 else
29581 as_basename=false
29582 fi
29583
29584 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29585 as_dirname=dirname
29586 else
29587 as_dirname=false
29588 fi
29589
29590 as_me=`$as_basename -- "$0" ||
29591 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29592 X"$0" : 'X\(//\)$' \| \
29593 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29594 $as_echo X/"$0" |
29595 sed '/^.*\/\([^/][^/]*\)\/*$/{
29596 s//\1/
29597 q
29598 }
29599 /^X\/\(\/\/\)$/{
29600 s//\1/
29601 q
29602 }
29603 /^X\/\(\/\).*/{
29604 s//\1/
29605 q
29606 }
29607 s/.*/./; q'`
29608
29609 # Avoid depending upon Character Ranges.
29610 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29611 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29612 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29613 as_cr_digits='0123456789'
29614 as_cr_alnum=$as_cr_Letters$as_cr_digits
29615
29616 ECHO_C= ECHO_N= ECHO_T=
29617 case `echo -n x` in #(((((
29618 -n*)
29619 case `echo 'xy\c'` in
29620 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29621 xy) ECHO_C='\c';;
29622 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29623 ECHO_T=' ';;
29624 esac;;
29625 *)
29626 ECHO_N='-n';;
29627 esac
29628
29629 rm -f conf$$ conf$$.exe conf$$.file
29630 if test -d conf$$.dir; then
29631 rm -f conf$$.dir/conf$$.file
29632 else
29633 rm -f conf$$.dir
29634 mkdir conf$$.dir 2>/dev/null
29635 fi
29636 if (echo >conf$$.file) 2>/dev/null; then
29637 if ln -s conf$$.file conf$$ 2>/dev/null; then
29638 as_ln_s='ln -s'
29639 # ... but there are two gotchas:
29640 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29641 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29642 # In both cases, we have to default to `cp -p'.
29643 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29644 as_ln_s='cp -p'
29645 elif ln conf$$.file conf$$ 2>/dev/null; then
29646 as_ln_s=ln
29647 else
29648 as_ln_s='cp -p'
29649 fi
29650 else
29651 as_ln_s='cp -p'
29652 fi
29653 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29654 rmdir conf$$.dir 2>/dev/null
29655
29656
29657 # as_fn_mkdir_p
29658 # -------------
29659 # Create "$as_dir" as a directory, including parents if necessary.
29660 as_fn_mkdir_p ()
29661 {
29662
29663 case $as_dir in #(
29664 -*) as_dir=./$as_dir;;
29665 esac
29666 test -d "$as_dir" || eval $as_mkdir_p || {
29667 as_dirs=
29668 while :; do
29669 case $as_dir in #(
29670 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29671 *) as_qdir=$as_dir;;
29672 esac
29673 as_dirs="'$as_qdir' $as_dirs"
29674 as_dir=`$as_dirname -- "$as_dir" ||
29675 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29676 X"$as_dir" : 'X\(//\)[^/]' \| \
29677 X"$as_dir" : 'X\(//\)$' \| \
29678 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29679 $as_echo X"$as_dir" |
29680 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29681 s//\1/
29682 q
29683 }
29684 /^X\(\/\/\)[^/].*/{
29685 s//\1/
29686 q
29687 }
29688 /^X\(\/\/\)$/{
29689 s//\1/
29690 q
29691 }
29692 /^X\(\/\).*/{
29693 s//\1/
29694 q
29695 }
29696 s/.*/./; q'`
29697 test -d "$as_dir" && break
29698 done
29699 test -z "$as_dirs" || eval "mkdir $as_dirs"
29700 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
29701
29702
29703 } # as_fn_mkdir_p
29704 if mkdir -p . 2>/dev/null; then
29705 as_mkdir_p='mkdir -p "$as_dir"'
29706 else
29707 test -d ./-p && rmdir ./-p
29708 as_mkdir_p=false
29709 fi
29710
29711 if test -x / >/dev/null 2>&1; then
29712 as_test_x='test -x'
29713 else
29714 if ls -dL / >/dev/null 2>&1; then
29715 as_ls_L_option=L
29716 else
29717 as_ls_L_option=
29718 fi
29719 as_test_x='
29720 eval sh -c '\''
29721 if test -d "$1"; then
29722 test -d "$1/.";
29723 else
29724 case $1 in #(
29725 -*)set "./$1";;
29726 esac;
29727 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
29728 ???[sx]*):;;*)false;;esac;fi
29729 '\'' sh
29730 '
29731 fi
29732 as_executable_p=$as_test_x
29733
29734 # Sed expression to map a string onto a valid CPP name.
29735 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29736
29737 # Sed expression to map a string onto a valid variable name.
29738 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29739
29740
29741 exec 6>&1
29742 ## ----------------------------------- ##
29743 ## Main body of $CONFIG_STATUS script. ##
29744 ## ----------------------------------- ##
29745 _ASEOF
29746 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29747
29748 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29749 # Save the log message, to keep $0 and so on meaningful, and to
29750 # report actual input values of CONFIG_FILES etc. instead of their
29751 # values after options handling.
29752 ac_log="
29753 This file was extended by emacs $as_me 24.3.50, which was
29754 generated by GNU Autoconf 2.65. Invocation command line was
29755
29756 CONFIG_FILES = $CONFIG_FILES
29757 CONFIG_HEADERS = $CONFIG_HEADERS
29758 CONFIG_LINKS = $CONFIG_LINKS
29759 CONFIG_COMMANDS = $CONFIG_COMMANDS
29760 $ $0 $@
29761
29762 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29763 "
29764
29765 _ACEOF
29766
29767 case $ac_config_files in *"
29768 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29769 esac
29770
29771 case $ac_config_headers in *"
29772 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29773 esac
29774
29775
29776 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29777 # Files that config.status was made for.
29778 config_files="$ac_config_files"
29779 config_headers="$ac_config_headers"
29780 config_commands="$ac_config_commands"
29781
29782 _ACEOF
29783
29784 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29785 ac_cs_usage="\
29786 \`$as_me' instantiates files and other configuration actions
29787 from templates according to the current configuration. Unless the files
29788 and actions are specified as TAGs, all are instantiated by default.
29789
29790 Usage: $0 [OPTION]... [TAG]...
29791
29792 -h, --help print this help, then exit
29793 -V, --version print version number and configuration settings, then exit
29794 --config print configuration, then exit
29795 -q, --quiet, --silent
29796 do not print progress messages
29797 -d, --debug don't remove temporary files
29798 --recheck update $as_me by reconfiguring in the same conditions
29799 --file=FILE[:TEMPLATE]
29800 instantiate the configuration file FILE
29801 --header=FILE[:TEMPLATE]
29802 instantiate the configuration header FILE
29803
29804 Configuration files:
29805 $config_files
29806
29807 Configuration headers:
29808 $config_headers
29809
29810 Configuration commands:
29811 $config_commands
29812
29813 Report bugs to the package provider."
29814
29815 _ACEOF
29816 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29817 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29818 ac_cs_version="\\
29819 emacs config.status 24.3.50
29820 configured by $0, generated by GNU Autoconf 2.65,
29821 with options \\"\$ac_cs_config\\"
29822
29823 Copyright (C) 2009 Free Software Foundation, Inc.
29824 This config.status script is free software; the Free Software Foundation
29825 gives unlimited permission to copy, distribute and modify it."
29826
29827 ac_pwd='$ac_pwd'
29828 srcdir='$srcdir'
29829 INSTALL='$INSTALL'
29830 MKDIR_P='$MKDIR_P'
29831 AWK='$AWK'
29832 test -n "\$AWK" || AWK=awk
29833 _ACEOF
29834
29835 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29836 # The default lists apply if the user does not specify any file.
29837 ac_need_defaults=:
29838 while test $# != 0
29839 do
29840 case $1 in
29841 --*=*)
29842 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29843 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29844 ac_shift=:
29845 ;;
29846 *)
29847 ac_option=$1
29848 ac_optarg=$2
29849 ac_shift=shift
29850 ;;
29851 esac
29852
29853 case $ac_option in
29854 # Handling of the options.
29855 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29856 ac_cs_recheck=: ;;
29857 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29858 $as_echo "$ac_cs_version"; exit ;;
29859 --config | --confi | --conf | --con | --co | --c )
29860 $as_echo "$ac_cs_config"; exit ;;
29861 --debug | --debu | --deb | --de | --d | -d )
29862 debug=: ;;
29863 --file | --fil | --fi | --f )
29864 $ac_shift
29865 case $ac_optarg in
29866 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29867 esac
29868 as_fn_append CONFIG_FILES " '$ac_optarg'"
29869 ac_need_defaults=false;;
29870 --header | --heade | --head | --hea )
29871 $ac_shift
29872 case $ac_optarg in
29873 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29874 esac
29875 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29876 ac_need_defaults=false;;
29877 --he | --h)
29878 # Conflict between --help and --header
29879 as_fn_error "ambiguous option: \`$1'
29880 Try \`$0 --help' for more information.";;
29881 --help | --hel | -h )
29882 $as_echo "$ac_cs_usage"; exit ;;
29883 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29884 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29885 ac_cs_silent=: ;;
29886
29887 # This is an error.
29888 -*) as_fn_error "unrecognized option: \`$1'
29889 Try \`$0 --help' for more information." ;;
29890
29891 *) as_fn_append ac_config_targets " $1"
29892 ac_need_defaults=false ;;
29893
29894 esac
29895 shift
29896 done
29897
29898 ac_configure_extra_args=
29899
29900 if $ac_cs_silent; then
29901 exec 6>/dev/null
29902 ac_configure_extra_args="$ac_configure_extra_args --silent"
29903 fi
29904
29905 _ACEOF
29906 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29907 if \$ac_cs_recheck; then
29908 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29909 shift
29910 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29911 CONFIG_SHELL='$SHELL'
29912 export CONFIG_SHELL
29913 exec "\$@"
29914 fi
29915
29916 _ACEOF
29917 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29918 exec 5>>config.log
29919 {
29920 echo
29921 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29922 ## Running $as_me. ##
29923 _ASBOX
29924 $as_echo "$ac_log"
29925 } >&5
29926
29927 _ACEOF
29928 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29929 #
29930 # INIT-COMMANDS
29931 #
29932 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29933 GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
29934
29935 _ACEOF
29936
29937 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29938
29939 # Handling of arguments.
29940 for ac_config_target in $ac_config_targets
29941 do
29942 case $ac_config_target in
29943 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
29944 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29945 "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in" ;;
29946 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
29947 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
29948 "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" ;;
29949 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29950 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29951 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
29952 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
29953 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
29954 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
29955 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
29956 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
29957 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
29958 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
29959 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
29960 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
29961 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
29962 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
29963 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
29964 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
29965 "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;;
29966 "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;;
29967
29968 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29969 esac
29970 done
29971
29972
29973 # If the user did not use the arguments to specify the items to instantiate,
29974 # then the envvar interface is used. Set only those that are not.
29975 # We use the long form for the default assignment because of an extremely
29976 # bizarre bug on SunOS 4.1.3.
29977 if $ac_need_defaults; then
29978 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29979 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29980 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29981 fi
29982
29983 # Have a temporary directory for convenience. Make it in the build tree
29984 # simply because there is no reason against having it here, and in addition,
29985 # creating and moving files from /tmp can sometimes cause problems.
29986 # Hook for its removal unless debugging.
29987 # Note that there is a small window in which the directory will not be cleaned:
29988 # after its creation but before its name has been assigned to `$tmp'.
29989 $debug ||
29990 {
29991 tmp=
29992 trap 'exit_status=$?
29993 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
29994 ' 0
29995 trap 'as_fn_exit 1' 1 2 13 15
29996 }
29997 # Create a (secure) tmp directory for tmp files.
29998
29999 {
30000 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
30001 test -n "$tmp" && test -d "$tmp"
30002 } ||
30003 {
30004 tmp=./conf$$-$RANDOM
30005 (umask 077 && mkdir "$tmp")
30006 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
30007
30008 # Set up the scripts for CONFIG_FILES section.
30009 # No need to generate them if there are no CONFIG_FILES.
30010 # This happens for instance with `./config.status config.h'.
30011 if test -n "$CONFIG_FILES"; then
30012
30013 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
30014 ac_cs_awk_getline=:
30015 ac_cs_awk_pipe_init=
30016 ac_cs_awk_read_file='
30017 while ((getline aline < (F[key])) > 0)
30018 print(aline)
30019 close(F[key])'
30020 ac_cs_awk_pipe_fini=
30021 else
30022 ac_cs_awk_getline=false
30023 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
30024 ac_cs_awk_read_file='
30025 print "|#_!!_#|"
30026 print "cat " F[key] " &&"
30027 '$ac_cs_awk_pipe_init
30028 # The final `:' finishes the AND list.
30029 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
30030 fi
30031 ac_cr=`echo X | tr X '\015'`
30032 # On cygwin, bash can eat \r inside `` if the user requested igncr.
30033 # But we know of no other shell where ac_cr would be empty at this
30034 # point, so we can use a bashism as a fallback.
30035 if test "x$ac_cr" = x; then
30036 eval ac_cr=\$\'\\r\'
30037 fi
30038 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30039 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
30040 ac_cs_awk_cr='\r'
30041 else
30042 ac_cs_awk_cr=$ac_cr
30043 fi
30044
30045 echo 'BEGIN {' >"$tmp/subs1.awk" &&
30046 _ACEOF
30047
30048 # Create commands to substitute file output variables.
30049 {
30050 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
30051 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
30052 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
30053 echo "_ACAWK" &&
30054 echo "_ACEOF"
30055 } >conf$$files.sh &&
30056 . ./conf$$files.sh ||
30057 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30058 rm -f conf$$files.sh
30059
30060 {
30061 echo "cat >conf$$subs.awk <<_ACEOF" &&
30062 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30063 echo "_ACEOF"
30064 } >conf$$subs.sh ||
30065 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30066 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
30067 ac_delim='%!_!# '
30068 for ac_last_try in false false false false false :; do
30069 . ./conf$$subs.sh ||
30070 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30071
30072 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30073 if test $ac_delim_n = $ac_delim_num; then
30074 break
30075 elif $ac_last_try; then
30076 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30077 else
30078 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30079 fi
30080 done
30081 rm -f conf$$subs.sh
30082
30083 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30084 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
30085 _ACEOF
30086 sed -n '
30087 h
30088 s/^/S["/; s/!.*/"]=/
30089 p
30090 g
30091 s/^[^!]*!//
30092 :repl
30093 t repl
30094 s/'"$ac_delim"'$//
30095 t delim
30096 :nl
30097 h
30098 s/\(.\{148\}\)..*/\1/
30099 t more1
30100 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
30101 p
30102 n
30103 b repl
30104 :more1
30105 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30106 p
30107 g
30108 s/.\{148\}//
30109 t nl
30110 :delim
30111 h
30112 s/\(.\{148\}\)..*/\1/
30113 t more2
30114 s/["\\]/\\&/g; s/^/"/; s/$/"/
30115 p
30116 b
30117 :more2
30118 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30119 p
30120 g
30121 s/.\{148\}//
30122 t delim
30123 ' <conf$$subs.awk | sed '
30124 /^[^""]/{
30125 N
30126 s/\n//
30127 }
30128 ' >>$CONFIG_STATUS || ac_write_fail=1
30129 rm -f conf$$subs.awk
30130 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30131 _ACAWK
30132 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
30133 for (key in S) S_is_set[key] = 1
30134 FS = "\a"
30135 \$ac_cs_awk_pipe_init
30136 }
30137 {
30138 line = $ 0
30139 nfields = split(line, field, "@")
30140 substed = 0
30141 len = length(field[1])
30142 for (i = 2; i < nfields; i++) {
30143 key = field[i]
30144 keylen = length(key)
30145 if (S_is_set[key]) {
30146 value = S[key]
30147 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30148 len += length(value) + length(field[++i])
30149 substed = 1
30150 } else
30151 len += 1 + keylen
30152 }
30153 if (nfields == 3 && !substed) {
30154 key = field[2]
30155 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
30156 \$ac_cs_awk_read_file
30157 next
30158 }
30159 }
30160 print line
30161 }
30162 \$ac_cs_awk_pipe_fini
30163 _ACAWK
30164 _ACEOF
30165 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30166 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30167 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30168 else
30169 cat
30170 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
30171 || as_fn_error "could not setup config files machinery" "$LINENO" 5
30172 _ACEOF
30173
30174 # VPATH may cause trouble with some makes, so we remove $(srcdir),
30175 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
30176 # trailing colons and then remove the whole line if VPATH becomes empty
30177 # (actually we leave an empty line to preserve line numbers).
30178 if test "x$srcdir" = x.; then
30179 ac_vpsub='/^[ ]*VPATH[ ]*=/{
30180 s/:*\$(srcdir):*/:/
30181 s/:*\${srcdir}:*/:/
30182 s/:*@srcdir@:*/:/
30183 s/^\([^=]*=[ ]*\):*/\1/
30184 s/:*$//
30185 s/^[^=]*=[ ]*$//
30186 }'
30187 fi
30188
30189 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30190 fi # test -n "$CONFIG_FILES"
30191
30192 # Set up the scripts for CONFIG_HEADERS section.
30193 # No need to generate them if there are no CONFIG_HEADERS.
30194 # This happens for instance with `./config.status Makefile'.
30195 if test -n "$CONFIG_HEADERS"; then
30196 cat >"$tmp/defines.awk" <<\_ACAWK ||
30197 BEGIN {
30198 _ACEOF
30199
30200 # Transform confdefs.h into an awk script `defines.awk', embedded as
30201 # here-document in config.status, that substitutes the proper values into
30202 # config.h.in to produce config.h.
30203
30204 # Create a delimiter string that does not exist in confdefs.h, to ease
30205 # handling of long lines.
30206 ac_delim='%!_!# '
30207 for ac_last_try in false false :; do
30208 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30209 if test -z "$ac_t"; then
30210 break
30211 elif $ac_last_try; then
30212 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
30213 else
30214 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30215 fi
30216 done
30217
30218 # For the awk script, D is an array of macro values keyed by name,
30219 # likewise P contains macro parameters if any. Preserve backslash
30220 # newline sequences.
30221
30222 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30223 sed -n '
30224 s/.\{148\}/&'"$ac_delim"'/g
30225 t rset
30226 :rset
30227 s/^[ ]*#[ ]*define[ ][ ]*/ /
30228 t def
30229 d
30230 :def
30231 s/\\$//
30232 t bsnl
30233 s/["\\]/\\&/g
30234 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30235 D["\1"]=" \3"/p
30236 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30237 d
30238 :bsnl
30239 s/["\\]/\\&/g
30240 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30241 D["\1"]=" \3\\\\\\n"\\/p
30242 t cont
30243 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30244 t cont
30245 d
30246 :cont
30247 n
30248 s/.\{148\}/&'"$ac_delim"'/g
30249 t clear
30250 :clear
30251 s/\\$//
30252 t bsnlc
30253 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30254 d
30255 :bsnlc
30256 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30257 b cont
30258 ' <confdefs.h | sed '
30259 s/'"$ac_delim"'/"\\\
30260 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30261
30262 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30263 for (key in D) D_is_set[key] = 1
30264 FS = "\a"
30265 }
30266 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30267 line = \$ 0
30268 split(line, arg, " ")
30269 if (arg[1] == "#") {
30270 defundef = arg[2]
30271 mac1 = arg[3]
30272 } else {
30273 defundef = substr(arg[1], 2)
30274 mac1 = arg[2]
30275 }
30276 split(mac1, mac2, "(") #)
30277 macro = mac2[1]
30278 prefix = substr(line, 1, index(line, defundef) - 1)
30279 if (D_is_set[macro]) {
30280 # Preserve the white space surrounding the "#".
30281 print prefix "define", macro P[macro] D[macro]
30282 next
30283 } else {
30284 # Replace #undef with comments. This is necessary, for example,
30285 # in the case of _POSIX_SOURCE, which is predefined and required
30286 # on some systems where configure will not decide to define it.
30287 if (defundef == "undef") {
30288 print "/*", prefix defundef, macro, "*/"
30289 next
30290 }
30291 }
30292 }
30293 { print }
30294 _ACAWK
30295 _ACEOF
30296 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30297 as_fn_error "could not setup config headers machinery" "$LINENO" 5
30298 fi # test -n "$CONFIG_HEADERS"
30299
30300
30301 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30302 shift
30303 for ac_tag
30304 do
30305 case $ac_tag in
30306 :[FHLC]) ac_mode=$ac_tag; continue;;
30307 esac
30308 case $ac_mode$ac_tag in
30309 :[FHL]*:*);;
30310 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
30311 :[FH]-) ac_tag=-:-;;
30312 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30313 esac
30314 ac_save_IFS=$IFS
30315 IFS=:
30316 set x $ac_tag
30317 IFS=$ac_save_IFS
30318 shift
30319 ac_file=$1
30320 shift
30321
30322 case $ac_mode in
30323 :L) ac_source=$1;;
30324 :[FH])
30325 ac_file_inputs=
30326 for ac_f
30327 do
30328 case $ac_f in
30329 -) ac_f="$tmp/stdin";;
30330 *) # Look for the file first in the build tree, then in the source tree
30331 # (if the path is not absolute). The absolute path cannot be DOS-style,
30332 # because $ac_f cannot contain `:'.
30333 test -f "$ac_f" ||
30334 case $ac_f in
30335 [\\/$]*) false;;
30336 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30337 esac ||
30338 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30339 esac
30340 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30341 as_fn_append ac_file_inputs " '$ac_f'"
30342 done
30343
30344 # Let's still pretend it is `configure' which instantiates (i.e., don't
30345 # use $as_me), people would be surprised to read:
30346 # /* config.h. Generated by config.status. */
30347 configure_input='Generated from '`
30348 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30349 `' by configure.'
30350 if test x"$ac_file" != x-; then
30351 configure_input="$ac_file. $configure_input"
30352 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30353 $as_echo "$as_me: creating $ac_file" >&6;}
30354 fi
30355 # Neutralize special characters interpreted by sed in replacement strings.
30356 case $configure_input in #(
30357 *\&* | *\|* | *\\* )
30358 ac_sed_conf_input=`$as_echo "$configure_input" |
30359 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30360 *) ac_sed_conf_input=$configure_input;;
30361 esac
30362
30363 case $ac_tag in
30364 *:-:* | *:-) cat >"$tmp/stdin" \
30365 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
30366 esac
30367 ;;
30368 esac
30369
30370 ac_dir=`$as_dirname -- "$ac_file" ||
30371 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30372 X"$ac_file" : 'X\(//\)[^/]' \| \
30373 X"$ac_file" : 'X\(//\)$' \| \
30374 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30375 $as_echo X"$ac_file" |
30376 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30377 s//\1/
30378 q
30379 }
30380 /^X\(\/\/\)[^/].*/{
30381 s//\1/
30382 q
30383 }
30384 /^X\(\/\/\)$/{
30385 s//\1/
30386 q
30387 }
30388 /^X\(\/\).*/{
30389 s//\1/
30390 q
30391 }
30392 s/.*/./; q'`
30393 as_dir="$ac_dir"; as_fn_mkdir_p
30394 ac_builddir=.
30395
30396 case "$ac_dir" in
30397 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30398 *)
30399 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30400 # A ".." for each directory in $ac_dir_suffix.
30401 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30402 case $ac_top_builddir_sub in
30403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30405 esac ;;
30406 esac
30407 ac_abs_top_builddir=$ac_pwd
30408 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30409 # for backward compatibility:
30410 ac_top_builddir=$ac_top_build_prefix
30411
30412 case $srcdir in
30413 .) # We are building in place.
30414 ac_srcdir=.
30415 ac_top_srcdir=$ac_top_builddir_sub
30416 ac_abs_top_srcdir=$ac_pwd ;;
30417 [\\/]* | ?:[\\/]* ) # Absolute name.
30418 ac_srcdir=$srcdir$ac_dir_suffix;
30419 ac_top_srcdir=$srcdir
30420 ac_abs_top_srcdir=$srcdir ;;
30421 *) # Relative name.
30422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30423 ac_top_srcdir=$ac_top_build_prefix$srcdir
30424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30425 esac
30426 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30427
30428
30429 case $ac_mode in
30430 :F)
30431 #
30432 # CONFIG_FILE
30433 #
30434
30435 case $INSTALL in
30436 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30437 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30438 esac
30439 ac_MKDIR_P=$MKDIR_P
30440 case $MKDIR_P in
30441 [\\/$]* | ?:[\\/]* ) ;;
30442 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30443 esac
30444 _ACEOF
30445
30446 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30447 # If the template does not know about datarootdir, expand it.
30448 # FIXME: This hack should be removed a few years after 2.60.
30449 ac_datarootdir_hack=; ac_datarootdir_seen=
30450 ac_sed_dataroot='
30451 /datarootdir/ {
30452 p
30453 q
30454 }
30455 /@datadir@/p
30456 /@docdir@/p
30457 /@infodir@/p
30458 /@localedir@/p
30459 /@mandir@/p'
30460 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30461 *datarootdir*) ac_datarootdir_seen=yes;;
30462 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30464 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30465 _ACEOF
30466 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30467 ac_datarootdir_hack='
30468 s&@datadir@&$datadir&g
30469 s&@docdir@&$docdir&g
30470 s&@infodir@&$infodir&g
30471 s&@localedir@&$localedir&g
30472 s&@mandir@&$mandir&g
30473 s&\\\${datarootdir}&$datarootdir&g' ;;
30474 esac
30475 _ACEOF
30476
30477 # Neutralize VPATH when `$srcdir' = `.'.
30478 # Shell code in configure.ac might set extrasub.
30479 # FIXME: do we really want to maintain this feature?
30480 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30481 ac_sed_extra="$ac_vpsub
30482 $extrasub
30483 _ACEOF
30484 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30485 :t
30486 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30487 s|@configure_input@|$ac_sed_conf_input|;t t
30488 s&@top_builddir@&$ac_top_builddir_sub&;t t
30489 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30490 s&@srcdir@&$ac_srcdir&;t t
30491 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30492 s&@top_srcdir@&$ac_top_srcdir&;t t
30493 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30494 s&@builddir@&$ac_builddir&;t t
30495 s&@abs_builddir@&$ac_abs_builddir&;t t
30496 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30497 s&@INSTALL@&$ac_INSTALL&;t t
30498 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30499 $ac_datarootdir_hack
30500 "
30501 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30502 if $ac_cs_awk_getline; then
30503 $AWK -f "$tmp/subs.awk"
30504 else
30505 $AWK -f "$tmp/subs.awk" | $SHELL
30506 fi >$tmp/out \
30507 || as_fn_error "could not create $ac_file" "$LINENO" 5
30508
30509 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30510 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30511 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
30512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30513 which seems to be undefined. Please make sure it is defined." >&5
30514 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30515 which seems to be undefined. Please make sure it is defined." >&2;}
30516
30517 rm -f "$tmp/stdin"
30518 case $ac_file in
30519 -) cat "$tmp/out" && rm -f "$tmp/out";;
30520 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
30521 esac \
30522 || as_fn_error "could not create $ac_file" "$LINENO" 5
30523 ;;
30524 :H)
30525 #
30526 # CONFIG_HEADER
30527 #
30528 if test x"$ac_file" != x-; then
30529 {
30530 $as_echo "/* $configure_input */" \
30531 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30532 } >"$tmp/config.h" \
30533 || as_fn_error "could not create $ac_file" "$LINENO" 5
30534 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
30535 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30536 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30537 else
30538 rm -f "$ac_file"
30539 mv "$tmp/config.h" "$ac_file" \
30540 || as_fn_error "could not create $ac_file" "$LINENO" 5
30541 fi
30542 else
30543 $as_echo "/* $configure_input */" \
30544 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30545 || as_fn_error "could not create -" "$LINENO" 5
30546 fi
30547 # Compute "$ac_file"'s index in $config_headers.
30548 _am_arg="$ac_file"
30549 _am_stamp_count=1
30550 for _am_header in $config_headers :; do
30551 case $_am_header in
30552 $_am_arg | $_am_arg:* )
30553 break ;;
30554 * )
30555 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30556 esac
30557 done
30558 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30559 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30560 X"$_am_arg" : 'X\(//\)[^/]' \| \
30561 X"$_am_arg" : 'X\(//\)$' \| \
30562 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30563 $as_echo X"$_am_arg" |
30564 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30565 s//\1/
30566 q
30567 }
30568 /^X\(\/\/\)[^/].*/{
30569 s//\1/
30570 q
30571 }
30572 /^X\(\/\/\)$/{
30573 s//\1/
30574 q
30575 }
30576 /^X\(\/\).*/{
30577 s//\1/
30578 q
30579 }
30580 s/.*/./; q'`/stamp-h$_am_stamp_count
30581 ;;
30582
30583 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30584 $as_echo "$as_me: executing $ac_file commands" >&6;}
30585 ;;
30586 esac
30587
30588
30589 case $ac_file$ac_mode in
30590 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30591 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30592 # are listed without --file. Let's play safe and only enable the eval
30593 # if we detect the quoting.
30594 case $CONFIG_FILES in
30595 *\'*) eval set x "$CONFIG_FILES" ;;
30596 *) set x $CONFIG_FILES ;;
30597 esac
30598 shift
30599 for mf
30600 do
30601 # Strip MF so we end up with the name of the file.
30602 mf=`echo "$mf" | sed -e 's/:.*$//'`
30603 # Check whether this is an Automake generated Makefile or not.
30604 # We used to match only the files named `Makefile.in', but
30605 # some people rename them; so instead we look at the file content.
30606 # Grep'ing the first line is not enough: some people post-process
30607 # each Makefile.in and add a new line on top of each file to say so.
30608 # Grep'ing the whole file is not good either: AIX grep has a line
30609 # limit of 2048, but all sed's we know have understand at least 4000.
30610 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30611 dirpart=`$as_dirname -- "$mf" ||
30612 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30613 X"$mf" : 'X\(//\)[^/]' \| \
30614 X"$mf" : 'X\(//\)$' \| \
30615 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30616 $as_echo X"$mf" |
30617 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30618 s//\1/
30619 q
30620 }
30621 /^X\(\/\/\)[^/].*/{
30622 s//\1/
30623 q
30624 }
30625 /^X\(\/\/\)$/{
30626 s//\1/
30627 q
30628 }
30629 /^X\(\/\).*/{
30630 s//\1/
30631 q
30632 }
30633 s/.*/./; q'`
30634 else
30635 continue
30636 fi
30637 # Extract the definition of DEPDIR, am__include, and am__quote
30638 # from the Makefile without running `make'.
30639 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30640 test -z "$DEPDIR" && continue
30641 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30642 test -z "am__include" && continue
30643 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30644 # When using ansi2knr, U may be empty or an underscore; expand it
30645 U=`sed -n 's/^U = //p' < "$mf"`
30646 # Find all dependency output files, they are included files with
30647 # $(DEPDIR) in their names. We invoke sed twice because it is the
30648 # simplest approach to changing $(DEPDIR) to its actual value in the
30649 # expansion.
30650 for file in `sed -n "
30651 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30652 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
30653 # Make sure the directory exists.
30654 test -f "$dirpart/$file" && continue
30655 fdir=`$as_dirname -- "$file" ||
30656 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30657 X"$file" : 'X\(//\)[^/]' \| \
30658 X"$file" : 'X\(//\)$' \| \
30659 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30660 $as_echo X"$file" |
30661 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30662 s//\1/
30663 q
30664 }
30665 /^X\(\/\/\)[^/].*/{
30666 s//\1/
30667 q
30668 }
30669 /^X\(\/\/\)$/{
30670 s//\1/
30671 q
30672 }
30673 /^X\(\/\).*/{
30674 s//\1/
30675 q
30676 }
30677 s/.*/./; q'`
30678 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30679 # echo "creating $dirpart/$file"
30680 echo '# dummy' > "$dirpart/$file"
30681 done
30682 done
30683 }
30684 ;;
30685 "src/epaths.h":C)
30686 if test "${opsys}" = "mingw32"; then
30687 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
30688 else
30689 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
30690 fi
30691 ;;
30692 "src/.gdbinit":C)
30693 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
30694 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
30695 fi
30696 ;;
30697
30698 esac
30699 done # for ac_tag
30700
30701
30702 as_fn_exit 0
30703 _ACEOF
30704 ac_clean_files=$ac_clean_files_save
30705
30706 test $ac_write_fail = 0 ||
30707 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
30708
30709
30710 # configure is writing to config.log, and then calls config.status.
30711 # config.status does its own redirection, appending to config.log.
30712 # Unfortunately, on DOS this fails, as config.log is still kept open
30713 # by configure, so config.status won't be able to write to it; its
30714 # output is simply discarded. So we exec the FD to /dev/null,
30715 # effectively closing config.log, so it can be properly (re)opened and
30716 # appended to by config.status. When coming back to configure, we
30717 # need to make the FD available again.
30718 if test "$no_create" != yes; then
30719 ac_cs_success=:
30720 ac_config_status_args=
30721 test "$silent" = yes &&
30722 ac_config_status_args="$ac_config_status_args --quiet"
30723 exec 5>/dev/null
30724 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30725 exec 5>>config.log
30726 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30727 # would make configure fail if this is the last instruction.
30728 $ac_cs_success || as_fn_exit $?
30729 fi
30730 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30732 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30733 fi
30734