Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[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 LIB_GCC
609 LD_FIRSTFLAG
610 LD_SWITCH_SYSTEM_TEMACS
611 LIBGNU_LTLIBDEPS
612 LIBGNU_LIBDEPS
613 gltests_WITNESS
614 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
615 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
616 gl_GNULIB_ENABLED_verify_FALSE
617 gl_GNULIB_ENABLED_verify_TRUE
618 gl_GNULIB_ENABLED_strtoull_FALSE
619 gl_GNULIB_ENABLED_strtoull_TRUE
620 gl_GNULIB_ENABLED_strtoll_FALSE
621 gl_GNULIB_ENABLED_strtoll_TRUE
622 gl_GNULIB_ENABLED_stat_FALSE
623 gl_GNULIB_ENABLED_stat_TRUE
624 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
625 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
626 gl_GNULIB_ENABLED_pathmax_FALSE
627 gl_GNULIB_ENABLED_pathmax_TRUE
628 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
629 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
630 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
631 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
632 gl_GNULIB_ENABLED_getgroups_FALSE
633 gl_GNULIB_ENABLED_getgroups_TRUE
634 gl_GNULIB_ENABLED_euidaccess_FALSE
635 gl_GNULIB_ENABLED_euidaccess_TRUE
636 gl_GNULIB_ENABLED_dosname_FALSE
637 gl_GNULIB_ENABLED_dosname_TRUE
638 LTLIBINTL
639 LIBINTL
640 LIB_EACCESS
641 WINDOWS_64_BIT_OFF_T
642 HAVE_UNISTD_H
643 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
644 NEXT_UNISTD_H
645 LIB_TIMER_TIME
646 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
647 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
648 TIME_H_DEFINES_STRUCT_TIMESPEC
649 NEXT_AS_FIRST_DIRECTIVE_TIME_H
650 NEXT_TIME_H
651 WINDOWS_64_BIT_ST_SIZE
652 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
653 NEXT_SYS_STAT_H
654 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
655 NEXT_STDLIB_H
656 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
657 NEXT_STDIO_H
658 REPLACE_VSPRINTF
659 REPLACE_VSNPRINTF
660 REPLACE_VPRINTF
661 REPLACE_VFPRINTF
662 REPLACE_VDPRINTF
663 REPLACE_VASPRINTF
664 REPLACE_TMPFILE
665 REPLACE_STDIO_WRITE_FUNCS
666 REPLACE_STDIO_READ_FUNCS
667 REPLACE_SPRINTF
668 REPLACE_SNPRINTF
669 REPLACE_RENAMEAT
670 REPLACE_RENAME
671 REPLACE_REMOVE
672 REPLACE_PRINTF
673 REPLACE_POPEN
674 REPLACE_PERROR
675 REPLACE_OBSTACK_PRINTF
676 REPLACE_GETLINE
677 REPLACE_GETDELIM
678 REPLACE_FTELLO
679 REPLACE_FTELL
680 REPLACE_FSEEKO
681 REPLACE_FSEEK
682 REPLACE_FREOPEN
683 REPLACE_FPURGE
684 REPLACE_FPRINTF
685 REPLACE_FOPEN
686 REPLACE_FFLUSH
687 REPLACE_FDOPEN
688 REPLACE_FCLOSE
689 REPLACE_DPRINTF
690 HAVE_VDPRINTF
691 HAVE_VASPRINTF
692 HAVE_RENAMEAT
693 HAVE_POPEN
694 HAVE_PCLOSE
695 HAVE_FTELLO
696 HAVE_FSEEKO
697 HAVE_DPRINTF
698 HAVE_DECL_VSNPRINTF
699 HAVE_DECL_SNPRINTF
700 HAVE_DECL_OBSTACK_PRINTF
701 HAVE_DECL_GETLINE
702 HAVE_DECL_GETDELIM
703 HAVE_DECL_FTELLO
704 HAVE_DECL_FSEEKO
705 HAVE_DECL_FPURGE
706 GNULIB_VSPRINTF_POSIX
707 GNULIB_VSNPRINTF
708 GNULIB_VPRINTF_POSIX
709 GNULIB_VPRINTF
710 GNULIB_VFPRINTF_POSIX
711 GNULIB_VFPRINTF
712 GNULIB_VDPRINTF
713 GNULIB_VSCANF
714 GNULIB_VFSCANF
715 GNULIB_VASPRINTF
716 GNULIB_TMPFILE
717 GNULIB_STDIO_H_SIGPIPE
718 GNULIB_STDIO_H_NONBLOCKING
719 GNULIB_SPRINTF_POSIX
720 GNULIB_SNPRINTF
721 GNULIB_SCANF
722 GNULIB_RENAMEAT
723 GNULIB_RENAME
724 GNULIB_REMOVE
725 GNULIB_PUTS
726 GNULIB_PUTCHAR
727 GNULIB_PUTC
728 GNULIB_PRINTF_POSIX
729 GNULIB_PRINTF
730 GNULIB_POPEN
731 GNULIB_PERROR
732 GNULIB_PCLOSE
733 GNULIB_OBSTACK_PRINTF_POSIX
734 GNULIB_OBSTACK_PRINTF
735 GNULIB_GETLINE
736 GNULIB_GETDELIM
737 GNULIB_GETCHAR
738 GNULIB_GETC
739 GNULIB_FWRITE
740 GNULIB_FTELLO
741 GNULIB_FTELL
742 GNULIB_FSEEKO
743 GNULIB_FSEEK
744 GNULIB_FSCANF
745 GNULIB_FREOPEN
746 GNULIB_FREAD
747 GNULIB_FPUTS
748 GNULIB_FPUTC
749 GNULIB_FPURGE
750 GNULIB_FPRINTF_POSIX
751 GNULIB_FPRINTF
752 GNULIB_FOPEN
753 GNULIB_FGETS
754 GNULIB_FGETC
755 GNULIB_FFLUSH
756 GNULIB_FDOPEN
757 GNULIB_FCLOSE
758 GNULIB_DPRINTF
759 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
760 NEXT_STDDEF_H
761 GL_GENERATE_STDDEF_H_FALSE
762 GL_GENERATE_STDDEF_H_TRUE
763 STDDEF_H
764 HAVE_WCHAR_T
765 REPLACE_NULL
766 HAVE__BOOL
767 GL_GENERATE_STDBOOL_H_FALSE
768 GL_GENERATE_STDBOOL_H_TRUE
769 STDBOOL_H
770 GL_GENERATE_STDARG_H_FALSE
771 GL_GENERATE_STDARG_H_TRUE
772 STDARG_H
773 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
774 NEXT_STDARG_H
775 GL_GENERATE_STDALIGN_H_FALSE
776 GL_GENERATE_STDALIGN_H_TRUE
777 STDALIGN_H
778 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
779 NEXT_SIGNAL_H
780 LIB_PTHREAD_SIGMASK
781 REPLACE_RAISE
782 REPLACE_PTHREAD_SIGMASK
783 HAVE_SIGHANDLER_T
784 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
785 HAVE_STRUCT_SIGACTION_SA_SIGACTION
786 HAVE_SIGACTION
787 HAVE_SIGINFO_T
788 HAVE_SIGSET_T
789 HAVE_RAISE
790 HAVE_PTHREAD_SIGMASK
791 HAVE_POSIX_SIGNALBLOCKING
792 GNULIB_SIGACTION
793 GNULIB_SIGPROCMASK
794 GNULIB_SIGNAL_H_SIGPIPE
795 GNULIB_RAISE
796 GNULIB_PTHREAD_SIGMASK
797 HAVE_SYS_SELECT_H
798 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
799 NEXT_SYS_SELECT_H
800 REPLACE_SELECT
801 REPLACE_PSELECT
802 HAVE_PSELECT
803 GNULIB_SELECT
804 GNULIB_PSELECT
805 REPLACE_TIMEGM
806 REPLACE_NANOSLEEP
807 REPLACE_MKTIME
808 REPLACE_LOCALTIME_R
809 HAVE_TIMEGM
810 HAVE_STRPTIME
811 HAVE_NANOSLEEP
812 HAVE_DECL_LOCALTIME_R
813 GNULIB_TIME_R
814 GNULIB_TIMEGM
815 GNULIB_STRPTIME
816 GNULIB_NANOSLEEP
817 GNULIB_MKTIME
818 REPLACE_UTIMENSAT
819 REPLACE_STAT
820 REPLACE_MKNOD
821 REPLACE_MKFIFO
822 REPLACE_MKDIR
823 REPLACE_LSTAT
824 REPLACE_FUTIMENS
825 REPLACE_FSTATAT
826 REPLACE_FSTAT
827 HAVE_UTIMENSAT
828 HAVE_MKNODAT
829 HAVE_MKNOD
830 HAVE_MKFIFOAT
831 HAVE_MKFIFO
832 HAVE_MKDIRAT
833 HAVE_LSTAT
834 HAVE_LCHMOD
835 HAVE_FUTIMENS
836 HAVE_FSTATAT
837 HAVE_FCHMODAT
838 GNULIB_UTIMENSAT
839 GNULIB_STAT
840 GNULIB_MKNODAT
841 GNULIB_MKNOD
842 GNULIB_MKFIFOAT
843 GNULIB_MKFIFO
844 GNULIB_MKDIRAT
845 GNULIB_LSTAT
846 GNULIB_LCHMOD
847 GNULIB_FUTIMENS
848 GNULIB_FSTATAT
849 GNULIB_FSTAT
850 GNULIB_FCHMODAT
851 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
852 NEXT_INTTYPES_H
853 UINT64_MAX_EQ_ULONG_MAX
854 UINT32_MAX_LT_UINTMAX_MAX
855 PRIPTR_PREFIX
856 PRI_MACROS_BROKEN
857 INT64_MAX_EQ_LONG_MAX
858 INT32_MAX_LT_INTMAX_MAX
859 REPLACE_STRTOIMAX
860 HAVE_DECL_STRTOUMAX
861 HAVE_DECL_STRTOIMAX
862 HAVE_DECL_IMAXDIV
863 HAVE_DECL_IMAXABS
864 GNULIB_STRTOUMAX
865 GNULIB_STRTOIMAX
866 GNULIB_IMAXDIV
867 GNULIB_IMAXABS
868 GL_GENERATE_STDINT_H_FALSE
869 GL_GENERATE_STDINT_H_TRUE
870 STDINT_H
871 WINT_T_SUFFIX
872 WCHAR_T_SUFFIX
873 SIG_ATOMIC_T_SUFFIX
874 SIZE_T_SUFFIX
875 PTRDIFF_T_SUFFIX
876 HAVE_SIGNED_WINT_T
877 HAVE_SIGNED_WCHAR_T
878 HAVE_SIGNED_SIG_ATOMIC_T
879 BITSIZEOF_WINT_T
880 BITSIZEOF_WCHAR_T
881 BITSIZEOF_SIG_ATOMIC_T
882 BITSIZEOF_SIZE_T
883 BITSIZEOF_PTRDIFF_T
884 APPLE_UNIVERSAL_BUILD
885 HAVE_SYS_BITYPES_H
886 HAVE_SYS_INTTYPES_H
887 HAVE_STDINT_H
888 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
889 NEXT_STDINT_H
890 HAVE_SYS_TYPES_H
891 HAVE_INTTYPES_H
892 HAVE_WCHAR_H
893 HAVE_UNSIGNED_LONG_LONG_INT
894 HAVE_LONG_LONG_INT
895 HAVE_WINSOCK2_H
896 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
897 NEXT_SYS_TIME_H
898 REPLACE_STRUCT_TIMEVAL
899 REPLACE_GETTIMEOFDAY
900 HAVE_SYS_TIME_H
901 HAVE_STRUCT_TIMEVAL
902 HAVE_GETTIMEOFDAY
903 GNULIB_GETTIMEOFDAY
904 GNULIB_GL_UNISTD_H_GETOPT
905 GETOPT_H
906 HAVE_GETOPT_H
907 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
908 NEXT_GETOPT_H
909 GETLOADAVG_LIBS
910 REPLACE_WCTOMB
911 REPLACE_UNSETENV
912 REPLACE_STRTOD
913 REPLACE_SETENV
914 REPLACE_REALPATH
915 REPLACE_REALLOC
916 REPLACE_RANDOM_R
917 REPLACE_PUTENV
918 REPLACE_PTSNAME_R
919 REPLACE_PTSNAME
920 REPLACE_MKSTEMP
921 REPLACE_MBTOWC
922 REPLACE_MALLOC
923 REPLACE_CANONICALIZE_FILE_NAME
924 REPLACE_CALLOC
925 HAVE_DECL_UNSETENV
926 HAVE_UNLOCKPT
927 HAVE_SYS_LOADAVG_H
928 HAVE_STRUCT_RANDOM_DATA
929 HAVE_STRTOULL
930 HAVE_STRTOLL
931 HAVE_STRTOD
932 HAVE_DECL_SETENV
933 HAVE_SETENV
934 HAVE_RPMATCH
935 HAVE_REALPATH
936 HAVE_RANDOM_R
937 HAVE_RANDOM_H
938 HAVE_RANDOM
939 HAVE_PTSNAME_R
940 HAVE_PTSNAME
941 HAVE_POSIX_OPENPT
942 HAVE_MKSTEMPS
943 HAVE_MKSTEMP
944 HAVE_MKOSTEMPS
945 HAVE_MKOSTEMP
946 HAVE_MKDTEMP
947 HAVE_GRANTPT
948 HAVE_GETSUBOPT
949 HAVE_DECL_GETLOADAVG
950 HAVE_CANONICALIZE_FILE_NAME
951 HAVE_ATOLL
952 HAVE__EXIT
953 GNULIB_WCTOMB
954 GNULIB_UNSETENV
955 GNULIB_UNLOCKPT
956 GNULIB_SYSTEM_POSIX
957 GNULIB_STRTOULL
958 GNULIB_STRTOLL
959 GNULIB_STRTOD
960 GNULIB_SETENV
961 GNULIB_RPMATCH
962 GNULIB_REALPATH
963 GNULIB_REALLOC_POSIX
964 GNULIB_RANDOM_R
965 GNULIB_RANDOM
966 GNULIB_PUTENV
967 GNULIB_PTSNAME_R
968 GNULIB_PTSNAME
969 GNULIB_POSIX_OPENPT
970 GNULIB_MKSTEMPS
971 GNULIB_MKSTEMP
972 GNULIB_MKOSTEMPS
973 GNULIB_MKOSTEMP
974 GNULIB_MKDTEMP
975 GNULIB_MBTOWC
976 GNULIB_MALLOC_POSIX
977 GNULIB_GRANTPT
978 GNULIB_GETSUBOPT
979 GNULIB_GETLOADAVG
980 GNULIB_CANONICALIZE_FILE_NAME
981 GNULIB_CALLOC_POSIX
982 GNULIB_ATOLL
983 GNULIB__EXIT
984 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
985 NEXT_FCNTL_H
986 PRAGMA_COLUMNS
987 PRAGMA_SYSTEM_HEADER
988 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
989 INCLUDE_NEXT
990 REPLACE_OPENAT
991 REPLACE_OPEN
992 REPLACE_FCNTL
993 HAVE_OPENAT
994 HAVE_FCNTL
995 GNULIB_OPENAT
996 GNULIB_OPEN
997 GNULIB_NONBLOCKING
998 GNULIB_FCNTL
999 GL_GENERATE_EXECINFO_H_FALSE
1000 GL_GENERATE_EXECINFO_H_TRUE
1001 LIB_EXECINFO
1002 EXECINFO_H
1003 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1004 UNISTD_H_HAVE_WINSOCK2_H
1005 REPLACE_WRITE
1006 REPLACE_USLEEP
1007 REPLACE_UNLINKAT
1008 REPLACE_UNLINK
1009 REPLACE_TTYNAME_R
1010 REPLACE_SYMLINK
1011 REPLACE_SLEEP
1012 REPLACE_RMDIR
1013 REPLACE_READLINK
1014 REPLACE_READ
1015 REPLACE_PWRITE
1016 REPLACE_PREAD
1017 REPLACE_LSEEK
1018 REPLACE_LINKAT
1019 REPLACE_LINK
1020 REPLACE_LCHOWN
1021 REPLACE_ISATTY
1022 REPLACE_GETPAGESIZE
1023 REPLACE_GETGROUPS
1024 REPLACE_GETLOGIN_R
1025 REPLACE_GETDOMAINNAME
1026 REPLACE_GETCWD
1027 REPLACE_FTRUNCATE
1028 REPLACE_FCHOWNAT
1029 REPLACE_DUP2
1030 REPLACE_DUP
1031 REPLACE_CLOSE
1032 REPLACE_CHOWN
1033 HAVE_SYS_PARAM_H
1034 HAVE_OS_H
1035 HAVE_DECL_TTYNAME_R
1036 HAVE_DECL_SETHOSTNAME
1037 HAVE_DECL_GETUSERSHELL
1038 HAVE_DECL_GETPAGESIZE
1039 HAVE_DECL_GETLOGIN_R
1040 HAVE_DECL_GETDOMAINNAME
1041 HAVE_DECL_FDATASYNC
1042 HAVE_DECL_FCHDIR
1043 HAVE_DECL_ENVIRON
1044 HAVE_USLEEP
1045 HAVE_UNLINKAT
1046 HAVE_SYMLINKAT
1047 HAVE_SYMLINK
1048 HAVE_SLEEP
1049 HAVE_SETHOSTNAME
1050 HAVE_READLINKAT
1051 HAVE_READLINK
1052 HAVE_PWRITE
1053 HAVE_PREAD
1054 HAVE_PIPE2
1055 HAVE_PIPE
1056 HAVE_LINKAT
1057 HAVE_LINK
1058 HAVE_LCHOWN
1059 HAVE_GROUP_MEMBER
1060 HAVE_GETPAGESIZE
1061 HAVE_GETLOGIN
1062 HAVE_GETHOSTNAME
1063 HAVE_GETGROUPS
1064 HAVE_GETDTABLESIZE
1065 HAVE_FTRUNCATE
1066 HAVE_FSYNC
1067 HAVE_FDATASYNC
1068 HAVE_FCHOWNAT
1069 HAVE_FCHDIR
1070 HAVE_FACCESSAT
1071 HAVE_EUIDACCESS
1072 HAVE_DUP3
1073 HAVE_DUP2
1074 HAVE_CHOWN
1075 GNULIB_WRITE
1076 GNULIB_USLEEP
1077 GNULIB_UNLINKAT
1078 GNULIB_UNLINK
1079 GNULIB_UNISTD_H_SIGPIPE
1080 GNULIB_UNISTD_H_NONBLOCKING
1081 GNULIB_TTYNAME_R
1082 GNULIB_SYMLINKAT
1083 GNULIB_SYMLINK
1084 GNULIB_SLEEP
1085 GNULIB_SETHOSTNAME
1086 GNULIB_RMDIR
1087 GNULIB_READLINKAT
1088 GNULIB_READLINK
1089 GNULIB_READ
1090 GNULIB_PWRITE
1091 GNULIB_PREAD
1092 GNULIB_PIPE2
1093 GNULIB_PIPE
1094 GNULIB_LSEEK
1095 GNULIB_LINKAT
1096 GNULIB_LINK
1097 GNULIB_LCHOWN
1098 GNULIB_ISATTY
1099 GNULIB_GROUP_MEMBER
1100 GNULIB_GETUSERSHELL
1101 GNULIB_GETPAGESIZE
1102 GNULIB_GETLOGIN_R
1103 GNULIB_GETLOGIN
1104 GNULIB_GETHOSTNAME
1105 GNULIB_GETGROUPS
1106 GNULIB_GETDTABLESIZE
1107 GNULIB_GETDOMAINNAME
1108 GNULIB_GETCWD
1109 GNULIB_FTRUNCATE
1110 GNULIB_FSYNC
1111 GNULIB_FDATASYNC
1112 GNULIB_FCHOWNAT
1113 GNULIB_FCHDIR
1114 GNULIB_FACCESSAT
1115 GNULIB_EUIDACCESS
1116 GNULIB_ENVIRON
1117 GNULIB_DUP3
1118 GNULIB_DUP2
1119 GNULIB_DUP
1120 GNULIB_CLOSE
1121 GNULIB_CHOWN
1122 GNULIB_CHDIR
1123 LIB_CLOCK_GETTIME
1124 GL_GENERATE_ALLOCA_H_FALSE
1125 GL_GENERATE_ALLOCA_H_TRUE
1126 ALLOCA_H
1127 ALLOCA
1128 GL_COND_LIBTOOL_FALSE
1129 GL_COND_LIBTOOL_TRUE
1130 POST_ALLOC_OBJ
1131 PRE_ALLOC_OBJ
1132 CYGWIN_OBJ
1133 RALLOC_OBJ
1134 OLDXMENU_DEPS
1135 LIBX_OTHER
1136 LIBXMENU
1137 OLDXMENU
1138 OLDXMENU_TARGET
1139 LIBXT_OTHER
1140 TOOLKIT_LIBW
1141 WIDGET_OBJ
1142 XOBJ
1143 XMENU_OBJ
1144 FONT_OBJ
1145 OTHER_FILES
1146 GNU_OBJC_CFLAGS
1147 ns_appsrc
1148 ns_appresdir
1149 ns_appbindir
1150 ns_appdir
1151 X_TOOLKIT_TYPE
1152 GNUSTEP_CFLAGS
1153 C_SWITCH_X_SITE
1154 LD_SWITCH_X_SITE
1155 gameuser
1156 gamedir
1157 bitmapdir
1158 archlibdir
1159 etcdir
1160 x_default_search_path
1161 lisppath
1162 locallisppath
1163 standardlisppath
1164 leimdir
1165 lispdir
1166 srcdir
1167 canonical
1168 configuration
1169 version
1170 copyright
1171 KRB4LIB
1172 DESLIB
1173 KRB5LIB
1174 CRYPTOLIB
1175 COM_ERRLIB
1176 LIBRESOLV
1177 LIBHESIOD
1178 TERMCAP_OBJ
1179 LIBS_TERMCAP
1180 BLESSMAIL_TARGET
1181 LIBS_MAIL
1182 liblockfile
1183 LIBXML2_LIBS
1184 LIBXML2_CFLAGS
1185 LIBXSM
1186 LIBGPM
1187 LIBGIF
1188 LIBTIFF
1189 LIBPNG
1190 LIBJPEG
1191 LIBXPM
1192 M17N_FLT_LIBS
1193 M17N_FLT_CFLAGS
1194 LIBOTF_LIBS
1195 LIBOTF_CFLAGS
1196 FREETYPE_LIBS
1197 FREETYPE_CFLAGS
1198 XFT_LIBS
1199 XFT_CFLAGS
1200 FONTCONFIG_LIBS
1201 FONTCONFIG_CFLAGS
1202 LIBXMU
1203 LIBXTR6
1204 LIBACL_LIBS
1205 LIBGNUTLS_LIBS
1206 LIBGNUTLS_CFLAGS
1207 LIBSELINUX_LIBS
1208 SETTINGS_LIBS
1209 SETTINGS_CFLAGS
1210 GOBJECT_LIBS
1211 GOBJECT_CFLAGS
1212 GCONF_LIBS
1213 GCONF_CFLAGS
1214 GSETTINGS_LIBS
1215 GSETTINGS_CFLAGS
1216 DBUS_OBJ
1217 DBUS_LIBS
1218 DBUS_CFLAGS
1219 GTK_OBJ
1220 GTK_LIBS
1221 GTK_CFLAGS
1222 IMAGEMAGICK_LIBS
1223 IMAGEMAGICK_CFLAGS
1224 RSVG_LIBS
1225 RSVG_CFLAGS
1226 LIB_PTHREAD
1227 VMLIMIT_OBJ
1228 GMALLOC_OBJ
1229 HAVE_XSERVER
1230 W32_RES_LINK
1231 W32_RES
1232 W32_LIBS
1233 W32_OBJ
1234 WINDRES
1235 LIB_STANDARD
1236 NS_OBJC_OBJ
1237 NS_OBJ
1238 ns_self_contained
1239 INSTALL_ARCH_INDEP_EXTRA
1240 LIBS_GNUSTEP
1241 LD_SWITCH_X_SITE_RPATH
1242 XMKMF
1243 DEPFLAGS
1244 MKDEPDIR
1245 CFLAGS_SOUND
1246 ALSA_LIBS
1247 ALSA_CFLAGS
1248 LIBSOUND
1249 PKG_CONFIG
1250 CRT_DIR
1251 START_FILES
1252 LIB_MATH
1253 LIBS_SYSTEM
1254 C_SWITCH_SYSTEM
1255 UNEXEC_OBJ
1256 C_SWITCH_MACHINE
1257 LD_SWITCH_SYSTEM
1258 CANNOT_DUMP
1259 INFO_OPTS
1260 INFO_EXT
1261 HAVE_MAKEINFO
1262 PAXCTL
1263 GZIP_PROG
1264 INSTALL_INFO
1265 LN_S
1266 GNULIB_WARN_CFLAGS
1267 WARN_CFLAGS
1268 WERROR_CFLAGS
1269 RANLIB
1270 ARFLAGS
1271 AR
1272 EGREP
1273 GREP
1274 CPP
1275 am__fastdepCC_FALSE
1276 am__fastdepCC_TRUE
1277 CCDEPMODE
1278 AMDEPBACKSLASH
1279 AMDEP_FALSE
1280 AMDEP_TRUE
1281 am__quote
1282 am__include
1283 DEPDIR
1284 OBJEXT
1285 EXEEXT
1286 ac_ct_CC
1287 CPPFLAGS
1288 LDFLAGS
1289 CFLAGS
1290 CC
1291 host_os
1292 host_vendor
1293 host_cpu
1294 host
1295 build_os
1296 build_vendor
1297 build_cpu
1298 build
1299 PROFILING_CFLAGS
1300 GZIP_INFO
1301 cache_file
1302 am__untar
1303 am__tar
1304 AMTAR
1305 am__leading_dot
1306 SET_MAKE
1307 AWK
1308 mkdir_p
1309 MKDIR_P
1310 INSTALL_STRIP_PROGRAM
1311 STRIP
1312 install_sh
1313 MAKEINFO
1314 AUTOHEADER
1315 AUTOMAKE
1316 AUTOCONF
1317 ACLOCAL
1318 VERSION
1319 PACKAGE
1320 CYGPATH_W
1321 am__isrc
1322 INSTALL_DATA
1323 INSTALL_SCRIPT
1324 INSTALL_PROGRAM
1325 target_alias
1326 host_alias
1327 build_alias
1328 LIBS
1329 ECHO_T
1330 ECHO_N
1331 ECHO_C
1332 DEFS
1333 mandir
1334 localedir
1335 libdir
1336 psdir
1337 pdfdir
1338 dvidir
1339 htmldir
1340 infodir
1341 docdir
1342 oldincludedir
1343 includedir
1344 localstatedir
1345 sharedstatedir
1346 sysconfdir
1347 datadir
1348 datarootdir
1349 libexecdir
1350 sbindir
1351 bindir
1352 program_transform_name
1353 prefix
1354 exec_prefix
1355 PACKAGE_URL
1356 PACKAGE_BUGREPORT
1357 PACKAGE_STRING
1358 PACKAGE_VERSION
1359 PACKAGE_TARNAME
1360 PACKAGE_NAME
1361 PATH_SEPARATOR
1362 SHELL'
1363 ac_subst_files='deps_frag
1364 lisp_frag'
1365 ac_user_opts='
1366 enable_option_checking
1367 with_all
1368 with_pop
1369 with_kerberos
1370 with_kerberos5
1371 with_hesiod
1372 with_mmdf
1373 with_mail_unlink
1374 with_mailhost
1375 with_sound
1376 with_x_toolkit
1377 with_wide_int
1378 with_xpm
1379 with_jpeg
1380 with_tiff
1381 with_gif
1382 with_png
1383 with_rsvg
1384 with_xml2
1385 with_imagemagick
1386 with_xft
1387 with_libotf
1388 with_m17n_flt
1389 with_toolkit_scroll_bars
1390 with_xaw3d
1391 with_xim
1392 with_ns
1393 with_w32
1394 with_gpm
1395 with_dbus
1396 with_gconf
1397 with_gsettings
1398 with_selinux
1399 with_acl
1400 with_gnutls
1401 with_inotify
1402 with_makeinfo
1403 with_compress_info
1404 with_pkg_config_prog
1405 with_crt_dir
1406 with_gameuser
1407 with_gnustep_conf
1408 enable_ns_self_contained
1409 enable_locallisppath
1410 enable_checking
1411 enable_check_lisp_object_type
1412 enable_profiling
1413 enable_autodepend
1414 enable_gtk_deprecation_warnings
1415 enable_dependency_tracking
1416 enable_largefile
1417 enable_gcc_warnings
1418 enable_link_time_optimization
1419 with_x
1420 '
1421 ac_precious_vars='build_alias
1422 host_alias
1423 target_alias
1424 CC
1425 CFLAGS
1426 LDFLAGS
1427 LIBS
1428 CPPFLAGS
1429 CPP
1430 XMKMF'
1431
1432
1433 # Initialize some variables set by options.
1434 ac_init_help=
1435 ac_init_version=false
1436 ac_unrecognized_opts=
1437 ac_unrecognized_sep=
1438 # The variables have the same names as the options, with
1439 # dashes changed to underlines.
1440 cache_file=/dev/null
1441 exec_prefix=NONE
1442 no_create=
1443 no_recursion=
1444 prefix=NONE
1445 program_prefix=NONE
1446 program_suffix=NONE
1447 program_transform_name=s,x,x,
1448 silent=
1449 site=
1450 srcdir=
1451 verbose=
1452 x_includes=NONE
1453 x_libraries=NONE
1454
1455 # Installation directory options.
1456 # These are left unexpanded so users can "make install exec_prefix=/foo"
1457 # and all the variables that are supposed to be based on exec_prefix
1458 # by default will actually change.
1459 # Use braces instead of parens because sh, perl, etc. also accept them.
1460 # (The list follows the same order as the GNU Coding Standards.)
1461 bindir='${exec_prefix}/bin'
1462 sbindir='${exec_prefix}/sbin'
1463 libexecdir='${exec_prefix}/libexec'
1464 datarootdir='${prefix}/share'
1465 datadir='${datarootdir}'
1466 sysconfdir='${prefix}/etc'
1467 sharedstatedir='${prefix}/com'
1468 localstatedir='${prefix}/var'
1469 includedir='${prefix}/include'
1470 oldincludedir='/usr/include'
1471 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1472 infodir='${datarootdir}/info'
1473 htmldir='${docdir}'
1474 dvidir='${docdir}'
1475 pdfdir='${docdir}'
1476 psdir='${docdir}'
1477 libdir='${exec_prefix}/lib'
1478 localedir='${datarootdir}/locale'
1479 mandir='${datarootdir}/man'
1480
1481 ac_prev=
1482 ac_dashdash=
1483 for ac_option
1484 do
1485 # If the previous option needs an argument, assign it.
1486 if test -n "$ac_prev"; then
1487 eval $ac_prev=\$ac_option
1488 ac_prev=
1489 continue
1490 fi
1491
1492 case $ac_option in
1493 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1494 *) ac_optarg=yes ;;
1495 esac
1496
1497 # Accept the important Cygnus configure options, so we can diagnose typos.
1498
1499 case $ac_dashdash$ac_option in
1500 --)
1501 ac_dashdash=yes ;;
1502
1503 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1504 ac_prev=bindir ;;
1505 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1506 bindir=$ac_optarg ;;
1507
1508 -build | --build | --buil | --bui | --bu)
1509 ac_prev=build_alias ;;
1510 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1511 build_alias=$ac_optarg ;;
1512
1513 -cache-file | --cache-file | --cache-fil | --cache-fi \
1514 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1515 ac_prev=cache_file ;;
1516 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1517 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1518 cache_file=$ac_optarg ;;
1519
1520 --config-cache | -C)
1521 cache_file=config.cache ;;
1522
1523 -datadir | --datadir | --datadi | --datad)
1524 ac_prev=datadir ;;
1525 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1526 datadir=$ac_optarg ;;
1527
1528 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1529 | --dataroo | --dataro | --datar)
1530 ac_prev=datarootdir ;;
1531 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1532 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1533 datarootdir=$ac_optarg ;;
1534
1535 -disable-* | --disable-*)
1536 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1537 # Reject names that are not valid shell variable names.
1538 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1539 as_fn_error "invalid feature name: $ac_useropt"
1540 ac_useropt_orig=$ac_useropt
1541 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1542 case $ac_user_opts in
1543 *"
1544 "enable_$ac_useropt"
1545 "*) ;;
1546 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1547 ac_unrecognized_sep=', ';;
1548 esac
1549 eval enable_$ac_useropt=no ;;
1550
1551 -docdir | --docdir | --docdi | --doc | --do)
1552 ac_prev=docdir ;;
1553 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1554 docdir=$ac_optarg ;;
1555
1556 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1557 ac_prev=dvidir ;;
1558 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1559 dvidir=$ac_optarg ;;
1560
1561 -enable-* | --enable-*)
1562 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1563 # Reject names that are not valid shell variable names.
1564 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1565 as_fn_error "invalid feature name: $ac_useropt"
1566 ac_useropt_orig=$ac_useropt
1567 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1568 case $ac_user_opts in
1569 *"
1570 "enable_$ac_useropt"
1571 "*) ;;
1572 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1573 ac_unrecognized_sep=', ';;
1574 esac
1575 eval enable_$ac_useropt=\$ac_optarg ;;
1576
1577 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1578 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1579 | --exec | --exe | --ex)
1580 ac_prev=exec_prefix ;;
1581 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1582 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1583 | --exec=* | --exe=* | --ex=*)
1584 exec_prefix=$ac_optarg ;;
1585
1586 -gas | --gas | --ga | --g)
1587 # Obsolete; use --with-gas.
1588 with_gas=yes ;;
1589
1590 -help | --help | --hel | --he | -h)
1591 ac_init_help=long ;;
1592 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1593 ac_init_help=recursive ;;
1594 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1595 ac_init_help=short ;;
1596
1597 -host | --host | --hos | --ho)
1598 ac_prev=host_alias ;;
1599 -host=* | --host=* | --hos=* | --ho=*)
1600 host_alias=$ac_optarg ;;
1601
1602 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1603 ac_prev=htmldir ;;
1604 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1605 | --ht=*)
1606 htmldir=$ac_optarg ;;
1607
1608 -includedir | --includedir | --includedi | --included | --include \
1609 | --includ | --inclu | --incl | --inc)
1610 ac_prev=includedir ;;
1611 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1612 | --includ=* | --inclu=* | --incl=* | --inc=*)
1613 includedir=$ac_optarg ;;
1614
1615 -infodir | --infodir | --infodi | --infod | --info | --inf)
1616 ac_prev=infodir ;;
1617 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1618 infodir=$ac_optarg ;;
1619
1620 -libdir | --libdir | --libdi | --libd)
1621 ac_prev=libdir ;;
1622 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1623 libdir=$ac_optarg ;;
1624
1625 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1626 | --libexe | --libex | --libe)
1627 ac_prev=libexecdir ;;
1628 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1629 | --libexe=* | --libex=* | --libe=*)
1630 libexecdir=$ac_optarg ;;
1631
1632 -localedir | --localedir | --localedi | --localed | --locale)
1633 ac_prev=localedir ;;
1634 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1635 localedir=$ac_optarg ;;
1636
1637 -localstatedir | --localstatedir | --localstatedi | --localstated \
1638 | --localstate | --localstat | --localsta | --localst | --locals)
1639 ac_prev=localstatedir ;;
1640 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1641 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1642 localstatedir=$ac_optarg ;;
1643
1644 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1645 ac_prev=mandir ;;
1646 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1647 mandir=$ac_optarg ;;
1648
1649 -nfp | --nfp | --nf)
1650 # Obsolete; use --without-fp.
1651 with_fp=no ;;
1652
1653 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1654 | --no-cr | --no-c | -n)
1655 no_create=yes ;;
1656
1657 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1658 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1659 no_recursion=yes ;;
1660
1661 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1662 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1663 | --oldin | --oldi | --old | --ol | --o)
1664 ac_prev=oldincludedir ;;
1665 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1666 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1667 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1668 oldincludedir=$ac_optarg ;;
1669
1670 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1671 ac_prev=prefix ;;
1672 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1673 prefix=$ac_optarg ;;
1674
1675 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1676 | --program-pre | --program-pr | --program-p)
1677 ac_prev=program_prefix ;;
1678 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1679 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1680 program_prefix=$ac_optarg ;;
1681
1682 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1683 | --program-suf | --program-su | --program-s)
1684 ac_prev=program_suffix ;;
1685 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1686 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1687 program_suffix=$ac_optarg ;;
1688
1689 -program-transform-name | --program-transform-name \
1690 | --program-transform-nam | --program-transform-na \
1691 | --program-transform-n | --program-transform- \
1692 | --program-transform | --program-transfor \
1693 | --program-transfo | --program-transf \
1694 | --program-trans | --program-tran \
1695 | --progr-tra | --program-tr | --program-t)
1696 ac_prev=program_transform_name ;;
1697 -program-transform-name=* | --program-transform-name=* \
1698 | --program-transform-nam=* | --program-transform-na=* \
1699 | --program-transform-n=* | --program-transform-=* \
1700 | --program-transform=* | --program-transfor=* \
1701 | --program-transfo=* | --program-transf=* \
1702 | --program-trans=* | --program-tran=* \
1703 | --progr-tra=* | --program-tr=* | --program-t=*)
1704 program_transform_name=$ac_optarg ;;
1705
1706 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1707 ac_prev=pdfdir ;;
1708 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1709 pdfdir=$ac_optarg ;;
1710
1711 -psdir | --psdir | --psdi | --psd | --ps)
1712 ac_prev=psdir ;;
1713 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1714 psdir=$ac_optarg ;;
1715
1716 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1717 | -silent | --silent | --silen | --sile | --sil)
1718 silent=yes ;;
1719
1720 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1721 ac_prev=sbindir ;;
1722 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1723 | --sbi=* | --sb=*)
1724 sbindir=$ac_optarg ;;
1725
1726 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1727 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1728 | --sharedst | --shareds | --shared | --share | --shar \
1729 | --sha | --sh)
1730 ac_prev=sharedstatedir ;;
1731 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1732 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1733 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1734 | --sha=* | --sh=*)
1735 sharedstatedir=$ac_optarg ;;
1736
1737 -site | --site | --sit)
1738 ac_prev=site ;;
1739 -site=* | --site=* | --sit=*)
1740 site=$ac_optarg ;;
1741
1742 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1743 ac_prev=srcdir ;;
1744 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1745 srcdir=$ac_optarg ;;
1746
1747 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1748 | --syscon | --sysco | --sysc | --sys | --sy)
1749 ac_prev=sysconfdir ;;
1750 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1751 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1752 sysconfdir=$ac_optarg ;;
1753
1754 -target | --target | --targe | --targ | --tar | --ta | --t)
1755 ac_prev=target_alias ;;
1756 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1757 target_alias=$ac_optarg ;;
1758
1759 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1760 verbose=yes ;;
1761
1762 -version | --version | --versio | --versi | --vers | -V)
1763 ac_init_version=: ;;
1764
1765 -with-* | --with-*)
1766 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1767 # Reject names that are not valid shell variable names.
1768 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1769 as_fn_error "invalid package name: $ac_useropt"
1770 ac_useropt_orig=$ac_useropt
1771 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1772 case $ac_user_opts in
1773 *"
1774 "with_$ac_useropt"
1775 "*) ;;
1776 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1777 ac_unrecognized_sep=', ';;
1778 esac
1779 eval with_$ac_useropt=\$ac_optarg ;;
1780
1781 -without-* | --without-*)
1782 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1783 # Reject names that are not valid shell variable names.
1784 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1785 as_fn_error "invalid package name: $ac_useropt"
1786 ac_useropt_orig=$ac_useropt
1787 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1788 case $ac_user_opts in
1789 *"
1790 "with_$ac_useropt"
1791 "*) ;;
1792 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1793 ac_unrecognized_sep=', ';;
1794 esac
1795 eval with_$ac_useropt=no ;;
1796
1797 --x)
1798 # Obsolete; use --with-x.
1799 with_x=yes ;;
1800
1801 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1802 | --x-incl | --x-inc | --x-in | --x-i)
1803 ac_prev=x_includes ;;
1804 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1805 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1806 x_includes=$ac_optarg ;;
1807
1808 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1809 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1810 ac_prev=x_libraries ;;
1811 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1812 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1813 x_libraries=$ac_optarg ;;
1814
1815 -*) as_fn_error "unrecognized option: \`$ac_option'
1816 Try \`$0 --help' for more information."
1817 ;;
1818
1819 *=*)
1820 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1821 # Reject names that are not valid shell variable names.
1822 case $ac_envvar in #(
1823 '' | [0-9]* | *[!_$as_cr_alnum]* )
1824 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1825 esac
1826 eval $ac_envvar=\$ac_optarg
1827 export $ac_envvar ;;
1828
1829 *)
1830 # FIXME: should be removed in autoconf 3.0.
1831 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1832 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1833 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1834 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1835 ;;
1836
1837 esac
1838 done
1839
1840 if test -n "$ac_prev"; then
1841 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1842 as_fn_error "missing argument to $ac_option"
1843 fi
1844
1845 if test -n "$ac_unrecognized_opts"; then
1846 case $enable_option_checking in
1847 no) ;;
1848 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1849 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1850 esac
1851 fi
1852
1853 # Check all directory arguments for consistency.
1854 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1855 datadir sysconfdir sharedstatedir localstatedir includedir \
1856 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1857 libdir localedir mandir
1858 do
1859 eval ac_val=\$$ac_var
1860 # Remove trailing slashes.
1861 case $ac_val in
1862 */ )
1863 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1864 eval $ac_var=\$ac_val;;
1865 esac
1866 # Be sure to have absolute directory names.
1867 case $ac_val in
1868 [\\/$]* | ?:[\\/]* ) continue;;
1869 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1870 esac
1871 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1872 done
1873
1874 # There might be people who depend on the old broken behavior: `$host'
1875 # used to hold the argument of --host etc.
1876 # FIXME: To remove some day.
1877 build=$build_alias
1878 host=$host_alias
1879 target=$target_alias
1880
1881 # FIXME: To remove some day.
1882 if test "x$host_alias" != x; then
1883 if test "x$build_alias" = x; then
1884 cross_compiling=maybe
1885 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1886 If a cross compiler is detected then cross compile mode will be used." >&2
1887 elif test "x$build_alias" != "x$host_alias"; then
1888 cross_compiling=yes
1889 fi
1890 fi
1891
1892 ac_tool_prefix=
1893 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1894
1895 test "$silent" = yes && exec 6>/dev/null
1896
1897
1898 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1899 ac_ls_di=`ls -di .` &&
1900 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1901 as_fn_error "working directory cannot be determined"
1902 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1903 as_fn_error "pwd does not report name of working directory"
1904
1905
1906 # Find the source files, if location was not specified.
1907 if test -z "$srcdir"; then
1908 ac_srcdir_defaulted=yes
1909 # Try the directory containing this script, then the parent directory.
1910 ac_confdir=`$as_dirname -- "$as_myself" ||
1911 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1912 X"$as_myself" : 'X\(//\)[^/]' \| \
1913 X"$as_myself" : 'X\(//\)$' \| \
1914 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1915 $as_echo X"$as_myself" |
1916 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1917 s//\1/
1918 q
1919 }
1920 /^X\(\/\/\)[^/].*/{
1921 s//\1/
1922 q
1923 }
1924 /^X\(\/\/\)$/{
1925 s//\1/
1926 q
1927 }
1928 /^X\(\/\).*/{
1929 s//\1/
1930 q
1931 }
1932 s/.*/./; q'`
1933 srcdir=$ac_confdir
1934 if test ! -r "$srcdir/$ac_unique_file"; then
1935 srcdir=..
1936 fi
1937 else
1938 ac_srcdir_defaulted=no
1939 fi
1940 if test ! -r "$srcdir/$ac_unique_file"; then
1941 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1942 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1943 fi
1944 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1945 ac_abs_confdir=`(
1946 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1947 pwd)`
1948 # When building in place, set srcdir=.
1949 if test "$ac_abs_confdir" = "$ac_pwd"; then
1950 srcdir=.
1951 fi
1952 # Remove unnecessary trailing slashes from srcdir.
1953 # Double slashes in file names in object file debugging info
1954 # mess up M-x gdb in Emacs.
1955 case $srcdir in
1956 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1957 esac
1958 for ac_var in $ac_precious_vars; do
1959 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1960 eval ac_env_${ac_var}_value=\$${ac_var}
1961 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1962 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1963 done
1964
1965 #
1966 # Report the --help message.
1967 #
1968 if test "$ac_init_help" = "long"; then
1969 # Omit some internal or obsolete options to make the list less imposing.
1970 # This message is too long to be a string in the A/UX 3.1 sh.
1971 cat <<_ACEOF
1972 \`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
1973
1974 Usage: $0 [OPTION]... [VAR=VALUE]...
1975
1976 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1977 VAR=VALUE. See below for descriptions of some of the useful variables.
1978
1979 Defaults for the options are specified in brackets.
1980
1981 Configuration:
1982 -h, --help display this help and exit
1983 --help=short display options specific to this package
1984 --help=recursive display the short help of all the included packages
1985 -V, --version display version information and exit
1986 -q, --quiet, --silent do not print \`checking...' messages
1987 --cache-file=FILE cache test results in FILE [disabled]
1988 -C, --config-cache alias for \`--cache-file=config.cache'
1989 -n, --no-create do not create output files
1990 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1991
1992 Installation directories:
1993 --prefix=PREFIX install architecture-independent files in PREFIX
1994 [$ac_default_prefix]
1995 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1996 [PREFIX]
1997
1998 By default, \`make install' will install all the files in
1999 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2000 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2001 for instance \`--prefix=\$HOME'.
2002
2003 For better control, use the options below.
2004
2005 Fine tuning of the installation directories:
2006 --bindir=DIR user executables [EPREFIX/bin]
2007 --sbindir=DIR system admin executables [EPREFIX/sbin]
2008 --libexecdir=DIR program executables [EPREFIX/libexec]
2009 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2010 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2011 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2012 --libdir=DIR object code libraries [EPREFIX/lib]
2013 --includedir=DIR C header files [PREFIX/include]
2014 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2015 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2016 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2017 --infodir=DIR info documentation [DATAROOTDIR/info]
2018 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2019 --mandir=DIR man documentation [DATAROOTDIR/man]
2020 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2021 --htmldir=DIR html documentation [DOCDIR]
2022 --dvidir=DIR dvi documentation [DOCDIR]
2023 --pdfdir=DIR pdf documentation [DOCDIR]
2024 --psdir=DIR ps documentation [DOCDIR]
2025 _ACEOF
2026
2027 cat <<\_ACEOF
2028
2029 Program names:
2030 --program-prefix=PREFIX prepend PREFIX to installed program names
2031 --program-suffix=SUFFIX append SUFFIX to installed program names
2032 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2033
2034 X features:
2035 --x-includes=DIR X include files are in DIR
2036 --x-libraries=DIR X library files are in DIR
2037
2038 System types:
2039 --build=BUILD configure for building on BUILD [guessed]
2040 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2041 _ACEOF
2042 fi
2043
2044 if test -n "$ac_init_help"; then
2045 case $ac_init_help in
2046 short | recursive ) echo "Configuration of emacs 24.3.50:";;
2047 esac
2048 cat <<\_ACEOF
2049
2050 Optional Features:
2051 --disable-option-checking ignore unrecognized --enable/--with options
2052 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2053 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2054 --disable-ns-self-contained
2055 disable self contained build under NeXTstep
2056 --enable-locallisppath=PATH
2057 directories Emacs should search for lisp files
2058 specific to this site
2059 --enable-checking[=LIST]
2060 enable expensive run-time checks. With LIST, enable
2061 only specific categories of checks. Categories are:
2062 all,yes,no. Flags are: stringbytes, stringoverrun,
2063 stringfreelist, xmallocoverrun, conslist, glyphs
2064 --enable-check-lisp-object-type
2065 enable compile time checks for the Lisp_Object data
2066 type. This is useful for development for catching
2067 certain types of bugs.
2068 --enable-profiling build emacs with low-level, gprof profiling support.
2069 Mainly useful for debugging Emacs itself. May not
2070 work on all platforms. Stops profiler.el working.
2071 --enable-autodepend automatically generate dependencies to .h-files.
2072 Requires GNU Make and Gcc. Enabled if GNU Make and
2073 Gcc is found
2074 --enable-gtk-deprecation-warnings
2075 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
2076 --disable-dependency-tracking speeds up one-time build
2077 --enable-dependency-tracking do not reject slow dependency extractors
2078 --disable-largefile omit support for large files
2079 --enable-gcc-warnings turn on lots of GCC warnings. This is intended for
2080 developers, and may generate false alarms when used
2081 with older or non-GNU development tools.
2082 --enable-link-time-optimization
2083 build emacs with link-time optimization. This is
2084 supported only for GCC since 4.5.0.
2085
2086 Optional Packages:
2087 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2088 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2089 --without-all omit almost all features and build small executable
2090 with minimal dependencies
2091 --without-pop don't support POP mail retrieval with movemail
2092 --with-kerberos support Kerberos-authenticated POP
2093 --with-kerberos5 support Kerberos version 5 authenticated POP
2094 --with-hesiod support Hesiod to get the POP server host
2095 --with-mmdf support MMDF mailboxes
2096 --with-mail-unlink unlink, rather than empty, mail spool after reading
2097 --with-mailhost=HOSTNAME
2098 string giving default POP mail host
2099 --without-sound don't compile with sound support
2100 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2101 gtk3, lucid or athena, motif, no)
2102 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2103 --without-xpm don't compile with XPM image support
2104 --without-jpeg don't compile with JPEG image support
2105 --without-tiff don't compile with TIFF image support
2106 --without-gif don't compile with GIF image support
2107 --without-png don't compile with PNG image support
2108 --without-rsvg don't compile with SVG image support
2109 --without-xml2 don't compile with XML parsing support
2110 --without-imagemagick don't compile with ImageMagick image support
2111 --without-xft don't use XFT for anti aliased fonts
2112 --without-libotf don't use libotf for OpenType font support
2113 --without-m17n-flt don't use m17n-flt for text shaping
2114 --without-toolkit-scroll-bars
2115 don't use Motif or Xaw3d scroll bars
2116 --without-xaw3d don't use Xaw3d
2117 --without-xim don't use X11 XIM
2118 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2119 --with-w32 use native MS Windows GUI
2120 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2121 console
2122 --without-dbus don't compile with D-Bus support
2123 --without-gconf don't compile with GConf support
2124 --without-gsettings don't compile with GSettings support
2125 --without-selinux don't compile with SELinux support
2126 --without-acl don't compile with ACL support
2127 --without-gnutls don't use -lgnutls for SSL/TLS support
2128 --without-inotify don't compile with inotify (file-watch) support
2129 --without-makeinfo don't require makeinfo for building manuals
2130 --without-compress-info don't compress the installed Info pages
2131 --with-pkg-config-prog=FILENAME
2132 file name of pkg-config for finding GTK and librsvg
2133 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2134 /usr/lib, or /usr/lib64 on some platforms.
2135 --with-gameuser=USER user for shared game score files
2136 --with-gnustep-conf=FILENAME
2137 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2138 or /etc/GNUstep/GNUstep.conf
2139 --with-x use the X Window System
2140
2141 Some influential environment variables:
2142 CC C compiler command
2143 CFLAGS C compiler flags
2144 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2145 nonstandard directory <lib dir>
2146 LIBS libraries to pass to the linker, e.g. -l<library>
2147 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2148 you have headers in a nonstandard directory <include dir>
2149 CPP C preprocessor
2150 XMKMF Path to xmkmf, Makefile generator for X Window System
2151
2152 Use these variables to override the choices made by `configure' or to help
2153 it to find libraries and programs with nonstandard names/locations.
2154
2155 Report bugs to the package provider.
2156 _ACEOF
2157 ac_status=$?
2158 fi
2159
2160 if test "$ac_init_help" = "recursive"; then
2161 # If there are subdirs, report their specific --help.
2162 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2163 test -d "$ac_dir" ||
2164 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2165 continue
2166 ac_builddir=.
2167
2168 case "$ac_dir" in
2169 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2170 *)
2171 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2172 # A ".." for each directory in $ac_dir_suffix.
2173 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2174 case $ac_top_builddir_sub in
2175 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2176 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2177 esac ;;
2178 esac
2179 ac_abs_top_builddir=$ac_pwd
2180 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2181 # for backward compatibility:
2182 ac_top_builddir=$ac_top_build_prefix
2183
2184 case $srcdir in
2185 .) # We are building in place.
2186 ac_srcdir=.
2187 ac_top_srcdir=$ac_top_builddir_sub
2188 ac_abs_top_srcdir=$ac_pwd ;;
2189 [\\/]* | ?:[\\/]* ) # Absolute name.
2190 ac_srcdir=$srcdir$ac_dir_suffix;
2191 ac_top_srcdir=$srcdir
2192 ac_abs_top_srcdir=$srcdir ;;
2193 *) # Relative name.
2194 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2195 ac_top_srcdir=$ac_top_build_prefix$srcdir
2196 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2197 esac
2198 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2199
2200 cd "$ac_dir" || { ac_status=$?; continue; }
2201 # Check for guested configure.
2202 if test -f "$ac_srcdir/configure.gnu"; then
2203 echo &&
2204 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2205 elif test -f "$ac_srcdir/configure"; then
2206 echo &&
2207 $SHELL "$ac_srcdir/configure" --help=recursive
2208 else
2209 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2210 fi || ac_status=$?
2211 cd "$ac_pwd" || { ac_status=$?; break; }
2212 done
2213 fi
2214
2215 test -n "$ac_init_help" && exit $ac_status
2216 if $ac_init_version; then
2217 cat <<\_ACEOF
2218 emacs configure 24.3.50
2219 generated by GNU Autoconf 2.65
2220
2221 Copyright (C) 2009 Free Software Foundation, Inc.
2222 This configure script is free software; the Free Software Foundation
2223 gives unlimited permission to copy, distribute and modify it.
2224 _ACEOF
2225 exit
2226 fi
2227
2228 ## ------------------------ ##
2229 ## Autoconf initialization. ##
2230 ## ------------------------ ##
2231
2232 # ac_fn_c_try_compile LINENO
2233 # --------------------------
2234 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2235 ac_fn_c_try_compile ()
2236 {
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 rm -f conftest.$ac_objext
2239 if { { ac_try="$ac_compile"
2240 case "(($ac_try" in
2241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2242 *) ac_try_echo=$ac_try;;
2243 esac
2244 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2245 $as_echo "$ac_try_echo"; } >&5
2246 (eval "$ac_compile") 2>conftest.err
2247 ac_status=$?
2248 if test -s conftest.err; then
2249 grep -v '^ *+' conftest.err >conftest.er1
2250 cat conftest.er1 >&5
2251 mv -f conftest.er1 conftest.err
2252 fi
2253 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2254 test $ac_status = 0; } && {
2255 test -z "$ac_c_werror_flag" ||
2256 test ! -s conftest.err
2257 } && test -s conftest.$ac_objext; then :
2258 ac_retval=0
2259 else
2260 $as_echo "$as_me: failed program was:" >&5
2261 sed 's/^/| /' conftest.$ac_ext >&5
2262
2263 ac_retval=1
2264 fi
2265 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2266 as_fn_set_status $ac_retval
2267
2268 } # ac_fn_c_try_compile
2269
2270 # ac_fn_c_try_cpp LINENO
2271 # ----------------------
2272 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2273 ac_fn_c_try_cpp ()
2274 {
2275 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2276 if { { ac_try="$ac_cpp conftest.$ac_ext"
2277 case "(($ac_try" in
2278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2279 *) ac_try_echo=$ac_try;;
2280 esac
2281 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2282 $as_echo "$ac_try_echo"; } >&5
2283 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2284 ac_status=$?
2285 if test -s conftest.err; then
2286 grep -v '^ *+' conftest.err >conftest.er1
2287 cat conftest.er1 >&5
2288 mv -f conftest.er1 conftest.err
2289 fi
2290 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2291 test $ac_status = 0; } >/dev/null && {
2292 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2293 test ! -s conftest.err
2294 }; then :
2295 ac_retval=0
2296 else
2297 $as_echo "$as_me: failed program was:" >&5
2298 sed 's/^/| /' conftest.$ac_ext >&5
2299
2300 ac_retval=1
2301 fi
2302 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2303 as_fn_set_status $ac_retval
2304
2305 } # ac_fn_c_try_cpp
2306
2307 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2308 # -------------------------------------------------------
2309 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2310 # the include files in INCLUDES and setting the cache variable VAR
2311 # accordingly.
2312 ac_fn_c_check_header_mongrel ()
2313 {
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2317 $as_echo_n "checking for $2... " >&6; }
2318 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2319 $as_echo_n "(cached) " >&6
2320 fi
2321 eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323 $as_echo "$ac_res" >&6; }
2324 else
2325 # Is the header compilable?
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2327 $as_echo_n "checking $2 usability... " >&6; }
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h. */
2330 $4
2331 #include <$2>
2332 _ACEOF
2333 if ac_fn_c_try_compile "$LINENO"; then :
2334 ac_header_compiler=yes
2335 else
2336 ac_header_compiler=no
2337 fi
2338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2340 $as_echo "$ac_header_compiler" >&6; }
2341
2342 # Is the header present?
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2344 $as_echo_n "checking $2 presence... " >&6; }
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346 /* end confdefs.h. */
2347 #include <$2>
2348 _ACEOF
2349 if ac_fn_c_try_cpp "$LINENO"; then :
2350 ac_header_preproc=yes
2351 else
2352 ac_header_preproc=no
2353 fi
2354 rm -f conftest.err conftest.$ac_ext
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2356 $as_echo "$ac_header_preproc" >&6; }
2357
2358 # So? What about this header?
2359 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2360 yes:no: )
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2362 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2364 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2365 ;;
2366 no:yes:* )
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2368 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2370 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2372 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2374 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2375 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2376 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2377 ;;
2378 esac
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2380 $as_echo_n "checking for $2... " >&6; }
2381 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2382 $as_echo_n "(cached) " >&6
2383 else
2384 eval "$3=\$ac_header_compiler"
2385 fi
2386 eval ac_res=\$$3
2387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2388 $as_echo "$ac_res" >&6; }
2389 fi
2390 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2391
2392 } # ac_fn_c_check_header_mongrel
2393
2394 # ac_fn_c_try_run LINENO
2395 # ----------------------
2396 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2397 # that executables *can* be run.
2398 ac_fn_c_try_run ()
2399 {
2400 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2401 if { { ac_try="$ac_link"
2402 case "(($ac_try" in
2403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404 *) ac_try_echo=$ac_try;;
2405 esac
2406 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407 $as_echo "$ac_try_echo"; } >&5
2408 (eval "$ac_link") 2>&5
2409 ac_status=$?
2410 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2411 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2412 { { case "(($ac_try" in
2413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2414 *) ac_try_echo=$ac_try;;
2415 esac
2416 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2417 $as_echo "$ac_try_echo"; } >&5
2418 (eval "$ac_try") 2>&5
2419 ac_status=$?
2420 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2421 test $ac_status = 0; }; }; then :
2422 ac_retval=0
2423 else
2424 $as_echo "$as_me: program exited with status $ac_status" >&5
2425 $as_echo "$as_me: failed program was:" >&5
2426 sed 's/^/| /' conftest.$ac_ext >&5
2427
2428 ac_retval=$ac_status
2429 fi
2430 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2431 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2432 as_fn_set_status $ac_retval
2433
2434 } # ac_fn_c_try_run
2435
2436 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2437 # -------------------------------------------------------
2438 # Tests whether HEADER exists and can be compiled using the include files in
2439 # INCLUDES, setting the cache variable VAR accordingly.
2440 ac_fn_c_check_header_compile ()
2441 {
2442 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2444 $as_echo_n "checking for $2... " >&6; }
2445 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2446 $as_echo_n "(cached) " >&6
2447 else
2448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449 /* end confdefs.h. */
2450 $4
2451 #include <$2>
2452 _ACEOF
2453 if ac_fn_c_try_compile "$LINENO"; then :
2454 eval "$3=yes"
2455 else
2456 eval "$3=no"
2457 fi
2458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2459 fi
2460 eval ac_res=\$$3
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2462 $as_echo "$ac_res" >&6; }
2463 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2464
2465 } # ac_fn_c_check_header_compile
2466
2467 # ac_fn_c_try_link LINENO
2468 # -----------------------
2469 # Try to link conftest.$ac_ext, and return whether this succeeded.
2470 ac_fn_c_try_link ()
2471 {
2472 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473 rm -f conftest.$ac_objext conftest$ac_exeext
2474 if { { ac_try="$ac_link"
2475 case "(($ac_try" in
2476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2477 *) ac_try_echo=$ac_try;;
2478 esac
2479 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2480 $as_echo "$ac_try_echo"; } >&5
2481 (eval "$ac_link") 2>conftest.err
2482 ac_status=$?
2483 if test -s conftest.err; then
2484 grep -v '^ *+' conftest.err >conftest.er1
2485 cat conftest.er1 >&5
2486 mv -f conftest.er1 conftest.err
2487 fi
2488 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2489 test $ac_status = 0; } && {
2490 test -z "$ac_c_werror_flag" ||
2491 test ! -s conftest.err
2492 } && test -s conftest$ac_exeext && {
2493 test "$cross_compiling" = yes ||
2494 $as_test_x conftest$ac_exeext
2495 }; then :
2496 ac_retval=0
2497 else
2498 $as_echo "$as_me: failed program was:" >&5
2499 sed 's/^/| /' conftest.$ac_ext >&5
2500
2501 ac_retval=1
2502 fi
2503 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2504 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2505 # interfere with the next link command; also delete a directory that is
2506 # left behind by Apple's compiler. We do this before executing the actions.
2507 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2508 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2509 as_fn_set_status $ac_retval
2510
2511 } # ac_fn_c_try_link
2512
2513 # ac_fn_c_check_decl LINENO SYMBOL VAR
2514 # ------------------------------------
2515 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2516 ac_fn_c_check_decl ()
2517 {
2518 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2520 $as_echo_n "checking whether $2 is declared... " >&6; }
2521 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2522 $as_echo_n "(cached) " >&6
2523 else
2524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2525 /* end confdefs.h. */
2526 $4
2527 int
2528 main ()
2529 {
2530 #ifndef $2
2531 (void) $2;
2532 #endif
2533
2534 ;
2535 return 0;
2536 }
2537 _ACEOF
2538 if ac_fn_c_try_compile "$LINENO"; then :
2539 eval "$3=yes"
2540 else
2541 eval "$3=no"
2542 fi
2543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2544 fi
2545 eval ac_res=\$$3
2546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2547 $as_echo "$ac_res" >&6; }
2548 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2549
2550 } # ac_fn_c_check_decl
2551
2552 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2553 # ----------------------------------------------
2554 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2555 ac_fn_c_check_header_preproc ()
2556 {
2557 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2559 $as_echo_n "checking for $2... " >&6; }
2560 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2561 $as_echo_n "(cached) " >&6
2562 else
2563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564 /* end confdefs.h. */
2565 #include <$2>
2566 _ACEOF
2567 if ac_fn_c_try_cpp "$LINENO"; then :
2568 eval "$3=yes"
2569 else
2570 eval "$3=no"
2571 fi
2572 rm -f conftest.err conftest.$ac_ext
2573 fi
2574 eval ac_res=\$$3
2575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2576 $as_echo "$ac_res" >&6; }
2577 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2578
2579 } # ac_fn_c_check_header_preproc
2580
2581 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2582 # ----------------------------------------------------
2583 # Tries to find if the field MEMBER exists in type AGGR, after including
2584 # INCLUDES, setting cache variable VAR accordingly.
2585 ac_fn_c_check_member ()
2586 {
2587 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2589 $as_echo_n "checking for $2.$3... " >&6; }
2590 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2591 $as_echo_n "(cached) " >&6
2592 else
2593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2594 /* end confdefs.h. */
2595 $5
2596 int
2597 main ()
2598 {
2599 static $2 ac_aggr;
2600 if (ac_aggr.$3)
2601 return 0;
2602 ;
2603 return 0;
2604 }
2605 _ACEOF
2606 if ac_fn_c_try_compile "$LINENO"; then :
2607 eval "$4=yes"
2608 else
2609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610 /* end confdefs.h. */
2611 $5
2612 int
2613 main ()
2614 {
2615 static $2 ac_aggr;
2616 if (sizeof ac_aggr.$3)
2617 return 0;
2618 ;
2619 return 0;
2620 }
2621 _ACEOF
2622 if ac_fn_c_try_compile "$LINENO"; then :
2623 eval "$4=yes"
2624 else
2625 eval "$4=no"
2626 fi
2627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2628 fi
2629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630 fi
2631 eval ac_res=\$$4
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2633 $as_echo "$ac_res" >&6; }
2634 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2635
2636 } # ac_fn_c_check_member
2637
2638 # ac_fn_c_check_func LINENO FUNC VAR
2639 # ----------------------------------
2640 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2641 ac_fn_c_check_func ()
2642 {
2643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2645 $as_echo_n "checking for $2... " >&6; }
2646 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2647 $as_echo_n "(cached) " >&6
2648 else
2649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2650 /* end confdefs.h. */
2651 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2652 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2653 #define $2 innocuous_$2
2654
2655 /* System header to define __stub macros and hopefully few prototypes,
2656 which can conflict with char $2 (); below.
2657 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2658 <limits.h> exists even on freestanding compilers. */
2659
2660 #ifdef __STDC__
2661 # include <limits.h>
2662 #else
2663 # include <assert.h>
2664 #endif
2665
2666 #undef $2
2667
2668 /* Override any GCC internal prototype to avoid an error.
2669 Use char because int might match the return type of a GCC
2670 builtin and then its argument prototype would still apply. */
2671 #ifdef __cplusplus
2672 extern "C"
2673 #endif
2674 char $2 ();
2675 /* The GNU C library defines this for functions which it implements
2676 to always fail with ENOSYS. Some functions are actually named
2677 something starting with __ and the normal name is an alias. */
2678 #if defined __stub_$2 || defined __stub___$2
2679 choke me
2680 #endif
2681
2682 int
2683 main ()
2684 {
2685 return $2 ();
2686 ;
2687 return 0;
2688 }
2689 _ACEOF
2690 if ac_fn_c_try_link "$LINENO"; then :
2691 eval "$3=yes"
2692 else
2693 eval "$3=no"
2694 fi
2695 rm -f core conftest.err conftest.$ac_objext \
2696 conftest$ac_exeext conftest.$ac_ext
2697 fi
2698 eval ac_res=\$$3
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2700 $as_echo "$ac_res" >&6; }
2701 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2702
2703 } # ac_fn_c_check_func
2704
2705 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2706 # -------------------------------------------
2707 # Tests whether TYPE exists after having included INCLUDES, setting cache
2708 # variable VAR accordingly.
2709 ac_fn_c_check_type ()
2710 {
2711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2713 $as_echo_n "checking for $2... " >&6; }
2714 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2715 $as_echo_n "(cached) " >&6
2716 else
2717 eval "$3=no"
2718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719 /* end confdefs.h. */
2720 $4
2721 int
2722 main ()
2723 {
2724 if (sizeof ($2))
2725 return 0;
2726 ;
2727 return 0;
2728 }
2729 _ACEOF
2730 if ac_fn_c_try_compile "$LINENO"; then :
2731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2732 /* end confdefs.h. */
2733 $4
2734 int
2735 main ()
2736 {
2737 if (sizeof (($2)))
2738 return 0;
2739 ;
2740 return 0;
2741 }
2742 _ACEOF
2743 if ac_fn_c_try_compile "$LINENO"; then :
2744
2745 else
2746 eval "$3=yes"
2747 fi
2748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2749 fi
2750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2751 fi
2752 eval ac_res=\$$3
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2754 $as_echo "$ac_res" >&6; }
2755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2756
2757 } # ac_fn_c_check_type
2758
2759 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2760 # --------------------------------------------
2761 # Tries to find the compile-time value of EXPR in a program that includes
2762 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2763 # computed
2764 ac_fn_c_compute_int ()
2765 {
2766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2767 if test "$cross_compiling" = yes; then
2768 # Depending upon the size, compute the lo and hi bounds.
2769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770 /* end confdefs.h. */
2771 $4
2772 int
2773 main ()
2774 {
2775 static int test_array [1 - 2 * !(($2) >= 0)];
2776 test_array [0] = 0
2777
2778 ;
2779 return 0;
2780 }
2781 _ACEOF
2782 if ac_fn_c_try_compile "$LINENO"; then :
2783 ac_lo=0 ac_mid=0
2784 while :; do
2785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2786 /* end confdefs.h. */
2787 $4
2788 int
2789 main ()
2790 {
2791 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2792 test_array [0] = 0
2793
2794 ;
2795 return 0;
2796 }
2797 _ACEOF
2798 if ac_fn_c_try_compile "$LINENO"; then :
2799 ac_hi=$ac_mid; break
2800 else
2801 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2802 if test $ac_lo -le $ac_mid; then
2803 ac_lo= ac_hi=
2804 break
2805 fi
2806 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2807 fi
2808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2809 done
2810 else
2811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812 /* end confdefs.h. */
2813 $4
2814 int
2815 main ()
2816 {
2817 static int test_array [1 - 2 * !(($2) < 0)];
2818 test_array [0] = 0
2819
2820 ;
2821 return 0;
2822 }
2823 _ACEOF
2824 if ac_fn_c_try_compile "$LINENO"; then :
2825 ac_hi=-1 ac_mid=-1
2826 while :; do
2827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2828 /* end confdefs.h. */
2829 $4
2830 int
2831 main ()
2832 {
2833 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2834 test_array [0] = 0
2835
2836 ;
2837 return 0;
2838 }
2839 _ACEOF
2840 if ac_fn_c_try_compile "$LINENO"; then :
2841 ac_lo=$ac_mid; break
2842 else
2843 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2844 if test $ac_mid -le $ac_hi; then
2845 ac_lo= ac_hi=
2846 break
2847 fi
2848 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2849 fi
2850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2851 done
2852 else
2853 ac_lo= ac_hi=
2854 fi
2855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856 fi
2857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858 # Binary search between lo and hi bounds.
2859 while test "x$ac_lo" != "x$ac_hi"; do
2860 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862 /* end confdefs.h. */
2863 $4
2864 int
2865 main ()
2866 {
2867 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2868 test_array [0] = 0
2869
2870 ;
2871 return 0;
2872 }
2873 _ACEOF
2874 if ac_fn_c_try_compile "$LINENO"; then :
2875 ac_hi=$ac_mid
2876 else
2877 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2878 fi
2879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2880 done
2881 case $ac_lo in #((
2882 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2883 '') ac_retval=1 ;;
2884 esac
2885 else
2886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2887 /* end confdefs.h. */
2888 $4
2889 static long int longval () { return $2; }
2890 static unsigned long int ulongval () { return $2; }
2891 #include <stdio.h>
2892 #include <stdlib.h>
2893 int
2894 main ()
2895 {
2896
2897 FILE *f = fopen ("conftest.val", "w");
2898 if (! f)
2899 return 1;
2900 if (($2) < 0)
2901 {
2902 long int i = longval ();
2903 if (i != ($2))
2904 return 1;
2905 fprintf (f, "%ld", i);
2906 }
2907 else
2908 {
2909 unsigned long int i = ulongval ();
2910 if (i != ($2))
2911 return 1;
2912 fprintf (f, "%lu", i);
2913 }
2914 /* Do not output a trailing newline, as this causes \r\n confusion
2915 on some platforms. */
2916 return ferror (f) || fclose (f) != 0;
2917
2918 ;
2919 return 0;
2920 }
2921 _ACEOF
2922 if ac_fn_c_try_run "$LINENO"; then :
2923 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2924 else
2925 ac_retval=1
2926 fi
2927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2928 conftest.$ac_objext conftest.beam conftest.$ac_ext
2929 rm -f conftest.val
2930
2931 fi
2932 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2933 as_fn_set_status $ac_retval
2934
2935 } # ac_fn_c_compute_int
2936 cat >config.log <<_ACEOF
2937 This file contains any messages produced by compilers while
2938 running configure, to aid debugging if configure makes a mistake.
2939
2940 It was created by emacs $as_me 24.3.50, which was
2941 generated by GNU Autoconf 2.65. Invocation command line was
2942
2943 $ $0 $@
2944
2945 _ACEOF
2946 exec 5>>config.log
2947 {
2948 cat <<_ASUNAME
2949 ## --------- ##
2950 ## Platform. ##
2951 ## --------- ##
2952
2953 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2954 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2955 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2956 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2957 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2958
2959 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2960 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2961
2962 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2963 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2964 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2965 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2966 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2967 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2968 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2969
2970 _ASUNAME
2971
2972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2973 for as_dir in $PATH
2974 do
2975 IFS=$as_save_IFS
2976 test -z "$as_dir" && as_dir=.
2977 $as_echo "PATH: $as_dir"
2978 done
2979 IFS=$as_save_IFS
2980
2981 } >&5
2982
2983 cat >&5 <<_ACEOF
2984
2985
2986 ## ----------- ##
2987 ## Core tests. ##
2988 ## ----------- ##
2989
2990 _ACEOF
2991
2992
2993 # Keep a trace of the command line.
2994 # Strip out --no-create and --no-recursion so they do not pile up.
2995 # Strip out --silent because we don't want to record it for future runs.
2996 # Also quote any args containing shell meta-characters.
2997 # Make two passes to allow for proper duplicate-argument suppression.
2998 ac_configure_args=
2999 ac_configure_args0=
3000 ac_configure_args1=
3001 ac_must_keep_next=false
3002 for ac_pass in 1 2
3003 do
3004 for ac_arg
3005 do
3006 case $ac_arg in
3007 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3008 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3009 | -silent | --silent | --silen | --sile | --sil)
3010 continue ;;
3011 *\'*)
3012 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3013 esac
3014 case $ac_pass in
3015 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3016 2)
3017 as_fn_append ac_configure_args1 " '$ac_arg'"
3018 if test $ac_must_keep_next = true; then
3019 ac_must_keep_next=false # Got value, back to normal.
3020 else
3021 case $ac_arg in
3022 *=* | --config-cache | -C | -disable-* | --disable-* \
3023 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3024 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3025 | -with-* | --with-* | -without-* | --without-* | --x)
3026 case "$ac_configure_args0 " in
3027 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3028 esac
3029 ;;
3030 -* ) ac_must_keep_next=true ;;
3031 esac
3032 fi
3033 as_fn_append ac_configure_args " '$ac_arg'"
3034 ;;
3035 esac
3036 done
3037 done
3038 { ac_configure_args0=; unset ac_configure_args0;}
3039 { ac_configure_args1=; unset ac_configure_args1;}
3040
3041 # When interrupted or exit'd, cleanup temporary files, and complete
3042 # config.log. We remove comments because anyway the quotes in there
3043 # would cause problems or look ugly.
3044 # WARNING: Use '\'' to represent an apostrophe within the trap.
3045 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3046 trap 'exit_status=$?
3047 # Save into config.log some information that might help in debugging.
3048 {
3049 echo
3050
3051 cat <<\_ASBOX
3052 ## ---------------- ##
3053 ## Cache variables. ##
3054 ## ---------------- ##
3055 _ASBOX
3056 echo
3057 # The following way of writing the cache mishandles newlines in values,
3058 (
3059 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3060 eval ac_val=\$$ac_var
3061 case $ac_val in #(
3062 *${as_nl}*)
3063 case $ac_var in #(
3064 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3065 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3066 esac
3067 case $ac_var in #(
3068 _ | IFS | as_nl) ;; #(
3069 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3070 *) { eval $ac_var=; unset $ac_var;} ;;
3071 esac ;;
3072 esac
3073 done
3074 (set) 2>&1 |
3075 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3076 *${as_nl}ac_space=\ *)
3077 sed -n \
3078 "s/'\''/'\''\\\\'\'''\''/g;
3079 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3080 ;; #(
3081 *)
3082 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3083 ;;
3084 esac |
3085 sort
3086 )
3087 echo
3088
3089 cat <<\_ASBOX
3090 ## ----------------- ##
3091 ## Output variables. ##
3092 ## ----------------- ##
3093 _ASBOX
3094 echo
3095 for ac_var in $ac_subst_vars
3096 do
3097 eval ac_val=\$$ac_var
3098 case $ac_val in
3099 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3100 esac
3101 $as_echo "$ac_var='\''$ac_val'\''"
3102 done | sort
3103 echo
3104
3105 if test -n "$ac_subst_files"; then
3106 cat <<\_ASBOX
3107 ## ------------------- ##
3108 ## File substitutions. ##
3109 ## ------------------- ##
3110 _ASBOX
3111 echo
3112 for ac_var in $ac_subst_files
3113 do
3114 eval ac_val=\$$ac_var
3115 case $ac_val in
3116 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3117 esac
3118 $as_echo "$ac_var='\''$ac_val'\''"
3119 done | sort
3120 echo
3121 fi
3122
3123 if test -s confdefs.h; then
3124 cat <<\_ASBOX
3125 ## ----------- ##
3126 ## confdefs.h. ##
3127 ## ----------- ##
3128 _ASBOX
3129 echo
3130 cat confdefs.h
3131 echo
3132 fi
3133 test "$ac_signal" != 0 &&
3134 $as_echo "$as_me: caught signal $ac_signal"
3135 $as_echo "$as_me: exit $exit_status"
3136 } >&5
3137 rm -f core *.core core.conftest.* &&
3138 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3139 exit $exit_status
3140 ' 0
3141 for ac_signal in 1 2 13 15; do
3142 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3143 done
3144 ac_signal=0
3145
3146 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3147 rm -f -r conftest* confdefs.h
3148
3149 $as_echo "/* confdefs.h */" > confdefs.h
3150
3151 # Predefined preprocessor variables.
3152
3153 cat >>confdefs.h <<_ACEOF
3154 #define PACKAGE_NAME "$PACKAGE_NAME"
3155 _ACEOF
3156
3157 cat >>confdefs.h <<_ACEOF
3158 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3159 _ACEOF
3160
3161 cat >>confdefs.h <<_ACEOF
3162 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3163 _ACEOF
3164
3165 cat >>confdefs.h <<_ACEOF
3166 #define PACKAGE_STRING "$PACKAGE_STRING"
3167 _ACEOF
3168
3169 cat >>confdefs.h <<_ACEOF
3170 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3171 _ACEOF
3172
3173 cat >>confdefs.h <<_ACEOF
3174 #define PACKAGE_URL "$PACKAGE_URL"
3175 _ACEOF
3176
3177
3178 # Let the site file select an alternate cache file if it wants to.
3179 # Prefer an explicitly selected file to automatically selected ones.
3180 ac_site_file1=NONE
3181 ac_site_file2=NONE
3182 if test -n "$CONFIG_SITE"; then
3183 ac_site_file1=$CONFIG_SITE
3184 elif test "x$prefix" != xNONE; then
3185 ac_site_file1=$prefix/share/config.site
3186 ac_site_file2=$prefix/etc/config.site
3187 else
3188 ac_site_file1=$ac_default_prefix/share/config.site
3189 ac_site_file2=$ac_default_prefix/etc/config.site
3190 fi
3191 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3192 do
3193 test "x$ac_site_file" = xNONE && continue
3194 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3195 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3196 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3197 sed 's/^/| /' "$ac_site_file" >&5
3198 . "$ac_site_file"
3199 fi
3200 done
3201
3202 if test -r "$cache_file"; then
3203 # Some versions of bash will fail to source /dev/null (special files
3204 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3205 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3206 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3207 $as_echo "$as_me: loading cache $cache_file" >&6;}
3208 case $cache_file in
3209 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3210 *) . "./$cache_file";;
3211 esac
3212 fi
3213 else
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3215 $as_echo "$as_me: creating cache $cache_file" >&6;}
3216 >$cache_file
3217 fi
3218
3219 as_fn_append ac_header_list " linux/version.h"
3220 as_fn_append ac_header_list " sys/systeminfo.h"
3221 as_fn_append ac_header_list " coff.h"
3222 as_fn_append ac_header_list " pty.h"
3223 as_fn_append ac_header_list " sys/vlimit.h"
3224 as_fn_append ac_header_list " sys/resource.h"
3225 as_fn_append ac_header_list " sys/utsname.h"
3226 as_fn_append ac_header_list " pwd.h"
3227 as_fn_append ac_header_list " utmp.h"
3228 as_fn_append ac_header_list " util.h"
3229 as_fn_append ac_header_list " sys/socket.h"
3230 as_fn_append ac_header_list " stdlib.h"
3231 as_fn_append ac_header_list " unistd.h"
3232 as_fn_append ac_header_list " sys/param.h"
3233 as_fn_append ac_header_list " pthread.h"
3234 as_fn_append ac_header_list " malloc/malloc.h"
3235 as_fn_append ac_header_list " maillock.h"
3236 as_fn_append ac_header_list " sys/un.h"
3237 as_fn_append ac_func_list " tzset"
3238 as_fn_append ac_func_list " readlinkat"
3239 as_fn_append ac_header_list " execinfo.h"
3240 as_fn_append ac_func_list " faccessat"
3241 as_fn_append ac_header_list " stdio_ext.h"
3242 as_fn_append ac_func_list " __fpending"
3243 gl_getopt_required=GNU
3244 as_fn_append ac_header_list " getopt.h"
3245 as_fn_append ac_func_list " gettimeofday"
3246 as_fn_append ac_func_list " nanotime"
3247 as_fn_append ac_header_list " sys/time.h"
3248 as_fn_append ac_header_list " wchar.h"
3249 as_fn_append ac_header_list " stdint.h"
3250 as_fn_append ac_header_list " inttypes.h"
3251 as_fn_append ac_func_list " lstat"
3252 as_fn_append ac_func_list " alarm"
3253 as_fn_append ac_header_list " sys/select.h"
3254 as_fn_append ac_func_list " pselect"
3255 as_fn_append ac_func_list " pthread_sigmask"
3256 as_fn_append ac_func_list " readlink"
3257 as_fn_append ac_func_list " strtoimax"
3258 as_fn_append ac_func_list " strtoumax"
3259 as_fn_append ac_func_list " symlink"
3260 as_fn_append ac_header_list " sys/stat.h"
3261 as_fn_append ac_func_list " localtime_r"
3262 as_fn_append ac_header_list " utime.h"
3263 as_fn_append ac_func_list " futimes"
3264 as_fn_append ac_func_list " futimesat"
3265 as_fn_append ac_func_list " futimens"
3266 as_fn_append ac_func_list " utimensat"
3267 as_fn_append ac_func_list " lutimes"
3268 # Check that the precious variables saved in the cache have kept the same
3269 # value.
3270 ac_cache_corrupted=false
3271 for ac_var in $ac_precious_vars; do
3272 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3273 eval ac_new_set=\$ac_env_${ac_var}_set
3274 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3275 eval ac_new_val=\$ac_env_${ac_var}_value
3276 case $ac_old_set,$ac_new_set in
3277 set,)
3278 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3279 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3280 ac_cache_corrupted=: ;;
3281 ,set)
3282 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3283 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3284 ac_cache_corrupted=: ;;
3285 ,);;
3286 *)
3287 if test "x$ac_old_val" != "x$ac_new_val"; then
3288 # differences in whitespace do not lead to failure.
3289 ac_old_val_w=`echo x $ac_old_val`
3290 ac_new_val_w=`echo x $ac_new_val`
3291 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3292 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3293 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3294 ac_cache_corrupted=:
3295 else
3296 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3297 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3298 eval $ac_var=\$ac_old_val
3299 fi
3300 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3301 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3302 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3303 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3304 fi;;
3305 esac
3306 # Pass precious variables to config.status.
3307 if test "$ac_new_set" = set; then
3308 case $ac_new_val in
3309 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3310 *) ac_arg=$ac_var=$ac_new_val ;;
3311 esac
3312 case " $ac_configure_args " in
3313 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3314 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3315 esac
3316 fi
3317 done
3318 if $ac_cache_corrupted; then
3319 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3320 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3321 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3322 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3323 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3324 fi
3325 ## -------------------- ##
3326 ## Main body of script. ##
3327 ## -------------------- ##
3328
3329 ac_ext=c
3330 ac_cpp='$CPP $CPPFLAGS'
3331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3334
3335
3336 emacs_config_options="$@"
3337 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3338
3339
3340 ac_aux_dir=
3341 for ac_dir in build-aux "$srcdir"/build-aux; do
3342 for ac_t in install-sh install.sh shtool; do
3343 if test -f "$ac_dir/$ac_t"; then
3344 ac_aux_dir=$ac_dir
3345 ac_install_sh="$ac_aux_dir/$ac_t -c"
3346 break 2
3347 fi
3348 done
3349 done
3350 if test -z "$ac_aux_dir"; then
3351 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3352 fi
3353
3354 # These three variables are undocumented and unsupported,
3355 # and are intended to be withdrawn in a future Autoconf release.
3356 # They can cause serious problems if a builder's source tree is in a directory
3357 # whose full name contains unusual characters.
3358 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3359 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3360 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3361
3362
3363 am__api_version='1.11'
3364
3365 # Find a good install program. We prefer a C program (faster),
3366 # so one script is as good as another. But avoid the broken or
3367 # incompatible versions:
3368 # SysV /etc/install, /usr/sbin/install
3369 # SunOS /usr/etc/install
3370 # IRIX /sbin/install
3371 # AIX /bin/install
3372 # AmigaOS /C/install, which installs bootblocks on floppy discs
3373 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3374 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3375 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3376 # OS/2's system install, which has a completely different semantic
3377 # ./install, which can be erroneously created by make from ./install.sh.
3378 # Reject install programs that cannot install multiple files.
3379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3380 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3381 if test -z "$INSTALL"; then
3382 if test "${ac_cv_path_install+set}" = set; then :
3383 $as_echo_n "(cached) " >&6
3384 else
3385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3386 for as_dir in $PATH
3387 do
3388 IFS=$as_save_IFS
3389 test -z "$as_dir" && as_dir=.
3390 # Account for people who put trailing slashes in PATH elements.
3391 case $as_dir/ in #((
3392 ./ | .// | /[cC]/* | \
3393 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3394 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3395 /usr/ucb/* ) ;;
3396 *)
3397 # OSF1 and SCO ODT 3.0 have their own names for install.
3398 # Don't use installbsd from OSF since it installs stuff as root
3399 # by default.
3400 for ac_prog in ginstall scoinst install; do
3401 for ac_exec_ext in '' $ac_executable_extensions; do
3402 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3403 if test $ac_prog = install &&
3404 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3405 # AIX install. It has an incompatible calling convention.
3406 :
3407 elif test $ac_prog = install &&
3408 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3409 # program-specific install script used by HP pwplus--don't use.
3410 :
3411 else
3412 rm -rf conftest.one conftest.two conftest.dir
3413 echo one > conftest.one
3414 echo two > conftest.two
3415 mkdir conftest.dir
3416 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3417 test -s conftest.one && test -s conftest.two &&
3418 test -s conftest.dir/conftest.one &&
3419 test -s conftest.dir/conftest.two
3420 then
3421 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3422 break 3
3423 fi
3424 fi
3425 fi
3426 done
3427 done
3428 ;;
3429 esac
3430
3431 done
3432 IFS=$as_save_IFS
3433
3434 rm -rf conftest.one conftest.two conftest.dir
3435
3436 fi
3437 if test "${ac_cv_path_install+set}" = set; then
3438 INSTALL=$ac_cv_path_install
3439 else
3440 # As a last resort, use the slow shell script. Don't cache a
3441 # value for INSTALL within a source directory, because that will
3442 # break other packages using the cache if that directory is
3443 # removed, or if the value is a relative name.
3444 INSTALL=$ac_install_sh
3445 fi
3446 fi
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3448 $as_echo "$INSTALL" >&6; }
3449
3450 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3451 # It thinks the first close brace ends the variable substitution.
3452 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3453
3454 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3455
3456 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3457
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3459 $as_echo_n "checking whether build environment is sane... " >&6; }
3460 # Just in case
3461 sleep 1
3462 echo timestamp > conftest.file
3463 # Reject unsafe characters in $srcdir or the absolute working directory
3464 # name. Accept space and tab only in the latter.
3465 am_lf='
3466 '
3467 case `pwd` in
3468 *[\\\"\#\$\&\'\`$am_lf]*)
3469 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3470 esac
3471 case $srcdir in
3472 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3473 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3474 esac
3475
3476 # Do `set' in a subshell so we don't clobber the current shell's
3477 # arguments. Must try -L first in case configure is actually a
3478 # symlink; some systems play weird games with the mod time of symlinks
3479 # (eg FreeBSD returns the mod time of the symlink's containing
3480 # directory).
3481 if (
3482 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3483 if test "$*" = "X"; then
3484 # -L didn't work.
3485 set X `ls -t "$srcdir/configure" conftest.file`
3486 fi
3487 rm -f conftest.file
3488 if test "$*" != "X $srcdir/configure conftest.file" \
3489 && test "$*" != "X conftest.file $srcdir/configure"; then
3490
3491 # If neither matched, then we have a broken ls. This can happen
3492 # if, for instance, CONFIG_SHELL is bash and it inherits a
3493 # broken ls alias from the environment. This has actually
3494 # happened. Such a system could not be considered "sane".
3495 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3496 alias in your environment" "$LINENO" 5
3497 fi
3498
3499 test "$2" = conftest.file
3500 )
3501 then
3502 # Ok.
3503 :
3504 else
3505 as_fn_error "newly created file is older than distributed files!
3506 Check your system clock" "$LINENO" 5
3507 fi
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3509 $as_echo "yes" >&6; }
3510 test "$program_prefix" != NONE &&
3511 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3512 # Use a double $ so make ignores it.
3513 test "$program_suffix" != NONE &&
3514 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3515 # Double any \ or $.
3516 # By default was `s,x,x', remove it if useless.
3517 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3518 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3519
3520 # expand $ac_aux_dir to an absolute path
3521 am_aux_dir=`cd $ac_aux_dir && pwd`
3522
3523 if test x"${MISSING+set}" != xset; then
3524 case $am_aux_dir in
3525 *\ * | *\ *)
3526 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3527 *)
3528 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3529 esac
3530 fi
3531 # Use eval to expand $SHELL
3532 if eval "$MISSING --run true"; then
3533 am_missing_run="$MISSING --run "
3534 else
3535 am_missing_run=
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3537 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3538 fi
3539
3540 if test x"${install_sh}" != xset; then
3541 case $am_aux_dir in
3542 *\ * | *\ *)
3543 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3544 *)
3545 install_sh="\${SHELL} $am_aux_dir/install-sh"
3546 esac
3547 fi
3548
3549 # Installed binaries are usually stripped using `strip' when the user
3550 # run `make install-strip'. However `strip' might not be the right
3551 # tool to use in cross-compilation environments, therefore Automake
3552 # will honor the `STRIP' environment variable to overrule this program.
3553 if test "$cross_compiling" != no; then
3554 if test -n "$ac_tool_prefix"; then
3555 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3556 set dummy ${ac_tool_prefix}strip; ac_word=$2
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3558 $as_echo_n "checking for $ac_word... " >&6; }
3559 if test "${ac_cv_prog_STRIP+set}" = set; then :
3560 $as_echo_n "(cached) " >&6
3561 else
3562 if test -n "$STRIP"; then
3563 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3564 else
3565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3566 for as_dir in $PATH
3567 do
3568 IFS=$as_save_IFS
3569 test -z "$as_dir" && as_dir=.
3570 for ac_exec_ext in '' $ac_executable_extensions; do
3571 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3572 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3574 break 2
3575 fi
3576 done
3577 done
3578 IFS=$as_save_IFS
3579
3580 fi
3581 fi
3582 STRIP=$ac_cv_prog_STRIP
3583 if test -n "$STRIP"; then
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3585 $as_echo "$STRIP" >&6; }
3586 else
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3588 $as_echo "no" >&6; }
3589 fi
3590
3591
3592 fi
3593 if test -z "$ac_cv_prog_STRIP"; then
3594 ac_ct_STRIP=$STRIP
3595 # Extract the first word of "strip", so it can be a program name with args.
3596 set dummy strip; ac_word=$2
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3598 $as_echo_n "checking for $ac_word... " >&6; }
3599 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3600 $as_echo_n "(cached) " >&6
3601 else
3602 if test -n "$ac_ct_STRIP"; then
3603 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3604 else
3605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606 for as_dir in $PATH
3607 do
3608 IFS=$as_save_IFS
3609 test -z "$as_dir" && as_dir=.
3610 for ac_exec_ext in '' $ac_executable_extensions; do
3611 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3612 ac_cv_prog_ac_ct_STRIP="strip"
3613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3614 break 2
3615 fi
3616 done
3617 done
3618 IFS=$as_save_IFS
3619
3620 fi
3621 fi
3622 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3623 if test -n "$ac_ct_STRIP"; then
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3625 $as_echo "$ac_ct_STRIP" >&6; }
3626 else
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3628 $as_echo "no" >&6; }
3629 fi
3630
3631 if test "x$ac_ct_STRIP" = x; then
3632 STRIP=":"
3633 else
3634 case $cross_compiling:$ac_tool_warned in
3635 yes:)
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3637 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3638 ac_tool_warned=yes ;;
3639 esac
3640 STRIP=$ac_ct_STRIP
3641 fi
3642 else
3643 STRIP="$ac_cv_prog_STRIP"
3644 fi
3645
3646 fi
3647 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3648
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3650 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3651 if test -z "$MKDIR_P"; then
3652 if test "${ac_cv_path_mkdir+set}" = set; then :
3653 $as_echo_n "(cached) " >&6
3654 else
3655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3656 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3657 do
3658 IFS=$as_save_IFS
3659 test -z "$as_dir" && as_dir=.
3660 for ac_prog in mkdir gmkdir; do
3661 for ac_exec_ext in '' $ac_executable_extensions; do
3662 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3663 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3664 'mkdir (GNU coreutils) '* | \
3665 'mkdir (coreutils) '* | \
3666 'mkdir (fileutils) '4.1*)
3667 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3668 break 3;;
3669 esac
3670 done
3671 done
3672 done
3673 IFS=$as_save_IFS
3674
3675 fi
3676
3677 test -d ./--version && rmdir ./--version
3678 if test "${ac_cv_path_mkdir+set}" = set; then
3679 MKDIR_P="$ac_cv_path_mkdir -p"
3680 else
3681 # As a last resort, use the slow shell script. Don't cache a
3682 # value for MKDIR_P within a source directory, because that will
3683 # break other packages using the cache if that directory is
3684 # removed, or if the value is a relative name.
3685 MKDIR_P="$ac_install_sh -d"
3686 fi
3687 fi
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3689 $as_echo "$MKDIR_P" >&6; }
3690
3691 mkdir_p="$MKDIR_P"
3692 case $mkdir_p in
3693 [\\/$]* | ?:[\\/]*) ;;
3694 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3695 esac
3696
3697 for ac_prog in gawk mawk nawk awk
3698 do
3699 # Extract the first word of "$ac_prog", so it can be a program name with args.
3700 set dummy $ac_prog; ac_word=$2
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3702 $as_echo_n "checking for $ac_word... " >&6; }
3703 if test "${ac_cv_prog_AWK+set}" = set; then :
3704 $as_echo_n "(cached) " >&6
3705 else
3706 if test -n "$AWK"; then
3707 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3708 else
3709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710 for as_dir in $PATH
3711 do
3712 IFS=$as_save_IFS
3713 test -z "$as_dir" && as_dir=.
3714 for ac_exec_ext in '' $ac_executable_extensions; do
3715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3716 ac_cv_prog_AWK="$ac_prog"
3717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3718 break 2
3719 fi
3720 done
3721 done
3722 IFS=$as_save_IFS
3723
3724 fi
3725 fi
3726 AWK=$ac_cv_prog_AWK
3727 if test -n "$AWK"; then
3728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3729 $as_echo "$AWK" >&6; }
3730 else
3731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3732 $as_echo "no" >&6; }
3733 fi
3734
3735
3736 test -n "$AWK" && break
3737 done
3738
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3740 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3741 set x ${MAKE-make}
3742 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3743 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3744 $as_echo_n "(cached) " >&6
3745 else
3746 cat >conftest.make <<\_ACEOF
3747 SHELL = /bin/sh
3748 all:
3749 @echo '@@@%%%=$(MAKE)=@@@%%%'
3750 _ACEOF
3751 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3752 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3753 *@@@%%%=?*=@@@%%%*)
3754 eval ac_cv_prog_make_${ac_make}_set=yes;;
3755 *)
3756 eval ac_cv_prog_make_${ac_make}_set=no;;
3757 esac
3758 rm -f conftest.make
3759 fi
3760 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3762 $as_echo "yes" >&6; }
3763 SET_MAKE=
3764 else
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3766 $as_echo "no" >&6; }
3767 SET_MAKE="MAKE=${MAKE-make}"
3768 fi
3769
3770 rm -rf .tst 2>/dev/null
3771 mkdir .tst 2>/dev/null
3772 if test -d .tst; then
3773 am__leading_dot=.
3774 else
3775 am__leading_dot=_
3776 fi
3777 rmdir .tst 2>/dev/null
3778
3779 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3780 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3781 # is not polluted with repeated "-I."
3782 am__isrc=' -I$(srcdir)'
3783 # test to see if srcdir already configured
3784 if test -f $srcdir/config.status; then
3785 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3786 fi
3787 fi
3788
3789 # test whether we have cygpath
3790 if test -z "$CYGPATH_W"; then
3791 if (cygpath --version) >/dev/null 2>/dev/null; then
3792 CYGPATH_W='cygpath -w'
3793 else
3794 CYGPATH_W=echo
3795 fi
3796 fi
3797
3798
3799 # Define the identity of the package.
3800 PACKAGE='emacs'
3801 VERSION='24.3.50'
3802
3803
3804 cat >>confdefs.h <<_ACEOF
3805 #define PACKAGE "$PACKAGE"
3806 _ACEOF
3807
3808
3809 cat >>confdefs.h <<_ACEOF
3810 #define VERSION "$VERSION"
3811 _ACEOF
3812
3813 # Some tools Automake needs.
3814
3815 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3816
3817
3818 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3819
3820
3821 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3822
3823
3824 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3825
3826
3827 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3828
3829 # We need awk for the "check" target. The system "awk" is bad on
3830 # some platforms.
3831 # Always define AMTAR for backward compatibility.
3832
3833 AMTAR=${AMTAR-"${am_missing_run}tar"}
3834
3835 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3836
3837
3838
3839
3840
3841
3842
3843
3844 lispdir='${datadir}/emacs/${version}/lisp'
3845 leimdir='${datadir}/emacs/${version}/leim'
3846 standardlisppath='${lispdir}:${leimdir}'
3847 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3848 '${datadir}/emacs/site-lisp'
3849 lisppath='${locallisppath}:${standardlisppath}'
3850 etcdir='${datadir}/emacs/${version}/etc'
3851 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3852 docdir='${datadir}/emacs/${version}/etc'
3853 gamedir='${localstatedir}/games/emacs'
3854
3855
3856 # Check whether --with-all was given.
3857 if test "${with_all+set}" = set; then :
3858 withval=$with_all; with_features=$withval
3859 else
3860 with_features=yes
3861 fi
3862
3863
3864
3865
3866
3867 # Check whether --with-pop was given.
3868 if test "${with_pop+set}" = set; then :
3869 withval=$with_pop;
3870 else
3871 with_pop=$with_features
3872 fi
3873
3874 if test "$with_pop" = yes; then
3875 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3876
3877 fi
3878
3879
3880 # Check whether --with-kerberos was given.
3881 if test "${with_kerberos+set}" = set; then :
3882 withval=$with_kerberos;
3883 else
3884 with_kerberos=no
3885 fi
3886
3887 if test "$with_kerberos" != no; then
3888 $as_echo "#define KERBEROS 1" >>confdefs.h
3889
3890 fi
3891
3892
3893 # Check whether --with-kerberos5 was given.
3894 if test "${with_kerberos5+set}" = set; then :
3895 withval=$with_kerberos5;
3896 else
3897 with_kerberos5=no
3898 fi
3899
3900 if test "${with_kerberos5}" != no; then
3901 if test "${with_kerberos}" = no; then
3902 with_kerberos=yes
3903 $as_echo "#define KERBEROS 1" >>confdefs.h
3904
3905 fi
3906
3907 $as_echo "#define KERBEROS5 1" >>confdefs.h
3908
3909 fi
3910
3911
3912 # Check whether --with-hesiod was given.
3913 if test "${with_hesiod+set}" = set; then :
3914 withval=$with_hesiod;
3915 else
3916 with_hesiod=no
3917 fi
3918
3919 if test "$with_hesiod" != no; then
3920
3921 $as_echo "#define HESIOD 1" >>confdefs.h
3922
3923 fi
3924
3925
3926 # Check whether --with-mmdf was given.
3927 if test "${with_mmdf+set}" = set; then :
3928 withval=$with_mmdf;
3929 else
3930 with_mmdf=no
3931 fi
3932
3933 if test "$with_mmdf" != no; then
3934
3935 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3936
3937 fi
3938
3939
3940 # Check whether --with-mail-unlink was given.
3941 if test "${with_mail_unlink+set}" = set; then :
3942 withval=$with_mail_unlink;
3943 else
3944 with_mail_unlink=no
3945 fi
3946
3947 if test "$with_mail_unlink" != no; then
3948
3949 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3950
3951 fi
3952
3953
3954 # Check whether --with-mailhost was given.
3955 if test "${with_mailhost+set}" = set; then :
3956 withval=$with_mailhost;
3957 cat >>confdefs.h <<_ACEOF
3958 #define MAILHOST "$withval"
3959 _ACEOF
3960
3961 fi
3962
3963
3964
3965 # Check whether --with-sound was given.
3966 if test "${with_sound+set}" = set; then :
3967 withval=$with_sound;
3968 else
3969 with_sound=$with_features
3970 fi
3971
3972
3973
3974 # Check whether --with-x-toolkit was given.
3975 if test "${with_x_toolkit+set}" = set; then :
3976 withval=$with_x_toolkit; case "${withval}" in
3977 y | ye | yes ) val=gtk ;;
3978 n | no ) val=no ;;
3979 l | lu | luc | luci | lucid ) val=lucid ;;
3980 a | at | ath | athe | athen | athena ) val=athena ;;
3981 m | mo | mot | moti | motif ) val=motif ;;
3982 g | gt | gtk ) val=gtk ;;
3983 gtk2 ) val=gtk2 ;;
3984 gtk3 ) val=gtk3 ;;
3985 * )
3986 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
3987 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
3988 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
3989 \`athena' and \`lucid' are synonyms." "$LINENO" 5
3990 ;;
3991 esac
3992 with_x_toolkit=$val
3993
3994 fi
3995
3996
3997
3998 # Check whether --with-wide-int was given.
3999 if test "${with_wide_int+set}" = set; then :
4000 withval=$with_wide_int;
4001 else
4002 with_wide_int=no
4003 fi
4004
4005 if test "$with_wide_int" = yes; then
4006
4007 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4008
4009 fi
4010
4011
4012 # Check whether --with-xpm was given.
4013 if test "${with_xpm+set}" = set; then :
4014 withval=$with_xpm;
4015 else
4016 with_xpm=$with_features
4017 fi
4018
4019
4020 # Check whether --with-jpeg was given.
4021 if test "${with_jpeg+set}" = set; then :
4022 withval=$with_jpeg;
4023 else
4024 with_jpeg=$with_features
4025 fi
4026
4027
4028 # Check whether --with-tiff was given.
4029 if test "${with_tiff+set}" = set; then :
4030 withval=$with_tiff;
4031 else
4032 with_tiff=$with_features
4033 fi
4034
4035
4036 # Check whether --with-gif was given.
4037 if test "${with_gif+set}" = set; then :
4038 withval=$with_gif;
4039 else
4040 with_gif=$with_features
4041 fi
4042
4043
4044 # Check whether --with-png was given.
4045 if test "${with_png+set}" = set; then :
4046 withval=$with_png;
4047 else
4048 with_png=$with_features
4049 fi
4050
4051
4052 # Check whether --with-rsvg was given.
4053 if test "${with_rsvg+set}" = set; then :
4054 withval=$with_rsvg;
4055 else
4056 with_rsvg=$with_features
4057 fi
4058
4059
4060 # Check whether --with-xml2 was given.
4061 if test "${with_xml2+set}" = set; then :
4062 withval=$with_xml2;
4063 else
4064 with_xml2=$with_features
4065 fi
4066
4067
4068 # Check whether --with-imagemagick was given.
4069 if test "${with_imagemagick+set}" = set; then :
4070 withval=$with_imagemagick;
4071 else
4072 with_imagemagick=$with_features
4073 fi
4074
4075
4076
4077 # Check whether --with-xft was given.
4078 if test "${with_xft+set}" = set; then :
4079 withval=$with_xft;
4080 else
4081 with_xft=$with_features
4082 fi
4083
4084
4085 # Check whether --with-libotf was given.
4086 if test "${with_libotf+set}" = set; then :
4087 withval=$with_libotf;
4088 else
4089 with_libotf=$with_features
4090 fi
4091
4092
4093 # Check whether --with-m17n-flt was given.
4094 if test "${with_m17n_flt+set}" = set; then :
4095 withval=$with_m17n_flt;
4096 else
4097 with_m17n_flt=$with_features
4098 fi
4099
4100
4101
4102 # Check whether --with-toolkit-scroll-bars was given.
4103 if test "${with_toolkit_scroll_bars+set}" = set; then :
4104 withval=$with_toolkit_scroll_bars;
4105 else
4106 with_toolkit_scroll_bars=$with_features
4107 fi
4108
4109
4110 # Check whether --with-xaw3d was given.
4111 if test "${with_xaw3d+set}" = set; then :
4112 withval=$with_xaw3d;
4113 else
4114 with_xaw3d=$with_features
4115 fi
4116
4117
4118 # Check whether --with-xim was given.
4119 if test "${with_xim+set}" = set; then :
4120 withval=$with_xim;
4121 else
4122 with_xim=$with_features
4123 fi
4124
4125
4126 # Check whether --with-ns was given.
4127 if test "${with_ns+set}" = set; then :
4128 withval=$with_ns;
4129 else
4130 with_ns=no
4131 fi
4132
4133
4134 # Check whether --with-w32 was given.
4135 if test "${with_w32+set}" = set; then :
4136 withval=$with_w32;
4137 else
4138 with_w32=no
4139 fi
4140
4141
4142
4143 # Check whether --with-gpm was given.
4144 if test "${with_gpm+set}" = set; then :
4145 withval=$with_gpm;
4146 else
4147 with_gpm=$with_features
4148 fi
4149
4150
4151 # Check whether --with-dbus was given.
4152 if test "${with_dbus+set}" = set; then :
4153 withval=$with_dbus;
4154 else
4155 with_dbus=$with_features
4156 fi
4157
4158
4159 # Check whether --with-gconf was given.
4160 if test "${with_gconf+set}" = set; then :
4161 withval=$with_gconf;
4162 else
4163 with_gconf=$with_features
4164 fi
4165
4166
4167 # Check whether --with-gsettings was given.
4168 if test "${with_gsettings+set}" = set; then :
4169 withval=$with_gsettings;
4170 else
4171 with_gsettings=$with_features
4172 fi
4173
4174
4175 # Check whether --with-selinux was given.
4176 if test "${with_selinux+set}" = set; then :
4177 withval=$with_selinux;
4178 else
4179 with_selinux=$with_features
4180 fi
4181
4182
4183 # Check whether --with-acl was given.
4184 if test "${with_acl+set}" = set; then :
4185 withval=$with_acl;
4186 else
4187 with_acl=$with_features
4188 fi
4189
4190
4191 # Check whether --with-gnutls was given.
4192 if test "${with_gnutls+set}" = set; then :
4193 withval=$with_gnutls;
4194 else
4195 with_gnutls=$with_features
4196 fi
4197
4198
4199 # Check whether --with-inotify was given.
4200 if test "${with_inotify+set}" = set; then :
4201 withval=$with_inotify;
4202 else
4203 with_inotify=$with_features
4204 fi
4205
4206
4207 ## For the times when you want to build Emacs but don't have
4208 ## a suitable makeinfo, and can live without the manuals.
4209
4210 # Check whether --with-makeinfo was given.
4211 if test "${with_makeinfo+set}" = set; then :
4212 withval=$with_makeinfo;
4213 else
4214 with_makeinfo=$with_features
4215 fi
4216
4217
4218 ## Makefile.in needs the cache file name.
4219
4220
4221 ## This is an option because I do not know if all info/man support
4222 ## compressed files, nor how to test if they do so.
4223
4224 # Check whether --with-compress-info was given.
4225 if test "${with_compress_info+set}" = set; then :
4226 withval=$with_compress_info;
4227 else
4228 with_compress_info=$with_features
4229 fi
4230
4231 if test $with_compress_info = yes; then
4232 GZIP_INFO=yes
4233 else
4234 GZIP_INFO=
4235 fi
4236
4237
4238
4239 # Check whether --with-pkg-config-prog was given.
4240 if test "${with_pkg_config_prog+set}" = set; then :
4241 withval=$with_pkg_config_prog;
4242 fi
4243
4244 if test "X${with_pkg_config_prog}" != X; then
4245 if test "${with_pkg_config_prog}" != yes; then
4246 PKG_CONFIG="${with_pkg_config_prog}"
4247 fi
4248 fi
4249
4250 CRT_DIR=
4251
4252 # Check whether --with-crt-dir was given.
4253 if test "${with_crt_dir+set}" = set; then :
4254 withval=$with_crt_dir;
4255 fi
4256
4257 CRT_DIR="${with_crt_dir}"
4258
4259
4260 # Check whether --with-gameuser was given.
4261 if test "${with_gameuser+set}" = set; then :
4262 withval=$with_gameuser;
4263 fi
4264
4265 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4266 && gameuser="${with_gameuser}"
4267 test "X$gameuser" = X && gameuser=games
4268
4269
4270 # Check whether --with-gnustep-conf was given.
4271 if test "${with_gnustep_conf+set}" = set; then :
4272 withval=$with_gnustep_conf;
4273 fi
4274
4275 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4276 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4277 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4278 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4279
4280 # Check whether --enable-ns-self-contained was given.
4281 if test "${enable_ns_self_contained+set}" = set; then :
4282 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4283 else
4284 EN_NS_SELF_CONTAINED=yes
4285 fi
4286
4287
4288 # Check whether --enable-locallisppath was given.
4289 if test "${enable_locallisppath+set}" = set; then :
4290 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4291 locallisppath=
4292 elif test "${enableval}" != "yes"; then
4293 locallisppath=${enableval}
4294 fi
4295 fi
4296
4297
4298 # Check whether --enable-checking was given.
4299 if test "${enable_checking+set}" = set; then :
4300 enableval=$enable_checking; ac_checking_flags="${enableval}"
4301 fi
4302
4303 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4304 for check in $ac_checking_flags
4305 do
4306 case $check in
4307 # these set all the flags to specific states
4308 yes) ac_enable_checking=1 ;;
4309 no) ac_enable_checking= ;
4310 ac_gc_check_stringbytes= ;
4311 ac_gc_check_string_overrun= ;
4312 ac_gc_check_string_free_list= ;
4313 ac_xmalloc_overrun= ;
4314 ac_gc_check_cons_list= ;
4315 ac_glyphs_debug= ;;
4316 all) ac_enable_checking=1 ;
4317 ac_gc_check_stringbytes=1 ;
4318 ac_gc_check_string_overrun=1 ;
4319 ac_gc_check_string_free_list=1 ;
4320 ac_xmalloc_overrun=1 ;
4321 ac_gc_check_cons_list=1 ;
4322 ac_glyphs_debug=1 ;;
4323 # these enable particular checks
4324 stringbytes) ac_gc_check_stringbytes=1 ;;
4325 stringoverrun) ac_gc_check_string_overrun=1 ;;
4326 stringfreelist) ac_gc_check_string_free_list=1 ;;
4327 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4328 conslist) ac_gc_check_cons_list=1 ;;
4329 glyphs) ac_glyphs_debug=1 ;;
4330 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4331 esac
4332 done
4333 IFS="$ac_save_IFS"
4334
4335 if test x$ac_enable_checking != x ; then
4336
4337 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4338
4339 fi
4340 if test x$ac_gc_check_stringbytes != x ; then
4341
4342 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4343
4344 fi
4345 if test x$ac_gc_check_string_overrun != x ; then
4346
4347 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4348
4349 fi
4350 if test x$ac_gc_check_string_free_list != x ; then
4351
4352 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4353
4354 fi
4355 if test x$ac_xmalloc_overrun != x ; then
4356
4357 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4358
4359 fi
4360 if test x$ac_gc_check_cons_list != x ; then
4361
4362 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4363
4364 fi
4365 if test x$ac_glyphs_debug != x ; then
4366
4367 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4368
4369 fi
4370
4371 # Check whether --enable-check-lisp-object-type was given.
4372 if test "${enable_check_lisp_object_type+set}" = set; then :
4373 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4374
4375 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4376
4377 fi
4378 fi
4379
4380
4381
4382 # Check whether --enable-profiling was given.
4383 if test "${enable_profiling+set}" = set; then :
4384 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4385 fi
4386
4387 if test x$ac_enable_profiling != x ; then
4388 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4389 else
4390 PROFILING_CFLAGS=
4391 fi
4392
4393
4394 # Check whether --enable-autodepend was given.
4395 if test "${enable_autodepend+set}" = set; then :
4396 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4397 else
4398 ac_enable_autodepend=yes
4399 fi
4400
4401
4402 # Check whether --enable-gtk-deprecation-warnings was given.
4403 if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4404 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4405 fi
4406
4407
4408 #### Make srcdir absolute, if it isn't already. It's important to
4409 #### avoid running the file name through pwd unnecessarily, since pwd can
4410 #### give you automounter prefixes, which can go away. We do all this
4411 #### so Emacs can find its files when run uninstalled.
4412 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4413 unset CDPATH
4414 case "${srcdir}" in
4415 /* ) ;;
4416 . )
4417 ## We may be able to use the $PWD environment variable to make this
4418 ## absolute. But sometimes PWD is inaccurate.
4419 ## Note: we used to use $PWD at the end instead of `pwd`,
4420 ## but that tested only for a well-formed and valid PWD,
4421 ## it did not object when PWD was well-formed and valid but just wrong.
4422 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
4423 then
4424 srcdir="$PWD"
4425 else
4426 srcdir=`(cd "$srcdir"; pwd)`
4427 fi
4428 ;;
4429 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
4430 esac
4431
4432 ### Canonicalize the configuration name.
4433
4434 # Make sure we can run config.sub.
4435 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4436 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4437
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4439 $as_echo_n "checking build system type... " >&6; }
4440 if test "${ac_cv_build+set}" = set; then :
4441 $as_echo_n "(cached) " >&6
4442 else
4443 ac_build_alias=$build_alias
4444 test "x$ac_build_alias" = x &&
4445 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4446 test "x$ac_build_alias" = x &&
4447 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4448 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4449 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4450
4451 fi
4452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4453 $as_echo "$ac_cv_build" >&6; }
4454 case $ac_cv_build in
4455 *-*-*) ;;
4456 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4457 esac
4458 build=$ac_cv_build
4459 ac_save_IFS=$IFS; IFS='-'
4460 set x $ac_cv_build
4461 shift
4462 build_cpu=$1
4463 build_vendor=$2
4464 shift; shift
4465 # Remember, the first character of IFS is used to create $*,
4466 # except with old shells:
4467 build_os=$*
4468 IFS=$ac_save_IFS
4469 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4470
4471
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4473 $as_echo_n "checking host system type... " >&6; }
4474 if test "${ac_cv_host+set}" = set; then :
4475 $as_echo_n "(cached) " >&6
4476 else
4477 if test "x$host_alias" = x; then
4478 ac_cv_host=$ac_cv_build
4479 else
4480 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4481 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4482 fi
4483
4484 fi
4485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4486 $as_echo "$ac_cv_host" >&6; }
4487 case $ac_cv_host in
4488 *-*-*) ;;
4489 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4490 esac
4491 host=$ac_cv_host
4492 ac_save_IFS=$IFS; IFS='-'
4493 set x $ac_cv_host
4494 shift
4495 host_cpu=$1
4496 host_vendor=$2
4497 shift; shift
4498 # Remember, the first character of IFS is used to create $*,
4499 # except with old shells:
4500 host_os=$*
4501 IFS=$ac_save_IFS
4502 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4503
4504
4505 canonical=$host
4506 configuration=${host_alias-${build_alias-$host}}
4507
4508
4509
4510 ### If you add support for a new configuration, add code to this
4511 ### switch statement to recognize your configuration name and select
4512 ### the appropriate operating system file.
4513
4514 ### You would hope that you could choose an s/*.h
4515 ### file based on the operating system portion. However, it turns out
4516 ### that each s/*.h file is pretty manufacturer-specific.
4517 ### So we basically have to have a special case for each
4518 ### configuration name.
4519 ###
4520 ### As far as handling version numbers on operating systems is
4521 ### concerned, make sure things will fail in a fixable way. If
4522 ### /etc/MACHINES doesn't say anything about version numbers, be
4523 ### prepared to handle anything reasonably. If version numbers
4524 ### matter, be sure /etc/MACHINES says something about it.
4525
4526 opsys='' unported=no
4527 case "${canonical}" in
4528
4529 ## GNU/Linux and similar ports
4530 *-*-linux* )
4531 opsys=gnu-linux
4532 ;;
4533
4534 ## FreeBSD ports
4535 *-*-freebsd* )
4536 opsys=freebsd
4537 ;;
4538
4539 ## FreeBSD kernel + glibc based userland
4540 *-*-kfreebsd*gnu* )
4541 opsys=gnu-kfreebsd
4542 ;;
4543
4544 ## NetBSD ports
4545 *-*-netbsd* )
4546 opsys=netbsd
4547 ;;
4548
4549 ## OpenBSD ports
4550 *-*-openbsd* )
4551 opsys=openbsd
4552 ;;
4553
4554 ## Apple Darwin / Mac OS X
4555 *-apple-darwin* )
4556 case "${canonical}" in
4557 i[3456]86-* ) ;;
4558 powerpc-* ) ;;
4559 x86_64-* ) ;;
4560 * ) unported=yes ;;
4561 esac
4562 opsys=darwin
4563 ## Use fink packages if available.
4564 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4565 ## if test -d /sw/include && test -d /sw/lib; then
4566 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4567 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4568 ## fi
4569 ;;
4570
4571 ## HP 9000 series 700 and 800, running HP/UX
4572 hppa*-hp-hpux10.2* )
4573 opsys=hpux10-20
4574 ;;
4575 hppa*-hp-hpux1[1-9]* )
4576 opsys=hpux11
4577 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4578 ;;
4579
4580 ## IBM machines
4581 rs6000-ibm-aix4.[23]* )
4582 opsys=aix4-2
4583 ;;
4584 powerpc-ibm-aix4.[23]* )
4585 opsys=aix4-2
4586 ;;
4587 rs6000-ibm-aix[56]* )
4588 opsys=aix4-2
4589 ;;
4590 powerpc-ibm-aix[56]* )
4591 opsys=aix4-2
4592 ;;
4593
4594 ## Silicon Graphics machines
4595 ## Iris 4D
4596 mips-sgi-irix6.5 )
4597 opsys=irix6-5
4598 # Without defining _LANGUAGE_C, things get masked out in the headers
4599 # so that, for instance, grepping for `free' in stdlib.h fails and
4600 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4601 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4602 ;;
4603
4604 ## Suns
4605 *-sun-solaris* \
4606 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4607 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4608 case "${canonical}" in
4609 i[3456]86-*-* ) ;;
4610 amd64-*-*|x86_64-*-*) ;;
4611 sparc* ) ;;
4612 * ) unported=yes ;;
4613 esac
4614 case "${canonical}" in
4615 *-sunos5.6* | *-solaris2.6* )
4616 opsys=sol2-6
4617 RANLIB="ar -ts"
4618 ;;
4619 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4620 opsys=sol2-6
4621 emacs_check_sunpro_c=yes
4622 ;;
4623 *-sunos5* | *-solaris* )
4624 opsys=sol2-10
4625 emacs_check_sunpro_c=yes
4626 ;;
4627 esac
4628 ## Watch out for a compiler that we know will not work.
4629 case "${canonical}" in
4630 *-solaris* | *-sunos5* )
4631 if [ "x$CC" = x/usr/ucb/cc ]; then
4632 ## /usr/ucb/cc doesn't work;
4633 ## we should find some other compiler that does work.
4634 unset CC
4635 fi
4636 ;;
4637 *) ;;
4638 esac
4639 ;;
4640
4641 ## Intel 386 machines where we don't care about the manufacturer.
4642 i[3456]86-*-* )
4643 case "${canonical}" in
4644 *-cygwin ) opsys=cygwin ;;
4645 *-darwin* ) opsys=darwin ;;
4646 *-sysv4.2uw* ) opsys=unixware ;;
4647 *-sysv5uw* ) opsys=unixware ;;
4648 *-sysv5OpenUNIX* ) opsys=unixware ;;
4649 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4650 esac
4651 ;;
4652
4653 * )
4654 unported=yes
4655 ;;
4656 esac
4657
4658 ### If the code above didn't choose an operating system, just choose
4659 ### an operating system based on the configuration name. You really
4660 ### only want to use this when you have no idea what the right
4661 ### operating system is; if you know what operating systems a machine
4662 ### runs, it's cleaner to make it explicit in the case statement
4663 ### above.
4664 if test x"${opsys}" = x; then
4665 case "${canonical}" in
4666 *-gnu* ) opsys=gnu ;;
4667 * )
4668 unported=yes
4669 ;;
4670 esac
4671 fi
4672
4673
4674
4675 if test $unported = yes; then
4676 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4677 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4678 fi
4679
4680
4681 #### Choose a compiler.
4682
4683 ac_ext=c
4684 ac_cpp='$CPP $CPPFLAGS'
4685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4687 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4688 if test -n "$ac_tool_prefix"; then
4689 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4690 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4692 $as_echo_n "checking for $ac_word... " >&6; }
4693 if test "${ac_cv_prog_CC+set}" = set; then :
4694 $as_echo_n "(cached) " >&6
4695 else
4696 if test -n "$CC"; then
4697 ac_cv_prog_CC="$CC" # Let the user override the test.
4698 else
4699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4700 for as_dir in $PATH
4701 do
4702 IFS=$as_save_IFS
4703 test -z "$as_dir" && as_dir=.
4704 for ac_exec_ext in '' $ac_executable_extensions; do
4705 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4706 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4708 break 2
4709 fi
4710 done
4711 done
4712 IFS=$as_save_IFS
4713
4714 fi
4715 fi
4716 CC=$ac_cv_prog_CC
4717 if test -n "$CC"; then
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4719 $as_echo "$CC" >&6; }
4720 else
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722 $as_echo "no" >&6; }
4723 fi
4724
4725
4726 fi
4727 if test -z "$ac_cv_prog_CC"; then
4728 ac_ct_CC=$CC
4729 # Extract the first word of "gcc", so it can be a program name with args.
4730 set dummy gcc; ac_word=$2
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4732 $as_echo_n "checking for $ac_word... " >&6; }
4733 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4734 $as_echo_n "(cached) " >&6
4735 else
4736 if test -n "$ac_ct_CC"; then
4737 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4738 else
4739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740 for as_dir in $PATH
4741 do
4742 IFS=$as_save_IFS
4743 test -z "$as_dir" && as_dir=.
4744 for ac_exec_ext in '' $ac_executable_extensions; do
4745 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4746 ac_cv_prog_ac_ct_CC="gcc"
4747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4748 break 2
4749 fi
4750 done
4751 done
4752 IFS=$as_save_IFS
4753
4754 fi
4755 fi
4756 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4757 if test -n "$ac_ct_CC"; then
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4759 $as_echo "$ac_ct_CC" >&6; }
4760 else
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762 $as_echo "no" >&6; }
4763 fi
4764
4765 if test "x$ac_ct_CC" = x; then
4766 CC=""
4767 else
4768 case $cross_compiling:$ac_tool_warned in
4769 yes:)
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4772 ac_tool_warned=yes ;;
4773 esac
4774 CC=$ac_ct_CC
4775 fi
4776 else
4777 CC="$ac_cv_prog_CC"
4778 fi
4779
4780 if test -z "$CC"; then
4781 if test -n "$ac_tool_prefix"; then
4782 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4783 set dummy ${ac_tool_prefix}cc; ac_word=$2
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785 $as_echo_n "checking for $ac_word... " >&6; }
4786 if test "${ac_cv_prog_CC+set}" = set; then :
4787 $as_echo_n "(cached) " >&6
4788 else
4789 if test -n "$CC"; then
4790 ac_cv_prog_CC="$CC" # Let the user override the test.
4791 else
4792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793 for as_dir in $PATH
4794 do
4795 IFS=$as_save_IFS
4796 test -z "$as_dir" && as_dir=.
4797 for ac_exec_ext in '' $ac_executable_extensions; do
4798 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4799 ac_cv_prog_CC="${ac_tool_prefix}cc"
4800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4801 break 2
4802 fi
4803 done
4804 done
4805 IFS=$as_save_IFS
4806
4807 fi
4808 fi
4809 CC=$ac_cv_prog_CC
4810 if test -n "$CC"; then
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4812 $as_echo "$CC" >&6; }
4813 else
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4815 $as_echo "no" >&6; }
4816 fi
4817
4818
4819 fi
4820 fi
4821 if test -z "$CC"; then
4822 # Extract the first word of "cc", so it can be a program name with args.
4823 set dummy cc; ac_word=$2
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825 $as_echo_n "checking for $ac_word... " >&6; }
4826 if test "${ac_cv_prog_CC+set}" = set; then :
4827 $as_echo_n "(cached) " >&6
4828 else
4829 if test -n "$CC"; then
4830 ac_cv_prog_CC="$CC" # Let the user override the test.
4831 else
4832 ac_prog_rejected=no
4833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4834 for as_dir in $PATH
4835 do
4836 IFS=$as_save_IFS
4837 test -z "$as_dir" && as_dir=.
4838 for ac_exec_ext in '' $ac_executable_extensions; do
4839 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4840 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4841 ac_prog_rejected=yes
4842 continue
4843 fi
4844 ac_cv_prog_CC="cc"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848 done
4849 done
4850 IFS=$as_save_IFS
4851
4852 if test $ac_prog_rejected = yes; then
4853 # We found a bogon in the path, so make sure we never use it.
4854 set dummy $ac_cv_prog_CC
4855 shift
4856 if test $# != 0; then
4857 # We chose a different compiler from the bogus one.
4858 # However, it has the same basename, so the bogon will be chosen
4859 # first if we set CC to just the basename; use the full file name.
4860 shift
4861 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4862 fi
4863 fi
4864 fi
4865 fi
4866 CC=$ac_cv_prog_CC
4867 if test -n "$CC"; then
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4869 $as_echo "$CC" >&6; }
4870 else
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872 $as_echo "no" >&6; }
4873 fi
4874
4875
4876 fi
4877 if test -z "$CC"; then
4878 if test -n "$ac_tool_prefix"; then
4879 for ac_prog in cl.exe
4880 do
4881 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4882 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884 $as_echo_n "checking for $ac_word... " >&6; }
4885 if test "${ac_cv_prog_CC+set}" = set; then :
4886 $as_echo_n "(cached) " >&6
4887 else
4888 if test -n "$CC"; then
4889 ac_cv_prog_CC="$CC" # Let the user override the test.
4890 else
4891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4892 for as_dir in $PATH
4893 do
4894 IFS=$as_save_IFS
4895 test -z "$as_dir" && as_dir=.
4896 for ac_exec_ext in '' $ac_executable_extensions; do
4897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4898 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4900 break 2
4901 fi
4902 done
4903 done
4904 IFS=$as_save_IFS
4905
4906 fi
4907 fi
4908 CC=$ac_cv_prog_CC
4909 if test -n "$CC"; then
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4911 $as_echo "$CC" >&6; }
4912 else
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4914 $as_echo "no" >&6; }
4915 fi
4916
4917
4918 test -n "$CC" && break
4919 done
4920 fi
4921 if test -z "$CC"; then
4922 ac_ct_CC=$CC
4923 for ac_prog in cl.exe
4924 do
4925 # Extract the first word of "$ac_prog", so it can be a program name with args.
4926 set dummy $ac_prog; ac_word=$2
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4928 $as_echo_n "checking for $ac_word... " >&6; }
4929 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4930 $as_echo_n "(cached) " >&6
4931 else
4932 if test -n "$ac_ct_CC"; then
4933 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4934 else
4935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4936 for as_dir in $PATH
4937 do
4938 IFS=$as_save_IFS
4939 test -z "$as_dir" && as_dir=.
4940 for ac_exec_ext in '' $ac_executable_extensions; do
4941 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4942 ac_cv_prog_ac_ct_CC="$ac_prog"
4943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4944 break 2
4945 fi
4946 done
4947 done
4948 IFS=$as_save_IFS
4949
4950 fi
4951 fi
4952 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4953 if test -n "$ac_ct_CC"; then
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4955 $as_echo "$ac_ct_CC" >&6; }
4956 else
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4958 $as_echo "no" >&6; }
4959 fi
4960
4961
4962 test -n "$ac_ct_CC" && break
4963 done
4964
4965 if test "x$ac_ct_CC" = x; then
4966 CC=""
4967 else
4968 case $cross_compiling:$ac_tool_warned in
4969 yes:)
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4971 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4972 ac_tool_warned=yes ;;
4973 esac
4974 CC=$ac_ct_CC
4975 fi
4976 fi
4977
4978 fi
4979
4980
4981 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4982 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4983 as_fn_error "no acceptable C compiler found in \$PATH
4984 See \`config.log' for more details." "$LINENO" 5; }
4985
4986 # Provide some information about the compiler.
4987 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4988 set X $ac_compile
4989 ac_compiler=$2
4990 for ac_option in --version -v -V -qversion; do
4991 { { ac_try="$ac_compiler $ac_option >&5"
4992 case "(($ac_try" in
4993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4994 *) ac_try_echo=$ac_try;;
4995 esac
4996 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4997 $as_echo "$ac_try_echo"; } >&5
4998 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4999 ac_status=$?
5000 if test -s conftest.err; then
5001 sed '10a\
5002 ... rest of stderr output deleted ...
5003 10q' conftest.err >conftest.er1
5004 cat conftest.er1 >&5
5005 fi
5006 rm -f conftest.er1 conftest.err
5007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5008 test $ac_status = 0; }
5009 done
5010
5011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5012 /* end confdefs.h. */
5013
5014 int
5015 main ()
5016 {
5017
5018 ;
5019 return 0;
5020 }
5021 _ACEOF
5022 ac_clean_files_save=$ac_clean_files
5023 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5024 # Try to create an executable without -o first, disregard a.out.
5025 # It will help us diagnose broken compilers, and finding out an intuition
5026 # of exeext.
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5028 $as_echo_n "checking whether the C compiler works... " >&6; }
5029 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5030
5031 # The possible output files:
5032 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5033
5034 ac_rmfiles=
5035 for ac_file in $ac_files
5036 do
5037 case $ac_file in
5038 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5039 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5040 esac
5041 done
5042 rm -f $ac_rmfiles
5043
5044 if { { ac_try="$ac_link_default"
5045 case "(($ac_try" in
5046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5047 *) ac_try_echo=$ac_try;;
5048 esac
5049 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5050 $as_echo "$ac_try_echo"; } >&5
5051 (eval "$ac_link_default") 2>&5
5052 ac_status=$?
5053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5054 test $ac_status = 0; }; then :
5055 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5056 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5057 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5058 # so that the user can short-circuit this test for compilers unknown to
5059 # Autoconf.
5060 for ac_file in $ac_files ''
5061 do
5062 test -f "$ac_file" || continue
5063 case $ac_file in
5064 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5065 ;;
5066 [ab].out )
5067 # We found the default executable, but exeext='' is most
5068 # certainly right.
5069 break;;
5070 *.* )
5071 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5072 then :; else
5073 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5074 fi
5075 # We set ac_cv_exeext here because the later test for it is not
5076 # safe: cross compilers may not add the suffix if given an `-o'
5077 # argument, so we may need to know it at that point already.
5078 # Even if this section looks crufty: it has the advantage of
5079 # actually working.
5080 break;;
5081 * )
5082 break;;
5083 esac
5084 done
5085 test "$ac_cv_exeext" = no && ac_cv_exeext=
5086
5087 else
5088 ac_file=''
5089 fi
5090 if test -z "$ac_file"; then :
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092 $as_echo "no" >&6; }
5093 $as_echo "$as_me: failed program was:" >&5
5094 sed 's/^/| /' conftest.$ac_ext >&5
5095
5096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5097 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5098 { as_fn_set_status 77
5099 as_fn_error "C compiler cannot create executables
5100 See \`config.log' for more details." "$LINENO" 5; }; }
5101 else
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5103 $as_echo "yes" >&6; }
5104 fi
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5106 $as_echo_n "checking for C compiler default output file name... " >&6; }
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5108 $as_echo "$ac_file" >&6; }
5109 ac_exeext=$ac_cv_exeext
5110
5111 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5112 ac_clean_files=$ac_clean_files_save
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5114 $as_echo_n "checking for suffix of executables... " >&6; }
5115 if { { ac_try="$ac_link"
5116 case "(($ac_try" in
5117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5118 *) ac_try_echo=$ac_try;;
5119 esac
5120 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5121 $as_echo "$ac_try_echo"; } >&5
5122 (eval "$ac_link") 2>&5
5123 ac_status=$?
5124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5125 test $ac_status = 0; }; then :
5126 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5127 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5128 # work properly (i.e., refer to `conftest.exe'), while it won't with
5129 # `rm'.
5130 for ac_file in conftest.exe conftest conftest.*; do
5131 test -f "$ac_file" || continue
5132 case $ac_file in
5133 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5134 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5135 break;;
5136 * ) break;;
5137 esac
5138 done
5139 else
5140 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5141 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5142 as_fn_error "cannot compute suffix of executables: cannot compile and link
5143 See \`config.log' for more details." "$LINENO" 5; }
5144 fi
5145 rm -f conftest conftest$ac_cv_exeext
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5147 $as_echo "$ac_cv_exeext" >&6; }
5148
5149 rm -f conftest.$ac_ext
5150 EXEEXT=$ac_cv_exeext
5151 ac_exeext=$EXEEXT
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5153 /* end confdefs.h. */
5154 #include <stdio.h>
5155 int
5156 main ()
5157 {
5158 FILE *f = fopen ("conftest.out", "w");
5159 return ferror (f) || fclose (f) != 0;
5160
5161 ;
5162 return 0;
5163 }
5164 _ACEOF
5165 ac_clean_files="$ac_clean_files conftest.out"
5166 # Check that the compiler produces executables we can run. If not, either
5167 # the compiler is broken, or we cross compile.
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5169 $as_echo_n "checking whether we are cross compiling... " >&6; }
5170 if test "$cross_compiling" != yes; then
5171 { { ac_try="$ac_link"
5172 case "(($ac_try" in
5173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5174 *) ac_try_echo=$ac_try;;
5175 esac
5176 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5177 $as_echo "$ac_try_echo"; } >&5
5178 (eval "$ac_link") 2>&5
5179 ac_status=$?
5180 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5181 test $ac_status = 0; }
5182 if { ac_try='./conftest$ac_cv_exeext'
5183 { { case "(($ac_try" in
5184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5185 *) ac_try_echo=$ac_try;;
5186 esac
5187 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5188 $as_echo "$ac_try_echo"; } >&5
5189 (eval "$ac_try") 2>&5
5190 ac_status=$?
5191 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5192 test $ac_status = 0; }; }; then
5193 cross_compiling=no
5194 else
5195 if test "$cross_compiling" = maybe; then
5196 cross_compiling=yes
5197 else
5198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5199 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5200 as_fn_error "cannot run C compiled programs.
5201 If you meant to cross compile, use \`--host'.
5202 See \`config.log' for more details." "$LINENO" 5; }
5203 fi
5204 fi
5205 fi
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5207 $as_echo "$cross_compiling" >&6; }
5208
5209 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5210 ac_clean_files=$ac_clean_files_save
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5212 $as_echo_n "checking for suffix of object files... " >&6; }
5213 if test "${ac_cv_objext+set}" = set; then :
5214 $as_echo_n "(cached) " >&6
5215 else
5216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5217 /* end confdefs.h. */
5218
5219 int
5220 main ()
5221 {
5222
5223 ;
5224 return 0;
5225 }
5226 _ACEOF
5227 rm -f conftest.o conftest.obj
5228 if { { ac_try="$ac_compile"
5229 case "(($ac_try" in
5230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5231 *) ac_try_echo=$ac_try;;
5232 esac
5233 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5234 $as_echo "$ac_try_echo"; } >&5
5235 (eval "$ac_compile") 2>&5
5236 ac_status=$?
5237 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5238 test $ac_status = 0; }; then :
5239 for ac_file in conftest.o conftest.obj conftest.*; do
5240 test -f "$ac_file" || continue;
5241 case $ac_file in
5242 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5243 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5244 break;;
5245 esac
5246 done
5247 else
5248 $as_echo "$as_me: failed program was:" >&5
5249 sed 's/^/| /' conftest.$ac_ext >&5
5250
5251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5252 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5253 as_fn_error "cannot compute suffix of object files: cannot compile
5254 See \`config.log' for more details." "$LINENO" 5; }
5255 fi
5256 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5257 fi
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5259 $as_echo "$ac_cv_objext" >&6; }
5260 OBJEXT=$ac_cv_objext
5261 ac_objext=$OBJEXT
5262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5263 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5264 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5265 $as_echo_n "(cached) " >&6
5266 else
5267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5268 /* end confdefs.h. */
5269
5270 int
5271 main ()
5272 {
5273 #ifndef __GNUC__
5274 choke me
5275 #endif
5276
5277 ;
5278 return 0;
5279 }
5280 _ACEOF
5281 if ac_fn_c_try_compile "$LINENO"; then :
5282 ac_compiler_gnu=yes
5283 else
5284 ac_compiler_gnu=no
5285 fi
5286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5287 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5288
5289 fi
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5291 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5292 if test $ac_compiler_gnu = yes; then
5293 GCC=yes
5294 else
5295 GCC=
5296 fi
5297 ac_test_CFLAGS=${CFLAGS+set}
5298 ac_save_CFLAGS=$CFLAGS
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5300 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5301 if test "${ac_cv_prog_cc_g+set}" = set; then :
5302 $as_echo_n "(cached) " >&6
5303 else
5304 ac_save_c_werror_flag=$ac_c_werror_flag
5305 ac_c_werror_flag=yes
5306 ac_cv_prog_cc_g=no
5307 CFLAGS="-g"
5308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5309 /* end confdefs.h. */
5310
5311 int
5312 main ()
5313 {
5314
5315 ;
5316 return 0;
5317 }
5318 _ACEOF
5319 if ac_fn_c_try_compile "$LINENO"; then :
5320 ac_cv_prog_cc_g=yes
5321 else
5322 CFLAGS=""
5323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5324 /* end confdefs.h. */
5325
5326 int
5327 main ()
5328 {
5329
5330 ;
5331 return 0;
5332 }
5333 _ACEOF
5334 if ac_fn_c_try_compile "$LINENO"; then :
5335
5336 else
5337 ac_c_werror_flag=$ac_save_c_werror_flag
5338 CFLAGS="-g"
5339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5340 /* end confdefs.h. */
5341
5342 int
5343 main ()
5344 {
5345
5346 ;
5347 return 0;
5348 }
5349 _ACEOF
5350 if ac_fn_c_try_compile "$LINENO"; then :
5351 ac_cv_prog_cc_g=yes
5352 fi
5353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5354 fi
5355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5356 fi
5357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5358 ac_c_werror_flag=$ac_save_c_werror_flag
5359 fi
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5361 $as_echo "$ac_cv_prog_cc_g" >&6; }
5362 if test "$ac_test_CFLAGS" = set; then
5363 CFLAGS=$ac_save_CFLAGS
5364 elif test $ac_cv_prog_cc_g = yes; then
5365 if test "$GCC" = yes; then
5366 CFLAGS="-g -O2"
5367 else
5368 CFLAGS="-g"
5369 fi
5370 else
5371 if test "$GCC" = yes; then
5372 CFLAGS="-O2"
5373 else
5374 CFLAGS=
5375 fi
5376 fi
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5378 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5379 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5380 $as_echo_n "(cached) " >&6
5381 else
5382 ac_cv_prog_cc_c89=no
5383 ac_save_CC=$CC
5384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5385 /* end confdefs.h. */
5386 #include <stdarg.h>
5387 #include <stdio.h>
5388 #include <sys/types.h>
5389 #include <sys/stat.h>
5390 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5391 struct buf { int x; };
5392 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5393 static char *e (p, i)
5394 char **p;
5395 int i;
5396 {
5397 return p[i];
5398 }
5399 static char *f (char * (*g) (char **, int), char **p, ...)
5400 {
5401 char *s;
5402 va_list v;
5403 va_start (v,p);
5404 s = g (p, va_arg (v,int));
5405 va_end (v);
5406 return s;
5407 }
5408
5409 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5410 function prototypes and stuff, but not '\xHH' hex character constants.
5411 These don't provoke an error unfortunately, instead are silently treated
5412 as 'x'. The following induces an error, until -std is added to get
5413 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5414 array size at least. It's necessary to write '\x00'==0 to get something
5415 that's true only with -std. */
5416 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5417
5418 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5419 inside strings and character constants. */
5420 #define FOO(x) 'x'
5421 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5422
5423 int test (int i, double x);
5424 struct s1 {int (*f) (int a);};
5425 struct s2 {int (*f) (double a);};
5426 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5427 int argc;
5428 char **argv;
5429 int
5430 main ()
5431 {
5432 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5433 ;
5434 return 0;
5435 }
5436 _ACEOF
5437 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5438 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5439 do
5440 CC="$ac_save_CC $ac_arg"
5441 if ac_fn_c_try_compile "$LINENO"; then :
5442 ac_cv_prog_cc_c89=$ac_arg
5443 fi
5444 rm -f core conftest.err conftest.$ac_objext
5445 test "x$ac_cv_prog_cc_c89" != "xno" && break
5446 done
5447 rm -f conftest.$ac_ext
5448 CC=$ac_save_CC
5449
5450 fi
5451 # AC_CACHE_VAL
5452 case "x$ac_cv_prog_cc_c89" in
5453 x)
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5455 $as_echo "none needed" >&6; } ;;
5456 xno)
5457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5458 $as_echo "unsupported" >&6; } ;;
5459 *)
5460 CC="$CC $ac_cv_prog_cc_c89"
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5462 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5463 esac
5464 if test "x$ac_cv_prog_cc_c89" != xno; then :
5465
5466 fi
5467
5468 ac_ext=c
5469 ac_cpp='$CPP $CPPFLAGS'
5470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5473 DEPDIR="${am__leading_dot}deps"
5474
5475 ac_config_commands="$ac_config_commands depfiles"
5476
5477
5478 am_make=${MAKE-make}
5479 cat > confinc << 'END'
5480 am__doit:
5481 @echo this is the am__doit target
5482 .PHONY: am__doit
5483 END
5484 # If we don't find an include directive, just comment out the code.
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5486 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5487 am__include="#"
5488 am__quote=
5489 _am_result=none
5490 # First try GNU make style include.
5491 echo "include confinc" > confmf
5492 # Ignore all kinds of additional output from `make'.
5493 case `$am_make -s -f confmf 2> /dev/null` in #(
5494 *the\ am__doit\ target*)
5495 am__include=include
5496 am__quote=
5497 _am_result=GNU
5498 ;;
5499 esac
5500 # Now try BSD make style include.
5501 if test "$am__include" = "#"; then
5502 echo '.include "confinc"' > confmf
5503 case `$am_make -s -f confmf 2> /dev/null` in #(
5504 *the\ am__doit\ target*)
5505 am__include=.include
5506 am__quote="\""
5507 _am_result=BSD
5508 ;;
5509 esac
5510 fi
5511
5512
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5514 $as_echo "$_am_result" >&6; }
5515 rm -f confinc confmf
5516
5517 # Check whether --enable-dependency-tracking was given.
5518 if test "${enable_dependency_tracking+set}" = set; then :
5519 enableval=$enable_dependency_tracking;
5520 fi
5521
5522 if test "x$enable_dependency_tracking" != xno; then
5523 am_depcomp="$ac_aux_dir/depcomp"
5524 AMDEPBACKSLASH='\'
5525 fi
5526 if test "x$enable_dependency_tracking" != xno; then
5527 AMDEP_TRUE=
5528 AMDEP_FALSE='#'
5529 else
5530 AMDEP_TRUE='#'
5531 AMDEP_FALSE=
5532 fi
5533
5534
5535
5536 depcc="$CC" am_compiler_list=
5537
5538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5539 $as_echo_n "checking dependency style of $depcc... " >&6; }
5540 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5541 $as_echo_n "(cached) " >&6
5542 else
5543 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5544 # We make a subdir and do the tests there. Otherwise we can end up
5545 # making bogus files that we don't know about and never remove. For
5546 # instance it was reported that on HP-UX the gcc test will end up
5547 # making a dummy file named `D' -- because `-MD' means `put the output
5548 # in D'.
5549 mkdir conftest.dir
5550 # Copy depcomp to subdir because otherwise we won't find it if we're
5551 # using a relative directory.
5552 cp "$am_depcomp" conftest.dir
5553 cd conftest.dir
5554 # We will build objects and dependencies in a subdirectory because
5555 # it helps to detect inapplicable dependency modes. For instance
5556 # both Tru64's cc and ICC support -MD to output dependencies as a
5557 # side effect of compilation, but ICC will put the dependencies in
5558 # the current directory while Tru64 will put them in the object
5559 # directory.
5560 mkdir sub
5561
5562 am_cv_CC_dependencies_compiler_type=none
5563 if test "$am_compiler_list" = ""; then
5564 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5565 fi
5566 am__universal=false
5567 case " $depcc " in #(
5568 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5569 esac
5570
5571 for depmode in $am_compiler_list; do
5572 # Setup a source with many dependencies, because some compilers
5573 # like to wrap large dependency lists on column 80 (with \), and
5574 # we should not choose a depcomp mode which is confused by this.
5575 #
5576 # We need to recreate these files for each test, as the compiler may
5577 # overwrite some of them when testing with obscure command lines.
5578 # This happens at least with the AIX C compiler.
5579 : > sub/conftest.c
5580 for i in 1 2 3 4 5 6; do
5581 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5582 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5583 # Solaris 8's {/usr,}/bin/sh.
5584 touch sub/conftst$i.h
5585 done
5586 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5587
5588 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5589 # mode. It turns out that the SunPro C++ compiler does not properly
5590 # handle `-M -o', and we need to detect this. Also, some Intel
5591 # versions had trouble with output in subdirs
5592 am__obj=sub/conftest.${OBJEXT-o}
5593 am__minus_obj="-o $am__obj"
5594 case $depmode in
5595 gcc)
5596 # This depmode causes a compiler race in universal mode.
5597 test "$am__universal" = false || continue
5598 ;;
5599 nosideeffect)
5600 # after this tag, mechanisms are not by side-effect, so they'll
5601 # only be used when explicitly requested
5602 if test "x$enable_dependency_tracking" = xyes; then
5603 continue
5604 else
5605 break
5606 fi
5607 ;;
5608 msvisualcpp | msvcmsys)
5609 # This compiler won't grok `-c -o', but also, the minuso test has
5610 # not run yet. These depmodes are late enough in the game, and
5611 # so weak that their functioning should not be impacted.
5612 am__obj=conftest.${OBJEXT-o}
5613 am__minus_obj=
5614 ;;
5615 none) break ;;
5616 esac
5617 if depmode=$depmode \
5618 source=sub/conftest.c object=$am__obj \
5619 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5620 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5621 >/dev/null 2>conftest.err &&
5622 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5623 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5624 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5625 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5626 # icc doesn't choke on unknown options, it will just issue warnings
5627 # or remarks (even with -Werror). So we grep stderr for any message
5628 # that says an option was ignored or not supported.
5629 # When given -MP, icc 7.0 and 7.1 complain thusly:
5630 # icc: Command line warning: ignoring option '-M'; no argument required
5631 # The diagnosis changed in icc 8.0:
5632 # icc: Command line remark: option '-MP' not supported
5633 if (grep 'ignoring option' conftest.err ||
5634 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5635 am_cv_CC_dependencies_compiler_type=$depmode
5636 break
5637 fi
5638 fi
5639 done
5640
5641 cd ..
5642 rm -rf conftest.dir
5643 else
5644 am_cv_CC_dependencies_compiler_type=none
5645 fi
5646
5647 fi
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5649 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5650 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5651
5652 if
5653 test "x$enable_dependency_tracking" != xno \
5654 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5655 am__fastdepCC_TRUE=
5656 am__fastdepCC_FALSE='#'
5657 else
5658 am__fastdepCC_TRUE='#'
5659 am__fastdepCC_FALSE=
5660 fi
5661
5662
5663 if test "x$CC" != xcc; then
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5665 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5666 else
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5668 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5669 fi
5670 set dummy $CC; ac_cc=`$as_echo "$2" |
5671 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5672 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5673 $as_echo_n "(cached) " >&6
5674 else
5675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5676 /* end confdefs.h. */
5677
5678 int
5679 main ()
5680 {
5681
5682 ;
5683 return 0;
5684 }
5685 _ACEOF
5686 # Make sure it works both with $CC and with simple cc.
5687 # We do the test twice because some compilers refuse to overwrite an
5688 # existing .o file with -o, though they will create one.
5689 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5690 rm -f conftest2.*
5691 if { { case "(($ac_try" in
5692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5693 *) ac_try_echo=$ac_try;;
5694 esac
5695 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5696 $as_echo "$ac_try_echo"; } >&5
5697 (eval "$ac_try") 2>&5
5698 ac_status=$?
5699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5700 test $ac_status = 0; } &&
5701 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5703 *) ac_try_echo=$ac_try;;
5704 esac
5705 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5706 $as_echo "$ac_try_echo"; } >&5
5707 (eval "$ac_try") 2>&5
5708 ac_status=$?
5709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5710 test $ac_status = 0; };
5711 then
5712 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5713 if test "x$CC" != xcc; then
5714 # Test first that cc exists at all.
5715 if { ac_try='cc -c conftest.$ac_ext >&5'
5716 { { case "(($ac_try" in
5717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5718 *) ac_try_echo=$ac_try;;
5719 esac
5720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5721 $as_echo "$ac_try_echo"; } >&5
5722 (eval "$ac_try") 2>&5
5723 ac_status=$?
5724 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5725 test $ac_status = 0; }; }; then
5726 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5727 rm -f conftest2.*
5728 if { { case "(($ac_try" in
5729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5730 *) ac_try_echo=$ac_try;;
5731 esac
5732 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5733 $as_echo "$ac_try_echo"; } >&5
5734 (eval "$ac_try") 2>&5
5735 ac_status=$?
5736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5737 test $ac_status = 0; } &&
5738 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5740 *) ac_try_echo=$ac_try;;
5741 esac
5742 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5743 $as_echo "$ac_try_echo"; } >&5
5744 (eval "$ac_try") 2>&5
5745 ac_status=$?
5746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5747 test $ac_status = 0; };
5748 then
5749 # cc works too.
5750 :
5751 else
5752 # cc exists but doesn't like -o.
5753 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5754 fi
5755 fi
5756 fi
5757 else
5758 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5759 fi
5760 rm -f core conftest*
5761
5762 fi
5763 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5765 $as_echo "yes" >&6; }
5766 else
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768 $as_echo "no" >&6; }
5769
5770 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5771
5772 fi
5773
5774 # FIXME: we rely on the cache variable name because
5775 # there is no other way.
5776 set dummy $CC
5777 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5778 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5779 if test "$am_t" != yes; then
5780 # Losing compiler, so override with the script.
5781 # FIXME: It is wrong to rewrite CC.
5782 # But if we don't then we get into trouble of one sort or another.
5783 # A longer-term fix would be to have automake use am__CC in this case,
5784 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5785 CC="$am_aux_dir/compile $CC"
5786 fi
5787
5788
5789
5790 if test x$GCC = xyes; then
5791 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5792 else
5793 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5794 fi
5795
5796 # Avoid gnulib's tests for O_NOATIME and O_NOFOLLOW, as we don't use them.
5797
5798 # Avoid gnulib's threadlib module, as we do threads our own way.
5799
5800
5801 # Initialize gnulib right after choosing the compiler.
5802
5803 ac_ext=c
5804 ac_cpp='$CPP $CPPFLAGS'
5805 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5806 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5809 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5810 # On Suns, sometimes $CPP names a directory.
5811 if test -n "$CPP" && test -d "$CPP"; then
5812 CPP=
5813 fi
5814 if test -z "$CPP"; then
5815 if test "${ac_cv_prog_CPP+set}" = set; then :
5816 $as_echo_n "(cached) " >&6
5817 else
5818 # Double quotes because CPP needs to be expanded
5819 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5820 do
5821 ac_preproc_ok=false
5822 for ac_c_preproc_warn_flag in '' yes
5823 do
5824 # Use a header file that comes with gcc, so configuring glibc
5825 # with a fresh cross-compiler works.
5826 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5827 # <limits.h> exists even on freestanding compilers.
5828 # On the NeXT, cc -E runs the code through the compiler's parser,
5829 # not just through cpp. "Syntax error" is here to catch this case.
5830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5831 /* end confdefs.h. */
5832 #ifdef __STDC__
5833 # include <limits.h>
5834 #else
5835 # include <assert.h>
5836 #endif
5837 Syntax error
5838 _ACEOF
5839 if ac_fn_c_try_cpp "$LINENO"; then :
5840
5841 else
5842 # Broken: fails on valid input.
5843 continue
5844 fi
5845 rm -f conftest.err conftest.$ac_ext
5846
5847 # OK, works on sane cases. Now check whether nonexistent headers
5848 # can be detected and how.
5849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5850 /* end confdefs.h. */
5851 #include <ac_nonexistent.h>
5852 _ACEOF
5853 if ac_fn_c_try_cpp "$LINENO"; then :
5854 # Broken: success on invalid input.
5855 continue
5856 else
5857 # Passes both tests.
5858 ac_preproc_ok=:
5859 break
5860 fi
5861 rm -f conftest.err conftest.$ac_ext
5862
5863 done
5864 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5865 rm -f conftest.err conftest.$ac_ext
5866 if $ac_preproc_ok; then :
5867 break
5868 fi
5869
5870 done
5871 ac_cv_prog_CPP=$CPP
5872
5873 fi
5874 CPP=$ac_cv_prog_CPP
5875 else
5876 ac_cv_prog_CPP=$CPP
5877 fi
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5879 $as_echo "$CPP" >&6; }
5880 ac_preproc_ok=false
5881 for ac_c_preproc_warn_flag in '' yes
5882 do
5883 # Use a header file that comes with gcc, so configuring glibc
5884 # with a fresh cross-compiler works.
5885 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5886 # <limits.h> exists even on freestanding compilers.
5887 # On the NeXT, cc -E runs the code through the compiler's parser,
5888 # not just through cpp. "Syntax error" is here to catch this case.
5889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5890 /* end confdefs.h. */
5891 #ifdef __STDC__
5892 # include <limits.h>
5893 #else
5894 # include <assert.h>
5895 #endif
5896 Syntax error
5897 _ACEOF
5898 if ac_fn_c_try_cpp "$LINENO"; then :
5899
5900 else
5901 # Broken: fails on valid input.
5902 continue
5903 fi
5904 rm -f conftest.err conftest.$ac_ext
5905
5906 # OK, works on sane cases. Now check whether nonexistent headers
5907 # can be detected and how.
5908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5909 /* end confdefs.h. */
5910 #include <ac_nonexistent.h>
5911 _ACEOF
5912 if ac_fn_c_try_cpp "$LINENO"; then :
5913 # Broken: success on invalid input.
5914 continue
5915 else
5916 # Passes both tests.
5917 ac_preproc_ok=:
5918 break
5919 fi
5920 rm -f conftest.err conftest.$ac_ext
5921
5922 done
5923 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5924 rm -f conftest.err conftest.$ac_ext
5925 if $ac_preproc_ok; then :
5926
5927 else
5928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5930 as_fn_error "C preprocessor \"$CPP\" fails sanity check
5931 See \`config.log' for more details." "$LINENO" 5; }
5932 fi
5933
5934 ac_ext=c
5935 ac_cpp='$CPP $CPPFLAGS'
5936 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5937 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5938 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5939
5940
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5942 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5943 if test "${ac_cv_path_GREP+set}" = set; then :
5944 $as_echo_n "(cached) " >&6
5945 else
5946 if test -z "$GREP"; then
5947 ac_path_GREP_found=false
5948 # Loop through the user's path and test for each of PROGNAME-LIST
5949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5951 do
5952 IFS=$as_save_IFS
5953 test -z "$as_dir" && as_dir=.
5954 for ac_prog in grep ggrep; do
5955 for ac_exec_ext in '' $ac_executable_extensions; do
5956 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5957 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5958 # Check for GNU ac_path_GREP and select it if it is found.
5959 # Check for GNU $ac_path_GREP
5960 case `"$ac_path_GREP" --version 2>&1` in
5961 *GNU*)
5962 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5963 *)
5964 ac_count=0
5965 $as_echo_n 0123456789 >"conftest.in"
5966 while :
5967 do
5968 cat "conftest.in" "conftest.in" >"conftest.tmp"
5969 mv "conftest.tmp" "conftest.in"
5970 cp "conftest.in" "conftest.nl"
5971 $as_echo 'GREP' >> "conftest.nl"
5972 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5973 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5974 as_fn_arith $ac_count + 1 && ac_count=$as_val
5975 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5976 # Best one so far, save it but keep looking for a better one
5977 ac_cv_path_GREP="$ac_path_GREP"
5978 ac_path_GREP_max=$ac_count
5979 fi
5980 # 10*(2^10) chars as input seems more than enough
5981 test $ac_count -gt 10 && break
5982 done
5983 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5984 esac
5985
5986 $ac_path_GREP_found && break 3
5987 done
5988 done
5989 done
5990 IFS=$as_save_IFS
5991 if test -z "$ac_cv_path_GREP"; then
5992 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5993 fi
5994 else
5995 ac_cv_path_GREP=$GREP
5996 fi
5997
5998 fi
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6000 $as_echo "$ac_cv_path_GREP" >&6; }
6001 GREP="$ac_cv_path_GREP"
6002
6003
6004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6005 $as_echo_n "checking for egrep... " >&6; }
6006 if test "${ac_cv_path_EGREP+set}" = set; then :
6007 $as_echo_n "(cached) " >&6
6008 else
6009 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6010 then ac_cv_path_EGREP="$GREP -E"
6011 else
6012 if test -z "$EGREP"; then
6013 ac_path_EGREP_found=false
6014 # Loop through the user's path and test for each of PROGNAME-LIST
6015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6017 do
6018 IFS=$as_save_IFS
6019 test -z "$as_dir" && as_dir=.
6020 for ac_prog in egrep; do
6021 for ac_exec_ext in '' $ac_executable_extensions; do
6022 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6023 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6024 # Check for GNU ac_path_EGREP and select it if it is found.
6025 # Check for GNU $ac_path_EGREP
6026 case `"$ac_path_EGREP" --version 2>&1` in
6027 *GNU*)
6028 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6029 *)
6030 ac_count=0
6031 $as_echo_n 0123456789 >"conftest.in"
6032 while :
6033 do
6034 cat "conftest.in" "conftest.in" >"conftest.tmp"
6035 mv "conftest.tmp" "conftest.in"
6036 cp "conftest.in" "conftest.nl"
6037 $as_echo 'EGREP' >> "conftest.nl"
6038 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6039 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6040 as_fn_arith $ac_count + 1 && ac_count=$as_val
6041 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6042 # Best one so far, save it but keep looking for a better one
6043 ac_cv_path_EGREP="$ac_path_EGREP"
6044 ac_path_EGREP_max=$ac_count
6045 fi
6046 # 10*(2^10) chars as input seems more than enough
6047 test $ac_count -gt 10 && break
6048 done
6049 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6050 esac
6051
6052 $ac_path_EGREP_found && break 3
6053 done
6054 done
6055 done
6056 IFS=$as_save_IFS
6057 if test -z "$ac_cv_path_EGREP"; then
6058 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6059 fi
6060 else
6061 ac_cv_path_EGREP=$EGREP
6062 fi
6063
6064 fi
6065 fi
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6067 $as_echo "$ac_cv_path_EGREP" >&6; }
6068 EGREP="$ac_cv_path_EGREP"
6069
6070
6071
6072
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6074 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6075 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6076 $as_echo_n "(cached) " >&6
6077 else
6078
6079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6080 /* end confdefs.h. */
6081
6082 #ifdef __ACK__
6083 Amsterdam
6084 #endif
6085
6086 _ACEOF
6087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6088 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6089 gl_cv_c_amsterdam_compiler=yes
6090 else
6091 gl_cv_c_amsterdam_compiler=no
6092 fi
6093 rm -f conftest*
6094
6095
6096 fi
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6098 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6099 if test -z "$AR"; then
6100 if test $gl_cv_c_amsterdam_compiler = yes; then
6101 AR='cc -c.a'
6102 if test -z "$ARFLAGS"; then
6103 ARFLAGS='-o'
6104 fi
6105 else
6106 if test -n "$ac_tool_prefix"; then
6107 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6108 set dummy ${ac_tool_prefix}ar; ac_word=$2
6109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6110 $as_echo_n "checking for $ac_word... " >&6; }
6111 if test "${ac_cv_prog_AR+set}" = set; then :
6112 $as_echo_n "(cached) " >&6
6113 else
6114 if test -n "$AR"; then
6115 ac_cv_prog_AR="$AR" # Let the user override the test.
6116 else
6117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6118 for as_dir in $PATH
6119 do
6120 IFS=$as_save_IFS
6121 test -z "$as_dir" && as_dir=.
6122 for ac_exec_ext in '' $ac_executable_extensions; do
6123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6124 ac_cv_prog_AR="${ac_tool_prefix}ar"
6125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6126 break 2
6127 fi
6128 done
6129 done
6130 IFS=$as_save_IFS
6131
6132 fi
6133 fi
6134 AR=$ac_cv_prog_AR
6135 if test -n "$AR"; then
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6137 $as_echo "$AR" >&6; }
6138 else
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140 $as_echo "no" >&6; }
6141 fi
6142
6143
6144 fi
6145 if test -z "$ac_cv_prog_AR"; then
6146 ac_ct_AR=$AR
6147 # Extract the first word of "ar", so it can be a program name with args.
6148 set dummy ar; ac_word=$2
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150 $as_echo_n "checking for $ac_word... " >&6; }
6151 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6152 $as_echo_n "(cached) " >&6
6153 else
6154 if test -n "$ac_ct_AR"; then
6155 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6156 else
6157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6158 for as_dir in $PATH
6159 do
6160 IFS=$as_save_IFS
6161 test -z "$as_dir" && as_dir=.
6162 for ac_exec_ext in '' $ac_executable_extensions; do
6163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6164 ac_cv_prog_ac_ct_AR="ar"
6165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6166 break 2
6167 fi
6168 done
6169 done
6170 IFS=$as_save_IFS
6171
6172 fi
6173 fi
6174 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6175 if test -n "$ac_ct_AR"; then
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6177 $as_echo "$ac_ct_AR" >&6; }
6178 else
6179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180 $as_echo "no" >&6; }
6181 fi
6182
6183 if test "x$ac_ct_AR" = x; then
6184 AR="ar"
6185 else
6186 case $cross_compiling:$ac_tool_warned in
6187 yes:)
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6189 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6190 ac_tool_warned=yes ;;
6191 esac
6192 AR=$ac_ct_AR
6193 fi
6194 else
6195 AR="$ac_cv_prog_AR"
6196 fi
6197
6198 if test -z "$ARFLAGS"; then
6199 ARFLAGS='cru'
6200 fi
6201 fi
6202 else
6203 if test -z "$ARFLAGS"; then
6204 ARFLAGS='cru'
6205 fi
6206 fi
6207
6208
6209 if test -z "$RANLIB"; then
6210 if test $gl_cv_c_amsterdam_compiler = yes; then
6211 RANLIB=':'
6212 else
6213 if test -n "$ac_tool_prefix"; then
6214 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6215 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6217 $as_echo_n "checking for $ac_word... " >&6; }
6218 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6219 $as_echo_n "(cached) " >&6
6220 else
6221 if test -n "$RANLIB"; then
6222 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6223 else
6224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225 for as_dir in $PATH
6226 do
6227 IFS=$as_save_IFS
6228 test -z "$as_dir" && as_dir=.
6229 for ac_exec_ext in '' $ac_executable_extensions; do
6230 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6231 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233 break 2
6234 fi
6235 done
6236 done
6237 IFS=$as_save_IFS
6238
6239 fi
6240 fi
6241 RANLIB=$ac_cv_prog_RANLIB
6242 if test -n "$RANLIB"; then
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6244 $as_echo "$RANLIB" >&6; }
6245 else
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6247 $as_echo "no" >&6; }
6248 fi
6249
6250
6251 fi
6252 if test -z "$ac_cv_prog_RANLIB"; then
6253 ac_ct_RANLIB=$RANLIB
6254 # Extract the first word of "ranlib", so it can be a program name with args.
6255 set dummy ranlib; ac_word=$2
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6257 $as_echo_n "checking for $ac_word... " >&6; }
6258 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6259 $as_echo_n "(cached) " >&6
6260 else
6261 if test -n "$ac_ct_RANLIB"; then
6262 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6263 else
6264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267 IFS=$as_save_IFS
6268 test -z "$as_dir" && as_dir=.
6269 for ac_exec_ext in '' $ac_executable_extensions; do
6270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6271 ac_cv_prog_ac_ct_RANLIB="ranlib"
6272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273 break 2
6274 fi
6275 done
6276 done
6277 IFS=$as_save_IFS
6278
6279 fi
6280 fi
6281 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6282 if test -n "$ac_ct_RANLIB"; then
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6284 $as_echo "$ac_ct_RANLIB" >&6; }
6285 else
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287 $as_echo "no" >&6; }
6288 fi
6289
6290 if test "x$ac_ct_RANLIB" = x; then
6291 RANLIB=":"
6292 else
6293 case $cross_compiling:$ac_tool_warned in
6294 yes:)
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6296 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6297 ac_tool_warned=yes ;;
6298 esac
6299 RANLIB=$ac_ct_RANLIB
6300 fi
6301 else
6302 RANLIB="$ac_cv_prog_RANLIB"
6303 fi
6304
6305 fi
6306 fi
6307
6308
6309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6310 $as_echo_n "checking for ANSI C header files... " >&6; }
6311 if test "${ac_cv_header_stdc+set}" = set; then :
6312 $as_echo_n "(cached) " >&6
6313 else
6314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6315 /* end confdefs.h. */
6316 #include <stdlib.h>
6317 #include <stdarg.h>
6318 #include <string.h>
6319 #include <float.h>
6320
6321 int
6322 main ()
6323 {
6324
6325 ;
6326 return 0;
6327 }
6328 _ACEOF
6329 if ac_fn_c_try_compile "$LINENO"; then :
6330 ac_cv_header_stdc=yes
6331 else
6332 ac_cv_header_stdc=no
6333 fi
6334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6335
6336 if test $ac_cv_header_stdc = yes; then
6337 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6339 /* end confdefs.h. */
6340 #include <string.h>
6341
6342 _ACEOF
6343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6344 $EGREP "memchr" >/dev/null 2>&1; then :
6345
6346 else
6347 ac_cv_header_stdc=no
6348 fi
6349 rm -f conftest*
6350
6351 fi
6352
6353 if test $ac_cv_header_stdc = yes; then
6354 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6356 /* end confdefs.h. */
6357 #include <stdlib.h>
6358
6359 _ACEOF
6360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6361 $EGREP "free" >/dev/null 2>&1; then :
6362
6363 else
6364 ac_cv_header_stdc=no
6365 fi
6366 rm -f conftest*
6367
6368 fi
6369
6370 if test $ac_cv_header_stdc = yes; then
6371 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6372 if test "$cross_compiling" = yes; then :
6373 :
6374 else
6375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6376 /* end confdefs.h. */
6377 #include <ctype.h>
6378 #include <stdlib.h>
6379 #if ((' ' & 0x0FF) == 0x020)
6380 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6381 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6382 #else
6383 # define ISLOWER(c) \
6384 (('a' <= (c) && (c) <= 'i') \
6385 || ('j' <= (c) && (c) <= 'r') \
6386 || ('s' <= (c) && (c) <= 'z'))
6387 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6388 #endif
6389
6390 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6391 int
6392 main ()
6393 {
6394 int i;
6395 for (i = 0; i < 256; i++)
6396 if (XOR (islower (i), ISLOWER (i))
6397 || toupper (i) != TOUPPER (i))
6398 return 2;
6399 return 0;
6400 }
6401 _ACEOF
6402 if ac_fn_c_try_run "$LINENO"; then :
6403
6404 else
6405 ac_cv_header_stdc=no
6406 fi
6407 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6408 conftest.$ac_objext conftest.beam conftest.$ac_ext
6409 fi
6410
6411 fi
6412 fi
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6414 $as_echo "$ac_cv_header_stdc" >&6; }
6415 if test $ac_cv_header_stdc = yes; then
6416
6417 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6418
6419 fi
6420
6421 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6422 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6423 inttypes.h stdint.h unistd.h
6424 do :
6425 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6426 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6427 "
6428 eval as_val=\$$as_ac_Header
6429 if test "x$as_val" = x""yes; then :
6430 cat >>confdefs.h <<_ACEOF
6431 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6432 _ACEOF
6433
6434 fi
6435
6436 done
6437
6438
6439
6440
6441
6442 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6443 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6444 MINIX=yes
6445 else
6446 MINIX=
6447 fi
6448
6449
6450 if test "$MINIX" = yes; then
6451
6452 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6453
6454
6455 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6456
6457
6458 $as_echo "#define _MINIX 1" >>confdefs.h
6459
6460 fi
6461
6462 case "$host_os" in
6463 hpux*)
6464
6465 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6466
6467 ;;
6468 esac
6469
6470
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6472 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6473 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6474 $as_echo_n "(cached) " >&6
6475 else
6476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6477 /* end confdefs.h. */
6478
6479 # define __EXTENSIONS__ 1
6480 $ac_includes_default
6481 int
6482 main ()
6483 {
6484
6485 ;
6486 return 0;
6487 }
6488 _ACEOF
6489 if ac_fn_c_try_compile "$LINENO"; then :
6490 ac_cv_safe_to_define___extensions__=yes
6491 else
6492 ac_cv_safe_to_define___extensions__=no
6493 fi
6494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6495 fi
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6497 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6498 test $ac_cv_safe_to_define___extensions__ = yes &&
6499 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6500
6501 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6502
6503 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6504
6505 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6506
6507 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6508
6509 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6510
6511
6512
6513
6514
6515
6516
6517
6518 # Check whether --enable-largefile was given.
6519 if test "${enable_largefile+set}" = set; then :
6520 enableval=$enable_largefile;
6521 fi
6522
6523 if test "$enable_largefile" != no; then
6524
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6526 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6527 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6528 $as_echo_n "(cached) " >&6
6529 else
6530 ac_cv_sys_largefile_CC=no
6531 if test "$GCC" != yes; then
6532 ac_save_CC=$CC
6533 while :; do
6534 # IRIX 6.2 and later do not support large files by default,
6535 # so use the C compiler's -n32 option if that helps.
6536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6537 /* end confdefs.h. */
6538 #include <sys/types.h>
6539 /* Check that off_t can represent 2**63 - 1 correctly.
6540 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6541 since some C++ compilers masquerading as C compilers
6542 incorrectly reject 9223372036854775807. */
6543 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6544 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6545 && LARGE_OFF_T % 2147483647 == 1)
6546 ? 1 : -1];
6547 int
6548 main ()
6549 {
6550
6551 ;
6552 return 0;
6553 }
6554 _ACEOF
6555 if ac_fn_c_try_compile "$LINENO"; then :
6556 break
6557 fi
6558 rm -f core conftest.err conftest.$ac_objext
6559 CC="$CC -n32"
6560 if ac_fn_c_try_compile "$LINENO"; then :
6561 ac_cv_sys_largefile_CC=' -n32'; break
6562 fi
6563 rm -f core conftest.err conftest.$ac_objext
6564 break
6565 done
6566 CC=$ac_save_CC
6567 rm -f conftest.$ac_ext
6568 fi
6569 fi
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6571 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6572 if test "$ac_cv_sys_largefile_CC" != no; then
6573 CC=$CC$ac_cv_sys_largefile_CC
6574 fi
6575
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6577 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6578 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6579 $as_echo_n "(cached) " >&6
6580 else
6581 while :; do
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583 /* end confdefs.h. */
6584 #include <sys/types.h>
6585 /* Check that off_t can represent 2**63 - 1 correctly.
6586 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6587 since some C++ compilers masquerading as C compilers
6588 incorrectly reject 9223372036854775807. */
6589 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6590 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6591 && LARGE_OFF_T % 2147483647 == 1)
6592 ? 1 : -1];
6593 int
6594 main ()
6595 {
6596
6597 ;
6598 return 0;
6599 }
6600 _ACEOF
6601 if ac_fn_c_try_compile "$LINENO"; then :
6602 ac_cv_sys_file_offset_bits=no; break
6603 fi
6604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6606 /* end confdefs.h. */
6607 #define _FILE_OFFSET_BITS 64
6608 #include <sys/types.h>
6609 /* Check that off_t can represent 2**63 - 1 correctly.
6610 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6611 since some C++ compilers masquerading as C compilers
6612 incorrectly reject 9223372036854775807. */
6613 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6614 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6615 && LARGE_OFF_T % 2147483647 == 1)
6616 ? 1 : -1];
6617 int
6618 main ()
6619 {
6620
6621 ;
6622 return 0;
6623 }
6624 _ACEOF
6625 if ac_fn_c_try_compile "$LINENO"; then :
6626 ac_cv_sys_file_offset_bits=64; break
6627 fi
6628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6629 ac_cv_sys_file_offset_bits=unknown
6630 break
6631 done
6632 fi
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6634 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6635 case $ac_cv_sys_file_offset_bits in #(
6636 no | unknown) ;;
6637 *)
6638 cat >>confdefs.h <<_ACEOF
6639 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6640 _ACEOF
6641 ;;
6642 esac
6643 rm -rf conftest*
6644 if test $ac_cv_sys_file_offset_bits = unknown; then
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6646 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6647 if test "${ac_cv_sys_large_files+set}" = set; then :
6648 $as_echo_n "(cached) " >&6
6649 else
6650 while :; do
6651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6652 /* end confdefs.h. */
6653 #include <sys/types.h>
6654 /* Check that off_t can represent 2**63 - 1 correctly.
6655 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6656 since some C++ compilers masquerading as C compilers
6657 incorrectly reject 9223372036854775807. */
6658 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6659 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6660 && LARGE_OFF_T % 2147483647 == 1)
6661 ? 1 : -1];
6662 int
6663 main ()
6664 {
6665
6666 ;
6667 return 0;
6668 }
6669 _ACEOF
6670 if ac_fn_c_try_compile "$LINENO"; then :
6671 ac_cv_sys_large_files=no; break
6672 fi
6673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675 /* end confdefs.h. */
6676 #define _LARGE_FILES 1
6677 #include <sys/types.h>
6678 /* Check that off_t can represent 2**63 - 1 correctly.
6679 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6680 since some C++ compilers masquerading as C compilers
6681 incorrectly reject 9223372036854775807. */
6682 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6683 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6684 && LARGE_OFF_T % 2147483647 == 1)
6685 ? 1 : -1];
6686 int
6687 main ()
6688 {
6689
6690 ;
6691 return 0;
6692 }
6693 _ACEOF
6694 if ac_fn_c_try_compile "$LINENO"; then :
6695 ac_cv_sys_large_files=1; break
6696 fi
6697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6698 ac_cv_sys_large_files=unknown
6699 break
6700 done
6701 fi
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6703 $as_echo "$ac_cv_sys_large_files" >&6; }
6704 case $ac_cv_sys_large_files in #(
6705 no | unknown) ;;
6706 *)
6707 cat >>confdefs.h <<_ACEOF
6708 #define _LARGE_FILES $ac_cv_sys_large_files
6709 _ACEOF
6710 ;;
6711 esac
6712 rm -rf conftest*
6713 fi
6714
6715
6716 fi
6717
6718 case $ac_cv_prog_cc_stdc in #(
6719 no) :
6720 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6721 *) :
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6723 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6724 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6725 $as_echo_n "(cached) " >&6
6726 else
6727 ac_cv_prog_cc_c99=no
6728 ac_save_CC=$CC
6729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6730 /* end confdefs.h. */
6731 #include <stdarg.h>
6732 #include <stdbool.h>
6733 #include <stdlib.h>
6734 #include <wchar.h>
6735 #include <stdio.h>
6736
6737 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6738 #define debug(...) fprintf (stderr, __VA_ARGS__)
6739 #define showlist(...) puts (#__VA_ARGS__)
6740 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6741 static void
6742 test_varargs_macros (void)
6743 {
6744 int x = 1234;
6745 int y = 5678;
6746 debug ("Flag");
6747 debug ("X = %d\n", x);
6748 showlist (The first, second, and third items.);
6749 report (x>y, "x is %d but y is %d", x, y);
6750 }
6751
6752 // Check long long types.
6753 #define BIG64 18446744073709551615ull
6754 #define BIG32 4294967295ul
6755 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6756 #if !BIG_OK
6757 your preprocessor is broken;
6758 #endif
6759 #if BIG_OK
6760 #else
6761 your preprocessor is broken;
6762 #endif
6763 static long long int bignum = -9223372036854775807LL;
6764 static unsigned long long int ubignum = BIG64;
6765
6766 struct incomplete_array
6767 {
6768 int datasize;
6769 double data[];
6770 };
6771
6772 struct named_init {
6773 int number;
6774 const wchar_t *name;
6775 double average;
6776 };
6777
6778 typedef const char *ccp;
6779
6780 static inline int
6781 test_restrict (ccp restrict text)
6782 {
6783 // See if C++-style comments work.
6784 // Iterate through items via the restricted pointer.
6785 // Also check for declarations in for loops.
6786 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6787 continue;
6788 return 0;
6789 }
6790
6791 // Check varargs and va_copy.
6792 static void
6793 test_varargs (const char *format, ...)
6794 {
6795 va_list args;
6796 va_start (args, format);
6797 va_list args_copy;
6798 va_copy (args_copy, args);
6799
6800 const char *str;
6801 int number;
6802 float fnumber;
6803
6804 while (*format)
6805 {
6806 switch (*format++)
6807 {
6808 case 's': // string
6809 str = va_arg (args_copy, const char *);
6810 break;
6811 case 'd': // int
6812 number = va_arg (args_copy, int);
6813 break;
6814 case 'f': // float
6815 fnumber = va_arg (args_copy, double);
6816 break;
6817 default:
6818 break;
6819 }
6820 }
6821 va_end (args_copy);
6822 va_end (args);
6823 }
6824
6825 int
6826 main ()
6827 {
6828
6829 // Check bool.
6830 _Bool success = false;
6831
6832 // Check restrict.
6833 if (test_restrict ("String literal") == 0)
6834 success = true;
6835 char *restrict newvar = "Another string";
6836
6837 // Check varargs.
6838 test_varargs ("s, d' f .", "string", 65, 34.234);
6839 test_varargs_macros ();
6840
6841 // Check flexible array members.
6842 struct incomplete_array *ia =
6843 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6844 ia->datasize = 10;
6845 for (int i = 0; i < ia->datasize; ++i)
6846 ia->data[i] = i * 1.234;
6847
6848 // Check named initializers.
6849 struct named_init ni = {
6850 .number = 34,
6851 .name = L"Test wide string",
6852 .average = 543.34343,
6853 };
6854
6855 ni.number = 58;
6856
6857 int dynamic_array[ni.number];
6858 dynamic_array[ni.number - 1] = 543;
6859
6860 // work around unused variable warnings
6861 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6862 || dynamic_array[ni.number - 1] != 543);
6863
6864 ;
6865 return 0;
6866 }
6867 _ACEOF
6868 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6869 do
6870 CC="$ac_save_CC $ac_arg"
6871 if ac_fn_c_try_compile "$LINENO"; then :
6872 ac_cv_prog_cc_c99=$ac_arg
6873 fi
6874 rm -f core conftest.err conftest.$ac_objext
6875 test "x$ac_cv_prog_cc_c99" != "xno" && break
6876 done
6877 rm -f conftest.$ac_ext
6878 CC=$ac_save_CC
6879
6880 fi
6881 # AC_CACHE_VAL
6882 case "x$ac_cv_prog_cc_c99" in
6883 x)
6884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6885 $as_echo "none needed" >&6; } ;;
6886 xno)
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6888 $as_echo "unsupported" >&6; } ;;
6889 *)
6890 CC="$CC $ac_cv_prog_cc_c99"
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6892 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6893 esac
6894 if test "x$ac_cv_prog_cc_c99" != xno; then :
6895 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6896 else
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6898 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6899 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6900 $as_echo_n "(cached) " >&6
6901 else
6902 ac_cv_prog_cc_c89=no
6903 ac_save_CC=$CC
6904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6905 /* end confdefs.h. */
6906 #include <stdarg.h>
6907 #include <stdio.h>
6908 #include <sys/types.h>
6909 #include <sys/stat.h>
6910 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6911 struct buf { int x; };
6912 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6913 static char *e (p, i)
6914 char **p;
6915 int i;
6916 {
6917 return p[i];
6918 }
6919 static char *f (char * (*g) (char **, int), char **p, ...)
6920 {
6921 char *s;
6922 va_list v;
6923 va_start (v,p);
6924 s = g (p, va_arg (v,int));
6925 va_end (v);
6926 return s;
6927 }
6928
6929 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6930 function prototypes and stuff, but not '\xHH' hex character constants.
6931 These don't provoke an error unfortunately, instead are silently treated
6932 as 'x'. The following induces an error, until -std is added to get
6933 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6934 array size at least. It's necessary to write '\x00'==0 to get something
6935 that's true only with -std. */
6936 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6937
6938 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6939 inside strings and character constants. */
6940 #define FOO(x) 'x'
6941 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6942
6943 int test (int i, double x);
6944 struct s1 {int (*f) (int a);};
6945 struct s2 {int (*f) (double a);};
6946 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6947 int argc;
6948 char **argv;
6949 int
6950 main ()
6951 {
6952 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6953 ;
6954 return 0;
6955 }
6956 _ACEOF
6957 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6958 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6959 do
6960 CC="$ac_save_CC $ac_arg"
6961 if ac_fn_c_try_compile "$LINENO"; then :
6962 ac_cv_prog_cc_c89=$ac_arg
6963 fi
6964 rm -f core conftest.err conftest.$ac_objext
6965 test "x$ac_cv_prog_cc_c89" != "xno" && break
6966 done
6967 rm -f conftest.$ac_ext
6968 CC=$ac_save_CC
6969
6970 fi
6971 # AC_CACHE_VAL
6972 case "x$ac_cv_prog_cc_c89" in
6973 x)
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6975 $as_echo "none needed" >&6; } ;;
6976 xno)
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6978 $as_echo "unsupported" >&6; } ;;
6979 *)
6980 CC="$CC $ac_cv_prog_cc_c89"
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6982 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6983 esac
6984 if test "x$ac_cv_prog_cc_c89" != xno; then :
6985 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6986 else
6987 ac_cv_prog_cc_stdc=no
6988 fi
6989
6990 fi
6991 ;;
6992 esac
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6994 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6995 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6996 $as_echo_n "(cached) " >&6
6997 fi
6998
6999 case $ac_cv_prog_cc_stdc in #(
7000 no) :
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7002 $as_echo "unsupported" >&6; } ;; #(
7003 '') :
7004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7005 $as_echo "none needed" >&6; } ;; #(
7006 *) :
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7008 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7009 esac
7010
7011
7012
7013 # Code from module alloca-opt:
7014 # Code from module allocator:
7015 # Code from module c-ctype:
7016 # Code from module c-strcase:
7017 # Code from module careadlinkat:
7018 # Code from module clock-time:
7019 # Code from module close-stream:
7020 # Code from module crypto/md5:
7021 # Code from module crypto/sha1:
7022 # Code from module crypto/sha256:
7023 # Code from module crypto/sha512:
7024 # Code from module dosname:
7025 # Code from module dtoastr:
7026 # Code from module dtotimespec:
7027 # Code from module dup2:
7028 # Code from module environ:
7029 # Code from module euidaccess:
7030 # Code from module execinfo:
7031 # Code from module extensions:
7032
7033 # Code from module extern-inline:
7034 # Code from module faccessat:
7035 # Code from module fcntl-h:
7036 # Code from module filemode:
7037 # Code from module fpending:
7038 # Code from module getgroups:
7039 # Code from module getloadavg:
7040 # Code from module getopt-gnu:
7041 # Code from module getopt-posix:
7042 # Code from module gettext-h:
7043 # Code from module gettime:
7044 # Code from module gettimeofday:
7045 # Code from module group-member:
7046 # Code from module ignore-value:
7047 # Code from module include_next:
7048 # Code from module intprops:
7049 # Code from module inttypes-incomplete:
7050 # Code from module largefile:
7051
7052 # Code from module lstat:
7053 # Code from module manywarnings:
7054 # Code from module mktime:
7055 # Code from module multiarch:
7056 # Code from module nocrash:
7057 # Code from module pathmax:
7058 # Code from module pselect:
7059 # Code from module pthread_sigmask:
7060 # Code from module putenv:
7061 # Code from module readlink:
7062 # Code from module root-uid:
7063 # Code from module sig2str:
7064 # Code from module signal-h:
7065 # Code from module snippet/_Noreturn:
7066 # Code from module snippet/arg-nonnull:
7067 # Code from module snippet/c++defs:
7068 # Code from module snippet/warn-on-use:
7069 # Code from module socklen:
7070 # Code from module ssize_t:
7071 # Code from module stat:
7072 # Code from module stat-time:
7073 # Code from module stdalign:
7074 # Code from module stdarg:
7075
7076
7077
7078 # Code from module stdbool:
7079 # Code from module stddef:
7080 # Code from module stdint:
7081 # Code from module stdio:
7082 # Code from module stdlib:
7083 # Code from module strftime:
7084 # Code from module strtoimax:
7085 # Code from module strtoll:
7086 # Code from module strtoull:
7087 # Code from module strtoumax:
7088 # Code from module symlink:
7089 # Code from module sys_select:
7090 # Code from module sys_stat:
7091 # Code from module sys_time:
7092 # Code from module time:
7093 # Code from module time_r:
7094 # Code from module timer-time:
7095 # Code from module timespec:
7096 # Code from module timespec-add:
7097 # Code from module timespec-sub:
7098 # Code from module u64:
7099 # Code from module unistd:
7100 # Code from module unsetenv:
7101 # Code from module utimens:
7102 # Code from module verify:
7103 # Code from module warnings:
7104 # Code from module xalloc-oversized:
7105
7106
7107 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7108 # if -g3 works and the user does not specify CFLAGS.
7109 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7110 if test "$ac_test_CFLAGS" != set; then
7111 case $CFLAGS in
7112 '-g')
7113 emacs_g3_CFLAGS='-g3';;
7114 '-g -O2')
7115 emacs_g3_CFLAGS='-g3 -O2';;
7116 *)
7117 emacs_g3_CFLAGS='';;
7118 esac
7119 if test -n "$emacs_g3_CFLAGS"; then
7120 emacs_save_CFLAGS=$CFLAGS
7121 CFLAGS=$emacs_g3_CFLAGS
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7123 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7124 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7125 $as_echo_n "(cached) " >&6
7126 else
7127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7128 /* end confdefs.h. */
7129
7130 int
7131 main ()
7132 {
7133
7134 ;
7135 return 0;
7136 }
7137 _ACEOF
7138 if ac_fn_c_try_link "$LINENO"; then :
7139 emacs_cv_prog_cc_g3=yes
7140 else
7141 emacs_cv_prog_cc_g3=no
7142 fi
7143 rm -f core conftest.err conftest.$ac_objext \
7144 conftest$ac_exeext conftest.$ac_ext
7145 fi
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7147 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7148 if test $emacs_cv_prog_cc_g3 = yes; then
7149 CFLAGS=$emacs_g3_CFLAGS
7150 else
7151 CFLAGS=$emacs_save_CFLAGS
7152 fi
7153 fi
7154 fi
7155
7156 # Check whether --enable-gcc-warnings was given.
7157 if test "${enable_gcc_warnings+set}" = set; then :
7158 enableval=$enable_gcc_warnings; case $enableval in
7159 yes|no) ;;
7160 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7161 esac
7162 gl_gcc_warnings=$enableval
7163 else
7164 gl_gcc_warnings=no
7165
7166 fi
7167
7168
7169 # Check whether --enable-link-time-optimization was given.
7170 if test "${enable_link_time_optimization+set}" = set; then :
7171 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7173 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7174 ac_lto_supported=no
7175 if test x$GCC = xyes; then
7176 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7177 if test x$CPUS != x; then
7178 LTO="-flto=$CPUS"
7179 else
7180 LTO="-flto"
7181 fi
7182 old_CFLAGS=$CFLAGS
7183 CFLAGS="$CFLAGS $LTO"
7184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7185 /* end confdefs.h. */
7186
7187 int
7188 main ()
7189 {
7190
7191 ;
7192 return 0;
7193 }
7194 _ACEOF
7195 if ac_fn_c_try_compile "$LINENO"; then :
7196 ac_lto_supported=yes
7197 else
7198 ac_lto_supported=no
7199 fi
7200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201 CFLAGS="$old_CFLAGS"
7202 fi
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7204 $as_echo "$ac_lto_supported" >&6; }
7205 if test "$ac_lto_supported" = "yes"; then
7206 CFLAGS="$CFLAGS $LTO"
7207 fi
7208 fi
7209 fi
7210
7211
7212 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7213 # ------------------------------------------------
7214 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7215 # Otherwise, run RUN-IF-NOT-FOUND.
7216
7217
7218 # When compiling with GCC, prefer -isystem to -I when including system
7219 # include files, to avoid generating useless diagnostics for the files.
7220 if test "$gl_gcc_warnings" != yes; then
7221 isystem='-I'
7222 else
7223 isystem='-isystem '
7224
7225 # This, $nw, is the list of warnings we disable.
7226 nw=
7227
7228 case $with_x_toolkit in
7229 lucid | athena | motif)
7230 # Old toolkits mishandle 'const'.
7231 nw="$nw -Wwrite-strings"
7232 ;;
7233 *)
7234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7235 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7236 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7237 $as_echo_n "(cached) " >&6
7238 else
7239
7240 gl_save_compiler_FLAGS="$CFLAGS"
7241 as_fn_append CFLAGS " -Werror"
7242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7243 /* end confdefs.h. */
7244
7245 int
7246 main ()
7247 {
7248
7249 ;
7250 return 0;
7251 }
7252 _ACEOF
7253 if ac_fn_c_try_compile "$LINENO"; then :
7254 gl_cv_warn_c__Werror=yes
7255 else
7256 gl_cv_warn_c__Werror=no
7257 fi
7258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259 CFLAGS="$gl_save_compiler_FLAGS"
7260
7261 fi
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7263 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7264 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7265 as_fn_append WERROR_CFLAGS " -Werror"
7266 fi
7267
7268
7269 ;;
7270 esac
7271
7272
7273 nw="$nw -Waggregate-return" # anachronistic
7274 nw="$nw -Wlong-long" # C90 is anachronistic
7275 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7276 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7277 nw="$nw -Wtraditional" # Warns on #elif which we use often
7278 nw="$nw -Wcast-qual" # Too many warnings for now
7279 nw="$nw -Wconversion" # Too many warnings for now
7280 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7281 nw="$nw -Wsign-conversion" # Too many warnings for now
7282 nw="$nw -Woverlength-strings" # Not a problem these days
7283 nw="$nw -Wtraditional-conversion" # Too many warnings for now
7284 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
7285 nw="$nw -Wpadded" # Our structs are not padded
7286 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
7287 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7288 nw="$nw -Wformat-nonliteral" # we do this a lot
7289 nw="$nw -Wvla" # warnings in gettext.h
7290 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7291 nw="$nw -Wswitch-enum" # Too many warnings for now
7292 nw="$nw -Wswitch-default" # Too many warnings for now
7293 nw="$nw -Wfloat-equal" # warns about high-quality code
7294 nw="$nw -Winline" # OK to ignore 'inline'
7295 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7296 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7297 # signed overflow has undefined behavior
7298 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7299 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7300
7301 # Emacs doesn't care about shadowing; see
7302 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7303 nw="$nw -Wshadow"
7304
7305 # Emacs's use of alloca inhibits protecting the stack.
7306 nw="$nw -Wstack-protector"
7307
7308 # The following line should be removable at some point.
7309 nw="$nw -Wsuggest-attribute=pure"
7310
7311
7312
7313 if test -n "$GCC"; then
7314
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7316 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7317 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7318 $as_echo_n "(cached) " >&6
7319 else
7320
7321 gl_save_CFLAGS="$CFLAGS"
7322 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7324 /* end confdefs.h. */
7325
7326 int
7327 main ()
7328 {
7329
7330 ;
7331 return 0;
7332 }
7333 _ACEOF
7334 if ac_fn_c_try_compile "$LINENO"; then :
7335 gl_cv_cc_nomfi_supported=yes
7336 else
7337 gl_cv_cc_nomfi_supported=no
7338 fi
7339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7340 CFLAGS="$gl_save_CFLAGS"
7341 fi
7342
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7344 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7345
7346 if test "$gl_cv_cc_nomfi_supported" = yes; then
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7348 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7349 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7350 $as_echo_n "(cached) " >&6
7351 else
7352
7353 gl_save_CFLAGS="$CFLAGS"
7354 CFLAGS="$CFLAGS -W -Werror"
7355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7356 /* end confdefs.h. */
7357 void f (void)
7358 {
7359 typedef struct { int a; int b; } s_t;
7360 s_t s1 = { 0, };
7361 }
7362
7363 int
7364 main ()
7365 {
7366
7367 ;
7368 return 0;
7369 }
7370 _ACEOF
7371 if ac_fn_c_try_compile "$LINENO"; then :
7372 gl_cv_cc_nomfi_needed=no
7373 else
7374 gl_cv_cc_nomfi_needed=yes
7375 fi
7376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377 CFLAGS="$gl_save_CFLAGS"
7378
7379 fi
7380
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7382 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7383 fi
7384
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7386 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7387 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7388 $as_echo_n "(cached) " >&6
7389 else
7390
7391 gl_save_CFLAGS="$CFLAGS"
7392 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7394 /* end confdefs.h. */
7395
7396 int
7397 main ()
7398 {
7399
7400 ;
7401 return 0;
7402 }
7403 _ACEOF
7404 if ac_fn_c_try_compile "$LINENO"; then :
7405 gl_cv_cc_uninitialized_supported=yes
7406 else
7407 gl_cv_cc_uninitialized_supported=no
7408 fi
7409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7410 CFLAGS="$gl_save_CFLAGS"
7411 fi
7412
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7414 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7415
7416 fi
7417
7418 # List all gcc warning categories.
7419 gl_manywarn_set=
7420 for gl_manywarn_item in \
7421 -W \
7422 -Wabi \
7423 -Waddress \
7424 -Wall \
7425 -Warray-bounds \
7426 -Wattributes \
7427 -Wbad-function-cast \
7428 -Wbuiltin-macro-redefined \
7429 -Wcast-align \
7430 -Wchar-subscripts \
7431 -Wclobbered \
7432 -Wcomment \
7433 -Wcomments \
7434 -Wcoverage-mismatch \
7435 -Wcpp \
7436 -Wdeprecated \
7437 -Wdeprecated-declarations \
7438 -Wdisabled-optimization \
7439 -Wdiv-by-zero \
7440 -Wdouble-promotion \
7441 -Wempty-body \
7442 -Wendif-labels \
7443 -Wenum-compare \
7444 -Wextra \
7445 -Wformat-contains-nul \
7446 -Wformat-extra-args \
7447 -Wformat-nonliteral \
7448 -Wformat-security \
7449 -Wformat-y2k \
7450 -Wformat-zero-length \
7451 -Wformat=2 \
7452 -Wfree-nonheap-object \
7453 -Wignored-qualifiers \
7454 -Wimplicit \
7455 -Wimplicit-function-declaration \
7456 -Wimplicit-int \
7457 -Winit-self \
7458 -Winline \
7459 -Wint-to-pointer-cast \
7460 -Winvalid-memory-model \
7461 -Winvalid-pch \
7462 -Wjump-misses-init \
7463 -Wlogical-op \
7464 -Wmain \
7465 -Wmaybe-uninitialized \
7466 -Wmissing-braces \
7467 -Wmissing-declarations \
7468 -Wmissing-field-initializers \
7469 -Wmissing-format-attribute \
7470 -Wmissing-include-dirs \
7471 -Wmissing-noreturn \
7472 -Wmissing-parameter-type \
7473 -Wmissing-prototypes \
7474 -Wmudflap \
7475 -Wmultichar \
7476 -Wnarrowing \
7477 -Wnested-externs \
7478 -Wnonnull \
7479 -Wnormalized=nfc \
7480 -Wold-style-declaration \
7481 -Wold-style-definition \
7482 -Woverflow \
7483 -Woverlength-strings \
7484 -Woverride-init \
7485 -Wpacked \
7486 -Wpacked-bitfield-compat \
7487 -Wparentheses \
7488 -Wpointer-arith \
7489 -Wpointer-sign \
7490 -Wpointer-to-int-cast \
7491 -Wpragmas \
7492 -Wreturn-type \
7493 -Wsequence-point \
7494 -Wshadow \
7495 -Wsizeof-pointer-memaccess \
7496 -Wstack-protector \
7497 -Wstrict-aliasing \
7498 -Wstrict-overflow \
7499 -Wstrict-prototypes \
7500 -Wsuggest-attribute=const \
7501 -Wsuggest-attribute=format \
7502 -Wsuggest-attribute=noreturn \
7503 -Wsuggest-attribute=pure \
7504 -Wswitch \
7505 -Wswitch-default \
7506 -Wsync-nand \
7507 -Wsystem-headers \
7508 -Wtrampolines \
7509 -Wtrigraphs \
7510 -Wtype-limits \
7511 -Wuninitialized \
7512 -Wunknown-pragmas \
7513 -Wunreachable-code \
7514 -Wunsafe-loop-optimizations \
7515 -Wunused \
7516 -Wunused-but-set-parameter \
7517 -Wunused-but-set-variable \
7518 -Wunused-function \
7519 -Wunused-label \
7520 -Wunused-local-typedefs \
7521 -Wunused-macros \
7522 -Wunused-parameter \
7523 -Wunused-result \
7524 -Wunused-value \
7525 -Wunused-variable \
7526 -Wvarargs \
7527 -Wvariadic-macros \
7528 -Wvector-operation-performance \
7529 -Wvla \
7530 -Wvolatile-register-var \
7531 -Wwrite-strings \
7532 \
7533 ; do
7534 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7535 done
7536
7537 # Disable specific options as needed.
7538 if test "$gl_cv_cc_nomfi_needed" = yes; then
7539 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7540 fi
7541
7542 if test "$gl_cv_cc_uninitialized_supported" = no; then
7543 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7544 fi
7545
7546 ws=$gl_manywarn_set
7547
7548
7549 gl_warn_set=
7550 set x $ws; shift
7551 for gl_warn_item
7552 do
7553 case " $nw " in
7554 *" $gl_warn_item "*)
7555 ;;
7556 *)
7557 gl_warn_set="$gl_warn_set $gl_warn_item"
7558 ;;
7559 esac
7560 done
7561 ws=$gl_warn_set
7562
7563 for w in $ws; do
7564 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7566 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7567 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7568 $as_echo_n "(cached) " >&6
7569 else
7570
7571 gl_save_compiler_FLAGS="$CFLAGS"
7572 as_fn_append CFLAGS " $w"
7573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7574 /* end confdefs.h. */
7575
7576 int
7577 main ()
7578 {
7579
7580 ;
7581 return 0;
7582 }
7583 _ACEOF
7584 if ac_fn_c_try_compile "$LINENO"; then :
7585 eval "$as_gl_Warn=yes"
7586 else
7587 eval "$as_gl_Warn=no"
7588 fi
7589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7590 CFLAGS="$gl_save_compiler_FLAGS"
7591
7592 fi
7593 eval ac_res=\$$as_gl_Warn
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7595 $as_echo "$ac_res" >&6; }
7596 eval as_val=\$$as_gl_Warn
7597 if test "x$as_val" = x""yes; then :
7598 as_fn_append WARN_CFLAGS " $w"
7599 fi
7600
7601
7602 done
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7604 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7605 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7606 $as_echo_n "(cached) " >&6
7607 else
7608
7609 gl_save_compiler_FLAGS="$CFLAGS"
7610 as_fn_append CFLAGS " -Wno-missing-field-initializers"
7611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7612 /* end confdefs.h. */
7613
7614 int
7615 main ()
7616 {
7617
7618 ;
7619 return 0;
7620 }
7621 _ACEOF
7622 if ac_fn_c_try_compile "$LINENO"; then :
7623 gl_cv_warn_c__Wno_missing_field_initializers=yes
7624 else
7625 gl_cv_warn_c__Wno_missing_field_initializers=no
7626 fi
7627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7628 CFLAGS="$gl_save_compiler_FLAGS"
7629
7630 fi
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7632 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7633 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7634 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7635 fi
7636
7637 # We need this one
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7639 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7640 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7641 $as_echo_n "(cached) " >&6
7642 else
7643
7644 gl_save_compiler_FLAGS="$CFLAGS"
7645 as_fn_append CFLAGS " -Wno-sign-compare"
7646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7647 /* end confdefs.h. */
7648
7649 int
7650 main ()
7651 {
7652
7653 ;
7654 return 0;
7655 }
7656 _ACEOF
7657 if ac_fn_c_try_compile "$LINENO"; then :
7658 gl_cv_warn_c__Wno_sign_compare=yes
7659 else
7660 gl_cv_warn_c__Wno_sign_compare=no
7661 fi
7662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7663 CFLAGS="$gl_save_compiler_FLAGS"
7664
7665 fi
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7667 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7668 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7669 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7670 fi
7671
7672 # Too many warnings for now
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7674 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7675 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7676 $as_echo_n "(cached) " >&6
7677 else
7678
7679 gl_save_compiler_FLAGS="$CFLAGS"
7680 as_fn_append CFLAGS " -Wno-type-limits"
7681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7682 /* end confdefs.h. */
7683
7684 int
7685 main ()
7686 {
7687
7688 ;
7689 return 0;
7690 }
7691 _ACEOF
7692 if ac_fn_c_try_compile "$LINENO"; then :
7693 gl_cv_warn_c__Wno_type_limits=yes
7694 else
7695 gl_cv_warn_c__Wno_type_limits=no
7696 fi
7697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7698 CFLAGS="$gl_save_compiler_FLAGS"
7699
7700 fi
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7702 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7703 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7704 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7705 fi
7706
7707 # Too many warnings for now
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7709 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7710 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7711 $as_echo_n "(cached) " >&6
7712 else
7713
7714 gl_save_compiler_FLAGS="$CFLAGS"
7715 as_fn_append CFLAGS " -Wno-switch"
7716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7717 /* end confdefs.h. */
7718
7719 int
7720 main ()
7721 {
7722
7723 ;
7724 return 0;
7725 }
7726 _ACEOF
7727 if ac_fn_c_try_compile "$LINENO"; then :
7728 gl_cv_warn_c__Wno_switch=yes
7729 else
7730 gl_cv_warn_c__Wno_switch=no
7731 fi
7732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7733 CFLAGS="$gl_save_compiler_FLAGS"
7734
7735 fi
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7737 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7738 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7739 as_fn_append WARN_CFLAGS " -Wno-switch"
7740 fi
7741
7742 # Too many warnings for now
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7744 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7745 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7746 $as_echo_n "(cached) " >&6
7747 else
7748
7749 gl_save_compiler_FLAGS="$CFLAGS"
7750 as_fn_append CFLAGS " -Wno-unused-parameter"
7751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7752 /* end confdefs.h. */
7753
7754 int
7755 main ()
7756 {
7757
7758 ;
7759 return 0;
7760 }
7761 _ACEOF
7762 if ac_fn_c_try_compile "$LINENO"; then :
7763 gl_cv_warn_c__Wno_unused_parameter=yes
7764 else
7765 gl_cv_warn_c__Wno_unused_parameter=no
7766 fi
7767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7768 CFLAGS="$gl_save_compiler_FLAGS"
7769
7770 fi
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7772 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7773 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7774 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7775 fi
7776
7777 # Too many warnings for now
7778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7779 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7780 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7781 $as_echo_n "(cached) " >&6
7782 else
7783
7784 gl_save_compiler_FLAGS="$CFLAGS"
7785 as_fn_append CFLAGS " -Wno-format-nonliteral"
7786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7787 /* end confdefs.h. */
7788
7789 int
7790 main ()
7791 {
7792
7793 ;
7794 return 0;
7795 }
7796 _ACEOF
7797 if ac_fn_c_try_compile "$LINENO"; then :
7798 gl_cv_warn_c__Wno_format_nonliteral=yes
7799 else
7800 gl_cv_warn_c__Wno_format_nonliteral=no
7801 fi
7802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7803 CFLAGS="$gl_save_compiler_FLAGS"
7804
7805 fi
7806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7807 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7808 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7809 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7810 fi
7811
7812
7813
7814 # In spite of excluding -Wlogical-op above, it is enabled, as of
7815 # gcc 4.5.0 20090517.
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7817 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7818 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7819 $as_echo_n "(cached) " >&6
7820 else
7821
7822 gl_save_compiler_FLAGS="$CFLAGS"
7823 as_fn_append CFLAGS " -Wno-logical-op"
7824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7825 /* end confdefs.h. */
7826
7827 int
7828 main ()
7829 {
7830
7831 ;
7832 return 0;
7833 }
7834 _ACEOF
7835 if ac_fn_c_try_compile "$LINENO"; then :
7836 gl_cv_warn_c__Wno_logical_op=yes
7837 else
7838 gl_cv_warn_c__Wno_logical_op=no
7839 fi
7840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7841 CFLAGS="$gl_save_compiler_FLAGS"
7842
7843 fi
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7845 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
7846 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
7847 as_fn_append WARN_CFLAGS " -Wno-logical-op"
7848 fi
7849
7850
7851
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7853 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7854 if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
7855 $as_echo_n "(cached) " >&6
7856 else
7857
7858 gl_save_compiler_FLAGS="$CFLAGS"
7859 as_fn_append CFLAGS " -fdiagnostics-show-option"
7860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7861 /* end confdefs.h. */
7862
7863 int
7864 main ()
7865 {
7866
7867 ;
7868 return 0;
7869 }
7870 _ACEOF
7871 if ac_fn_c_try_compile "$LINENO"; then :
7872 gl_cv_warn_c__fdiagnostics_show_option=yes
7873 else
7874 gl_cv_warn_c__fdiagnostics_show_option=no
7875 fi
7876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7877 CFLAGS="$gl_save_compiler_FLAGS"
7878
7879 fi
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7881 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7882 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
7883 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
7884 fi
7885
7886
7887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7888 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7889 if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
7890 $as_echo_n "(cached) " >&6
7891 else
7892
7893 gl_save_compiler_FLAGS="$CFLAGS"
7894 as_fn_append CFLAGS " -funit-at-a-time"
7895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7896 /* end confdefs.h. */
7897
7898 int
7899 main ()
7900 {
7901
7902 ;
7903 return 0;
7904 }
7905 _ACEOF
7906 if ac_fn_c_try_compile "$LINENO"; then :
7907 gl_cv_warn_c__funit_at_a_time=yes
7908 else
7909 gl_cv_warn_c__funit_at_a_time=no
7910 fi
7911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7912 CFLAGS="$gl_save_compiler_FLAGS"
7913
7914 fi
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7916 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7917 if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
7918 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7919 fi
7920
7921
7922
7923
7924 $as_echo "#define lint 1" >>confdefs.h
7925
7926
7927
7928 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
7929
7930
7931 # We use a slightly smaller set of warning options for lib/.
7932 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
7933 nw=
7934 nw="$nw -Wunused-macros"
7935
7936
7937 gl_warn_set=
7938 set x $WARN_CFLAGS; shift
7939 for gl_warn_item
7940 do
7941 case " $nw " in
7942 *" $gl_warn_item "*)
7943 ;;
7944 *)
7945 gl_warn_set="$gl_warn_set $gl_warn_item"
7946 ;;
7947 esac
7948 done
7949 GNULIB_WARN_CFLAGS=$gl_warn_set
7950
7951
7952 fi
7953
7954
7955
7956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7957 $as_echo_n "checking whether ln -s works... " >&6; }
7958 LN_S=$as_ln_s
7959 if test "$LN_S" = "ln -s"; then
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7961 $as_echo "yes" >&6; }
7962 else
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7964 $as_echo "no, using $LN_S" >&6; }
7965 fi
7966
7967
7968 # Extract the first word of "install-info", so it can be a program name with args.
7969 set dummy install-info; ac_word=$2
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7971 $as_echo_n "checking for $ac_word... " >&6; }
7972 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
7973 $as_echo_n "(cached) " >&6
7974 else
7975 case $INSTALL_INFO in
7976 [\\/]* | ?:[\\/]*)
7977 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7978 ;;
7979 *)
7980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7981 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
7982 do
7983 IFS=$as_save_IFS
7984 test -z "$as_dir" && as_dir=.
7985 for ac_exec_ext in '' $ac_executable_extensions; do
7986 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7987 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7989 break 2
7990 fi
7991 done
7992 done
7993 IFS=$as_save_IFS
7994
7995 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
7996 ;;
7997 esac
7998 fi
7999 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8000 if test -n "$INSTALL_INFO"; then
8001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8002 $as_echo "$INSTALL_INFO" >&6; }
8003 else
8004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8005 $as_echo "no" >&6; }
8006 fi
8007
8008
8009 # Extract the first word of "gzip", so it can be a program name with args.
8010 set dummy gzip; ac_word=$2
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012 $as_echo_n "checking for $ac_word... " >&6; }
8013 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
8014 $as_echo_n "(cached) " >&6
8015 else
8016 case $GZIP_PROG in
8017 [\\/]* | ?:[\\/]*)
8018 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8019 ;;
8020 *)
8021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022 for as_dir in $PATH
8023 do
8024 IFS=$as_save_IFS
8025 test -z "$as_dir" && as_dir=.
8026 for ac_exec_ext in '' $ac_executable_extensions; do
8027 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8028 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8030 break 2
8031 fi
8032 done
8033 done
8034 IFS=$as_save_IFS
8035
8036 ;;
8037 esac
8038 fi
8039 GZIP_PROG=$ac_cv_path_GZIP_PROG
8040 if test -n "$GZIP_PROG"; then
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8042 $as_echo "$GZIP_PROG" >&6; }
8043 else
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045 $as_echo "no" >&6; }
8046 fi
8047
8048
8049
8050 if test $opsys = gnu-linux; then
8051 # Extract the first word of "paxctl", so it can be a program name with args.
8052 set dummy paxctl; ac_word=$2
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8054 $as_echo_n "checking for $ac_word... " >&6; }
8055 if test "${ac_cv_path_PAXCTL+set}" = set; then :
8056 $as_echo_n "(cached) " >&6
8057 else
8058 case $PAXCTL in
8059 [\\/]* | ?:[\\/]*)
8060 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8061 ;;
8062 *)
8063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8064 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8065 do
8066 IFS=$as_save_IFS
8067 test -z "$as_dir" && as_dir=.
8068 for ac_exec_ext in '' $ac_executable_extensions; do
8069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8070 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8072 break 2
8073 fi
8074 done
8075 done
8076 IFS=$as_save_IFS
8077
8078 ;;
8079 esac
8080 fi
8081 PAXCTL=$ac_cv_path_PAXCTL
8082 if test -n "$PAXCTL"; then
8083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8084 $as_echo "$PAXCTL" >&6; }
8085 else
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8087 $as_echo "no" >&6; }
8088 fi
8089
8090
8091 if test "X$PAXCTL" != X; then
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8093 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8095 /* end confdefs.h. */
8096
8097 int
8098 main ()
8099 {
8100
8101 ;
8102 return 0;
8103 }
8104 _ACEOF
8105 if ac_fn_c_try_link "$LINENO"; then :
8106 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8107 $as_echo "yes" >&6; }
8108 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109 $as_echo "no" >&6; }; PAXCTL=""; fi
8110 fi
8111 rm -f core conftest.err conftest.$ac_objext \
8112 conftest$ac_exeext conftest.$ac_ext
8113 fi
8114 fi
8115
8116 ## Need makeinfo >= 4.7 (?) to build the manuals.
8117 # Extract the first word of "makeinfo", so it can be a program name with args.
8118 set dummy makeinfo; ac_word=$2
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120 $as_echo_n "checking for $ac_word... " >&6; }
8121 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8122 $as_echo_n "(cached) " >&6
8123 else
8124 case $MAKEINFO in
8125 [\\/]* | ?:[\\/]*)
8126 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8127 ;;
8128 *)
8129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8130 for as_dir in $PATH
8131 do
8132 IFS=$as_save_IFS
8133 test -z "$as_dir" && as_dir=.
8134 for ac_exec_ext in '' $ac_executable_extensions; do
8135 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8136 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8138 break 2
8139 fi
8140 done
8141 done
8142 IFS=$as_save_IFS
8143
8144 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8145 ;;
8146 esac
8147 fi
8148 MAKEINFO=$ac_cv_path_MAKEINFO
8149 if test -n "$MAKEINFO"; then
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8151 $as_echo "$MAKEINFO" >&6; }
8152 else
8153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8154 $as_echo "no" >&6; }
8155 fi
8156
8157
8158 if test "$MAKEINFO" != "no"; then
8159 case `
8160 $MAKEINFO --version 2> /dev/null |
8161 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8162 ` in
8163 '') MAKEINFO=no;;
8164 esac
8165 fi
8166
8167 ## Makeinfo is unusual. For a released Emacs, the manuals are
8168 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8169 ## therefore in the category of "special tools" not normally required, which
8170 ## configure does not have to check for (eg autoconf itself).
8171 ## In a Bazaar checkout on the other hand, the manuals are not included.
8172 ## So makeinfo is a requirement to build from Bazaar, and configure
8173 ## should test for it as it does for any other build requirement.
8174 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8175 ## with pre-built manuals, from a Bazaar checkout.
8176 HAVE_MAKEINFO=yes
8177
8178 if test "$MAKEINFO" = "no"; then
8179 MAKEINFO=makeinfo
8180 if test "x${with_makeinfo}" = "xno"; then
8181 HAVE_MAKEINFO=no
8182 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
8183 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8184 source tree does not seem to have pre-built manuals in the \`info' directory.
8185 Either install a suitable version of makeinfo, or re-run configure
8186 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8187 fi
8188 fi
8189
8190
8191 INFO_EXT=.info
8192 INFO_OPTS=--no-split
8193
8194
8195
8196
8197 if test x$GCC = xyes; then
8198 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8199 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8200 else
8201 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8202 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8203 fi
8204
8205
8206 late_LDFLAGS=$LDFLAGS
8207 if test x$GCC = xyes; then
8208 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8209 else
8210 LDFLAGS="$LDFLAGS -znocombreloc"
8211 fi
8212
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8214 $as_echo_n "checking for -znocombreloc... " >&6; }
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_link "$LINENO"; then :
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8228 $as_echo "yes" >&6; }
8229 else
8230 LDFLAGS=$late_LDFLAGS
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232 $as_echo "no" >&6; }
8233 fi
8234 rm -f core conftest.err conftest.$ac_objext \
8235 conftest$ac_exeext conftest.$ac_ext
8236
8237
8238 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8239 case "$opsys" in
8240 your-opsys-here) CANNOT_DUMP=yes ;;
8241 esac
8242
8243 test "$CANNOT_DUMP" = "yes" && \
8244
8245 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8246
8247
8248
8249
8250
8251 UNEXEC_OBJ=unexelf.o
8252 case "$opsys" in
8253 # MSDOS uses unexcoff.o
8254 # MSWindows uses unexw32.o
8255 aix4-2)
8256 UNEXEC_OBJ=unexaix.o
8257 ;;
8258 cygwin)
8259 UNEXEC_OBJ=unexcw.o
8260 ;;
8261 darwin)
8262 UNEXEC_OBJ=unexmacosx.o
8263 ;;
8264 hpux10-20 | hpux11)
8265 UNEXEC_OBJ=unexhp9k800.o
8266 ;;
8267 sol2-10)
8268 # Use the Solaris dldump() function, called from unexsol.c, to dump
8269 # emacs, instead of the generic ELF dump code found in unexelf.c.
8270 # The resulting binary has a complete symbol table, and is better
8271 # for debugging and other observability tools (debuggers, pstack, etc).
8272 #
8273 # If you encounter a problem using dldump(), please consider sending
8274 # a message to the OpenSolaris tools-linking mailing list:
8275 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8276 #
8277 # It is likely that dldump() works with older Solaris too, but this has
8278 # not been tested, so for now this change is for Solaris 10 or newer.
8279 UNEXEC_OBJ=unexsol.o
8280 ;;
8281 esac
8282
8283 LD_SWITCH_SYSTEM=
8284 case "$opsys" in
8285 freebsd)
8286 ## Let `ld' find image libs and similar things in /usr/local/lib.
8287 ## The system compiler, GCC, has apparently been modified to not
8288 ## look there, contrary to what a stock GCC would do.
8289 ### It's not our place to do this. See bug#10313#17.
8290 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8291 :
8292 ;;
8293
8294 gnu-linux)
8295 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8296 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8297 ;;
8298
8299 netbsd)
8300 ### It's not our place to do this. See bug#10313#17.
8301 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8302 :
8303 ;;
8304
8305 openbsd)
8306 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8307 ## otherwise Emacs dumps core on elf systems.
8308 LD_SWITCH_SYSTEM="-Z"
8309 ;;
8310 esac
8311
8312
8313 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8314
8315 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8316 ## which has not been defined yet. When this was handled with cpp,
8317 ## it was expanded to null when configure sourced the s/*.h file.
8318 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8319 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8320 ## (or somesuch), but because it is supposed to go at the _front_
8321 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8322 ## Compare with the gnu-linux case below, which added to the end
8323 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8324 ## LD_SWITCH_SYSTEM_TEMACS.
8325 case "$opsys" in
8326 netbsd|openbsd)
8327 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8328 esac
8329
8330
8331 C_SWITCH_MACHINE=
8332 case $canonical in
8333 alpha*)
8334 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8335 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8336
8337 fi
8338
8339 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8340 ## With ELF, make sure that all common symbols get allocated to in the
8341 ## data section. Otherwise, the dump of temacs may miss variables in
8342 ## the shared library that have been initialized. For example, with
8343 ## GNU libc, __malloc_initialized would normally be resolved to the
8344 ## shared library's .bss section, which is fatal.
8345 if test "x$GCC" = "xyes"; then
8346 C_SWITCH_MACHINE="-fno-common"
8347 else
8348 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
8349 fi
8350 else
8351 UNEXEC_OBJ=unexalpha.o
8352 fi
8353 ;;
8354 esac
8355
8356
8357
8358
8359 C_SWITCH_SYSTEM=
8360 ## Some programs in src produce warnings saying certain subprograms
8361 ## are too complex and need a MAXMEM value greater than 2000 for
8362 ## additional optimization. --nils@exp-math.uni-essen.de
8363 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8364 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8365 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8366 ## It is redundant in glibc2, since we define _GNU_SOURCE.
8367
8368
8369
8370 LIBS_SYSTEM=
8371 case "$opsys" in
8372 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8373 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8374
8375 freebsd) LIBS_SYSTEM="-lutil" ;;
8376
8377 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8378
8379 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
8380
8381 ## Motif needs -lgen.
8382 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8383 esac
8384
8385
8386
8387 ### Make sure subsequent tests use flags consistent with the build flags.
8388
8389 if test x"${OVERRIDE_CPPFLAGS}" != x; then
8390 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8391 else
8392 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8393 fi
8394
8395 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8396
8397 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8398
8399
8400
8401 LIB_MATH=-lm
8402 LIB_STANDARD=
8403 START_FILES=
8404 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
8405
8406 case $opsys in
8407 cygwin )
8408 LIB_MATH=
8409 START_FILES='pre-crt0.o'
8410 ;;
8411 darwin )
8412 ## Adding -lm confuses the dynamic linker, so omit it.
8413 LIB_MATH=
8414 START_FILES='pre-crt0.o'
8415 ;;
8416 freebsd )
8417 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8418 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8419 SYSTEM_TYPE=berkeley-unix
8420 ;;
8421 gnu-linux | gnu-kfreebsd )
8422 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8423 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8424 ;;
8425 hpux10-20 | hpux11 )
8426 LIB_STANDARD=-lc
8427 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8428 ;;
8429 netbsd | openbsd )
8430 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8431 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
8432 SYSTEM_TYPE=berkeley-unix
8433 ;;
8434
8435 sol2* | unixware )
8436 SYSTEM_TYPE=usg-unix-v
8437 ;;
8438
8439 esac
8440
8441
8442
8443
8444 cat >>confdefs.h <<_ACEOF
8445 #define SYSTEM_TYPE "$SYSTEM_TYPE"
8446 _ACEOF
8447
8448
8449 crt_files=
8450
8451 for file in x $LIB_STANDARD $START_FILES; do
8452 case "$file" in
8453 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
8454 esac
8455 done
8456
8457 if test "x$crt_files" != x; then
8458
8459 ## If user specified a crt-dir, use that unconditionally.
8460 crt_gcc=no
8461
8462 if test "X$CRT_DIR" = "X"; then
8463
8464 CRT_DIR=/usr/lib # default
8465
8466 case "$canonical" in
8467 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
8468 ## On x86-64 and s390x GNU/Linux distributions, the standard library
8469 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
8470 ## For anything else (eg /usr/lib32), it is up the user to specify
8471 ## the location (bug#5655).
8472 ## Test for crtn.o, not just the directory, because sometimes the
8473 ## directory exists but does not have the relevant files (bug#1287).
8474 ## FIXME better to test for binary compatibility somehow.
8475 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
8476 ;;
8477
8478 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
8479 esac
8480
8481 case "$opsys" in
8482 hpux10-20) CRT_DIR=/lib ;;
8483 esac
8484
8485 test "x${GCC}" = xyes && crt_gcc=yes
8486
8487 fi # CRT_DIR = ""
8488
8489 crt_missing=
8490
8491 for file in $crt_files; do
8492
8493 ## If we're using gcc, try to determine it automatically by asking
8494 ## gcc. [If this doesn't work, CRT_DIR will remain at the
8495 ## system-dependent default from above.]
8496 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
8497
8498 crt_file=`$CC --print-file-name=$file 2>/dev/null`
8499 case "$crt_file" in
8500 */*)
8501 CRT_DIR=`$as_dirname -- "$crt_file" ||
8502 $as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8503 X"$crt_file" : 'X\(//\)[^/]' \| \
8504 X"$crt_file" : 'X\(//\)$' \| \
8505 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
8506 $as_echo X"$crt_file" |
8507 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8508 s//\1/
8509 q
8510 }
8511 /^X\(\/\/\)[^/].*/{
8512 s//\1/
8513 q
8514 }
8515 /^X\(\/\/\)$/{
8516 s//\1/
8517 q
8518 }
8519 /^X\(\/\).*/{
8520 s//\1/
8521 q
8522 }
8523 s/.*/./; q'`
8524 ;;
8525 esac
8526 fi
8527
8528 crt_gcc=no
8529
8530 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
8531 done # $crt_files
8532
8533 test "x$crt_missing" = x || \
8534 as_fn_error "Required file(s) not found:$crt_missing
8535 Try using the --with-crt-dir option." "$LINENO" 5
8536
8537 fi # crt_files != ""
8538
8539
8540
8541 case $opsys in
8542 netbsd | openbsd )
8543 if test -f $CRT_DIR/crti.o; then
8544
8545 test -f $CRT_DIR/crtn.o || \
8546 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8547
8548 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8549 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8550 fi
8551 ;;
8552 esac
8553
8554
8555 pre_PKG_CONFIG_CFLAGS=$CFLAGS
8556 pre_PKG_CONFIG_LIBS=$LIBS
8557
8558 # Extract the first word of "pkg-config", so it can be a program name with args.
8559 set dummy pkg-config; ac_word=$2
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8561 $as_echo_n "checking for $ac_word... " >&6; }
8562 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8563 $as_echo_n "(cached) " >&6
8564 else
8565 case $PKG_CONFIG in
8566 [\\/]* | ?:[\\/]*)
8567 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8568 ;;
8569 *)
8570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8571 for as_dir in $PATH
8572 do
8573 IFS=$as_save_IFS
8574 test -z "$as_dir" && as_dir=.
8575 for ac_exec_ext in '' $ac_executable_extensions; do
8576 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8577 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8579 break 2
8580 fi
8581 done
8582 done
8583 IFS=$as_save_IFS
8584
8585 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8586 ;;
8587 esac
8588 fi
8589 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8590 if test -n "$PKG_CONFIG"; then
8591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8592 $as_echo "$PKG_CONFIG" >&6; }
8593 else
8594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8595 $as_echo "no" >&6; }
8596 fi
8597
8598
8599
8600
8601
8602
8603 if test "${with_sound}" != "no"; then
8604 # Sound support for GNU/Linux and the free BSDs.
8605 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8606 do :
8607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8608 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8609 eval as_val=\$$as_ac_Header
8610 if test "x$as_val" = x""yes; then :
8611 cat >>confdefs.h <<_ACEOF
8612 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8613 _ACEOF
8614 have_sound_header=yes
8615 fi
8616
8617 done
8618
8619 # Emulation library used on NetBSD.
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8621 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8622 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
8623 $as_echo_n "(cached) " >&6
8624 else
8625 ac_check_lib_save_LIBS=$LIBS
8626 LIBS="-lossaudio $LIBS"
8627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8628 /* end confdefs.h. */
8629
8630 /* Override any GCC internal prototype to avoid an error.
8631 Use char because int might match the return type of a GCC
8632 builtin and then its argument prototype would still apply. */
8633 #ifdef __cplusplus
8634 extern "C"
8635 #endif
8636 char _oss_ioctl ();
8637 int
8638 main ()
8639 {
8640 return _oss_ioctl ();
8641 ;
8642 return 0;
8643 }
8644 _ACEOF
8645 if ac_fn_c_try_link "$LINENO"; then :
8646 ac_cv_lib_ossaudio__oss_ioctl=yes
8647 else
8648 ac_cv_lib_ossaudio__oss_ioctl=no
8649 fi
8650 rm -f core conftest.err conftest.$ac_objext \
8651 conftest$ac_exeext conftest.$ac_ext
8652 LIBS=$ac_check_lib_save_LIBS
8653 fi
8654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8655 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8656 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8657 LIBSOUND=-lossaudio
8658 else
8659 LIBSOUND=
8660 fi
8661
8662
8663
8664 ALSA_REQUIRED=1.0.0
8665 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8666
8667 succeeded=no
8668
8669 if test "$PKG_CONFIG" = "no" ; then
8670 HAVE_ALSA=no
8671 else
8672 PKG_CONFIG_MIN_VERSION=0.9.0
8673 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8675 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
8676
8677 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
8678 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
8679 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
8680 edit_cflags="
8681 s,///*,/,g
8682 s/^/ /
8683 s/ -I/ $isystem/g
8684 s/^ //
8685 "
8686 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8687 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8689 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8690 succeeded=yes
8691 else
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8693 $as_echo "no" >&6; }
8694 ALSA_CFLAGS=""
8695 ALSA_LIBS=""
8696 ## If we have a custom action on failure, don't print errors, but
8697 ## do set a variable so people can do so. Do it in a subshell
8698 ## to capture any diagnostics in invoking pkg-config.
8699 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
8700
8701 fi
8702
8703
8704
8705 else
8706 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8707 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8708 fi
8709 fi
8710
8711 if test $succeeded = yes; then
8712 HAVE_ALSA=yes
8713 else
8714 HAVE_ALSA=no
8715 fi
8716
8717 if test $HAVE_ALSA = yes; then
8718 SAVE_CFLAGS="$CFLAGS"
8719 SAVE_LIBS="$LIBS"
8720 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8721 LIBS="$ALSA_LIBS $LIBS"
8722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723 /* end confdefs.h. */
8724 #include <asoundlib.h>
8725 int
8726 main ()
8727 {
8728 snd_lib_error_set_handler (0);
8729 ;
8730 return 0;
8731 }
8732 _ACEOF
8733 if ac_fn_c_try_compile "$LINENO"; then :
8734 emacs_alsa_normal=yes
8735 else
8736 emacs_alsa_normal=no
8737 fi
8738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8739 if test "$emacs_alsa_normal" != yes; then
8740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741 /* end confdefs.h. */
8742 #include <alsa/asoundlib.h>
8743 int
8744 main ()
8745 {
8746 snd_lib_error_set_handler (0);
8747 ;
8748 return 0;
8749 }
8750 _ACEOF
8751 if ac_fn_c_try_compile "$LINENO"; then :
8752 emacs_alsa_subdir=yes
8753 else
8754 emacs_alsa_subdir=no
8755 fi
8756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8757 if test "$emacs_alsa_subdir" != yes; then
8758 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8759 fi
8760 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8761 fi
8762
8763 CFLAGS="$SAVE_CFLAGS"
8764 LIBS="$SAVE_LIBS"
8765 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8766 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
8767
8768 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
8769
8770 fi
8771
8772 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8773 case "$opsys" in
8774 gnu-linux|freebsd|netbsd)
8775
8776 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
8777
8778 ;;
8779 esac
8780 fi
8781
8782
8783 fi
8784
8785
8786
8787
8788 for ac_header in $ac_header_list
8789 do :
8790 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8791 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8792 "
8793 eval as_val=\$$as_ac_Header
8794 if test "x$as_val" = x""yes; then :
8795 cat >>confdefs.h <<_ACEOF
8796 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8797 _ACEOF
8798
8799 fi
8800
8801 done
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8826 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8828 /* end confdefs.h. */
8829 #include <sys/personality.h>
8830 int
8831 main ()
8832 {
8833 personality (PER_LINUX32)
8834 ;
8835 return 0;
8836 }
8837 _ACEOF
8838 if ac_fn_c_try_compile "$LINENO"; then :
8839 emacs_cv_personality_linux32=yes
8840 else
8841 emacs_cv_personality_linux32=no
8842 fi
8843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8845 $as_echo "$emacs_cv_personality_linux32" >&6; }
8846
8847 if test $emacs_cv_personality_linux32 = yes; then
8848
8849 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8850
8851 fi
8852
8853 for ac_header in term.h
8854 do :
8855 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8856 if test "x$ac_cv_header_term_h" = x""yes; then :
8857 cat >>confdefs.h <<_ACEOF
8858 #define HAVE_TERM_H 1
8859 _ACEOF
8860
8861 fi
8862
8863 done
8864
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8866 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8867 if test "${ac_cv_header_time+set}" = set; then :
8868 $as_echo_n "(cached) " >&6
8869 else
8870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8871 /* end confdefs.h. */
8872 #include <sys/types.h>
8873 #include <sys/time.h>
8874 #include <time.h>
8875
8876 int
8877 main ()
8878 {
8879 if ((struct tm *) 0)
8880 return 0;
8881 ;
8882 return 0;
8883 }
8884 _ACEOF
8885 if ac_fn_c_try_compile "$LINENO"; then :
8886 ac_cv_header_time=yes
8887 else
8888 ac_cv_header_time=no
8889 fi
8890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8891 fi
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8893 $as_echo "$ac_cv_header_time" >&6; }
8894 if test $ac_cv_header_time = yes; then
8895
8896 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8897
8898 fi
8899
8900 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
8901
8902 "
8903 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8904 ac_have_decl=1
8905 else
8906 ac_have_decl=0
8907 fi
8908
8909 cat >>confdefs.h <<_ACEOF
8910 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
8911 _ACEOF
8912
8913 if test $ac_cv_have_decl_sys_siglist != yes; then
8914 # For Tru64, at least:
8915 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
8916
8917 "
8918 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8919 ac_have_decl=1
8920 else
8921 ac_have_decl=0
8922 fi
8923
8924 cat >>confdefs.h <<_ACEOF
8925 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8926 _ACEOF
8927
8928 if test $ac_cv_have_decl___sys_siglist = yes; then
8929
8930 $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8931
8932 fi
8933 fi
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8935 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8936 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8937 $as_echo_n "(cached) " >&6
8938 else
8939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8940 /* end confdefs.h. */
8941 #include <sys/types.h>
8942 #include <sys/wait.h>
8943 #ifndef WEXITSTATUS
8944 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8945 #endif
8946 #ifndef WIFEXITED
8947 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8948 #endif
8949
8950 int
8951 main ()
8952 {
8953 int s;
8954 wait (&s);
8955 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8956 ;
8957 return 0;
8958 }
8959 _ACEOF
8960 if ac_fn_c_try_compile "$LINENO"; then :
8961 ac_cv_header_sys_wait_h=yes
8962 else
8963 ac_cv_header_sys_wait_h=no
8964 fi
8965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8966 fi
8967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8968 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
8969 if test $ac_cv_header_sys_wait_h = yes; then
8970
8971 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8972
8973 fi
8974
8975
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8977 $as_echo_n "checking for speed_t... " >&6; }
8978 if test "${emacs_cv_speed_t+set}" = set; then :
8979 $as_echo_n "(cached) " >&6
8980 else
8981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8982 /* end confdefs.h. */
8983 #include <termios.h>
8984 int
8985 main ()
8986 {
8987 speed_t x = 1;
8988 ;
8989 return 0;
8990 }
8991 _ACEOF
8992 if ac_fn_c_try_compile "$LINENO"; then :
8993 emacs_cv_speed_t=yes
8994 else
8995 emacs_cv_speed_t=no
8996 fi
8997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8998 fi
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9000 $as_echo "$emacs_cv_speed_t" >&6; }
9001 if test $emacs_cv_speed_t = yes; then
9002
9003 $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
9004
9005 fi
9006
9007
9008
9009
9010 for ac_header in net/if.h
9011 do :
9012 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9013 #if HAVE_SYS_SOCKET_H
9014 #include <sys/socket.h>
9015 #endif
9016 "
9017 if test "x$ac_cv_header_net_if_h" = x""yes; then :
9018 cat >>confdefs.h <<_ACEOF
9019 #define HAVE_NET_IF_H 1
9020 _ACEOF
9021
9022 fi
9023
9024 done
9025
9026 for ac_header in ifaddrs.h
9027 do :
9028 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9029 #if HAVE_SYS_SOCKET_H
9030 #include <sys/socket.h>
9031 #endif
9032 "
9033 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9034 cat >>confdefs.h <<_ACEOF
9035 #define HAVE_IFADDRS_H 1
9036 _ACEOF
9037
9038 fi
9039
9040 done
9041
9042 for ac_header in net/if_dl.h
9043 do :
9044 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9045 #if HAVE_SYS_SOCKET_H
9046 #include <sys/socket.h>
9047 #endif
9048 "
9049 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
9050 cat >>confdefs.h <<_ACEOF
9051 #define HAVE_NET_IF_DL_H 1
9052 _ACEOF
9053
9054 fi
9055
9056 done
9057
9058
9059 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9060 #if HAVE_SYS_SOCKET_H
9061 #include <sys/socket.h>
9062 #endif
9063 #if HAVE_NET_IF_H
9064 #include <net/if.h>
9065 #endif
9066 "
9067 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
9068
9069 cat >>confdefs.h <<_ACEOF
9070 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9071 _ACEOF
9072
9073
9074 fi
9075 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9076 #if HAVE_SYS_SOCKET_H
9077 #include <sys/socket.h>
9078 #endif
9079 #if HAVE_NET_IF_H
9080 #include <net/if.h>
9081 #endif
9082 "
9083 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9084
9085 cat >>confdefs.h <<_ACEOF
9086 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9087 _ACEOF
9088
9089
9090 fi
9091 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9092 #if HAVE_SYS_SOCKET_H
9093 #include <sys/socket.h>
9094 #endif
9095 #if HAVE_NET_IF_H
9096 #include <net/if.h>
9097 #endif
9098 "
9099 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9100
9101 cat >>confdefs.h <<_ACEOF
9102 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9103 _ACEOF
9104
9105
9106 fi
9107 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9108 #if HAVE_SYS_SOCKET_H
9109 #include <sys/socket.h>
9110 #endif
9111 #if HAVE_NET_IF_H
9112 #include <net/if.h>
9113 #endif
9114 "
9115 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9116
9117 cat >>confdefs.h <<_ACEOF
9118 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9119 _ACEOF
9120
9121
9122 fi
9123 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9124 #if HAVE_SYS_SOCKET_H
9125 #include <sys/socket.h>
9126 #endif
9127 #if HAVE_NET_IF_H
9128 #include <net/if.h>
9129 #endif
9130 "
9131 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9132
9133 cat >>confdefs.h <<_ACEOF
9134 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9135 _ACEOF
9136
9137
9138 fi
9139 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9140 #if HAVE_SYS_SOCKET_H
9141 #include <sys/socket.h>
9142 #endif
9143 #if HAVE_NET_IF_H
9144 #include <net/if.h>
9145 #endif
9146 "
9147 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9148
9149 cat >>confdefs.h <<_ACEOF
9150 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9151 _ACEOF
9152
9153
9154 fi
9155
9156
9157
9158
9159 DEPFLAGS=
9160 MKDEPDIR=":"
9161 deps_frag=deps.mk
9162 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9164 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9165 HAVE_GNU_MAKE=no
9166 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9167 if test "x$testval" != x; then
9168 HAVE_GNU_MAKE=yes
9169 else
9170 ac_enable_autodepend=no
9171 fi
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9173 $as_echo "$HAVE_GNU_MAKE" >&6; }
9174 if test $HAVE_GNU_MAKE = yes; then
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9176 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9177 SAVE_CFLAGS="$CFLAGS"
9178 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9180 /* end confdefs.h. */
9181
9182 int
9183 main ()
9184 {
9185
9186 ;
9187 return 0;
9188 }
9189 _ACEOF
9190 if ac_fn_c_try_compile "$LINENO"; then :
9191
9192 else
9193 ac_enable_autodepend=no
9194 fi
9195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9196 CFLAGS="$SAVE_CFLAGS"
9197 test -f deps.d || ac_enable_autodepend=no
9198 rm -rf deps.d
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9200 $as_echo "$ac_enable_autodepend" >&6; }
9201 fi
9202 if test $ac_enable_autodepend = yes; then
9203 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9204 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9205 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9206 deps_frag=autodeps.mk
9207 fi
9208 fi
9209 deps_frag=$srcdir/src/$deps_frag
9210
9211
9212
9213
9214
9215 lisp_frag=$srcdir/src/lisp.mk
9216
9217
9218
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9220 $as_echo_n "checking for long file names... " >&6; }
9221 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9222 $as_echo_n "(cached) " >&6
9223 else
9224 ac_cv_sys_long_file_names=yes
9225 # Test for long file names in all the places we know might matter:
9226 # . the current directory, where building will happen
9227 # $prefix/lib where we will be installing things
9228 # $exec_prefix/lib likewise
9229 # $TMPDIR if set, where it might want to write temporary files
9230 # /tmp where it might want to write temporary files
9231 # /var/tmp likewise
9232 # /usr/tmp likewise
9233 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9234 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9235 # in the usual case where exec_prefix is '${prefix}'.
9236 case $ac_dir in #(
9237 . | /* | ?:[\\/]*) ;; #(
9238 *) continue;;
9239 esac
9240 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9241 ac_xdir=$ac_dir/cf$$
9242 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9243 ac_tf1=$ac_xdir/conftest9012345
9244 ac_tf2=$ac_xdir/conftest9012346
9245 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9246 ac_cv_sys_long_file_names=no
9247 rm -f -r "$ac_xdir" 2>/dev/null
9248 test $ac_cv_sys_long_file_names = no && break
9249 done
9250 fi
9251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9252 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9253 if test $ac_cv_sys_long_file_names = yes; then
9254
9255 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9256
9257 fi
9258
9259
9260 #### Choose a window system.
9261
9262 ## We leave window_system equal to none if
9263 ## we end up building without one. Any new window system should
9264 ## set window_system to an appropriate value and add objects to
9265 ## window-system-specific substs.
9266
9267 window_system=none
9268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9269 $as_echo_n "checking for X... " >&6; }
9270
9271
9272 # Check whether --with-x was given.
9273 if test "${with_x+set}" = set; then :
9274 withval=$with_x;
9275 fi
9276
9277 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9278 if test "x$with_x" = xno; then
9279 # The user explicitly disabled X.
9280 have_x=disabled
9281 else
9282 case $x_includes,$x_libraries in #(
9283 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9284 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9285 $as_echo_n "(cached) " >&6
9286 else
9287 # One or both of the vars are not set, and there is no cached value.
9288 ac_x_includes=no ac_x_libraries=no
9289 rm -f -r conftest.dir
9290 if mkdir conftest.dir; then
9291 cd conftest.dir
9292 cat >Imakefile <<'_ACEOF'
9293 incroot:
9294 @echo incroot='${INCROOT}'
9295 usrlibdir:
9296 @echo usrlibdir='${USRLIBDIR}'
9297 libdir:
9298 @echo libdir='${LIBDIR}'
9299 _ACEOF
9300 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9301 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9302 for ac_var in incroot usrlibdir libdir; do
9303 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9304 done
9305 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9306 for ac_extension in a so sl dylib la dll; do
9307 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9308 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9309 ac_im_usrlibdir=$ac_im_libdir; break
9310 fi
9311 done
9312 # Screen out bogus values from the imake configuration. They are
9313 # bogus both because they are the default anyway, and because
9314 # using them would break gcc on systems where it needs fixed includes.
9315 case $ac_im_incroot in
9316 /usr/include) ac_x_includes= ;;
9317 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9318 esac
9319 case $ac_im_usrlibdir in
9320 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9321 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9322 esac
9323 fi
9324 cd ..
9325 rm -f -r conftest.dir
9326 fi
9327
9328 # Standard set of common directories for X headers.
9329 # Check X11 before X11Rn because it is often a symlink to the current release.
9330 ac_x_header_dirs='
9331 /usr/X11/include
9332 /usr/X11R7/include
9333 /usr/X11R6/include
9334 /usr/X11R5/include
9335 /usr/X11R4/include
9336
9337 /usr/include/X11
9338 /usr/include/X11R7
9339 /usr/include/X11R6
9340 /usr/include/X11R5
9341 /usr/include/X11R4
9342
9343 /usr/local/X11/include
9344 /usr/local/X11R7/include
9345 /usr/local/X11R6/include
9346 /usr/local/X11R5/include
9347 /usr/local/X11R4/include
9348
9349 /usr/local/include/X11
9350 /usr/local/include/X11R7
9351 /usr/local/include/X11R6
9352 /usr/local/include/X11R5
9353 /usr/local/include/X11R4
9354
9355 /usr/X386/include
9356 /usr/x386/include
9357 /usr/XFree86/include/X11
9358
9359 /usr/include
9360 /usr/local/include
9361 /usr/unsupported/include
9362 /usr/athena/include
9363 /usr/local/x11r5/include
9364 /usr/lpp/Xamples/include
9365
9366 /usr/openwin/include
9367 /usr/openwin/share/include'
9368
9369 if test "$ac_x_includes" = no; then
9370 # Guess where to find include files, by looking for Xlib.h.
9371 # First, try using that file with no special directory specified.
9372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9373 /* end confdefs.h. */
9374 #include <X11/Xlib.h>
9375 _ACEOF
9376 if ac_fn_c_try_cpp "$LINENO"; then :
9377 # We can compile using X headers with no special include directory.
9378 ac_x_includes=
9379 else
9380 for ac_dir in $ac_x_header_dirs; do
9381 if test -r "$ac_dir/X11/Xlib.h"; then
9382 ac_x_includes=$ac_dir
9383 break
9384 fi
9385 done
9386 fi
9387 rm -f conftest.err conftest.$ac_ext
9388 fi # $ac_x_includes = no
9389
9390 if test "$ac_x_libraries" = no; then
9391 # Check for the libraries.
9392 # See if we find them without any special options.
9393 # Don't add to $LIBS permanently.
9394 ac_save_LIBS=$LIBS
9395 LIBS="-lX11 $LIBS"
9396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9397 /* end confdefs.h. */
9398 #include <X11/Xlib.h>
9399 int
9400 main ()
9401 {
9402 XrmInitialize ()
9403 ;
9404 return 0;
9405 }
9406 _ACEOF
9407 if ac_fn_c_try_link "$LINENO"; then :
9408 LIBS=$ac_save_LIBS
9409 # We can link X programs with no special library path.
9410 ac_x_libraries=
9411 else
9412 LIBS=$ac_save_LIBS
9413 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9414 do
9415 # Don't even attempt the hair of trying to link an X program!
9416 for ac_extension in a so sl dylib la dll; do
9417 if test -r "$ac_dir/libX11.$ac_extension"; then
9418 ac_x_libraries=$ac_dir
9419 break 2
9420 fi
9421 done
9422 done
9423 fi
9424 rm -f core conftest.err conftest.$ac_objext \
9425 conftest$ac_exeext conftest.$ac_ext
9426 fi # $ac_x_libraries = no
9427
9428 case $ac_x_includes,$ac_x_libraries in #(
9429 no,* | *,no | *\'*)
9430 # Didn't find X, or a directory has "'" in its name.
9431 ac_cv_have_x="have_x=no";; #(
9432 *)
9433 # Record where we found X for the cache.
9434 ac_cv_have_x="have_x=yes\
9435 ac_x_includes='$ac_x_includes'\
9436 ac_x_libraries='$ac_x_libraries'"
9437 esac
9438 fi
9439 ;; #(
9440 *) have_x=yes;;
9441 esac
9442 eval "$ac_cv_have_x"
9443 fi # $with_x != no
9444
9445 if test "$have_x" != yes; then
9446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9447 $as_echo "$have_x" >&6; }
9448 no_x=yes
9449 else
9450 # If each of the values was on the command line, it overrides each guess.
9451 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9452 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9453 # Update the cache value to reflect the command line values.
9454 ac_cv_have_x="have_x=yes\
9455 ac_x_includes='$x_includes'\
9456 ac_x_libraries='$x_libraries'"
9457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9458 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9459 fi
9460
9461 if test "$no_x" != yes; then
9462 window_system=x11
9463 fi
9464
9465 LD_SWITCH_X_SITE_RPATH=
9466 if test "${x_libraries}" != NONE; then
9467 if test -n "${x_libraries}"; then
9468 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9469 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9470 fi
9471 x_default_search_path=""
9472 x_search_path=${x_libraries}
9473 if test -z "${x_search_path}"; then
9474 x_search_path=/usr/lib
9475 fi
9476 for x_library in `echo ${x_search_path}: | \
9477 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9478 x_search_path="\
9479 ${x_library}/X11/%L/%T/%N%C%S:\
9480 ${x_library}/X11/%l/%T/%N%C%S:\
9481 ${x_library}/X11/%T/%N%C%S:\
9482 ${x_library}/X11/%L/%T/%N%S:\
9483 ${x_library}/X11/%l/%T/%N%S:\
9484 ${x_library}/X11/%T/%N%S"
9485 if test x"${x_default_search_path}" = x; then
9486 x_default_search_path=${x_search_path}
9487 else
9488 x_default_search_path="${x_search_path}:${x_default_search_path}"
9489 fi
9490 done
9491 fi
9492
9493
9494 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9495 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9496 fi
9497
9498 if test x"${x_includes}" = x; then
9499 bitmapdir=/usr/include/X11/bitmaps
9500 else
9501 # accumulate include directories that have X11 bitmap subdirectories
9502 bmd_acc="dummyval"
9503 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9504 if test -d "${bmd}/X11/bitmaps"; then
9505 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9506 fi
9507 if test -d "${bmd}/bitmaps"; then
9508 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9509 fi
9510 done
9511 if test ${bmd_acc} != "dummyval"; then
9512 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9513 fi
9514 fi
9515
9516 HAVE_NS=no
9517 NS_IMPL_COCOA=no
9518 NS_IMPL_GNUSTEP=no
9519 tmp_CPPFLAGS="$CPPFLAGS"
9520 tmp_CFLAGS="$CFLAGS"
9521 CPPFLAGS="$CPPFLAGS -x objective-c"
9522 CFLAGS="$CFLAGS -x objective-c"
9523 GNU_OBJC_CFLAGS=
9524 LIBS_GNUSTEP=
9525 if test "${with_ns}" != no; then
9526 if test "${opsys}" = darwin; then
9527 NS_IMPL_COCOA=yes
9528 ns_appdir=`pwd`/nextstep/Emacs.app
9529 ns_appbindir=${ns_appdir}/Contents/MacOS
9530 ns_appresdir=${ns_appdir}/Contents/Resources
9531 ns_appsrc=Cocoa/Emacs.base
9532 elif test -f $GNUSTEP_CONFIG_FILE; then
9533 NS_IMPL_GNUSTEP=yes
9534 ns_appdir=`pwd`/nextstep/Emacs.app
9535 ns_appbindir=${ns_appdir}
9536 ns_appresdir=${ns_appdir}/Resources
9537 ns_appsrc=GNUstep/Emacs.base
9538 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9539 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9540 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9541 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9542 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9543 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9544 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9545 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9546 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9547 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9548 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9549 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
9550 LIB_STANDARD=
9551 START_FILES=
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9553 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9554 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9555 $as_echo_n "(cached) " >&6
9556 else
9557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9558 /* end confdefs.h. */
9559 #include <GNUstepBase/GSConfig.h>
9560 int
9561 main ()
9562 {
9563 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9564 1;
9565 #else
9566 fail;
9567 #endif
9568 ;
9569 return 0;
9570 }
9571 _ACEOF
9572 if ac_fn_c_try_compile "$LINENO"; then :
9573 emacs_cv_objc_exceptions=yes
9574 else
9575 emacs_cv_objc_exceptions=no
9576 fi
9577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9578 fi
9579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9580 $as_echo "$emacs_cv_objc_exceptions" >&6; }
9581 if test $emacs_cv_objc_exceptions = yes; then
9582
9583 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9584
9585 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9586 fi
9587 fi
9588
9589 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9590
9591 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9592 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9593 HAVE_NS=yes
9594 else
9595 as_fn_error "\`--with-ns' was specified, but the include
9596 files are missing or cannot be compiled." "$LINENO" 5
9597 fi
9598
9599
9600
9601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9602 /* end confdefs.h. */
9603 #include <AppKit/AppKit.h>
9604 int
9605 main ()
9606 {
9607
9608 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9609 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9610 ; /* OK */
9611 #else
9612 #error "OSX 10.4 or newer required"
9613 #endif
9614 #endif
9615
9616 ;
9617 return 0;
9618 }
9619 _ACEOF
9620 if ac_fn_c_try_compile "$LINENO"; then :
9621 ns_osx_have_104=yes
9622 else
9623 ns_osx_have_104=no
9624 fi
9625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9627 /* end confdefs.h. */
9628 #include <Foundation/NSObjCRuntime.h>
9629 int
9630 main ()
9631 {
9632 NSInteger i;
9633 ;
9634 return 0;
9635 }
9636 _ACEOF
9637 if ac_fn_c_try_compile "$LINENO"; then :
9638 ns_have_nsinteger=yes
9639 else
9640 ns_have_nsinteger=no
9641 fi
9642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9643 if test $ns_osx_have_104 = no; then
9644 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
9645 fi
9646 if test $ns_have_nsinteger = yes; then
9647
9648 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
9649
9650 fi
9651 fi
9652
9653
9654
9655 INSTALL_ARCH_INDEP_EXTRA=install-etc
9656 ns_self_contained=no
9657 NS_OBJ=
9658 NS_OBJC_OBJ=
9659 if test "${HAVE_NS}" = yes; then
9660 if test "$with_toolkit_scroll_bars" = "no"; then
9661 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9662 fi
9663
9664 window_system=nextstep
9665 # set up packaging dirs
9666 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9667 ns_self_contained=yes
9668 prefix=${ns_appresdir}
9669 exec_prefix=${ns_appbindir}
9670 libexecdir="\${ns_appbindir}/libexec"
9671 archlibdir="\${ns_appbindir}/libexec"
9672 docdir="\${ns_appresdir}/etc"
9673 etcdir="\${ns_appresdir}/etc"
9674 infodir="\${ns_appresdir}/info"
9675 mandir="\${ns_appresdir}/man"
9676 lispdir="\${ns_appresdir}/lisp"
9677 leimdir="\${ns_appresdir}/leim"
9678 INSTALL_ARCH_INDEP_EXTRA=
9679 fi
9680 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9681 fi
9682 CFLAGS="$tmp_CFLAGS"
9683 CPPFLAGS="$tmp_CPPFLAGS"
9684
9685
9686
9687
9688
9689
9690 HAVE_W32=no
9691 W32_OBJ=
9692 W32_LIBS=
9693 W32_RES=
9694 W32_RES_LINK=
9695 if test "${with_w32}" != no; then
9696 if test "${opsys}" != "cygwin"; then
9697 as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
9698 fi
9699 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
9700 if test "x$ac_cv_header_windows_h" = x""yes; then :
9701 HAVE_W32=yes
9702 else
9703 as_fn_error "\`--with-w32' was specified, but windows.h
9704 cannot be found." "$LINENO" 5
9705 fi
9706
9707
9708
9709 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
9710
9711 if test -n "$ac_tool_prefix"; then
9712 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9713 set dummy ${ac_tool_prefix}windres; ac_word=$2
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9715 $as_echo_n "checking for $ac_word... " >&6; }
9716 if test "${ac_cv_prog_WINDRES+set}" = set; then :
9717 $as_echo_n "(cached) " >&6
9718 else
9719 if test -n "$WINDRES"; then
9720 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9721 else
9722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723 for as_dir in $PATH
9724 do
9725 IFS=$as_save_IFS
9726 test -z "$as_dir" && as_dir=.
9727 for ac_exec_ext in '' $ac_executable_extensions; do
9728 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9729 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731 break 2
9732 fi
9733 done
9734 done
9735 IFS=$as_save_IFS
9736
9737 fi
9738 fi
9739 WINDRES=$ac_cv_prog_WINDRES
9740 if test -n "$WINDRES"; then
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9742 $as_echo "$WINDRES" >&6; }
9743 else
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745 $as_echo "no" >&6; }
9746 fi
9747
9748
9749 fi
9750 if test -z "$ac_cv_prog_WINDRES"; then
9751 ac_ct_WINDRES=$WINDRES
9752 # Extract the first word of "windres", so it can be a program name with args.
9753 set dummy windres; ac_word=$2
9754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755 $as_echo_n "checking for $ac_word... " >&6; }
9756 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
9757 $as_echo_n "(cached) " >&6
9758 else
9759 if test -n "$ac_ct_WINDRES"; then
9760 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9761 else
9762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9763 for as_dir in $PATH
9764 do
9765 IFS=$as_save_IFS
9766 test -z "$as_dir" && as_dir=.
9767 for ac_exec_ext in '' $ac_executable_extensions; do
9768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9769 ac_cv_prog_ac_ct_WINDRES="windres"
9770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9771 break 2
9772 fi
9773 done
9774 done
9775 IFS=$as_save_IFS
9776
9777 fi
9778 fi
9779 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9780 if test -n "$ac_ct_WINDRES"; then
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9782 $as_echo "$ac_ct_WINDRES" >&6; }
9783 else
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785 $as_echo "no" >&6; }
9786 fi
9787
9788 if test "x$ac_ct_WINDRES" = x; then
9789 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
9790 else
9791 case $cross_compiling:$ac_tool_warned in
9792 yes:)
9793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9794 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9795 ac_tool_warned=yes ;;
9796 esac
9797 WINDRES=$ac_ct_WINDRES
9798 fi
9799 else
9800 WINDRES="$ac_cv_prog_WINDRES"
9801 fi
9802
9803 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
9804 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
9805 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
9806 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
9807 W32_RES="emacs.res"
9808 # Tell the linker that emacs.res is an object (which we compile from
9809 # the rc file), not a linker script.
9810 W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
9811 fi
9812
9813
9814
9815
9816
9817 if test "${HAVE_W32}" = "yes"; then
9818 window_system=w32
9819 with_xft=no
9820 fi
9821
9822 ## $window_system is now set to the window system we will
9823 ## ultimately use.
9824
9825 term_header=
9826 HAVE_X_WINDOWS=no
9827 HAVE_X11=no
9828 USE_X_TOOLKIT=none
9829
9830 case "${window_system}" in
9831 x11 )
9832 HAVE_X_WINDOWS=yes
9833 HAVE_X11=yes
9834 term_header=xterm.h
9835 case "${with_x_toolkit}" in
9836 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9837 motif ) USE_X_TOOLKIT=MOTIF ;;
9838 gtk ) with_gtk=yes
9839 term_header=gtkutil.h
9840 USE_X_TOOLKIT=none ;;
9841 gtk2 ) with_gtk2=yes
9842 term_header=gtkutil.h
9843 USE_X_TOOLKIT=none ;;
9844 gtk3 ) with_gtk3=yes
9845 term_header=gtkutil.h
9846 USE_X_TOOLKIT=none ;;
9847 no ) USE_X_TOOLKIT=none ;;
9848 * ) USE_X_TOOLKIT=maybe ;;
9849 esac
9850 ;;
9851 nextstep )
9852 term_header=nsterm.h
9853 ;;
9854 w32 )
9855 term_header=w32term.h
9856 ;;
9857 esac
9858
9859 if test -n "${term_header}"; then
9860
9861 cat >>confdefs.h <<_ACEOF
9862 #define TERM_HEADER "${term_header}"
9863 _ACEOF
9864
9865 fi
9866
9867 if test "$window_system" = none && test "X$with_x" != "Xno"; then
9868 # Extract the first word of "X", so it can be a program name with args.
9869 set dummy X; ac_word=$2
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9871 $as_echo_n "checking for $ac_word... " >&6; }
9872 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9873 $as_echo_n "(cached) " >&6
9874 else
9875 if test -n "$HAVE_XSERVER"; then
9876 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9877 else
9878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9879 for as_dir in $PATH
9880 do
9881 IFS=$as_save_IFS
9882 test -z "$as_dir" && as_dir=.
9883 for ac_exec_ext in '' $ac_executable_extensions; do
9884 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9885 ac_cv_prog_HAVE_XSERVER="true"
9886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9887 break 2
9888 fi
9889 done
9890 done
9891 IFS=$as_save_IFS
9892
9893 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9894 fi
9895 fi
9896 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9897 if test -n "$HAVE_XSERVER"; then
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9899 $as_echo "$HAVE_XSERVER" >&6; }
9900 else
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902 $as_echo "no" >&6; }
9903 fi
9904
9905
9906 if test "$HAVE_XSERVER" = true ||
9907 test -n "$DISPLAY" ||
9908 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9909 as_fn_error "You seem to be running X, but no X development libraries
9910 were found. You should install the relevant development files for X
9911 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9912 sure you have development files for image handling, i.e.
9913 tiff, gif, jpeg, png and xpm.
9914 If you are sure you want Emacs compiled without X window support, pass
9915 --without-x
9916 to configure." "$LINENO" 5
9917 fi
9918 fi
9919
9920 ### If we're using X11, we should use the X menu package.
9921 HAVE_MENUS=no
9922 case ${HAVE_X11} in
9923 yes ) HAVE_MENUS=yes ;;
9924 esac
9925
9926 # Does the opsystem file prohibit the use of the GNU malloc?
9927 # Assume not, until told otherwise.
9928 GNU_MALLOC=yes
9929
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9931 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9932 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
9933 $as_echo_n "(cached) " >&6
9934 else
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9936 /* end confdefs.h. */
9937 #include <malloc.h>
9938 static void hook (void) {}
9939 int
9940 main ()
9941 {
9942 malloc_set_state (malloc_get_state ());
9943 __after_morecore_hook = hook;
9944 __malloc_initialize_hook = hook;
9945 ;
9946 return 0;
9947 }
9948 _ACEOF
9949 if ac_fn_c_try_link "$LINENO"; then :
9950 emacs_cv_var_doug_lea_malloc=yes
9951 else
9952 emacs_cv_var_doug_lea_malloc=no
9953 fi
9954 rm -f core conftest.err conftest.$ac_objext \
9955 conftest$ac_exeext conftest.$ac_ext
9956 fi
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9958 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9959 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9960
9961
9962 system_malloc=no
9963 case "$opsys" in
9964 ## darwin ld insists on the use of malloc routines in the System framework.
9965 darwin|sol2-10) system_malloc=yes ;;
9966 esac
9967
9968 if test "${system_malloc}" = "yes"; then
9969
9970 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9971
9972 GNU_MALLOC=no
9973 GNU_MALLOC_reason="
9974 (The GNU allocators don't work with this system configuration.)"
9975 GMALLOC_OBJ=
9976 VMLIMIT_OBJ=
9977 else
9978 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
9979 VMLIMIT_OBJ=vm-limit.o
9980 fi
9981
9982
9983
9984 if test "$doug_lea_malloc" = "yes" ; then
9985 if test "$GNU_MALLOC" = yes ; then
9986 GNU_MALLOC_reason="
9987 (Using Doug Lea's new malloc from the GNU C Library.)"
9988 fi
9989
9990 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
9991
9992
9993 ## Use mmap directly for allocating larger buffers.
9994 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
9995 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
9996 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
9997 case "$opsys" in
9998 gnu*) REL_ALLOC=no ;;
9999 esac
10000 fi
10001
10002 if test x"${REL_ALLOC}" = x; then
10003 REL_ALLOC=${GNU_MALLOC}
10004 fi
10005
10006 use_mmap_for_buffers=no
10007 case "$opsys" in
10008 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10009 esac
10010
10011
10012
10013
10014
10015
10016
10017
10018 for ac_func in getpagesize
10019 do :
10020 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10021 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10022 cat >>confdefs.h <<_ACEOF
10023 #define HAVE_GETPAGESIZE 1
10024 _ACEOF
10025
10026 fi
10027 done
10028
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10030 $as_echo_n "checking for working mmap... " >&6; }
10031 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10032 $as_echo_n "(cached) " >&6
10033 else
10034 if test "$cross_compiling" = yes; then :
10035 ac_cv_func_mmap_fixed_mapped=no
10036 else
10037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10038 /* end confdefs.h. */
10039 $ac_includes_default
10040 /* malloc might have been renamed as rpl_malloc. */
10041 #undef malloc
10042
10043 /* Thanks to Mike Haertel and Jim Avera for this test.
10044 Here is a matrix of mmap possibilities:
10045 mmap private not fixed
10046 mmap private fixed at somewhere currently unmapped
10047 mmap private fixed at somewhere already mapped
10048 mmap shared not fixed
10049 mmap shared fixed at somewhere currently unmapped
10050 mmap shared fixed at somewhere already mapped
10051 For private mappings, we should verify that changes cannot be read()
10052 back from the file, nor mmap's back from the file at a different
10053 address. (There have been systems where private was not correctly
10054 implemented like the infamous i386 svr4.0, and systems where the
10055 VM page cache was not coherent with the file system buffer cache
10056 like early versions of FreeBSD and possibly contemporary NetBSD.)
10057 For shared mappings, we should conversely verify that changes get
10058 propagated back to all the places they're supposed to be.
10059
10060 Grep wants private fixed already mapped.
10061 The main things grep needs to know about mmap are:
10062 * does it exist and is it safe to write into the mmap'd area
10063 * how to use it (BSD variants) */
10064
10065 #include <fcntl.h>
10066 #include <sys/mman.h>
10067
10068 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10069 char *malloc ();
10070 #endif
10071
10072 /* This mess was copied from the GNU getpagesize.h. */
10073 #ifndef HAVE_GETPAGESIZE
10074 # ifdef _SC_PAGESIZE
10075 # define getpagesize() sysconf(_SC_PAGESIZE)
10076 # else /* no _SC_PAGESIZE */
10077 # ifdef HAVE_SYS_PARAM_H
10078 # include <sys/param.h>
10079 # ifdef EXEC_PAGESIZE
10080 # define getpagesize() EXEC_PAGESIZE
10081 # else /* no EXEC_PAGESIZE */
10082 # ifdef NBPG
10083 # define getpagesize() NBPG * CLSIZE
10084 # ifndef CLSIZE
10085 # define CLSIZE 1
10086 # endif /* no CLSIZE */
10087 # else /* no NBPG */
10088 # ifdef NBPC
10089 # define getpagesize() NBPC
10090 # else /* no NBPC */
10091 # ifdef PAGESIZE
10092 # define getpagesize() PAGESIZE
10093 # endif /* PAGESIZE */
10094 # endif /* no NBPC */
10095 # endif /* no NBPG */
10096 # endif /* no EXEC_PAGESIZE */
10097 # else /* no HAVE_SYS_PARAM_H */
10098 # define getpagesize() 8192 /* punt totally */
10099 # endif /* no HAVE_SYS_PARAM_H */
10100 # endif /* no _SC_PAGESIZE */
10101
10102 #endif /* no HAVE_GETPAGESIZE */
10103
10104 int
10105 main ()
10106 {
10107 char *data, *data2, *data3;
10108 const char *cdata2;
10109 int i, pagesize;
10110 int fd, fd2;
10111
10112 pagesize = getpagesize ();
10113
10114 /* First, make a file with some known garbage in it. */
10115 data = (char *) malloc (pagesize);
10116 if (!data)
10117 return 1;
10118 for (i = 0; i < pagesize; ++i)
10119 *(data + i) = rand ();
10120 umask (0);
10121 fd = creat ("conftest.mmap", 0600);
10122 if (fd < 0)
10123 return 2;
10124 if (write (fd, data, pagesize) != pagesize)
10125 return 3;
10126 close (fd);
10127
10128 /* Next, check that the tail of a page is zero-filled. File must have
10129 non-zero length, otherwise we risk SIGBUS for entire page. */
10130 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10131 if (fd2 < 0)
10132 return 4;
10133 cdata2 = "";
10134 if (write (fd2, cdata2, 1) != 1)
10135 return 5;
10136 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10137 if (data2 == MAP_FAILED)
10138 return 6;
10139 for (i = 0; i < pagesize; ++i)
10140 if (*(data2 + i))
10141 return 7;
10142 close (fd2);
10143 if (munmap (data2, pagesize))
10144 return 8;
10145
10146 /* Next, try to mmap the file at a fixed address which already has
10147 something else allocated at it. If we can, also make sure that
10148 we see the same garbage. */
10149 fd = open ("conftest.mmap", O_RDWR);
10150 if (fd < 0)
10151 return 9;
10152 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10153 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10154 return 10;
10155 for (i = 0; i < pagesize; ++i)
10156 if (*(data + i) != *(data2 + i))
10157 return 11;
10158
10159 /* Finally, make sure that changes to the mapped area do not
10160 percolate back to the file as seen by read(). (This is a bug on
10161 some variants of i386 svr4.0.) */
10162 for (i = 0; i < pagesize; ++i)
10163 *(data2 + i) = *(data2 + i) + 1;
10164 data3 = (char *) malloc (pagesize);
10165 if (!data3)
10166 return 12;
10167 if (read (fd, data3, pagesize) != pagesize)
10168 return 13;
10169 for (i = 0; i < pagesize; ++i)
10170 if (*(data + i) != *(data3 + i))
10171 return 14;
10172 close (fd);
10173 return 0;
10174 }
10175 _ACEOF
10176 if ac_fn_c_try_run "$LINENO"; then :
10177 ac_cv_func_mmap_fixed_mapped=yes
10178 else
10179 ac_cv_func_mmap_fixed_mapped=no
10180 fi
10181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10182 conftest.$ac_objext conftest.beam conftest.$ac_ext
10183 fi
10184
10185 fi
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10187 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10188 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10189
10190 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10191
10192 fi
10193 rm -f conftest.mmap conftest.txt
10194
10195 if test $use_mmap_for_buffers = yes; then
10196
10197 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10198
10199 REL_ALLOC=no
10200 fi
10201
10202 LIBS="$LIBS_SYSTEM $LIBS"
10203
10204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10205 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10206 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10207 $as_echo_n "(cached) " >&6
10208 else
10209 ac_check_lib_save_LIBS=$LIBS
10210 LIBS="-ldnet $LIBS"
10211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10212 /* end confdefs.h. */
10213
10214 /* Override any GCC internal prototype to avoid an error.
10215 Use char because int might match the return type of a GCC
10216 builtin and then its argument prototype would still apply. */
10217 #ifdef __cplusplus
10218 extern "C"
10219 #endif
10220 char dnet_ntoa ();
10221 int
10222 main ()
10223 {
10224 return dnet_ntoa ();
10225 ;
10226 return 0;
10227 }
10228 _ACEOF
10229 if ac_fn_c_try_link "$LINENO"; then :
10230 ac_cv_lib_dnet_dnet_ntoa=yes
10231 else
10232 ac_cv_lib_dnet_dnet_ntoa=no
10233 fi
10234 rm -f core conftest.err conftest.$ac_objext \
10235 conftest$ac_exeext conftest.$ac_ext
10236 LIBS=$ac_check_lib_save_LIBS
10237 fi
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10239 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10240 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10241 cat >>confdefs.h <<_ACEOF
10242 #define HAVE_LIBDNET 1
10243 _ACEOF
10244
10245 LIBS="-ldnet $LIBS"
10246
10247 fi
10248
10249
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10251 $as_echo_n "checking for main in -lXbsd... " >&6; }
10252 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10253 $as_echo_n "(cached) " >&6
10254 else
10255 ac_check_lib_save_LIBS=$LIBS
10256 LIBS="-lXbsd $LIBS"
10257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10258 /* end confdefs.h. */
10259
10260
10261 int
10262 main ()
10263 {
10264 return main ();
10265 ;
10266 return 0;
10267 }
10268 _ACEOF
10269 if ac_fn_c_try_link "$LINENO"; then :
10270 ac_cv_lib_Xbsd_main=yes
10271 else
10272 ac_cv_lib_Xbsd_main=no
10273 fi
10274 rm -f core conftest.err conftest.$ac_objext \
10275 conftest$ac_exeext conftest.$ac_ext
10276 LIBS=$ac_check_lib_save_LIBS
10277 fi
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10279 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10280 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10281 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10282 fi
10283
10284
10285 LIB_PTHREAD=
10286
10287
10288
10289 if test "$ac_cv_header_pthread_h"; then
10290 if test "$GMALLOC_OBJ" = gmalloc.o; then
10291 emacs_pthread_function=pthread_atfork
10292 else
10293 emacs_pthread_function=pthread_self
10294 fi
10295 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10297 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10298 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10299 $as_echo_n "(cached) " >&6
10300 else
10301 ac_check_lib_save_LIBS=$LIBS
10302 LIBS="-lpthread $LIBS"
10303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10304 /* end confdefs.h. */
10305
10306 /* Override any GCC internal prototype to avoid an error.
10307 Use char because int might match the return type of a GCC
10308 builtin and then its argument prototype would still apply. */
10309 #ifdef __cplusplus
10310 extern "C"
10311 #endif
10312 char $emacs_pthread_function ();
10313 int
10314 main ()
10315 {
10316 return $emacs_pthread_function ();
10317 ;
10318 return 0;
10319 }
10320 _ACEOF
10321 if ac_fn_c_try_link "$LINENO"; then :
10322 eval "$as_ac_Lib=yes"
10323 else
10324 eval "$as_ac_Lib=no"
10325 fi
10326 rm -f core conftest.err conftest.$ac_objext \
10327 conftest$ac_exeext conftest.$ac_ext
10328 LIBS=$ac_check_lib_save_LIBS
10329 fi
10330 eval ac_res=\$$as_ac_Lib
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10332 $as_echo "$ac_res" >&6; }
10333 eval as_val=\$$as_ac_Lib
10334 if test "x$as_val" = x""yes; then :
10335 HAVE_PTHREAD=yes
10336 fi
10337
10338 fi
10339 if test "$HAVE_PTHREAD" = yes; then
10340 case "${canonical}" in
10341 *-hpux*) ;;
10342 *) LIB_PTHREAD="-lpthread"
10343 LIBS="$LIB_PTHREAD $LIBS" ;;
10344 esac
10345
10346 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10347
10348 fi
10349
10350
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10352 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10353 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10354 $as_echo_n "(cached) " >&6
10355 else
10356 ac_check_lib_save_LIBS=$LIBS
10357 LIBS="-lpthreads $LIBS"
10358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10359 /* end confdefs.h. */
10360
10361 /* Override any GCC internal prototype to avoid an error.
10362 Use char because int might match the return type of a GCC
10363 builtin and then its argument prototype would still apply. */
10364 #ifdef __cplusplus
10365 extern "C"
10366 #endif
10367 char cma_open ();
10368 int
10369 main ()
10370 {
10371 return cma_open ();
10372 ;
10373 return 0;
10374 }
10375 _ACEOF
10376 if ac_fn_c_try_link "$LINENO"; then :
10377 ac_cv_lib_pthreads_cma_open=yes
10378 else
10379 ac_cv_lib_pthreads_cma_open=no
10380 fi
10381 rm -f core conftest.err conftest.$ac_objext \
10382 conftest$ac_exeext conftest.$ac_ext
10383 LIBS=$ac_check_lib_save_LIBS
10384 fi
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10386 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10387 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10388 cat >>confdefs.h <<_ACEOF
10389 #define HAVE_LIBPTHREADS 1
10390 _ACEOF
10391
10392 LIBS="-lpthreads $LIBS"
10393
10394 fi
10395
10396
10397 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10398 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10399 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10400 ## added to LIBS in configure would never contain the pthreads part,
10401 ## but the value used in Makefiles might. FIXME?
10402 ##
10403 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10404 ## be harmless on older versions of X where it happens to exist.
10405 test "$opsys" = "aix4-2" && \
10406 test $ac_cv_lib_pthreads_cma_open = yes && \
10407 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10408
10409
10410 case ${host_os} in
10411 aix*)
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10413 $as_echo_n "checking for -bbigtoc option... " >&6; }
10414 if test "${gdb_cv_bigtoc+set}" = set; then :
10415 $as_echo_n "(cached) " >&6
10416 else
10417
10418 case $GCC in
10419 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10420 *) gdb_cv_bigtoc=-bbigtoc ;;
10421 esac
10422
10423 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10425 /* end confdefs.h. */
10426
10427 int
10428 main ()
10429 {
10430 int i;
10431 ;
10432 return 0;
10433 }
10434 _ACEOF
10435 if ac_fn_c_try_link "$LINENO"; then :
10436
10437 else
10438 gdb_cv_bigtoc=
10439 fi
10440 rm -f core conftest.err conftest.$ac_objext \
10441 conftest$ac_exeext conftest.$ac_ext
10442
10443 fi
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10445 $as_echo "$gdb_cv_bigtoc" >&6; }
10446 ;;
10447 esac
10448
10449 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10450 # used for the tests that follow. We set them back to REAL_CFLAGS and
10451 # REAL_CPPFLAGS later on.
10452
10453 REAL_CFLAGS="$CFLAGS"
10454 REAL_CPPFLAGS="$CPPFLAGS"
10455
10456 if test "${HAVE_X11}" = "yes"; then
10457 DEFS="$C_SWITCH_X_SITE $DEFS"
10458 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10459 LIBS="-lX11 $LIBS"
10460 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10461 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10462
10463 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10464 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10465 # but it's more convenient here to set LD_RUN_PATH since this
10466 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10467 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10468 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10469 export LD_RUN_PATH
10470 fi
10471
10472 if test "${opsys}" = "gnu-linux"; then
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10474 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10476 /* end confdefs.h. */
10477
10478 int
10479 main ()
10480 {
10481 XOpenDisplay ("foo");
10482 ;
10483 return 0;
10484 }
10485 _ACEOF
10486 if ac_fn_c_try_link "$LINENO"; then :
10487 xgnu_linux_first_failure=no
10488 else
10489 xgnu_linux_first_failure=yes
10490 fi
10491 rm -f core conftest.err conftest.$ac_objext \
10492 conftest$ac_exeext conftest.$ac_ext
10493 if test "${xgnu_linux_first_failure}" = "yes"; then
10494 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10495 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10496 OLD_CPPFLAGS="$CPPFLAGS"
10497 OLD_LIBS="$LIBS"
10498 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10499 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10500 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10501 LIBS="$LIBS -b i486-linuxaout"
10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10503 /* end confdefs.h. */
10504
10505 int
10506 main ()
10507 {
10508 XOpenDisplay ("foo");
10509 ;
10510 return 0;
10511 }
10512 _ACEOF
10513 if ac_fn_c_try_link "$LINENO"; then :
10514 xgnu_linux_second_failure=no
10515 else
10516 xgnu_linux_second_failure=yes
10517 fi
10518 rm -f core conftest.err conftest.$ac_objext \
10519 conftest$ac_exeext conftest.$ac_ext
10520 if test "${xgnu_linux_second_failure}" = "yes"; then
10521 # If we get the same failure with -b, there is no use adding -b.
10522 # So take it out. This plays safe.
10523 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10524 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10525 CPPFLAGS="$OLD_CPPFLAGS"
10526 LIBS="$OLD_LIBS"
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528 $as_echo "no" >&6; }
10529 else
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10531 $as_echo "yes" >&6; }
10532 fi
10533 else
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10535 $as_echo "no" >&6; }
10536 fi
10537 fi
10538
10539 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10540 # header files included from there.
10541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10542 $as_echo_n "checking for Xkb... " >&6; }
10543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10544 /* end confdefs.h. */
10545 #include <X11/Xlib.h>
10546 #include <X11/XKBlib.h>
10547 int
10548 main ()
10549 {
10550 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10551 ;
10552 return 0;
10553 }
10554 _ACEOF
10555 if ac_fn_c_try_link "$LINENO"; then :
10556 emacs_xkb=yes
10557 else
10558 emacs_xkb=no
10559 fi
10560 rm -f core conftest.err conftest.$ac_objext \
10561 conftest$ac_exeext conftest.$ac_ext
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10563 $as_echo "$emacs_xkb" >&6; }
10564 if test $emacs_xkb = yes; then
10565
10566 $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
10567
10568 fi
10569
10570 for ac_func in XrmSetDatabase XScreenResourceString \
10571 XScreenNumberOfScreen
10572 do :
10573 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10574 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10575 eval as_val=\$$as_ac_var
10576 if test "x$as_val" = x""yes; then :
10577 cat >>confdefs.h <<_ACEOF
10578 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10579 _ACEOF
10580
10581 fi
10582 done
10583
10584 fi
10585
10586 if test "${window_system}" = "x11"; then
10587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10588 $as_echo_n "checking X11 version 6... " >&6; }
10589 if test "${emacs_cv_x11_version_6+set}" = set; then :
10590 $as_echo_n "(cached) " >&6
10591 else
10592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10593 /* end confdefs.h. */
10594 #include <X11/Xlib.h>
10595 int
10596 main ()
10597 {
10598 #if XlibSpecificationRelease < 6
10599 fail;
10600 #endif
10601
10602 ;
10603 return 0;
10604 }
10605 _ACEOF
10606 if ac_fn_c_try_link "$LINENO"; then :
10607 emacs_cv_x11_version_6=yes
10608 else
10609 emacs_cv_x11_version_6=no
10610 fi
10611 rm -f core conftest.err conftest.$ac_objext \
10612 conftest$ac_exeext conftest.$ac_ext
10613 fi
10614
10615 if test $emacs_cv_x11_version_6 = yes; then
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10617 $as_echo "6 or newer" >&6; }
10618
10619 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
10620
10621
10622 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
10623
10624 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10625 ## XIM support.
10626 case "$opsys" in
10627 sol2-*) : ;;
10628 *)
10629 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
10630
10631 ;;
10632 esac
10633 else
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10635 $as_echo "before 6" >&6; }
10636 fi
10637 fi
10638
10639
10640 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10641 HAVE_RSVG=no
10642 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10643 if test "${with_rsvg}" != "no"; then
10644 RSVG_REQUIRED=2.11.0
10645 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10646
10647
10648 succeeded=no
10649
10650 if test "$PKG_CONFIG" = "no" ; then
10651 :
10652 else
10653 PKG_CONFIG_MIN_VERSION=0.9.0
10654 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10656 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
10657
10658 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
10659 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
10660 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
10661 edit_cflags="
10662 s,///*,/,g
10663 s/^/ /
10664 s/ -I/ $isystem/g
10665 s/^ //
10666 "
10667 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10668 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10670 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10671 succeeded=yes
10672 else
10673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10674 $as_echo "no" >&6; }
10675 RSVG_CFLAGS=""
10676 RSVG_LIBS=""
10677 ## If we have a custom action on failure, don't print errors, but
10678 ## do set a variable so people can do so. Do it in a subshell
10679 ## to capture any diagnostics in invoking pkg-config.
10680 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
10681
10682 fi
10683
10684
10685
10686 else
10687 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10688 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10689 fi
10690 fi
10691
10692 if test $succeeded = yes; then
10693 HAVE_RSVG=yes
10694 else
10695 :
10696 fi
10697
10698
10699
10700
10701 if test $HAVE_RSVG = yes; then
10702
10703 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
10704
10705 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10706 LIBS="$RSVG_LIBS $LIBS"
10707 fi
10708 fi
10709 fi
10710
10711 HAVE_IMAGEMAGICK=no
10712 if test "${HAVE_X11}" = "yes"; then
10713 if test "${with_imagemagick}" != "no"; then
10714 ## 6.2.8 is the earliest version known to work, but earlier versions
10715 ## might work - let us know if you find one.
10716 ## 6.0.7 does not work. See bug#7955.
10717 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
10718
10719 succeeded=no
10720
10721 if test "$PKG_CONFIG" = "no" ; then
10722 :
10723 else
10724 PKG_CONFIG_MIN_VERSION=0.9.0
10725 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10727 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
10728
10729 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10730 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10731 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10732 edit_cflags="
10733 s,///*,/,g
10734 s/^/ /
10735 s/ -I/ $isystem/g
10736 s/^ //
10737 "
10738 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10739 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10741 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10742 succeeded=yes
10743 else
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745 $as_echo "no" >&6; }
10746 IMAGEMAGICK_CFLAGS=""
10747 IMAGEMAGICK_LIBS=""
10748 ## If we have a custom action on failure, don't print errors, but
10749 ## do set a variable so people can do so. Do it in a subshell
10750 ## to capture any diagnostics in invoking pkg-config.
10751 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
10752
10753 fi
10754
10755
10756
10757 else
10758 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10759 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10760 fi
10761 fi
10762
10763 if test $succeeded = yes; then
10764 HAVE_IMAGEMAGICK=yes
10765 else
10766 :
10767 fi
10768
10769
10770
10771
10772 if test $HAVE_IMAGEMAGICK = yes; then
10773
10774 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
10775
10776 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10777 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10778 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10779 do :
10780 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10781 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10782 eval as_val=\$$as_ac_var
10783 if test "x$as_val" = x""yes; then :
10784 cat >>confdefs.h <<_ACEOF
10785 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10786 _ACEOF
10787
10788 fi
10789 done
10790
10791 fi
10792 fi
10793 fi
10794
10795
10796 HAVE_GTK=no
10797 GTK_OBJ=
10798 check_gtk2=no
10799 gtk3_pkg_errors=
10800 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
10801 GLIB_REQUIRED=2.28
10802 GTK_REQUIRED=3.0
10803 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10804
10805
10806 succeeded=no
10807
10808 if test "$PKG_CONFIG" = "no" ; then
10809 pkg_check_gtk=no
10810 else
10811 PKG_CONFIG_MIN_VERSION=0.9.0
10812 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10814 $as_echo_n "checking for $GTK_MODULES... " >&6; }
10815
10816 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10817 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10818 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
10819 edit_cflags="
10820 s,///*,/,g
10821 s/^/ /
10822 s/ -I/ $isystem/g
10823 s/^ //
10824 "
10825 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10826 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10828 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10829 succeeded=yes
10830 else
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832 $as_echo "no" >&6; }
10833 GTK_CFLAGS=""
10834 GTK_LIBS=""
10835 ## If we have a custom action on failure, don't print errors, but
10836 ## do set a variable so people can do so. Do it in a subshell
10837 ## to capture any diagnostics in invoking pkg-config.
10838 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
10839
10840 fi
10841
10842
10843
10844 else
10845 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10846 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10847 fi
10848 fi
10849
10850 if test $succeeded = yes; then
10851 pkg_check_gtk=yes
10852 else
10853 pkg_check_gtk=no
10854 fi
10855
10856 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
10857 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10858 fi
10859 if test "$pkg_check_gtk" = "yes"; then
10860
10861 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
10862
10863 GTK_OBJ=emacsgtkfixed.o
10864 term_header=gtkutil.h
10865 USE_GTK_TOOLKIT="GTK3"
10866 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
10867 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
10868 fi
10869 else
10870 check_gtk2=yes
10871 gtk3_pkg_errors="$GTK_PKG_ERRORS "
10872 fi
10873 fi
10874
10875 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
10876 GLIB_REQUIRED=2.10
10877 GTK_REQUIRED=2.10
10878 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10879
10880
10881 succeeded=no
10882
10883 if test "$PKG_CONFIG" = "no" ; then
10884 pkg_check_gtk=no
10885 else
10886 PKG_CONFIG_MIN_VERSION=0.9.0
10887 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10889 $as_echo_n "checking for $GTK_MODULES... " >&6; }
10890
10891 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10892 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10893 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
10894 edit_cflags="
10895 s,///*,/,g
10896 s/^/ /
10897 s/ -I/ $isystem/g
10898 s/^ //
10899 "
10900 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10901 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10903 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10904 succeeded=yes
10905 else
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907 $as_echo "no" >&6; }
10908 GTK_CFLAGS=""
10909 GTK_LIBS=""
10910 ## If we have a custom action on failure, don't print errors, but
10911 ## do set a variable so people can do so. Do it in a subshell
10912 ## to capture any diagnostics in invoking pkg-config.
10913 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
10914
10915 fi
10916
10917
10918
10919 else
10920 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10921 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10922 fi
10923 fi
10924
10925 if test $succeeded = yes; then
10926 pkg_check_gtk=yes
10927 else
10928 pkg_check_gtk=no
10929 fi
10930
10931 if test "$pkg_check_gtk" = "no" &&
10932 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
10933 then
10934 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
10935 fi
10936 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
10937 fi
10938
10939 if test x"$pkg_check_gtk" = xyes; then
10940
10941
10942
10943 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10944 CFLAGS="$CFLAGS $GTK_CFLAGS"
10945 LIBS="$GTK_LIBS $LIBS"
10946 GTK_COMPILES=no
10947 for ac_func in gtk_main
10948 do :
10949 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
10950 if test "x$ac_cv_func_gtk_main" = x""yes; then :
10951 cat >>confdefs.h <<_ACEOF
10952 #define HAVE_GTK_MAIN 1
10953 _ACEOF
10954 GTK_COMPILES=yes
10955 fi
10956 done
10957
10958 if test "${GTK_COMPILES}" != "yes"; then
10959 if test "$USE_X_TOOLKIT" != "maybe"; then
10960 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
10961 fi
10962 else
10963 HAVE_GTK=yes
10964
10965 $as_echo "#define USE_GTK 1" >>confdefs.h
10966
10967 GTK_OBJ="gtkutil.o $GTK_OBJ"
10968 USE_X_TOOLKIT=none
10969 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
10970 :
10971 else
10972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
10973 closing open displays. This is no problem if you just use
10974 one display, but if you use more than one and close one of them
10975 Emacs may crash." >&5
10976 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
10977 closing open displays. This is no problem if you just use
10978 one display, but if you use more than one and close one of them
10979 Emacs may crash." >&2;}
10980 sleep 3
10981 fi
10982 fi
10983
10984 fi
10985
10986
10987
10988 if test "${HAVE_GTK}" = "yes"; then
10989
10990 if test "$with_toolkit_scroll_bars" != no; then
10991 with_toolkit_scroll_bars=yes
10992 fi
10993
10994 HAVE_GTK_FILE_SELECTION=no
10995 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
10996 #include <gtk/gtk.h>
10997 "
10998 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
10999 HAVE_GTK_FILE_SELECTION=yes
11000 else
11001 HAVE_GTK_FILE_SELECTION=no
11002 fi
11003
11004 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11005 for ac_func in gtk_file_selection_new
11006 do :
11007 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11008 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11009 cat >>confdefs.h <<_ACEOF
11010 #define HAVE_GTK_FILE_SELECTION_NEW 1
11011 _ACEOF
11012
11013 fi
11014 done
11015
11016 fi
11017
11018 HAVE_GTK_HANDLE_BOX=no
11019 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11020 #include <gtk/gtk.h>
11021 "
11022 if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11023 HAVE_GTK_HANDLE_BOX=yes
11024 else
11025 HAVE_GTK_HANDLE_BOX=no
11026 fi
11027
11028 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11029 for ac_func in gtk_handle_box_new
11030 do :
11031 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11032 if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11033 cat >>confdefs.h <<_ACEOF
11034 #define HAVE_GTK_HANDLE_BOX_NEW 1
11035 _ACEOF
11036
11037 fi
11038 done
11039
11040 fi
11041
11042 HAVE_GTK_TEAROFF_MENU_ITEM=no
11043 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11044 #include <gtk/gtk.h>
11045 "
11046 if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11047 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11048 else
11049 HAVE_GTK_TEAROFF_MENU_ITEM=no
11050 fi
11051
11052 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11053 for ac_func in gtk_tearoff_menu_item_new
11054 do :
11055 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11056 if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11057 cat >>confdefs.h <<_ACEOF
11058 #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11059 _ACEOF
11060
11061 fi
11062 done
11063
11064 fi
11065
11066 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11067 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11068 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11069 gtk_orientable_set_orientation \
11070 gtk_window_set_has_resize_grip
11071 do :
11072 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11073 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11074 eval as_val=\$$as_ac_var
11075 if test "x$as_val" = x""yes; then :
11076 cat >>confdefs.h <<_ACEOF
11077 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11078 _ACEOF
11079
11080 fi
11081 done
11082
11083
11084 term_header=gtkutil.h
11085 fi
11086
11087 HAVE_DBUS=no
11088 DBUS_OBJ=
11089 if test "${with_dbus}" = "yes"; then
11090
11091 succeeded=no
11092
11093 if test "$PKG_CONFIG" = "no" ; then
11094 HAVE_DBUS=no
11095 else
11096 PKG_CONFIG_MIN_VERSION=0.9.0
11097 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11099 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11100
11101 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11102 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11103 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
11104 edit_cflags="
11105 s,///*,/,g
11106 s/^/ /
11107 s/ -I/ $isystem/g
11108 s/^ //
11109 "
11110 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11111 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11113 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11114 succeeded=yes
11115 else
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117 $as_echo "no" >&6; }
11118 DBUS_CFLAGS=""
11119 DBUS_LIBS=""
11120 ## If we have a custom action on failure, don't print errors, but
11121 ## do set a variable so people can do so. Do it in a subshell
11122 ## to capture any diagnostics in invoking pkg-config.
11123 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
11124
11125 fi
11126
11127
11128
11129 else
11130 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11131 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11132 fi
11133 fi
11134
11135 if test $succeeded = yes; then
11136 HAVE_DBUS=yes
11137 else
11138 HAVE_DBUS=no
11139 fi
11140
11141 if test "$HAVE_DBUS" = yes; then
11142 LIBS="$LIBS $DBUS_LIBS"
11143
11144 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11145
11146 for ac_func in dbus_watch_get_unix_fd \
11147 dbus_type_is_valid \
11148 dbus_validate_bus_name \
11149 dbus_validate_path \
11150 dbus_validate_interface \
11151 dbus_validate_member
11152 do :
11153 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11154 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11155 eval as_val=\$$as_ac_var
11156 if test "x$as_val" = x""yes; then :
11157 cat >>confdefs.h <<_ACEOF
11158 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11159 _ACEOF
11160
11161 fi
11162 done
11163
11164 DBUS_OBJ=dbusbind.o
11165 fi
11166 fi
11167
11168
11169 HAVE_GSETTINGS=no
11170 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11171
11172 succeeded=no
11173
11174 if test "$PKG_CONFIG" = "no" ; then
11175 HAVE_GSETTINGS=no
11176 else
11177 PKG_CONFIG_MIN_VERSION=0.9.0
11178 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11180 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11181
11182 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11183 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11184 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
11185 edit_cflags="
11186 s,///*,/,g
11187 s/^/ /
11188 s/ -I/ $isystem/g
11189 s/^ //
11190 "
11191 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11192 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11194 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11195 succeeded=yes
11196 else
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198 $as_echo "no" >&6; }
11199 GSETTINGS_CFLAGS=""
11200 GSETTINGS_LIBS=""
11201 ## If we have a custom action on failure, don't print errors, but
11202 ## do set a variable so people can do so. Do it in a subshell
11203 ## to capture any diagnostics in invoking pkg-config.
11204 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
11205
11206 fi
11207
11208
11209
11210 else
11211 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11212 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11213 fi
11214 fi
11215
11216 if test $succeeded = yes; then
11217 HAVE_GSETTINGS=yes
11218 else
11219 HAVE_GSETTINGS=no
11220 fi
11221
11222 if test "$HAVE_GSETTINGS" = "yes"; then
11223
11224 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11225
11226 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11227 SETTINGS_LIBS="$GSETTINGS_LIBS"
11228 fi
11229 fi
11230
11231 HAVE_GCONF=no
11232 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11233
11234 succeeded=no
11235
11236 if test "$PKG_CONFIG" = "no" ; then
11237 HAVE_GCONF=no
11238 else
11239 PKG_CONFIG_MIN_VERSION=0.9.0
11240 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11242 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11243
11244 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11245 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11246 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
11247 edit_cflags="
11248 s,///*,/,g
11249 s/^/ /
11250 s/ -I/ $isystem/g
11251 s/^ //
11252 "
11253 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11254 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11256 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11257 succeeded=yes
11258 else
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11260 $as_echo "no" >&6; }
11261 GCONF_CFLAGS=""
11262 GCONF_LIBS=""
11263 ## If we have a custom action on failure, don't print errors, but
11264 ## do set a variable so people can do so. Do it in a subshell
11265 ## to capture any diagnostics in invoking pkg-config.
11266 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
11267
11268 fi
11269
11270
11271
11272 else
11273 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11274 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11275 fi
11276 fi
11277
11278 if test $succeeded = yes; then
11279 HAVE_GCONF=yes
11280 else
11281 HAVE_GCONF=no
11282 fi
11283
11284 if test "$HAVE_GCONF" = yes; then
11285
11286 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11287
11288 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11289 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11290 fi
11291 fi
11292
11293 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11294
11295 succeeded=no
11296
11297 if test "$PKG_CONFIG" = "no" ; then
11298 HAVE_GOBJECT=no
11299 else
11300 PKG_CONFIG_MIN_VERSION=0.9.0
11301 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11303 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11304
11305 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11306 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11307 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
11308 edit_cflags="
11309 s,///*,/,g
11310 s/^/ /
11311 s/ -I/ $isystem/g
11312 s/^ //
11313 "
11314 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11315 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11317 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11318 succeeded=yes
11319 else
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321 $as_echo "no" >&6; }
11322 GOBJECT_CFLAGS=""
11323 GOBJECT_LIBS=""
11324 ## If we have a custom action on failure, don't print errors, but
11325 ## do set a variable so people can do so. Do it in a subshell
11326 ## to capture any diagnostics in invoking pkg-config.
11327 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
11328
11329 fi
11330
11331
11332
11333 else
11334 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11335 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11336 fi
11337 fi
11338
11339 if test $succeeded = yes; then
11340 HAVE_GOBJECT=yes
11341 else
11342 HAVE_GOBJECT=no
11343 fi
11344
11345 if test "$HAVE_GOBJECT" = "yes"; then
11346 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11347 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11348 fi
11349 SAVE_CFLAGS="$CFLAGS"
11350 SAVE_LIBS="$LIBS"
11351 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11352 LIBS="$SETTINGS_LIBS $LIBS"
11353 for ac_func in g_type_init
11354 do :
11355 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11356 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11357 cat >>confdefs.h <<_ACEOF
11358 #define HAVE_G_TYPE_INIT 1
11359 _ACEOF
11360
11361 fi
11362 done
11363
11364 CFLAGS="$SAVE_CFLAGS"
11365 LIBS="$SAVE_LIBS"
11366 fi
11367
11368
11369
11370
11371 HAVE_LIBSELINUX=no
11372 LIBSELINUX_LIBS=
11373 if test "${with_selinux}" = "yes"; then
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11375 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11376 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11377 $as_echo_n "(cached) " >&6
11378 else
11379 ac_check_lib_save_LIBS=$LIBS
11380 LIBS="-lselinux $LIBS"
11381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11382 /* end confdefs.h. */
11383
11384 /* Override any GCC internal prototype to avoid an error.
11385 Use char because int might match the return type of a GCC
11386 builtin and then its argument prototype would still apply. */
11387 #ifdef __cplusplus
11388 extern "C"
11389 #endif
11390 char lgetfilecon ();
11391 int
11392 main ()
11393 {
11394 return lgetfilecon ();
11395 ;
11396 return 0;
11397 }
11398 _ACEOF
11399 if ac_fn_c_try_link "$LINENO"; then :
11400 ac_cv_lib_selinux_lgetfilecon=yes
11401 else
11402 ac_cv_lib_selinux_lgetfilecon=no
11403 fi
11404 rm -f core conftest.err conftest.$ac_objext \
11405 conftest$ac_exeext conftest.$ac_ext
11406 LIBS=$ac_check_lib_save_LIBS
11407 fi
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11409 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11410 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11411 HAVE_LIBSELINUX=yes
11412 else
11413 HAVE_LIBSELINUX=no
11414 fi
11415
11416 if test "$HAVE_LIBSELINUX" = yes; then
11417
11418 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11419
11420 LIBSELINUX_LIBS=-lselinux
11421 fi
11422 fi
11423
11424
11425 HAVE_GNUTLS=no
11426 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11427 if test "${with_gnutls}" = "yes" ; then
11428
11429 succeeded=no
11430
11431 if test "$PKG_CONFIG" = "no" ; then
11432 HAVE_GNUTLS=no
11433 else
11434 PKG_CONFIG_MIN_VERSION=0.9.0
11435 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11437 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11438
11439 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11440 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11441 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
11442 edit_cflags="
11443 s,///*,/,g
11444 s/^/ /
11445 s/ -I/ $isystem/g
11446 s/^ //
11447 "
11448 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11449 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11451 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11452 succeeded=yes
11453 else
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455 $as_echo "no" >&6; }
11456 LIBGNUTLS_CFLAGS=""
11457 LIBGNUTLS_LIBS=""
11458 ## If we have a custom action on failure, don't print errors, but
11459 ## do set a variable so people can do so. Do it in a subshell
11460 ## to capture any diagnostics in invoking pkg-config.
11461 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
11462
11463 fi
11464
11465
11466
11467 else
11468 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11469 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11470 fi
11471 fi
11472
11473 if test $succeeded = yes; then
11474 HAVE_GNUTLS=yes
11475 else
11476 HAVE_GNUTLS=no
11477 fi
11478
11479 if test "${HAVE_GNUTLS}" = "yes"; then
11480
11481 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11482
11483 fi
11484
11485 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11486 LIBS="$LIBGNUTLS_LIBS $LIBS"
11487 for ac_func in gnutls_certificate_set_verify_function
11488 do :
11489 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11490 if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11491 cat >>confdefs.h <<_ACEOF
11492 #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
11493 _ACEOF
11494 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11495 fi
11496 done
11497
11498
11499 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11500
11501 $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
11502
11503 fi
11504 fi
11505
11506
11507
11508
11509 if test "${with_inotify}" = "yes"; then
11510 for ac_header in sys/inotify.h
11511 do :
11512 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
11513 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
11514 cat >>confdefs.h <<_ACEOF
11515 #define HAVE_SYS_INOTIFY_H 1
11516 _ACEOF
11517
11518 fi
11519
11520 done
11521
11522 if test "$ac_cv_header_sys_inotify_h" = yes ; then
11523 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
11524 if test "x$ac_cv_func_inotify_init1" = x""yes; then :
11525
11526 fi
11527
11528 fi
11529 fi
11530 if test "$ac_cv_func_inotify_init1" = yes; then
11531
11532 $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
11533
11534 fi
11535
11536 HAVE_POSIX_ACL=no
11537 LIBACL_LIBS=
11538 if test "${with_acl}" = "yes"; then
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_set_file in -lacl" >&5
11540 $as_echo_n "checking for acl_set_file in -lacl... " >&6; }
11541 if test "${ac_cv_lib_acl_acl_set_file+set}" = set; then :
11542 $as_echo_n "(cached) " >&6
11543 else
11544 ac_check_lib_save_LIBS=$LIBS
11545 LIBS="-lacl $LIBS"
11546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11547 /* end confdefs.h. */
11548
11549 /* Override any GCC internal prototype to avoid an error.
11550 Use char because int might match the return type of a GCC
11551 builtin and then its argument prototype would still apply. */
11552 #ifdef __cplusplus
11553 extern "C"
11554 #endif
11555 char acl_set_file ();
11556 int
11557 main ()
11558 {
11559 return acl_set_file ();
11560 ;
11561 return 0;
11562 }
11563 _ACEOF
11564 if ac_fn_c_try_link "$LINENO"; then :
11565 ac_cv_lib_acl_acl_set_file=yes
11566 else
11567 ac_cv_lib_acl_acl_set_file=no
11568 fi
11569 rm -f core conftest.err conftest.$ac_objext \
11570 conftest$ac_exeext conftest.$ac_ext
11571 LIBS=$ac_check_lib_save_LIBS
11572 fi
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_set_file" >&5
11574 $as_echo "$ac_cv_lib_acl_acl_set_file" >&6; }
11575 if test "x$ac_cv_lib_acl_acl_set_file" = x""yes; then :
11576 HAVE_POSIX_ACL=yes
11577 else
11578 HAVE_POSIX_ACL=no
11579 fi
11580
11581 if test "$HAVE_POSIX_ACL" = yes; then
11582
11583 $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11584
11585 LIBACL_LIBS=-lacl
11586 else
11587 ac_fn_c_check_func "$LINENO" "acl_set_file" "ac_cv_func_acl_set_file"
11588 if test "x$ac_cv_func_acl_set_file" = x""yes; then :
11589 HAVE_POSIX_ACL=yes
11590 else
11591 HAVE_POSIX_ACL=no
11592 fi
11593
11594 if test "$HAVE_POSIX_ACL" = yes; then
11595
11596 $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11597
11598 fi
11599 fi
11600 fi
11601
11602
11603 HAVE_XAW3D=no
11604 LUCID_LIBW=
11605 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11606 if test "$with_xaw3d" != no; then
11607 if test "${emacs_cv_xaw3d+set}" = set; then :
11608 $as_echo_n "(cached) " >&6
11609 else
11610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11611 /* end confdefs.h. */
11612
11613 #include <X11/Intrinsic.h>
11614 #include <X11/Xaw3d/Simple.h>
11615 int
11616 main ()
11617 {
11618
11619 ;
11620 return 0;
11621 }
11622 _ACEOF
11623 if ac_fn_c_try_link "$LINENO"; then :
11624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11625 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11626 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11627 $as_echo_n "(cached) " >&6
11628 else
11629 ac_check_lib_save_LIBS=$LIBS
11630 LIBS="-lXaw3d $LIBS"
11631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11632 /* end confdefs.h. */
11633
11634 /* Override any GCC internal prototype to avoid an error.
11635 Use char because int might match the return type of a GCC
11636 builtin and then its argument prototype would still apply. */
11637 #ifdef __cplusplus
11638 extern "C"
11639 #endif
11640 char XawScrollbarSetThumb ();
11641 int
11642 main ()
11643 {
11644 return XawScrollbarSetThumb ();
11645 ;
11646 return 0;
11647 }
11648 _ACEOF
11649 if ac_fn_c_try_link "$LINENO"; then :
11650 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
11651 else
11652 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
11653 fi
11654 rm -f core conftest.err conftest.$ac_objext \
11655 conftest$ac_exeext conftest.$ac_ext
11656 LIBS=$ac_check_lib_save_LIBS
11657 fi
11658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11659 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11660 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11661 emacs_cv_xaw3d=yes
11662 else
11663 emacs_cv_xaw3d=no
11664 fi
11665
11666 else
11667 emacs_cv_xaw3d=no
11668 fi
11669 rm -f core conftest.err conftest.$ac_objext \
11670 conftest$ac_exeext conftest.$ac_ext
11671 fi
11672
11673 else
11674 emacs_cv_xaw3d=no
11675 fi
11676 if test $emacs_cv_xaw3d = yes; then
11677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11678 $as_echo_n "checking for xaw3d... " >&6; }
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11680 $as_echo "yes; using Lucid toolkit" >&6; }
11681 USE_X_TOOLKIT=LUCID
11682 HAVE_XAW3D=yes
11683 LUCID_LIBW=-lXaw3d
11684
11685 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
11686
11687 else
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11689 $as_echo_n "checking for xaw3d... " >&6; }
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691 $as_echo "no" >&6; }
11692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11693 $as_echo_n "checking for libXaw... " >&6; }
11694 if test "${emacs_cv_xaw+set}" = set; then :
11695 $as_echo_n "(cached) " >&6
11696 else
11697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11698 /* end confdefs.h. */
11699
11700 #include <X11/Intrinsic.h>
11701 #include <X11/Xaw/Simple.h>
11702 int
11703 main ()
11704 {
11705
11706 ;
11707 return 0;
11708 }
11709 _ACEOF
11710 if ac_fn_c_try_link "$LINENO"; then :
11711 emacs_cv_xaw=yes
11712 else
11713 emacs_cv_xaw=no
11714 fi
11715 rm -f core conftest.err conftest.$ac_objext \
11716 conftest$ac_exeext conftest.$ac_ext
11717 fi
11718
11719 if test $emacs_cv_xaw = yes; then
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11721 $as_echo "yes; using Lucid toolkit" >&6; }
11722 USE_X_TOOLKIT=LUCID
11723 LUCID_LIBW=-lXaw
11724 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11725 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
11726 else
11727 as_fn_error "No X toolkit could be found.
11728 If you are sure you want Emacs compiled without an X toolkit, pass
11729 --with-x-toolkit=no
11730 to configure. Otherwise, install the development libraries for the toolkit
11731 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
11732 fi
11733 fi
11734 fi
11735
11736 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11737
11738 LIBXTR6=
11739 if test "${USE_X_TOOLKIT}" != "none"; then
11740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11741 $as_echo_n "checking X11 toolkit version... " >&6; }
11742 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
11743 $as_echo_n "(cached) " >&6
11744 else
11745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11746 /* end confdefs.h. */
11747 #include <X11/Intrinsic.h>
11748 int
11749 main ()
11750 {
11751 #if XtSpecificationRelease < 6
11752 fail;
11753 #endif
11754
11755 ;
11756 return 0;
11757 }
11758 _ACEOF
11759 if ac_fn_c_try_link "$LINENO"; then :
11760 emacs_cv_x11_toolkit_version_6=yes
11761 else
11762 emacs_cv_x11_toolkit_version_6=no
11763 fi
11764 rm -f core conftest.err conftest.$ac_objext \
11765 conftest$ac_exeext conftest.$ac_ext
11766 fi
11767
11768 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11769 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11771 $as_echo "6 or newer" >&6; }
11772
11773 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
11774
11775 LIBXTR6="-lSM -lICE"
11776 case "$opsys" in
11777 ## Use libw.a along with X11R6 Xt.
11778 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11779 esac
11780 else
11781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11782 $as_echo "before 6" >&6; }
11783 fi
11784
11785 OLDLIBS="$LIBS"
11786 if test x$HAVE_X11XTR6 = xyes; then
11787 LIBS="-lXt -lSM -lICE $LIBS"
11788 else
11789 LIBS="-lXt $LIBS"
11790 fi
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11792 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11793 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11794 $as_echo_n "(cached) " >&6
11795 else
11796 ac_check_lib_save_LIBS=$LIBS
11797 LIBS="-lXmu $LIBS"
11798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799 /* end confdefs.h. */
11800
11801 /* Override any GCC internal prototype to avoid an error.
11802 Use char because int might match the return type of a GCC
11803 builtin and then its argument prototype would still apply. */
11804 #ifdef __cplusplus
11805 extern "C"
11806 #endif
11807 char XmuConvertStandardSelection ();
11808 int
11809 main ()
11810 {
11811 return XmuConvertStandardSelection ();
11812 ;
11813 return 0;
11814 }
11815 _ACEOF
11816 if ac_fn_c_try_link "$LINENO"; then :
11817 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11818 else
11819 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11820 fi
11821 rm -f core conftest.err conftest.$ac_objext \
11822 conftest$ac_exeext conftest.$ac_ext
11823 LIBS=$ac_check_lib_save_LIBS
11824 fi
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11826 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11827 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11828 cat >>confdefs.h <<_ACEOF
11829 #define HAVE_LIBXMU 1
11830 _ACEOF
11831
11832 LIBS="-lXmu $LIBS"
11833
11834 fi
11835
11836 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11837 fi
11838
11839
11840 LIBXMU=-lXmu
11841 case $opsys in
11842 ## These systems don't supply Xmu.
11843 hpux* | aix4-2 )
11844 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11845 ;;
11846 esac
11847
11848
11849 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11850 if test "${HAVE_X11}" = "yes"; then
11851 if test "${USE_X_TOOLKIT}" != "none"; then
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11853 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11854 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
11855 $as_echo_n "(cached) " >&6
11856 else
11857 ac_check_lib_save_LIBS=$LIBS
11858 LIBS="-lXext $LIBS"
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860 /* end confdefs.h. */
11861
11862 /* Override any GCC internal prototype to avoid an error.
11863 Use char because int might match the return type of a GCC
11864 builtin and then its argument prototype would still apply. */
11865 #ifdef __cplusplus
11866 extern "C"
11867 #endif
11868 char XShapeQueryExtension ();
11869 int
11870 main ()
11871 {
11872 return XShapeQueryExtension ();
11873 ;
11874 return 0;
11875 }
11876 _ACEOF
11877 if ac_fn_c_try_link "$LINENO"; then :
11878 ac_cv_lib_Xext_XShapeQueryExtension=yes
11879 else
11880 ac_cv_lib_Xext_XShapeQueryExtension=no
11881 fi
11882 rm -f core conftest.err conftest.$ac_objext \
11883 conftest$ac_exeext conftest.$ac_ext
11884 LIBS=$ac_check_lib_save_LIBS
11885 fi
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11887 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11888 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11889 cat >>confdefs.h <<_ACEOF
11890 #define HAVE_LIBXEXT 1
11891 _ACEOF
11892
11893 LIBS="-lXext $LIBS"
11894
11895 fi
11896
11897 fi
11898 fi
11899
11900 LIBXP=
11901 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11902 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11903 if test -d /usr/include/openmotif; then
11904 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11905 emacs_cv_openmotif=yes
11906 case "$canonical" in
11907 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11908 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11909 ;;
11910 *)
11911 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11912 esac
11913 else
11914 emacs_cv_openmotif=no
11915 fi
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11917 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
11918 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
11919 $as_echo_n "(cached) " >&6
11920 else
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922 /* end confdefs.h. */
11923 #include <Xm/Xm.h>
11924 int
11925 main ()
11926 {
11927 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11928 int x = 5;
11929 #else
11930 Motif version prior to 2.1.
11931 #endif
11932 ;
11933 return 0;
11934 }
11935 _ACEOF
11936 if ac_fn_c_try_compile "$LINENO"; then :
11937 emacs_cv_motif_version_2_1=yes
11938 else
11939 emacs_cv_motif_version_2_1=no
11940 fi
11941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11942 fi
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11944 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
11945 if test $emacs_cv_motif_version_2_1 = yes; then
11946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11947 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
11948 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
11949 $as_echo_n "(cached) " >&6
11950 else
11951 ac_check_lib_save_LIBS=$LIBS
11952 LIBS="-lXp $LIBS"
11953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954 /* end confdefs.h. */
11955
11956 /* Override any GCC internal prototype to avoid an error.
11957 Use char because int might match the return type of a GCC
11958 builtin and then its argument prototype would still apply. */
11959 #ifdef __cplusplus
11960 extern "C"
11961 #endif
11962 char XpCreateContext ();
11963 int
11964 main ()
11965 {
11966 return XpCreateContext ();
11967 ;
11968 return 0;
11969 }
11970 _ACEOF
11971 if ac_fn_c_try_link "$LINENO"; then :
11972 ac_cv_lib_Xp_XpCreateContext=yes
11973 else
11974 ac_cv_lib_Xp_XpCreateContext=no
11975 fi
11976 rm -f core conftest.err conftest.$ac_objext \
11977 conftest$ac_exeext conftest.$ac_ext
11978 LIBS=$ac_check_lib_save_LIBS
11979 fi
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
11981 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
11982 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
11983 LIBXP=-lXp
11984 fi
11985
11986 if test x$emacs_cv_openmotif = xyes; then
11987 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
11988 fi
11989 else
11990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
11991 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
11992 if test "${emacs_cv_lesstif+set}" = set; then :
11993 $as_echo_n "(cached) " >&6
11994 else
11995 # We put this in CFLAGS temporarily to precede other -I options
11996 # that might be in CFLAGS temporarily.
11997 # We put this in CPPFLAGS where it precedes the other -I options.
11998 OLD_CPPFLAGS=$CPPFLAGS
11999 OLD_CFLAGS=$CFLAGS
12000 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12001 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12003 /* end confdefs.h. */
12004 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12005 int
12006 main ()
12007 {
12008 int x = 5;
12009 ;
12010 return 0;
12011 }
12012 _ACEOF
12013 if ac_fn_c_try_compile "$LINENO"; then :
12014 emacs_cv_lesstif=yes
12015 else
12016 emacs_cv_lesstif=no
12017 fi
12018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12019 fi
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12021 $as_echo "$emacs_cv_lesstif" >&6; }
12022 if test $emacs_cv_lesstif = yes; then
12023 # Make sure this -I option remains in CPPFLAGS after it is set
12024 # back to REAL_CPPFLAGS.
12025 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12026 # have those other -I options anyway. Ultimately, having this
12027 # directory ultimately in CPPFLAGS will be enough.
12028 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12029 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12030 else
12031 CFLAGS=$OLD_CFLAGS
12032 CPPFLAGS=$OLD_CPPFLAGS
12033 fi
12034 fi
12035 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12036 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12037
12038 else
12039 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12040 fi
12041
12042
12043 fi
12044
12045
12046 USE_TOOLKIT_SCROLL_BARS=no
12047 if test "${with_toolkit_scroll_bars}" != "no"; then
12048 if test "${USE_X_TOOLKIT}" != "none"; then
12049 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12050 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12051
12052 HAVE_XAW3D=no
12053 USE_TOOLKIT_SCROLL_BARS=yes
12054 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12055 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12056
12057 USE_TOOLKIT_SCROLL_BARS=yes
12058 fi
12059 elif test "${HAVE_GTK}" = "yes"; then
12060 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12061
12062 USE_TOOLKIT_SCROLL_BARS=yes
12063 elif test "${HAVE_NS}" = "yes"; then
12064 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12065
12066 USE_TOOLKIT_SCROLL_BARS=yes
12067 elif test "${HAVE_W32}" = "yes"; then
12068 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12069
12070 USE_TOOLKIT_SCROLL_BARS=yes
12071 fi
12072 fi
12073
12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12075 /* end confdefs.h. */
12076
12077 #include <X11/Xlib.h>
12078 #include <X11/Xresource.h>
12079 int
12080 main ()
12081 {
12082 XIMProc callback;
12083 ;
12084 return 0;
12085 }
12086 _ACEOF
12087 if ac_fn_c_try_compile "$LINENO"; then :
12088 HAVE_XIM=yes
12089
12090 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12091
12092 else
12093 HAVE_XIM=no
12094 fi
12095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12096
12097
12098 if test "${with_xim}" != "no"; then
12099
12100 $as_echo "#define USE_XIM 1" >>confdefs.h
12101
12102 fi
12103
12104
12105 if test "${HAVE_XIM}" != "no"; then
12106 late_CFLAGS=$CFLAGS
12107 if test "$GCC" = yes; then
12108 CFLAGS="$CFLAGS --pedantic-errors"
12109 fi
12110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12111 /* end confdefs.h. */
12112
12113 #include <X11/Xlib.h>
12114 #include <X11/Xresource.h>
12115 int
12116 main ()
12117 {
12118 Display *display;
12119 XrmDatabase db;
12120 char *res_name;
12121 char *res_class;
12122 XIMProc callback;
12123 XPointer *client_data;
12124 #ifndef __GNUC__
12125 /* If we're not using GCC, it's probably not XFree86, and this is
12126 probably right, but we can't use something like --pedantic-errors. */
12127 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12128 char*, XIMProc, XPointer*);
12129 #endif
12130 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12131 client_data);
12132 ;
12133 return 0;
12134 }
12135 _ACEOF
12136 if ac_fn_c_try_compile "$LINENO"; then :
12137 emacs_cv_arg6_star=yes
12138 fi
12139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12140 if test "$emacs_cv_arg6_star" = yes; then
12141 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12142
12143 else
12144 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
12145
12146 fi
12147 CFLAGS=$late_CFLAGS
12148 fi
12149
12150 ### Start of font-backend (under any platform) section.
12151 # (nothing here yet -- this is a placeholder)
12152 ### End of font-backend (under any platform) section.
12153
12154 ### Start of font-backend (under X11) section.
12155 if test "${HAVE_X11}" = "yes"; then
12156
12157 succeeded=no
12158
12159 if test "$PKG_CONFIG" = "no" ; then
12160 HAVE_FC=no
12161 else
12162 PKG_CONFIG_MIN_VERSION=0.9.0
12163 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12165 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12166
12167 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12168 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12169 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
12170 edit_cflags="
12171 s,///*,/,g
12172 s/^/ /
12173 s/ -I/ $isystem/g
12174 s/^ //
12175 "
12176 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12177 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12179 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12180 succeeded=yes
12181 else
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12183 $as_echo "no" >&6; }
12184 FONTCONFIG_CFLAGS=""
12185 FONTCONFIG_LIBS=""
12186 ## If we have a custom action on failure, don't print errors, but
12187 ## do set a variable so people can do so. Do it in a subshell
12188 ## to capture any diagnostics in invoking pkg-config.
12189 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
12190
12191 fi
12192
12193
12194
12195 else
12196 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12197 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12198 fi
12199 fi
12200
12201 if test $succeeded = yes; then
12202 HAVE_FC=yes
12203 else
12204 HAVE_FC=no
12205 fi
12206
12207
12208 ## Use -lXft if available, unless `--with-xft=no'.
12209 HAVE_XFT=maybe
12210 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12211 with_xft="no";
12212 fi
12213 if test "x${with_xft}" != "xno"; then
12214
12215
12216 succeeded=no
12217
12218 if test "$PKG_CONFIG" = "no" ; then
12219 HAVE_XFT=no
12220 else
12221 PKG_CONFIG_MIN_VERSION=0.9.0
12222 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12224 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12225
12226 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12227 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12228 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
12229 edit_cflags="
12230 s,///*,/,g
12231 s/^/ /
12232 s/ -I/ $isystem/g
12233 s/^ //
12234 "
12235 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12236 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12238 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12239 succeeded=yes
12240 else
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12242 $as_echo "no" >&6; }
12243 XFT_CFLAGS=""
12244 XFT_LIBS=""
12245 ## If we have a custom action on failure, don't print errors, but
12246 ## do set a variable so people can do so. Do it in a subshell
12247 ## to capture any diagnostics in invoking pkg-config.
12248 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
12249
12250 fi
12251
12252
12253
12254 else
12255 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12256 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12257 fi
12258 fi
12259
12260 if test $succeeded = yes; then
12261 :
12262 else
12263 HAVE_XFT=no
12264 fi
12265
12266 ## Because xftfont.c uses XRenderQueryExtension, we also
12267 ## need to link to -lXrender.
12268 HAVE_XRENDER=no
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12270 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12271 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12272 $as_echo_n "(cached) " >&6
12273 else
12274 ac_check_lib_save_LIBS=$LIBS
12275 LIBS="-lXrender $LIBS"
12276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12277 /* end confdefs.h. */
12278
12279 /* Override any GCC internal prototype to avoid an error.
12280 Use char because int might match the return type of a GCC
12281 builtin and then its argument prototype would still apply. */
12282 #ifdef __cplusplus
12283 extern "C"
12284 #endif
12285 char XRenderQueryExtension ();
12286 int
12287 main ()
12288 {
12289 return XRenderQueryExtension ();
12290 ;
12291 return 0;
12292 }
12293 _ACEOF
12294 if ac_fn_c_try_link "$LINENO"; then :
12295 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12296 else
12297 ac_cv_lib_Xrender_XRenderQueryExtension=no
12298 fi
12299 rm -f core conftest.err conftest.$ac_objext \
12300 conftest$ac_exeext conftest.$ac_ext
12301 LIBS=$ac_check_lib_save_LIBS
12302 fi
12303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12304 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12305 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12306 HAVE_XRENDER=yes
12307 fi
12308
12309 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12310 OLD_CPPFLAGS="$CPPFLAGS"
12311 OLD_CFLAGS="$CFLAGS"
12312 OLD_LIBS="$LIBS"
12313 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12314 CFLAGS="$CFLAGS $XFT_CFLAGS"
12315 XFT_LIBS="-lXrender $XFT_LIBS"
12316 LIBS="$XFT_LIBS $LIBS"
12317 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12318 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12320 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12321 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12322 $as_echo_n "(cached) " >&6
12323 else
12324 ac_check_lib_save_LIBS=$LIBS
12325 LIBS="-lXft $XFT_LIBS $LIBS"
12326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12327 /* end confdefs.h. */
12328
12329 /* Override any GCC internal prototype to avoid an error.
12330 Use char because int might match the return type of a GCC
12331 builtin and then its argument prototype would still apply. */
12332 #ifdef __cplusplus
12333 extern "C"
12334 #endif
12335 char XftFontOpen ();
12336 int
12337 main ()
12338 {
12339 return XftFontOpen ();
12340 ;
12341 return 0;
12342 }
12343 _ACEOF
12344 if ac_fn_c_try_link "$LINENO"; then :
12345 ac_cv_lib_Xft_XftFontOpen=yes
12346 else
12347 ac_cv_lib_Xft_XftFontOpen=no
12348 fi
12349 rm -f core conftest.err conftest.$ac_objext \
12350 conftest$ac_exeext conftest.$ac_ext
12351 LIBS=$ac_check_lib_save_LIBS
12352 fi
12353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12354 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12355 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12356 HAVE_XFT=yes
12357 fi
12358
12359 fi
12360
12361
12362
12363 if test "${HAVE_XFT}" = "yes"; then
12364
12365 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12366
12367
12368 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12369 else
12370 CPPFLAGS="$OLD_CPPFLAGS"
12371 CFLAGS="$OLD_CFLAGS"
12372 LIBS="$OLD_LIBS"
12373 fi # "${HAVE_XFT}" = "yes"
12374 fi # "$HAVE_XFT" != no
12375 fi # "x${with_xft}" != "xno"
12376
12377 ## We used to allow building with FreeType and without Xft.
12378 ## However, the ftx font backend driver is not in good shape.
12379 if test "$HAVE_XFT" != "yes"; then
12380 HAVE_XFT=no
12381 HAVE_FREETYPE=no
12382 else
12383
12384 succeeded=no
12385
12386 if test "$PKG_CONFIG" = "no" ; then
12387 HAVE_FREETYPE=no
12388 else
12389 PKG_CONFIG_MIN_VERSION=0.9.0
12390 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12392 $as_echo_n "checking for freetype2... " >&6; }
12393
12394 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12395 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12396 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
12397 edit_cflags="
12398 s,///*,/,g
12399 s/^/ /
12400 s/ -I/ $isystem/g
12401 s/^ //
12402 "
12403 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12404 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12406 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12407 succeeded=yes
12408 else
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12410 $as_echo "no" >&6; }
12411 FREETYPE_CFLAGS=""
12412 FREETYPE_LIBS=""
12413 ## If we have a custom action on failure, don't print errors, but
12414 ## do set a variable so people can do so. Do it in a subshell
12415 ## to capture any diagnostics in invoking pkg-config.
12416 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
12417
12418 fi
12419
12420
12421
12422 else
12423 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12424 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12425 fi
12426 fi
12427
12428 if test $succeeded = yes; then
12429 HAVE_FREETYPE=yes
12430 else
12431 HAVE_FREETYPE=no
12432 fi
12433
12434
12435 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12436 fi
12437
12438 HAVE_LIBOTF=no
12439 if test "${HAVE_FREETYPE}" = "yes"; then
12440
12441 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12442
12443 if test "${with_libotf}" != "no"; then
12444
12445 succeeded=no
12446
12447 if test "$PKG_CONFIG" = "no" ; then
12448 HAVE_LIBOTF=no
12449 else
12450 PKG_CONFIG_MIN_VERSION=0.9.0
12451 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12453 $as_echo_n "checking for libotf... " >&6; }
12454
12455 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12456 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12457 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
12458 edit_cflags="
12459 s,///*,/,g
12460 s/^/ /
12461 s/ -I/ $isystem/g
12462 s/^ //
12463 "
12464 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12465 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12467 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12468 succeeded=yes
12469 else
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12471 $as_echo "no" >&6; }
12472 LIBOTF_CFLAGS=""
12473 LIBOTF_LIBS=""
12474 ## If we have a custom action on failure, don't print errors, but
12475 ## do set a variable so people can do so. Do it in a subshell
12476 ## to capture any diagnostics in invoking pkg-config.
12477 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
12478
12479 fi
12480
12481
12482
12483 else
12484 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12485 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12486 fi
12487 fi
12488
12489 if test $succeeded = yes; then
12490 HAVE_LIBOTF=yes
12491 else
12492 HAVE_LIBOTF=no
12493 fi
12494
12495 if test "$HAVE_LIBOTF" = "yes"; then
12496
12497 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
12498
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12500 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12501 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
12502 $as_echo_n "(cached) " >&6
12503 else
12504 ac_check_lib_save_LIBS=$LIBS
12505 LIBS="-lotf $LIBS"
12506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507 /* end confdefs.h. */
12508
12509 /* Override any GCC internal prototype to avoid an error.
12510 Use char because int might match the return type of a GCC
12511 builtin and then its argument prototype would still apply. */
12512 #ifdef __cplusplus
12513 extern "C"
12514 #endif
12515 char OTF_get_variation_glyphs ();
12516 int
12517 main ()
12518 {
12519 return OTF_get_variation_glyphs ();
12520 ;
12521 return 0;
12522 }
12523 _ACEOF
12524 if ac_fn_c_try_link "$LINENO"; then :
12525 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
12526 else
12527 ac_cv_lib_otf_OTF_get_variation_glyphs=no
12528 fi
12529 rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext conftest.$ac_ext
12531 LIBS=$ac_check_lib_save_LIBS
12532 fi
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12534 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12535 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12536 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12537 else
12538 HAVE_OTF_GET_VARIATION_GLYPHS=no
12539 fi
12540
12541 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12542
12543 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12544
12545 fi
12546 fi
12547 fi
12548 fi
12549
12550 HAVE_M17N_FLT=no
12551 if test "${HAVE_LIBOTF}" = yes; then
12552 if test "${with_m17n_flt}" != "no"; then
12553
12554 succeeded=no
12555
12556 if test "$PKG_CONFIG" = "no" ; then
12557 HAVE_M17N_FLT=no
12558 else
12559 PKG_CONFIG_MIN_VERSION=0.9.0
12560 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12562 $as_echo_n "checking for m17n-flt... " >&6; }
12563
12564 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
12565 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
12566 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
12567 edit_cflags="
12568 s,///*,/,g
12569 s/^/ /
12570 s/ -I/ $isystem/g
12571 s/^ //
12572 "
12573 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12574 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12576 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12577 succeeded=yes
12578 else
12579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580 $as_echo "no" >&6; }
12581 M17N_FLT_CFLAGS=""
12582 M17N_FLT_LIBS=""
12583 ## If we have a custom action on failure, don't print errors, but
12584 ## do set a variable so people can do so. Do it in a subshell
12585 ## to capture any diagnostics in invoking pkg-config.
12586 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
12587
12588 fi
12589
12590
12591
12592 else
12593 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12594 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12595 fi
12596 fi
12597
12598 if test $succeeded = yes; then
12599 HAVE_M17N_FLT=yes
12600 else
12601 HAVE_M17N_FLT=no
12602 fi
12603
12604 if test "$HAVE_M17N_FLT" = "yes"; then
12605
12606 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12607
12608 fi
12609 fi
12610 fi
12611 else
12612 HAVE_XFT=no
12613 HAVE_FREETYPE=no
12614 HAVE_LIBOTF=no
12615 HAVE_M17N_FLT=no
12616 fi
12617
12618 ### End of font-backend (under X11) section.
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629 ### Use -lXpm if available, unless `--with-xpm=no'.
12630 HAVE_XPM=no
12631 LIBXPM=
12632
12633 if test "${HAVE_W32}" = "yes"; then
12634 if test "${with_xpm}" != "no"; then
12635 SAVE_CPPFLAGS="$CPPFLAGS"
12636 SAVE_LDFLAGS="$LDFLAGS"
12637 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
12638 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
12639 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12640 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
12642 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
12643 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
12644 $as_echo_n "(cached) " >&6
12645 else
12646 ac_check_lib_save_LIBS=$LIBS
12647 LIBS="-lXpm $LIBS"
12648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12649 /* end confdefs.h. */
12650
12651 /* Override any GCC internal prototype to avoid an error.
12652 Use char because int might match the return type of a GCC
12653 builtin and then its argument prototype would still apply. */
12654 #ifdef __cplusplus
12655 extern "C"
12656 #endif
12657 char XpmReadFileToImage ();
12658 int
12659 main ()
12660 {
12661 return XpmReadFileToImage ();
12662 ;
12663 return 0;
12664 }
12665 _ACEOF
12666 if ac_fn_c_try_link "$LINENO"; then :
12667 ac_cv_lib_Xpm_XpmReadFileToImage=yes
12668 else
12669 ac_cv_lib_Xpm_XpmReadFileToImage=no
12670 fi
12671 rm -f core conftest.err conftest.$ac_objext \
12672 conftest$ac_exeext conftest.$ac_ext
12673 LIBS=$ac_check_lib_save_LIBS
12674 fi
12675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
12676 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
12677 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
12678 HAVE_XPM=yes
12679 fi
12680
12681 fi
12682
12683
12684 if test "${HAVE_XPM}" = "yes"; then
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12686 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12688 /* end confdefs.h. */
12689 #include "X11/xpm.h"
12690 #ifndef XpmReturnAllocPixels
12691 no_return_alloc_pixels
12692 #endif
12693
12694 _ACEOF
12695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12696 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12697 HAVE_XPM=no
12698 else
12699 HAVE_XPM=yes
12700 fi
12701 rm -f conftest*
12702
12703
12704 if test "${HAVE_XPM}" = "yes"; then
12705 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
12706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12707 $as_echo "yes" >&6; }
12708 else
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12710 $as_echo "no" >&6; }
12711 CPPFLAGS="$SAVE_CPPFLAGS"
12712 LDFLAGS="$SAVE_LDFLAGS"
12713 fi
12714 fi
12715 fi
12716
12717 if test "${HAVE_XPM}" = "yes"; then
12718
12719 $as_echo "#define HAVE_XPM 1" >>confdefs.h
12720
12721 LIBXPM=-lXpm
12722 fi
12723 fi
12724
12725 if test "${HAVE_X11}" = "yes"; then
12726 if test "${with_xpm}" != "no"; then
12727 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12728 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12730 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12731 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
12732 $as_echo_n "(cached) " >&6
12733 else
12734 ac_check_lib_save_LIBS=$LIBS
12735 LIBS="-lXpm -lX11 $LIBS"
12736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12737 /* end confdefs.h. */
12738
12739 /* Override any GCC internal prototype to avoid an error.
12740 Use char because int might match the return type of a GCC
12741 builtin and then its argument prototype would still apply. */
12742 #ifdef __cplusplus
12743 extern "C"
12744 #endif
12745 char XpmReadFileToPixmap ();
12746 int
12747 main ()
12748 {
12749 return XpmReadFileToPixmap ();
12750 ;
12751 return 0;
12752 }
12753 _ACEOF
12754 if ac_fn_c_try_link "$LINENO"; then :
12755 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
12756 else
12757 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
12758 fi
12759 rm -f core conftest.err conftest.$ac_objext \
12760 conftest$ac_exeext conftest.$ac_ext
12761 LIBS=$ac_check_lib_save_LIBS
12762 fi
12763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12764 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12765 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12766 HAVE_XPM=yes
12767 fi
12768
12769 fi
12770
12771
12772 if test "${HAVE_XPM}" = "yes"; then
12773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12774 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776 /* end confdefs.h. */
12777 #include "X11/xpm.h"
12778 #ifndef XpmReturnAllocPixels
12779 no_return_alloc_pixels
12780 #endif
12781
12782 _ACEOF
12783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12784 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12785 HAVE_XPM=no
12786 else
12787 HAVE_XPM=yes
12788 fi
12789 rm -f conftest*
12790
12791
12792 if test "${HAVE_XPM}" = "yes"; then
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12794 $as_echo "yes" >&6; }
12795 else
12796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12797 $as_echo "no" >&6; }
12798 fi
12799 fi
12800 fi
12801
12802 if test "${HAVE_XPM}" = "yes"; then
12803
12804 $as_echo "#define HAVE_XPM 1" >>confdefs.h
12805
12806 LIBXPM=-lXpm
12807 fi
12808 fi
12809
12810
12811
12812 ### Use -ljpeg if available, unless `--with-jpeg=no'.
12813 HAVE_JPEG=no
12814 LIBJPEG=
12815 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
12816 if test "${with_jpeg}" != "no"; then
12817 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12818 if test "x$ac_cv_header_jerror_h" = x""yes; then :
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12820 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12821 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
12822 $as_echo_n "(cached) " >&6
12823 else
12824 ac_check_lib_save_LIBS=$LIBS
12825 LIBS="-ljpeg $LIBS"
12826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12827 /* end confdefs.h. */
12828
12829 /* Override any GCC internal prototype to avoid an error.
12830 Use char because int might match the return type of a GCC
12831 builtin and then its argument prototype would still apply. */
12832 #ifdef __cplusplus
12833 extern "C"
12834 #endif
12835 char jpeg_destroy_compress ();
12836 int
12837 main ()
12838 {
12839 return jpeg_destroy_compress ();
12840 ;
12841 return 0;
12842 }
12843 _ACEOF
12844 if ac_fn_c_try_link "$LINENO"; then :
12845 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
12846 else
12847 ac_cv_lib_jpeg_jpeg_destroy_compress=no
12848 fi
12849 rm -f core conftest.err conftest.$ac_objext \
12850 conftest$ac_exeext conftest.$ac_ext
12851 LIBS=$ac_check_lib_save_LIBS
12852 fi
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12854 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12855 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12856 HAVE_JPEG=yes
12857 fi
12858
12859 fi
12860
12861
12862 fi
12863
12864 if test "${HAVE_JPEG}" = "yes"; then
12865 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12866
12867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12868 /* end confdefs.h. */
12869 #include <jpeglib.h>
12870 version=JPEG_LIB_VERSION
12871
12872 _ACEOF
12873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12874 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12875 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12876
12877 else
12878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12879 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12880 HAVE_JPEG=no
12881 fi
12882 rm -f conftest*
12883
12884 fi
12885 if test "${HAVE_JPEG}" = "yes"; then
12886 LIBJPEG=-ljpeg
12887 fi
12888 fi
12889
12890
12891 ### Use -lpng if available, unless `--with-png=no'.
12892 HAVE_PNG=no
12893 LIBPNG=
12894 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
12895 if test "${with_png}" != "no"; then
12896 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12897 # in /usr/include/libpng.
12898 for ac_header in png.h libpng/png.h
12899 do :
12900 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12901 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12902 eval as_val=\$$as_ac_Header
12903 if test "x$as_val" = x""yes; then :
12904 cat >>confdefs.h <<_ACEOF
12905 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12906 _ACEOF
12907 break
12908 fi
12909
12910 done
12911
12912 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12914 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12915 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12916 $as_echo_n "(cached) " >&6
12917 else
12918 ac_check_lib_save_LIBS=$LIBS
12919 LIBS="-lpng -lz -lm $LIBS"
12920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12921 /* end confdefs.h. */
12922
12923 /* Override any GCC internal prototype to avoid an error.
12924 Use char because int might match the return type of a GCC
12925 builtin and then its argument prototype would still apply. */
12926 #ifdef __cplusplus
12927 extern "C"
12928 #endif
12929 char png_get_channels ();
12930 int
12931 main ()
12932 {
12933 return png_get_channels ();
12934 ;
12935 return 0;
12936 }
12937 _ACEOF
12938 if ac_fn_c_try_link "$LINENO"; then :
12939 ac_cv_lib_png_png_get_channels=yes
12940 else
12941 ac_cv_lib_png_png_get_channels=no
12942 fi
12943 rm -f core conftest.err conftest.$ac_objext \
12944 conftest$ac_exeext conftest.$ac_ext
12945 LIBS=$ac_check_lib_save_LIBS
12946 fi
12947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12948 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
12949 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
12950 HAVE_PNG=yes
12951 fi
12952
12953 fi
12954 fi
12955
12956 if test "${HAVE_PNG}" = "yes"; then
12957
12958 $as_echo "#define HAVE_PNG 1" >>confdefs.h
12959
12960 LIBPNG="-lpng -lz -lm"
12961
12962 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
12963 # include <libpng/png.h>
12964 #else
12965 # include <png.h>
12966 #endif
12967
12968 "
12969 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
12970
12971 else
12972
12973 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
12974
12975 fi
12976
12977 fi
12978 fi
12979
12980
12981 ### Use -ltiff if available, unless `--with-tiff=no'.
12982 HAVE_TIFF=no
12983 LIBTIFF=
12984 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
12985 if test "${with_tiff}" != "no"; then
12986 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
12987 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
12988 tifflibs="-lz -lm"
12989 # At least one tiff package requires the jpeg library.
12990 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
12991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
12992 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
12993 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
12994 $as_echo_n "(cached) " >&6
12995 else
12996 ac_check_lib_save_LIBS=$LIBS
12997 LIBS="-ltiff $tifflibs $LIBS"
12998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12999 /* end confdefs.h. */
13000
13001 /* Override any GCC internal prototype to avoid an error.
13002 Use char because int might match the return type of a GCC
13003 builtin and then its argument prototype would still apply. */
13004 #ifdef __cplusplus
13005 extern "C"
13006 #endif
13007 char TIFFGetVersion ();
13008 int
13009 main ()
13010 {
13011 return TIFFGetVersion ();
13012 ;
13013 return 0;
13014 }
13015 _ACEOF
13016 if ac_fn_c_try_link "$LINENO"; then :
13017 ac_cv_lib_tiff_TIFFGetVersion=yes
13018 else
13019 ac_cv_lib_tiff_TIFFGetVersion=no
13020 fi
13021 rm -f core conftest.err conftest.$ac_objext \
13022 conftest$ac_exeext conftest.$ac_ext
13023 LIBS=$ac_check_lib_save_LIBS
13024 fi
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13026 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13027 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13028 HAVE_TIFF=yes
13029 fi
13030
13031 fi
13032
13033
13034 fi
13035
13036 if test "${HAVE_TIFF}" = "yes"; then
13037
13038 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13039
13040 LIBTIFF=-ltiff
13041 fi
13042 fi
13043
13044
13045 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
13046 HAVE_GIF=no
13047 LIBGIF=
13048 if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13049 || test "${HAVE_W32}" = "yes"; then
13050 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13051 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13052 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13053 # Earlier versions can crash Emacs.
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13055 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13056 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
13057 $as_echo_n "(cached) " >&6
13058 else
13059 ac_check_lib_save_LIBS=$LIBS
13060 LIBS="-lgif $LIBS"
13061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13062 /* end confdefs.h. */
13063
13064 /* Override any GCC internal prototype to avoid an error.
13065 Use char because int might match the return type of a GCC
13066 builtin and then its argument prototype would still apply. */
13067 #ifdef __cplusplus
13068 extern "C"
13069 #endif
13070 char EGifPutExtensionLast ();
13071 int
13072 main ()
13073 {
13074 return EGifPutExtensionLast ();
13075 ;
13076 return 0;
13077 }
13078 _ACEOF
13079 if ac_fn_c_try_link "$LINENO"; then :
13080 ac_cv_lib_gif_EGifPutExtensionLast=yes
13081 else
13082 ac_cv_lib_gif_EGifPutExtensionLast=no
13083 fi
13084 rm -f core conftest.err conftest.$ac_objext \
13085 conftest$ac_exeext conftest.$ac_ext
13086 LIBS=$ac_check_lib_save_LIBS
13087 fi
13088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13089 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13090 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13091 HAVE_GIF=yes
13092 else
13093 HAVE_GIF=maybe
13094 fi
13095
13096 fi
13097
13098
13099
13100 if test "$HAVE_GIF" = yes; then
13101 LIBGIF=-lgif
13102 elif test "$HAVE_GIF" = maybe; then
13103 # If gif_lib.h but no libgif, try libungif.
13104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13105 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13106 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
13107 $as_echo_n "(cached) " >&6
13108 else
13109 ac_check_lib_save_LIBS=$LIBS
13110 LIBS="-lungif $LIBS"
13111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112 /* end confdefs.h. */
13113
13114 /* Override any GCC internal prototype to avoid an error.
13115 Use char because int might match the return type of a GCC
13116 builtin and then its argument prototype would still apply. */
13117 #ifdef __cplusplus
13118 extern "C"
13119 #endif
13120 char EGifPutExtensionLast ();
13121 int
13122 main ()
13123 {
13124 return EGifPutExtensionLast ();
13125 ;
13126 return 0;
13127 }
13128 _ACEOF
13129 if ac_fn_c_try_link "$LINENO"; then :
13130 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13131 else
13132 ac_cv_lib_ungif_EGifPutExtensionLast=no
13133 fi
13134 rm -f core conftest.err conftest.$ac_objext \
13135 conftest$ac_exeext conftest.$ac_ext
13136 LIBS=$ac_check_lib_save_LIBS
13137 fi
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13139 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13140 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13141 HAVE_GIF=yes
13142 else
13143 HAVE_GIF=no
13144 fi
13145
13146 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13147 fi
13148
13149 if test "${HAVE_GIF}" = "yes"; then
13150
13151 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13152
13153 fi
13154 fi
13155
13156
13157 if test "${HAVE_X11}" = "yes"; then
13158 MISSING=""
13159 WITH_NO=""
13160 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13161 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13162 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13163 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13164 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13165 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13166 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13167 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13168 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13169 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13170
13171 if test "X${MISSING}" != X; then
13172 as_fn_error "The following required libraries were not found:
13173 $MISSING
13174 Maybe some development libraries/packages are missing?
13175 If you don't want to link with them give
13176 $WITH_NO
13177 as options to configure" "$LINENO" 5
13178 fi
13179 fi
13180
13181 ### Use -lgpm if available, unless `--with-gpm=no'.
13182 HAVE_GPM=no
13183 LIBGPM=
13184 if test "${with_gpm}" != "no"; then
13185 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13186 if test "x$ac_cv_header_gpm_h" = x""yes; then :
13187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13188 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13189 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
13190 $as_echo_n "(cached) " >&6
13191 else
13192 ac_check_lib_save_LIBS=$LIBS
13193 LIBS="-lgpm $LIBS"
13194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13195 /* end confdefs.h. */
13196
13197 /* Override any GCC internal prototype to avoid an error.
13198 Use char because int might match the return type of a GCC
13199 builtin and then its argument prototype would still apply. */
13200 #ifdef __cplusplus
13201 extern "C"
13202 #endif
13203 char Gpm_Open ();
13204 int
13205 main ()
13206 {
13207 return Gpm_Open ();
13208 ;
13209 return 0;
13210 }
13211 _ACEOF
13212 if ac_fn_c_try_link "$LINENO"; then :
13213 ac_cv_lib_gpm_Gpm_Open=yes
13214 else
13215 ac_cv_lib_gpm_Gpm_Open=no
13216 fi
13217 rm -f core conftest.err conftest.$ac_objext \
13218 conftest$ac_exeext conftest.$ac_ext
13219 LIBS=$ac_check_lib_save_LIBS
13220 fi
13221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13222 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13223 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13224 HAVE_GPM=yes
13225 fi
13226
13227 fi
13228
13229
13230
13231 if test "${HAVE_GPM}" = "yes"; then
13232
13233 $as_echo "#define HAVE_GPM 1" >>confdefs.h
13234
13235 LIBGPM=-lgpm
13236 fi
13237 fi
13238
13239
13240
13241
13242
13243
13244 GNUSTEP_CFLAGS=
13245 ### Use NeXTstep API to implement GUI.
13246 if test "${HAVE_NS}" = "yes"; then
13247
13248 $as_echo "#define HAVE_NS 1" >>confdefs.h
13249
13250 if test "${NS_IMPL_COCOA}" = "yes"; then
13251
13252 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
13253
13254 fi
13255 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
13256
13257 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13258
13259 # See also .m.o rule in Makefile.in */
13260 # FIXME: are all these flags really needed? Document here why. */
13261 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13262 ## Extra CFLAGS applied to src/*.m files.
13263 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"
13264 fi
13265 # We also have mouse menus.
13266 HAVE_MENUS=yes
13267 OTHER_FILES=ns-app
13268 fi
13269
13270 if test "${HAVE_W32}" = "yes"; then
13271 HAVE_MENUS=yes
13272 fi
13273
13274 ### Use session management (-lSM -lICE) if available
13275 HAVE_X_SM=no
13276 LIBXSM=
13277 if test "${HAVE_X11}" = "yes"; then
13278 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13279 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13281 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13282 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
13283 $as_echo_n "(cached) " >&6
13284 else
13285 ac_check_lib_save_LIBS=$LIBS
13286 LIBS="-lSM -lICE $LIBS"
13287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13288 /* end confdefs.h. */
13289
13290 /* Override any GCC internal prototype to avoid an error.
13291 Use char because int might match the return type of a GCC
13292 builtin and then its argument prototype would still apply. */
13293 #ifdef __cplusplus
13294 extern "C"
13295 #endif
13296 char SmcOpenConnection ();
13297 int
13298 main ()
13299 {
13300 return SmcOpenConnection ();
13301 ;
13302 return 0;
13303 }
13304 _ACEOF
13305 if ac_fn_c_try_link "$LINENO"; then :
13306 ac_cv_lib_SM_SmcOpenConnection=yes
13307 else
13308 ac_cv_lib_SM_SmcOpenConnection=no
13309 fi
13310 rm -f core conftest.err conftest.$ac_objext \
13311 conftest$ac_exeext conftest.$ac_ext
13312 LIBS=$ac_check_lib_save_LIBS
13313 fi
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13315 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13316 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13317 HAVE_X_SM=yes
13318 fi
13319
13320 fi
13321
13322
13323
13324 if test "${HAVE_X_SM}" = "yes"; then
13325
13326 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
13327
13328 LIBXSM="-lSM -lICE"
13329 case "$LIBS" in
13330 *-lSM*) ;;
13331 *) LIBS="$LIBXSM $LIBS" ;;
13332 esac
13333 fi
13334 fi
13335
13336
13337 ### Use libxml (-lxml2) if available
13338 HAVE_LIBXML2=no
13339 if test "${with_xml2}" != "no"; then
13340 ### I'm not sure what the version number should be, so I just guessed.
13341
13342 succeeded=no
13343
13344 if test "$PKG_CONFIG" = "no" ; then
13345 HAVE_LIBXML2=no
13346 else
13347 PKG_CONFIG_MIN_VERSION=0.9.0
13348 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13350 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
13351
13352 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13353 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13354 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
13355 edit_cflags="
13356 s,///*,/,g
13357 s/^/ /
13358 s/ -I/ $isystem/g
13359 s/^ //
13360 "
13361 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13362 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13364 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
13365 succeeded=yes
13366 else
13367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13368 $as_echo "no" >&6; }
13369 LIBXML2_CFLAGS=""
13370 LIBXML2_LIBS=""
13371 ## If we have a custom action on failure, don't print errors, but
13372 ## do set a variable so people can do so. Do it in a subshell
13373 ## to capture any diagnostics in invoking pkg-config.
13374 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
13375
13376 fi
13377
13378
13379
13380 else
13381 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13382 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13383 fi
13384 fi
13385
13386 if test $succeeded = yes; then
13387 HAVE_LIBXML2=yes
13388 else
13389 HAVE_LIBXML2=no
13390 fi
13391
13392 if test "${HAVE_LIBXML2}" = "yes"; then
13393 LIBS="$LIBXML2_LIBS $LIBS"
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13395 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13396 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
13397 $as_echo_n "(cached) " >&6
13398 else
13399 ac_check_lib_save_LIBS=$LIBS
13400 LIBS="-lxml2 $LIBS"
13401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13402 /* end confdefs.h. */
13403
13404 /* Override any GCC internal prototype to avoid an error.
13405 Use char because int might match the return type of a GCC
13406 builtin and then its argument prototype would still apply. */
13407 #ifdef __cplusplus
13408 extern "C"
13409 #endif
13410 char htmlReadMemory ();
13411 int
13412 main ()
13413 {
13414 return htmlReadMemory ();
13415 ;
13416 return 0;
13417 }
13418 _ACEOF
13419 if ac_fn_c_try_link "$LINENO"; then :
13420 ac_cv_lib_xml2_htmlReadMemory=yes
13421 else
13422 ac_cv_lib_xml2_htmlReadMemory=no
13423 fi
13424 rm -f core conftest.err conftest.$ac_objext \
13425 conftest$ac_exeext conftest.$ac_ext
13426 LIBS=$ac_check_lib_save_LIBS
13427 fi
13428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13429 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13430 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13431 HAVE_LIBXML2=yes
13432 else
13433 HAVE_LIBXML2=no
13434 fi
13435
13436 if test "${HAVE_LIBXML2}" = "yes"; then
13437
13438 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
13439
13440 else
13441 LIBXML2_LIBS=""
13442 LIBXML2_CFLAGS=""
13443 fi
13444 fi
13445 fi
13446
13447
13448
13449 # If netdb.h doesn't declare h_errno, we must declare it by hand.
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13451 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
13452 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13453 $as_echo_n "(cached) " >&6
13454 else
13455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13456 /* end confdefs.h. */
13457 #include <netdb.h>
13458 int
13459 main ()
13460 {
13461 return h_errno;
13462 ;
13463 return 0;
13464 }
13465 _ACEOF
13466 if ac_fn_c_try_link "$LINENO"; then :
13467 emacs_cv_netdb_declares_h_errno=yes
13468 else
13469 emacs_cv_netdb_declares_h_errno=no
13470 fi
13471 rm -f core conftest.err conftest.$ac_objext \
13472 conftest$ac_exeext conftest.$ac_ext
13473 fi
13474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13475 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13476 if test $emacs_cv_netdb_declares_h_errno = yes; then
13477
13478 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
13479
13480 fi
13481
13482 # sqrt and other floating-point functions such as fmod and frexp
13483 # are found in -lm on most systems.
13484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13485 $as_echo_n "checking for sqrt in -lm... " >&6; }
13486 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13487 $as_echo_n "(cached) " >&6
13488 else
13489 ac_check_lib_save_LIBS=$LIBS
13490 LIBS="-lm $LIBS"
13491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13492 /* end confdefs.h. */
13493
13494 /* Override any GCC internal prototype to avoid an error.
13495 Use char because int might match the return type of a GCC
13496 builtin and then its argument prototype would still apply. */
13497 #ifdef __cplusplus
13498 extern "C"
13499 #endif
13500 char sqrt ();
13501 int
13502 main ()
13503 {
13504 return sqrt ();
13505 ;
13506 return 0;
13507 }
13508 _ACEOF
13509 if ac_fn_c_try_link "$LINENO"; then :
13510 ac_cv_lib_m_sqrt=yes
13511 else
13512 ac_cv_lib_m_sqrt=no
13513 fi
13514 rm -f core conftest.err conftest.$ac_objext \
13515 conftest$ac_exeext conftest.$ac_ext
13516 LIBS=$ac_check_lib_save_LIBS
13517 fi
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13519 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
13520 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13521 cat >>confdefs.h <<_ACEOF
13522 #define HAVE_LIBM 1
13523 _ACEOF
13524
13525 LIBS="-lm $LIBS"
13526
13527 fi
13528
13529
13530 # Check for mail-locking functions in a "mail" library. Probably this should
13531 # have the same check as for liblockfile below.
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13533 $as_echo_n "checking for maillock in -lmail... " >&6; }
13534 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
13535 $as_echo_n "(cached) " >&6
13536 else
13537 ac_check_lib_save_LIBS=$LIBS
13538 LIBS="-lmail $LIBS"
13539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13540 /* end confdefs.h. */
13541
13542 /* Override any GCC internal prototype to avoid an error.
13543 Use char because int might match the return type of a GCC
13544 builtin and then its argument prototype would still apply. */
13545 #ifdef __cplusplus
13546 extern "C"
13547 #endif
13548 char maillock ();
13549 int
13550 main ()
13551 {
13552 return maillock ();
13553 ;
13554 return 0;
13555 }
13556 _ACEOF
13557 if ac_fn_c_try_link "$LINENO"; then :
13558 ac_cv_lib_mail_maillock=yes
13559 else
13560 ac_cv_lib_mail_maillock=no
13561 fi
13562 rm -f core conftest.err conftest.$ac_objext \
13563 conftest$ac_exeext conftest.$ac_ext
13564 LIBS=$ac_check_lib_save_LIBS
13565 fi
13566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13567 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
13568 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13569 have_mail=yes
13570 else
13571 have_mail=no
13572 fi
13573
13574 if test $have_mail = yes; then
13575 LIBS_MAIL=-lmail
13576 LIBS="$LIBS_MAIL $LIBS"
13577
13578 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
13579
13580 else
13581 LIBS_MAIL=
13582 fi
13583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13584 $as_echo_n "checking for maillock in -llockfile... " >&6; }
13585 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
13586 $as_echo_n "(cached) " >&6
13587 else
13588 ac_check_lib_save_LIBS=$LIBS
13589 LIBS="-llockfile $LIBS"
13590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13591 /* end confdefs.h. */
13592
13593 /* Override any GCC internal prototype to avoid an error.
13594 Use char because int might match the return type of a GCC
13595 builtin and then its argument prototype would still apply. */
13596 #ifdef __cplusplus
13597 extern "C"
13598 #endif
13599 char maillock ();
13600 int
13601 main ()
13602 {
13603 return maillock ();
13604 ;
13605 return 0;
13606 }
13607 _ACEOF
13608 if ac_fn_c_try_link "$LINENO"; then :
13609 ac_cv_lib_lockfile_maillock=yes
13610 else
13611 ac_cv_lib_lockfile_maillock=no
13612 fi
13613 rm -f core conftest.err conftest.$ac_objext \
13614 conftest$ac_exeext conftest.$ac_ext
13615 LIBS=$ac_check_lib_save_LIBS
13616 fi
13617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13618 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13619 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13620 have_lockfile=yes
13621 else
13622 have_lockfile=no
13623 fi
13624
13625 if test $have_lockfile = yes; then
13626 LIBS_MAIL=-llockfile
13627 LIBS="$LIBS_MAIL $LIBS"
13628
13629 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
13630
13631 else
13632 # If we have the shared liblockfile, assume we must use it for mail
13633 # locking (e.g. Debian). If we couldn't link against liblockfile
13634 # (no liblockfile.a installed), ensure that we don't need to.
13635 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13636 set dummy liblockfile.so; ac_word=$2
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13638 $as_echo_n "checking for $ac_word... " >&6; }
13639 if test "${ac_cv_prog_liblockfile+set}" = set; then :
13640 $as_echo_n "(cached) " >&6
13641 else
13642 if test -n "$liblockfile"; then
13643 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13644 else
13645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13646 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13647 for as_dir in $as_dummy
13648 do
13649 IFS=$as_save_IFS
13650 test -z "$as_dir" && as_dir=.
13651 for ac_exec_ext in '' $ac_executable_extensions; do
13652 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13653 ac_cv_prog_liblockfile="yes"
13654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13655 break 2
13656 fi
13657 done
13658 done
13659 IFS=$as_save_IFS
13660
13661 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13662 fi
13663 fi
13664 liblockfile=$ac_cv_prog_liblockfile
13665 if test -n "$liblockfile"; then
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13667 $as_echo "$liblockfile" >&6; }
13668 else
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13670 $as_echo "no" >&6; }
13671 fi
13672
13673
13674 if test $ac_cv_prog_liblockfile = yes; then
13675 as_fn_error "Shared liblockfile found but can't link against it.
13676 This probably means that movemail could lose mail.
13677 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13678 fi
13679 fi
13680
13681
13682
13683
13684
13685 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13686 ## interlock access to the mail spool. The alternative is a lock file named
13687 ## /usr/spool/mail/$USER.lock.
13688 mail_lock=no
13689 case "$opsys" in
13690 aix4-2) mail_lock="lockf" ;;
13691
13692 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
13693
13694 ## On GNU/Linux systems, both methods are used by various mail programs.
13695 ## I assume most people are using newer mailers that have heard of flock.
13696 ## Change this if you need to.
13697 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13698 ## configure gets the right answers, and that means *NOT* using flock.
13699 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13700 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13701 ## Debian maintainer hasn't provided a clean fix for Emacs.
13702 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13703 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13704 ## correct logic. -- fx
13705 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13706 ## liblockfile is a Free Software replacement for libmail, used on
13707 ## Debian systems and elsewhere. -rfr.
13708 gnu-*)
13709 mail_lock="flock"
13710 if test $have_mail = yes || test $have_lockfile = yes; then
13711 test $ac_cv_header_maillock_h = yes && mail_lock=no
13712 fi
13713 ;;
13714 esac
13715
13716 BLESSMAIL_TARGET=
13717 case "$mail_lock" in
13718 flock)
13719 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13720 ;;
13721
13722 lockf)
13723 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13724 ;;
13725
13726 *) BLESSMAIL_TARGET="need-blessmail" ;;
13727 esac
13728
13729
13730
13731 for ac_func in gethostname \
13732 getrusage get_current_dir_name \
13733 lrand48 \
13734 select getpagesize setlocale \
13735 utimes getrlimit setrlimit shutdown getaddrinfo \
13736 strsignal setitimer \
13737 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
13738 gai_strerror mkstemp getline getdelim fsync sync \
13739 difftime posix_memalign \
13740 getpwent endpwent getgrent endgrent \
13741 touchlock \
13742 cfmakeraw cfsetspeed copysign __executable_start
13743 do :
13744 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13745 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13746 eval as_val=\$$as_ac_var
13747 if test "x$as_val" = x""yes; then :
13748 cat >>confdefs.h <<_ACEOF
13749 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13750 _ACEOF
13751
13752 fi
13753 done
13754
13755
13756 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13757 ## has a broken `rint' in some library versions including math library
13758 ## version number A.09.05.
13759 ## You can fix the math library by installing patch number PHSS_4630.
13760 ## But we can fix it more reliably for Emacs by just not using rint.
13761 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
13762 case $opsys in
13763 hpux*) : ;;
13764 *) for ac_func in random rint
13765 do :
13766 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13767 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13768 eval as_val=\$$as_ac_var
13769 if test "x$as_val" = x""yes; then :
13770 cat >>confdefs.h <<_ACEOF
13771 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13772 _ACEOF
13773
13774 fi
13775 done
13776 ;;
13777 esac
13778
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13780 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
13781 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
13782 $as_echo_n "(cached) " >&6
13783 else
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h. */
13786
13787 int
13788 main ()
13789 {
13790 __builtin_unwind_init ();
13791 ;
13792 return 0;
13793 }
13794 _ACEOF
13795 if ac_fn_c_try_link "$LINENO"; then :
13796 emacs_cv_func___builtin_unwind_init=yes
13797 else
13798 emacs_cv_func___builtin_unwind_init=no
13799 fi
13800 rm -f core conftest.err conftest.$ac_objext \
13801 conftest$ac_exeext conftest.$ac_ext
13802 fi
13803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13804 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13805 if test $emacs_cv_func___builtin_unwind_init = yes; then
13806
13807 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
13808
13809 fi
13810
13811
13812
13813
13814
13815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13816 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13817 if test "${ac_cv_sys_largefile_source+set}" = set; then :
13818 $as_echo_n "(cached) " >&6
13819 else
13820 while :; do
13821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13822 /* end confdefs.h. */
13823 #include <sys/types.h> /* for off_t */
13824 #include <stdio.h>
13825 int
13826 main ()
13827 {
13828 int (*fp) (FILE *, off_t, int) = fseeko;
13829 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13830 ;
13831 return 0;
13832 }
13833 _ACEOF
13834 if ac_fn_c_try_link "$LINENO"; then :
13835 ac_cv_sys_largefile_source=no; break
13836 fi
13837 rm -f core conftest.err conftest.$ac_objext \
13838 conftest$ac_exeext conftest.$ac_ext
13839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13840 /* end confdefs.h. */
13841 #define _LARGEFILE_SOURCE 1
13842 #include <sys/types.h> /* for off_t */
13843 #include <stdio.h>
13844 int
13845 main ()
13846 {
13847 int (*fp) (FILE *, off_t, int) = fseeko;
13848 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13849 ;
13850 return 0;
13851 }
13852 _ACEOF
13853 if ac_fn_c_try_link "$LINENO"; then :
13854 ac_cv_sys_largefile_source=1; break
13855 fi
13856 rm -f core conftest.err conftest.$ac_objext \
13857 conftest$ac_exeext conftest.$ac_ext
13858 ac_cv_sys_largefile_source=unknown
13859 break
13860 done
13861 fi
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13863 $as_echo "$ac_cv_sys_largefile_source" >&6; }
13864 case $ac_cv_sys_largefile_source in #(
13865 no | unknown) ;;
13866 *)
13867 cat >>confdefs.h <<_ACEOF
13868 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13869 _ACEOF
13870 ;;
13871 esac
13872 rm -rf conftest*
13873
13874 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13875 # in glibc 2.1.3, but that breaks too many other things.
13876 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13877 if test $ac_cv_sys_largefile_source != unknown; then
13878
13879 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13880
13881 fi
13882
13883
13884 # UNIX98 PTYs.
13885 for ac_func in grantpt
13886 do :
13887 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13888 if test "x$ac_cv_func_grantpt" = x""yes; then :
13889 cat >>confdefs.h <<_ACEOF
13890 #define HAVE_GRANTPT 1
13891 _ACEOF
13892
13893 fi
13894 done
13895
13896
13897 # PTY-related GNU extensions.
13898 for ac_func in getpt posix_openpt
13899 do :
13900 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13901 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13902 eval as_val=\$$as_ac_var
13903 if test "x$as_val" = x""yes; then :
13904 cat >>confdefs.h <<_ACEOF
13905 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13906 _ACEOF
13907
13908 fi
13909 done
13910
13911
13912 # Check this now, so that we will NOT find the above functions in ncurses.
13913 # That is because we have not set up to link ncurses in lib-src.
13914 # It's better to believe a function is not available
13915 # than to expect to find it in ncurses.
13916 # Also we need tputs and friends to be able to build at all.
13917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13918 $as_echo_n "checking for library containing tputs... " >&6; }
13919 # Run a test program that contains a call to tputs, a call that is
13920 # never executed. This tests whether a pre-'main' dynamic linker
13921 # works with the library. It's too much trouble to actually call
13922 # tputs in the test program, due to portability hassles. When
13923 # cross-compiling, assume the test program will run if it links.
13924
13925 # Maybe curses should be tried earlier?
13926 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13927 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
13928 OLIBS=$LIBS
13929 if test -z "$tputs_library"; then
13930 LIBS_TERMCAP=
13931 msg='none required'
13932 else
13933 LIBS_TERMCAP=-l$tputs_library
13934 msg=$LIBS_TERMCAP
13935 LIBS="$LIBS_TERMCAP $LIBS"
13936 fi
13937 if test "$cross_compiling" = yes; then :
13938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939 /* end confdefs.h. */
13940
13941 extern void tputs (const char *, int, int (*)(int));
13942 int main (int argc, char **argv)
13943 {
13944 if (argc == 10000)
13945 tputs (argv[0], 0, 0);
13946 return 0;
13947 }
13948
13949 _ACEOF
13950 if ac_fn_c_try_link "$LINENO"; then :
13951
13952 else
13953 msg=no
13954 fi
13955 rm -f core conftest.err conftest.$ac_objext \
13956 conftest$ac_exeext conftest.$ac_ext
13957 else
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h. */
13960
13961 extern void tputs (const char *, int, int (*)(int));
13962 int main (int argc, char **argv)
13963 {
13964 if (argc == 10000)
13965 tputs (argv[0], 0, 0);
13966 return 0;
13967 }
13968
13969 _ACEOF
13970 if ac_fn_c_try_run "$LINENO"; then :
13971
13972 else
13973 msg=no
13974 fi
13975 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13976 conftest.$ac_objext conftest.beam conftest.$ac_ext
13977 fi
13978
13979 LIBS=$OLIBS
13980 if test "X$msg" != Xno; then
13981 break
13982 fi
13983 done
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
13985 $as_echo "$msg" >&6; }
13986 if test "X$msg" = Xno; then
13987 as_fn_error "The required function \`tputs' was not found in any library.
13988 The following libraries were tried (in order):
13989 libtinfo, libncurses, libterminfo, libtermcap, libcurses
13990 Please try installing whichever of these libraries is most appropriate
13991 for your system, together with its header files.
13992 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
13993 fi
13994
13995 ## Use termcap instead of terminfo?
13996 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
13997 TERMINFO=yes
13998 ## FIXME? In the cases below where we unconditionally set
13999 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14000 ## if that was found above to have tputs.
14001 ## Should we use the gnu* logic everywhere?
14002 case "$opsys" in
14003 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14004 ## The ncurses library has been moved out of the System framework in
14005 ## Mac OS X 10.2. So if configure detects it, set the command-line
14006 ## option to use it.
14007 darwin) LIBS_TERMCAP="-lncurses" ;;
14008
14009 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14010
14011 freebsd)
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14013 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14014 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
14015 $as_echo_n "(cached) " >&6
14016 else
14017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14018 /* end confdefs.h. */
14019 #include <osreldate.h>
14020 int
14021 main ()
14022 {
14023 #if __FreeBSD_version < 400000
14024 fail;
14025 #endif
14026
14027 ;
14028 return 0;
14029 }
14030 _ACEOF
14031 if ac_fn_c_try_link "$LINENO"; then :
14032 emacs_cv_freebsd_terminfo=yes
14033 else
14034 emacs_cv_freebsd_terminfo=no
14035 fi
14036 rm -f core conftest.err conftest.$ac_objext \
14037 conftest$ac_exeext conftest.$ac_ext
14038 fi
14039
14040
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14042 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14043
14044 if test $emacs_cv_freebsd_terminfo = yes; then
14045 LIBS_TERMCAP="-lncurses"
14046 else
14047 TERMINFO=no
14048 LIBS_TERMCAP="-ltermcap"
14049 fi
14050 ;;
14051
14052 netbsd)
14053 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14054 TERMINFO=no
14055 LIBS_TERMCAP="-ltermcap"
14056 fi
14057 ;;
14058
14059 openbsd) LIBS_TERMCAP="-lncurses" ;;
14060
14061 ## hpux: Make sure we get select from libc rather than from libcurses
14062 ## because libcurses on HPUX 10.10 has a broken version of select.
14063 ## We used to use -lc -lcurses, but this may be cleaner.
14064 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
14065 # set that way, now it uses the default). Isn't this a contradiction?
14066 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14067
14068 esac
14069
14070 TERMCAP_OBJ=tparam.o
14071 if test $TERMINFO = yes; then
14072
14073 $as_echo "#define TERMINFO 1" >>confdefs.h
14074
14075 TERMCAP_OBJ=terminfo.o
14076 fi
14077
14078
14079
14080
14081 # Do we have res_init, for detecting changes in /etc/resolv.conf?
14082 # On Darwin, res_init appears not to be useful: see bug#562 and
14083 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
14084 resolv=no
14085
14086 if test $opsys != darwin; then
14087
14088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14089 /* end confdefs.h. */
14090 #include <netinet/in.h>
14091 #include <arpa/nameser.h>
14092 #include <resolv.h>
14093 int
14094 main ()
14095 {
14096 return res_init();
14097 ;
14098 return 0;
14099 }
14100 _ACEOF
14101 if ac_fn_c_try_link "$LINENO"; then :
14102 have_res_init=yes
14103 else
14104 have_res_init=no
14105 fi
14106 rm -f core conftest.err conftest.$ac_objext \
14107 conftest$ac_exeext conftest.$ac_ext
14108 if test "$have_res_init" = no; then
14109 OLIBS="$LIBS"
14110 LIBS="$LIBS -lresolv"
14111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14112 $as_echo_n "checking for res_init with -lresolv... " >&6; }
14113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14114 /* end confdefs.h. */
14115 #include <netinet/in.h>
14116 #include <arpa/nameser.h>
14117 #include <resolv.h>
14118 int
14119 main ()
14120 {
14121 return res_init();
14122 ;
14123 return 0;
14124 }
14125 _ACEOF
14126 if ac_fn_c_try_link "$LINENO"; then :
14127 have_res_init=yes
14128 else
14129 have_res_init=no
14130 fi
14131 rm -f core conftest.err conftest.$ac_objext \
14132 conftest$ac_exeext conftest.$ac_ext
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14134 $as_echo "$have_res_init" >&6; }
14135 if test "$have_res_init" = yes ; then
14136 resolv=yes
14137 fi
14138 LIBS="$OLIBS"
14139 fi
14140
14141 if test "$have_res_init" = yes; then
14142
14143 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
14144
14145 fi
14146 fi
14147 # Do we need the Hesiod library to provide the support routines?
14148 LIBHESIOD=
14149 if test "$with_hesiod" != no ; then
14150 # Don't set $LIBS here -- see comments above. FIXME which comments?
14151 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14152 if test "x$ac_cv_func_res_send" = x""yes; then :
14153
14154 else
14155 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14156 if test "x$ac_cv_func___res_send" = x""yes; then :
14157
14158 else
14159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14160 $as_echo_n "checking for res_send in -lresolv... " >&6; }
14161 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
14162 $as_echo_n "(cached) " >&6
14163 else
14164 ac_check_lib_save_LIBS=$LIBS
14165 LIBS="-lresolv $LIBS"
14166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167 /* end confdefs.h. */
14168
14169 /* Override any GCC internal prototype to avoid an error.
14170 Use char because int might match the return type of a GCC
14171 builtin and then its argument prototype would still apply. */
14172 #ifdef __cplusplus
14173 extern "C"
14174 #endif
14175 char res_send ();
14176 int
14177 main ()
14178 {
14179 return res_send ();
14180 ;
14181 return 0;
14182 }
14183 _ACEOF
14184 if ac_fn_c_try_link "$LINENO"; then :
14185 ac_cv_lib_resolv_res_send=yes
14186 else
14187 ac_cv_lib_resolv_res_send=no
14188 fi
14189 rm -f core conftest.err conftest.$ac_objext \
14190 conftest$ac_exeext conftest.$ac_ext
14191 LIBS=$ac_check_lib_save_LIBS
14192 fi
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14194 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14195 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14196 resolv=yes
14197 else
14198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14199 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
14200 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
14201 $as_echo_n "(cached) " >&6
14202 else
14203 ac_check_lib_save_LIBS=$LIBS
14204 LIBS="-lresolv $LIBS"
14205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206 /* end confdefs.h. */
14207
14208 /* Override any GCC internal prototype to avoid an error.
14209 Use char because int might match the return type of a GCC
14210 builtin and then its argument prototype would still apply. */
14211 #ifdef __cplusplus
14212 extern "C"
14213 #endif
14214 char __res_send ();
14215 int
14216 main ()
14217 {
14218 return __res_send ();
14219 ;
14220 return 0;
14221 }
14222 _ACEOF
14223 if ac_fn_c_try_link "$LINENO"; then :
14224 ac_cv_lib_resolv___res_send=yes
14225 else
14226 ac_cv_lib_resolv___res_send=no
14227 fi
14228 rm -f core conftest.err conftest.$ac_objext \
14229 conftest$ac_exeext conftest.$ac_ext
14230 LIBS=$ac_check_lib_save_LIBS
14231 fi
14232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14233 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14234 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14235 resolv=yes
14236 fi
14237
14238 fi
14239
14240 fi
14241
14242 fi
14243
14244 if test "$resolv" = yes ; then
14245 RESOLVLIB=-lresolv
14246 else
14247 RESOLVLIB=
14248 fi
14249 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14250 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14251
14252 else
14253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14254 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14255 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14256 $as_echo_n "(cached) " >&6
14257 else
14258 ac_check_lib_save_LIBS=$LIBS
14259 LIBS="-lhesiod $RESOLVLIB $LIBS"
14260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14261 /* end confdefs.h. */
14262
14263 /* Override any GCC internal prototype to avoid an error.
14264 Use char because int might match the return type of a GCC
14265 builtin and then its argument prototype would still apply. */
14266 #ifdef __cplusplus
14267 extern "C"
14268 #endif
14269 char hes_getmailhost ();
14270 int
14271 main ()
14272 {
14273 return hes_getmailhost ();
14274 ;
14275 return 0;
14276 }
14277 _ACEOF
14278 if ac_fn_c_try_link "$LINENO"; then :
14279 ac_cv_lib_hesiod_hes_getmailhost=yes
14280 else
14281 ac_cv_lib_hesiod_hes_getmailhost=no
14282 fi
14283 rm -f core conftest.err conftest.$ac_objext \
14284 conftest$ac_exeext conftest.$ac_ext
14285 LIBS=$ac_check_lib_save_LIBS
14286 fi
14287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14288 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14289 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14290 hesiod=yes
14291 else
14292 :
14293 fi
14294
14295 fi
14296
14297
14298 if test x"$hesiod" = xyes; then
14299
14300 $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
14301
14302 LIBHESIOD=-lhesiod
14303 fi
14304 fi
14305
14306
14307 # Do we need libresolv (due to res_init or Hesiod)?
14308 if test "$resolv" = yes && test $opsys != darwin; then
14309
14310 $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
14311
14312 LIBRESOLV=-lresolv
14313 else
14314 LIBRESOLV=
14315 fi
14316
14317
14318 # These tell us which Kerberos-related libraries to use.
14319 COM_ERRLIB=
14320 CRYPTOLIB=
14321 KRB5LIB=
14322 DESLIB=
14323 KRB4LIB=
14324
14325 if test "${with_kerberos}" != no; then
14326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14327 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
14328 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14329 $as_echo_n "(cached) " >&6
14330 else
14331 ac_check_lib_save_LIBS=$LIBS
14332 LIBS="-lcom_err $LIBS"
14333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334 /* end confdefs.h. */
14335
14336 /* Override any GCC internal prototype to avoid an error.
14337 Use char because int might match the return type of a GCC
14338 builtin and then its argument prototype would still apply. */
14339 #ifdef __cplusplus
14340 extern "C"
14341 #endif
14342 char com_err ();
14343 int
14344 main ()
14345 {
14346 return com_err ();
14347 ;
14348 return 0;
14349 }
14350 _ACEOF
14351 if ac_fn_c_try_link "$LINENO"; then :
14352 ac_cv_lib_com_err_com_err=yes
14353 else
14354 ac_cv_lib_com_err_com_err=no
14355 fi
14356 rm -f core conftest.err conftest.$ac_objext \
14357 conftest$ac_exeext conftest.$ac_ext
14358 LIBS=$ac_check_lib_save_LIBS
14359 fi
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14361 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14362 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14363 have_com_err=yes
14364 else
14365 have_com_err=no
14366 fi
14367
14368 if test $have_com_err = yes; then
14369 COM_ERRLIB=-lcom_err
14370 LIBS="$COM_ERRLIB $LIBS"
14371
14372 $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
14373
14374 fi
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14376 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14377 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14378 $as_echo_n "(cached) " >&6
14379 else
14380 ac_check_lib_save_LIBS=$LIBS
14381 LIBS="-lcrypto $LIBS"
14382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14383 /* end confdefs.h. */
14384
14385 /* Override any GCC internal prototype to avoid an error.
14386 Use char because int might match the return type of a GCC
14387 builtin and then its argument prototype would still apply. */
14388 #ifdef __cplusplus
14389 extern "C"
14390 #endif
14391 char mit_des_cbc_encrypt ();
14392 int
14393 main ()
14394 {
14395 return mit_des_cbc_encrypt ();
14396 ;
14397 return 0;
14398 }
14399 _ACEOF
14400 if ac_fn_c_try_link "$LINENO"; then :
14401 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14402 else
14403 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14404 fi
14405 rm -f core conftest.err conftest.$ac_objext \
14406 conftest$ac_exeext conftest.$ac_ext
14407 LIBS=$ac_check_lib_save_LIBS
14408 fi
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14410 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14411 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14412 have_crypto=yes
14413 else
14414 have_crypto=no
14415 fi
14416
14417 if test $have_crypto = yes; then
14418 CRYPTOLIB=-lcrypto
14419 LIBS="$CRYPTOLIB $LIBS"
14420
14421 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
14422
14423 fi
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14425 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14426 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14427 $as_echo_n "(cached) " >&6
14428 else
14429 ac_check_lib_save_LIBS=$LIBS
14430 LIBS="-lk5crypto $LIBS"
14431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14432 /* end confdefs.h. */
14433
14434 /* Override any GCC internal prototype to avoid an error.
14435 Use char because int might match the return type of a GCC
14436 builtin and then its argument prototype would still apply. */
14437 #ifdef __cplusplus
14438 extern "C"
14439 #endif
14440 char mit_des_cbc_encrypt ();
14441 int
14442 main ()
14443 {
14444 return mit_des_cbc_encrypt ();
14445 ;
14446 return 0;
14447 }
14448 _ACEOF
14449 if ac_fn_c_try_link "$LINENO"; then :
14450 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14451 else
14452 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14453 fi
14454 rm -f core conftest.err conftest.$ac_objext \
14455 conftest$ac_exeext conftest.$ac_ext
14456 LIBS=$ac_check_lib_save_LIBS
14457 fi
14458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14459 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14460 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14461 have_k5crypto=yes
14462 else
14463 have_k5crypto=no
14464 fi
14465
14466 if test $have_k5crypto = yes; then
14467 CRYPTOLIB=-lk5crypto
14468 LIBS="$CRYPTOLIB $LIBS"
14469
14470 $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
14471
14472 fi
14473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14474 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14475 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14476 $as_echo_n "(cached) " >&6
14477 else
14478 ac_check_lib_save_LIBS=$LIBS
14479 LIBS="-lkrb5 $LIBS"
14480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14481 /* end confdefs.h. */
14482
14483 /* Override any GCC internal prototype to avoid an error.
14484 Use char because int might match the return type of a GCC
14485 builtin and then its argument prototype would still apply. */
14486 #ifdef __cplusplus
14487 extern "C"
14488 #endif
14489 char krb5_init_context ();
14490 int
14491 main ()
14492 {
14493 return krb5_init_context ();
14494 ;
14495 return 0;
14496 }
14497 _ACEOF
14498 if ac_fn_c_try_link "$LINENO"; then :
14499 ac_cv_lib_krb5_krb5_init_context=yes
14500 else
14501 ac_cv_lib_krb5_krb5_init_context=no
14502 fi
14503 rm -f core conftest.err conftest.$ac_objext \
14504 conftest$ac_exeext conftest.$ac_ext
14505 LIBS=$ac_check_lib_save_LIBS
14506 fi
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14508 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14509 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14510 have_krb5=yes
14511 else
14512 have_krb5=no
14513 fi
14514
14515 if test $have_krb5=yes; then
14516 KRB5LIB=-lkrb5
14517 LIBS="$KRB5LIB $LIBS"
14518
14519 $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
14520
14521 fi
14522 if test "${with_kerberos5}" = no; then
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14524 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14525 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
14526 $as_echo_n "(cached) " >&6
14527 else
14528 ac_check_lib_save_LIBS=$LIBS
14529 LIBS="-ldes425 $LIBS"
14530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14531 /* end confdefs.h. */
14532
14533 /* Override any GCC internal prototype to avoid an error.
14534 Use char because int might match the return type of a GCC
14535 builtin and then its argument prototype would still apply. */
14536 #ifdef __cplusplus
14537 extern "C"
14538 #endif
14539 char des_cbc_encrypt ();
14540 int
14541 main ()
14542 {
14543 return des_cbc_encrypt ();
14544 ;
14545 return 0;
14546 }
14547 _ACEOF
14548 if ac_fn_c_try_link "$LINENO"; then :
14549 ac_cv_lib_des425_des_cbc_encrypt=yes
14550 else
14551 ac_cv_lib_des425_des_cbc_encrypt=no
14552 fi
14553 rm -f core conftest.err conftest.$ac_objext \
14554 conftest$ac_exeext conftest.$ac_ext
14555 LIBS=$ac_check_lib_save_LIBS
14556 fi
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14558 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14559 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14560 have_des425=yes
14561 else
14562 have_des425=no
14563 fi
14564
14565 if test $have_des425 = yes; then
14566 DESLIB=-ldes425
14567 LIBS="$DESLIB $LIBS"
14568
14569 $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
14570
14571 else
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14573 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14574 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14575 $as_echo_n "(cached) " >&6
14576 else
14577 ac_check_lib_save_LIBS=$LIBS
14578 LIBS="-ldes $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 des_cbc_encrypt ();
14589 int
14590 main ()
14591 {
14592 return des_cbc_encrypt ();
14593 ;
14594 return 0;
14595 }
14596 _ACEOF
14597 if ac_fn_c_try_link "$LINENO"; then :
14598 ac_cv_lib_des_des_cbc_encrypt=yes
14599 else
14600 ac_cv_lib_des_des_cbc_encrypt=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_des_des_cbc_encrypt" >&5
14607 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14608 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14609 have_des=yes
14610 else
14611 have_des=no
14612 fi
14613
14614 if test $have_des = yes; then
14615 DESLIB=-ldes
14616 LIBS="$DESLIB $LIBS"
14617
14618 $as_echo "#define HAVE_LIBDES 1" >>confdefs.h
14619
14620 fi
14621 fi
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14623 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14624 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
14625 $as_echo_n "(cached) " >&6
14626 else
14627 ac_check_lib_save_LIBS=$LIBS
14628 LIBS="-lkrb4 $LIBS"
14629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14630 /* end confdefs.h. */
14631
14632 /* Override any GCC internal prototype to avoid an error.
14633 Use char because int might match the return type of a GCC
14634 builtin and then its argument prototype would still apply. */
14635 #ifdef __cplusplus
14636 extern "C"
14637 #endif
14638 char krb_get_cred ();
14639 int
14640 main ()
14641 {
14642 return krb_get_cred ();
14643 ;
14644 return 0;
14645 }
14646 _ACEOF
14647 if ac_fn_c_try_link "$LINENO"; then :
14648 ac_cv_lib_krb4_krb_get_cred=yes
14649 else
14650 ac_cv_lib_krb4_krb_get_cred=no
14651 fi
14652 rm -f core conftest.err conftest.$ac_objext \
14653 conftest$ac_exeext conftest.$ac_ext
14654 LIBS=$ac_check_lib_save_LIBS
14655 fi
14656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14657 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14658 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14659 have_krb4=yes
14660 else
14661 have_krb4=no
14662 fi
14663
14664 if test $have_krb4 = yes; then
14665 KRB4LIB=-lkrb4
14666 LIBS="$KRB4LIB $LIBS"
14667
14668 $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14669
14670 else
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14672 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14673 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14674 $as_echo_n "(cached) " >&6
14675 else
14676 ac_check_lib_save_LIBS=$LIBS
14677 LIBS="-lkrb $LIBS"
14678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14679 /* end confdefs.h. */
14680
14681 /* Override any GCC internal prototype to avoid an error.
14682 Use char because int might match the return type of a GCC
14683 builtin and then its argument prototype would still apply. */
14684 #ifdef __cplusplus
14685 extern "C"
14686 #endif
14687 char krb_get_cred ();
14688 int
14689 main ()
14690 {
14691 return krb_get_cred ();
14692 ;
14693 return 0;
14694 }
14695 _ACEOF
14696 if ac_fn_c_try_link "$LINENO"; then :
14697 ac_cv_lib_krb_krb_get_cred=yes
14698 else
14699 ac_cv_lib_krb_krb_get_cred=no
14700 fi
14701 rm -f core conftest.err conftest.$ac_objext \
14702 conftest$ac_exeext conftest.$ac_ext
14703 LIBS=$ac_check_lib_save_LIBS
14704 fi
14705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14706 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14707 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14708 have_krb=yes
14709 else
14710 have_krb=no
14711 fi
14712
14713 if test $have_krb = yes; then
14714 KRB4LIB=-lkrb
14715 LIBS="$KRB4LIB $LIBS"
14716
14717 $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14718
14719 fi
14720 fi
14721 fi
14722
14723 if test "${with_kerberos5}" != no; then
14724 for ac_header in krb5.h
14725 do :
14726 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14727 if test "x$ac_cv_header_krb5_h" = x""yes; then :
14728 cat >>confdefs.h <<_ACEOF
14729 #define HAVE_KRB5_H 1
14730 _ACEOF
14731 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14732 "
14733 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14734
14735 cat >>confdefs.h <<_ACEOF
14736 #define HAVE_KRB5_ERROR_TEXT 1
14737 _ACEOF
14738
14739
14740 fi
14741 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14742 "
14743 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
14744
14745 cat >>confdefs.h <<_ACEOF
14746 #define HAVE_KRB5_ERROR_E_TEXT 1
14747 _ACEOF
14748
14749
14750 fi
14751
14752 fi
14753
14754 done
14755
14756 else
14757 for ac_header in des.h
14758 do :
14759 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14760 if test "x$ac_cv_header_des_h" = x""yes; then :
14761 cat >>confdefs.h <<_ACEOF
14762 #define HAVE_DES_H 1
14763 _ACEOF
14764
14765 else
14766 for ac_header in kerberosIV/des.h
14767 do :
14768 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14769 if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14770 cat >>confdefs.h <<_ACEOF
14771 #define HAVE_KERBEROSIV_DES_H 1
14772 _ACEOF
14773
14774 else
14775 for ac_header in kerberos/des.h
14776 do :
14777 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14778 if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14779 cat >>confdefs.h <<_ACEOF
14780 #define HAVE_KERBEROS_DES_H 1
14781 _ACEOF
14782
14783 fi
14784
14785 done
14786
14787 fi
14788
14789 done
14790
14791 fi
14792
14793 done
14794
14795 for ac_header in krb.h
14796 do :
14797 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14798 if test "x$ac_cv_header_krb_h" = x""yes; then :
14799 cat >>confdefs.h <<_ACEOF
14800 #define HAVE_KRB_H 1
14801 _ACEOF
14802
14803 else
14804 for ac_header in kerberosIV/krb.h
14805 do :
14806 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14807 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14808 cat >>confdefs.h <<_ACEOF
14809 #define HAVE_KERBEROSIV_KRB_H 1
14810 _ACEOF
14811
14812 else
14813 for ac_header in kerberos/krb.h
14814 do :
14815 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14816 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14817 cat >>confdefs.h <<_ACEOF
14818 #define HAVE_KERBEROS_KRB_H 1
14819 _ACEOF
14820
14821 fi
14822
14823 done
14824
14825 fi
14826
14827 done
14828
14829 fi
14830
14831 done
14832
14833 fi
14834 for ac_header in com_err.h
14835 do :
14836 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14837 if test "x$ac_cv_header_com_err_h" = x""yes; then :
14838 cat >>confdefs.h <<_ACEOF
14839 #define HAVE_COM_ERR_H 1
14840 _ACEOF
14841
14842 fi
14843
14844 done
14845
14846 fi
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857 for ac_func in $ac_func_list
14858 do :
14859 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14860 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14861 eval as_val=\$$as_ac_var
14862 if test "x$as_val" = x""yes; then :
14863 cat >>confdefs.h <<_ACEOF
14864 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14865 _ACEOF
14866
14867 fi
14868 done
14869
14870
14871
14872
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14874 $as_echo_n "checking whether localtime caches TZ... " >&6; }
14875 if test "${emacs_cv_localtime_cache+set}" = set; then :
14876 $as_echo_n "(cached) " >&6
14877 else
14878 if test x$ac_cv_func_tzset = xyes; then
14879 if test "$cross_compiling" = yes; then :
14880 # If we have tzset, assume the worst when cross-compiling.
14881 emacs_cv_localtime_cache=yes
14882 else
14883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14884 /* end confdefs.h. */
14885 #include <time.h>
14886 char TZ_GMT0[] = "TZ=GMT0";
14887 char TZ_PST8[] = "TZ=PST8";
14888 main()
14889 {
14890 time_t now = time ((time_t *) 0);
14891 int hour_GMT0, hour_unset;
14892 if (putenv (TZ_GMT0) != 0)
14893 exit (1);
14894 hour_GMT0 = localtime (&now)->tm_hour;
14895 unsetenv("TZ");
14896 hour_unset = localtime (&now)->tm_hour;
14897 if (putenv (TZ_PST8) != 0)
14898 exit (1);
14899 if (localtime (&now)->tm_hour == hour_GMT0)
14900 exit (1);
14901 unsetenv("TZ");
14902 if (localtime (&now)->tm_hour != hour_unset)
14903 exit (1);
14904 exit (0);
14905 }
14906 _ACEOF
14907 if ac_fn_c_try_run "$LINENO"; then :
14908 emacs_cv_localtime_cache=no
14909 else
14910 emacs_cv_localtime_cache=yes
14911 fi
14912 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14913 conftest.$ac_objext conftest.beam conftest.$ac_ext
14914 fi
14915
14916 else
14917 # If we lack tzset, report that localtime does not cache TZ,
14918 # since we can't invalidate the cache if we don't have tzset.
14919 emacs_cv_localtime_cache=no
14920 fi
14921 fi
14922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14923 $as_echo "$emacs_cv_localtime_cache" >&6; }
14924 if test $emacs_cv_localtime_cache = yes; then
14925
14926 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
14927
14928 fi
14929
14930 ok_so_far=yes
14931 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14932 if test "x$ac_cv_func_socket" = x""yes; then :
14933
14934 else
14935 ok_so_far=no
14936 fi
14937
14938 if test $ok_so_far = yes; then
14939 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14940 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
14941
14942 else
14943 ok_so_far=no
14944 fi
14945
14946
14947 fi
14948 if test $ok_so_far = yes; then
14949 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14950 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
14951
14952 else
14953 ok_so_far=no
14954 fi
14955
14956
14957 fi
14958 if test $ok_so_far = yes; then
14959
14960 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
14961
14962 fi
14963
14964 if test -f /usr/lpp/X11/bin/smt.exp; then
14965
14966 $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
14967
14968 fi
14969
14970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
14971 $as_echo_n "checking whether system supports dynamic ptys... " >&6; }
14972 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14974 $as_echo "yes" >&6; }
14975
14976 $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
14977
14978 else
14979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14980 $as_echo "no" >&6; }
14981 fi
14982
14983 case $canonical in
14984 *-solaris2.4 | *-solaris2.4.*)
14985 : ${ac_cv_func_vfork_works=no};;
14986 esac
14987
14988 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14989 if test "x$ac_cv_type_pid_t" = x""yes; then :
14990
14991 else
14992
14993 cat >>confdefs.h <<_ACEOF
14994 #define pid_t int
14995 _ACEOF
14996
14997 fi
14998
14999 for ac_header in vfork.h
15000 do :
15001 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15002 if test "x$ac_cv_header_vfork_h" = x""yes; then :
15003 cat >>confdefs.h <<_ACEOF
15004 #define HAVE_VFORK_H 1
15005 _ACEOF
15006
15007 fi
15008
15009 done
15010
15011 for ac_func in fork vfork
15012 do :
15013 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15014 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15015 eval as_val=\$$as_ac_var
15016 if test "x$as_val" = x""yes; then :
15017 cat >>confdefs.h <<_ACEOF
15018 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15019 _ACEOF
15020
15021 fi
15022 done
15023
15024 if test "x$ac_cv_func_fork" = xyes; then
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15026 $as_echo_n "checking for working fork... " >&6; }
15027 if test "${ac_cv_func_fork_works+set}" = set; then :
15028 $as_echo_n "(cached) " >&6
15029 else
15030 if test "$cross_compiling" = yes; then :
15031 ac_cv_func_fork_works=cross
15032 else
15033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15034 /* end confdefs.h. */
15035 $ac_includes_default
15036 int
15037 main ()
15038 {
15039
15040 /* By Ruediger Kuhlmann. */
15041 return fork () < 0;
15042
15043 ;
15044 return 0;
15045 }
15046 _ACEOF
15047 if ac_fn_c_try_run "$LINENO"; then :
15048 ac_cv_func_fork_works=yes
15049 else
15050 ac_cv_func_fork_works=no
15051 fi
15052 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15053 conftest.$ac_objext conftest.beam conftest.$ac_ext
15054 fi
15055
15056 fi
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15058 $as_echo "$ac_cv_func_fork_works" >&6; }
15059
15060 else
15061 ac_cv_func_fork_works=$ac_cv_func_fork
15062 fi
15063 if test "x$ac_cv_func_fork_works" = xcross; then
15064 case $host in
15065 *-*-amigaos* | *-*-msdosdjgpp*)
15066 # Override, as these systems have only a dummy fork() stub
15067 ac_cv_func_fork_works=no
15068 ;;
15069 *)
15070 ac_cv_func_fork_works=yes
15071 ;;
15072 esac
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15074 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15075 fi
15076 ac_cv_func_vfork_works=$ac_cv_func_vfork
15077 if test "x$ac_cv_func_vfork" = xyes; then
15078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15079 $as_echo_n "checking for working vfork... " >&6; }
15080 if test "${ac_cv_func_vfork_works+set}" = set; then :
15081 $as_echo_n "(cached) " >&6
15082 else
15083 if test "$cross_compiling" = yes; then :
15084 ac_cv_func_vfork_works=cross
15085 else
15086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15087 /* end confdefs.h. */
15088 /* Thanks to Paul Eggert for this test. */
15089 $ac_includes_default
15090 #include <sys/wait.h>
15091 #ifdef HAVE_VFORK_H
15092 # include <vfork.h>
15093 #endif
15094 /* On some sparc systems, changes by the child to local and incoming
15095 argument registers are propagated back to the parent. The compiler
15096 is told about this with #include <vfork.h>, but some compilers
15097 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15098 static variable whose address is put into a register that is
15099 clobbered by the vfork. */
15100 static void
15101 #ifdef __cplusplus
15102 sparc_address_test (int arg)
15103 # else
15104 sparc_address_test (arg) int arg;
15105 #endif
15106 {
15107 static pid_t child;
15108 if (!child) {
15109 child = vfork ();
15110 if (child < 0) {
15111 perror ("vfork");
15112 _exit(2);
15113 }
15114 if (!child) {
15115 arg = getpid();
15116 write(-1, "", 0);
15117 _exit (arg);
15118 }
15119 }
15120 }
15121
15122 int
15123 main ()
15124 {
15125 pid_t parent = getpid ();
15126 pid_t child;
15127
15128 sparc_address_test (0);
15129
15130 child = vfork ();
15131
15132 if (child == 0) {
15133 /* Here is another test for sparc vfork register problems. This
15134 test uses lots of local variables, at least as many local
15135 variables as main has allocated so far including compiler
15136 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15137 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15138 reuse the register of parent for one of the local variables,
15139 since it will think that parent can't possibly be used any more
15140 in this routine. Assigning to the local variable will thus
15141 munge parent in the parent process. */
15142 pid_t
15143 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15144 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15145 /* Convince the compiler that p..p7 are live; otherwise, it might
15146 use the same hardware register for all 8 local variables. */
15147 if (p != p1 || p != p2 || p != p3 || p != p4
15148 || p != p5 || p != p6 || p != p7)
15149 _exit(1);
15150
15151 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15152 from child file descriptors. If the child closes a descriptor
15153 before it execs or exits, this munges the parent's descriptor
15154 as well. Test for this by closing stdout in the child. */
15155 _exit(close(fileno(stdout)) != 0);
15156 } else {
15157 int status;
15158 struct stat st;
15159
15160 while (wait(&status) != child)
15161 ;
15162 return (
15163 /* Was there some problem with vforking? */
15164 child < 0
15165
15166 /* Did the child fail? (This shouldn't happen.) */
15167 || status
15168
15169 /* Did the vfork/compiler bug occur? */
15170 || parent != getpid()
15171
15172 /* Did the file descriptor bug occur? */
15173 || fstat(fileno(stdout), &st) != 0
15174 );
15175 }
15176 }
15177 _ACEOF
15178 if ac_fn_c_try_run "$LINENO"; then :
15179 ac_cv_func_vfork_works=yes
15180 else
15181 ac_cv_func_vfork_works=no
15182 fi
15183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15184 conftest.$ac_objext conftest.beam conftest.$ac_ext
15185 fi
15186
15187 fi
15188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15189 $as_echo "$ac_cv_func_vfork_works" >&6; }
15190
15191 fi;
15192 if test "x$ac_cv_func_fork_works" = xcross; then
15193 ac_cv_func_vfork_works=$ac_cv_func_vfork
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15195 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15196 fi
15197
15198 if test "x$ac_cv_func_vfork_works" = xyes; then
15199
15200 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15201
15202 else
15203
15204 $as_echo "#define vfork fork" >>confdefs.h
15205
15206 fi
15207 if test "x$ac_cv_func_fork_works" = xyes; then
15208
15209 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15210
15211 fi
15212
15213
15214 for ac_func in snprintf
15215 do :
15216 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15217 if test "x$ac_cv_func_snprintf" = x""yes; then :
15218 cat >>confdefs.h <<_ACEOF
15219 #define HAVE_SNPRINTF 1
15220 _ACEOF
15221
15222 fi
15223 done
15224
15225
15226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15227 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15228 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15229 $as_echo_n "(cached) " >&6
15230 else
15231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15232 /* end confdefs.h. */
15233 #include <langinfo.h>
15234 int
15235 main ()
15236 {
15237 char* cs = nl_langinfo(CODESET);
15238 ;
15239 return 0;
15240 }
15241 _ACEOF
15242 if ac_fn_c_try_link "$LINENO"; then :
15243 emacs_cv_langinfo_codeset=yes
15244 else
15245 emacs_cv_langinfo_codeset=no
15246 fi
15247 rm -f core conftest.err conftest.$ac_objext \
15248 conftest$ac_exeext conftest.$ac_ext
15249
15250 fi
15251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15252 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
15253 if test $emacs_cv_langinfo_codeset = yes; then
15254
15255 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
15256
15257 fi
15258
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15260 $as_echo_n "checking for mbstate_t... " >&6; }
15261 if test "${ac_cv_type_mbstate_t+set}" = set; then :
15262 $as_echo_n "(cached) " >&6
15263 else
15264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15265 /* end confdefs.h. */
15266 $ac_includes_default
15267 # include <wchar.h>
15268 int
15269 main ()
15270 {
15271 mbstate_t x; return sizeof x;
15272 ;
15273 return 0;
15274 }
15275 _ACEOF
15276 if ac_fn_c_try_compile "$LINENO"; then :
15277 ac_cv_type_mbstate_t=yes
15278 else
15279 ac_cv_type_mbstate_t=no
15280 fi
15281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15282 fi
15283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15284 $as_echo "$ac_cv_type_mbstate_t" >&6; }
15285 if test $ac_cv_type_mbstate_t = yes; then
15286
15287 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15288
15289 else
15290
15291 $as_echo "#define mbstate_t int" >>confdefs.h
15292
15293 fi
15294
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15296 $as_echo_n "checking for C restricted array declarations... " >&6; }
15297 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15298 $as_echo_n "(cached) " >&6
15299 else
15300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15301 /* end confdefs.h. */
15302 void fred (int x[__restrict]);
15303 int
15304 main ()
15305 {
15306
15307 ;
15308 return 0;
15309 }
15310 _ACEOF
15311 if ac_fn_c_try_compile "$LINENO"; then :
15312 emacs_cv_c_restrict_arr=yes
15313 else
15314 emacs_cv_c_restrict_arr=no
15315 fi
15316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15317 fi
15318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15319 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
15320 if test "$emacs_cv_c_restrict_arr" = yes; then
15321
15322 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
15323
15324 fi
15325
15326
15327
15328 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
15329
15330
15331
15332 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
15333
15334
15335 ## Note: PTYs are broken on darwin <6. Use at your own risk.
15336
15337 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
15338
15339
15340
15341 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
15342
15343
15344
15345
15346
15347 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
15348
15349
15350
15351 $as_echo "#define SEPCHAR ':'" >>confdefs.h
15352
15353
15354
15355 $as_echo "#define subprocesses 1" >>confdefs.h
15356
15357
15358
15359 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
15360
15361
15362
15363
15364 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
15365
15366
15367
15368
15369
15370 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
15371
15372
15373
15374 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
15375
15376
15377
15378 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
15379
15380
15381
15382
15383
15384 case $opsys in
15385 aix4-2)
15386 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
15387 $as_echo "#define NO_EDITRES 1" >>confdefs.h
15388
15389 fi
15390 ;;
15391
15392 hpux*)
15393 $as_echo "#define NO_EDITRES 1" >>confdefs.h
15394
15395 ;;
15396 esac
15397
15398
15399 case $opsys in
15400 irix6-5 | sol2* | unixware )
15401
15402 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
15403
15404 ;;
15405 esac
15406
15407 emacs_broken_SIGIO=no
15408
15409 case $opsys in
15410 hpux* | irix6-5 | openbsd | sol2* | unixware )
15411 emacs_broken_SIGIO=yes
15412 ;;
15413
15414 aix4-2)
15415
15416 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
15417
15418 ;;
15419
15420 freebsd)
15421
15422 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
15423
15424 ;;
15425 esac
15426
15427 case $opsys in
15428 gnu-* | sol2-10 )
15429
15430 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
15431
15432 ;;
15433 esac
15434
15435 case $opsys in
15436 darwin | freebsd | netbsd | openbsd )
15437
15438 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
15439
15440 ;;
15441 esac
15442
15443 case $opsys in
15444 netbsd | openbsd) sound_device="/dev/audio" ;;
15445 *) sound_device="/dev/dsp" ;;
15446 esac
15447
15448
15449 cat >>confdefs.h <<_ACEOF
15450 #define DEFAULT_SOUND_DEVICE "$sound_device"
15451 _ACEOF
15452
15453
15454
15455 case $opsys in
15456 darwin | gnu-linux | gnu-kfreebsd )
15457
15458 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
15459
15460 ;;
15461 esac
15462
15463
15464 case $opsys in
15465 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
15466
15467 $as_echo "#define NARROWPROTO 1" >>confdefs.h
15468
15469 ;;
15470 esac
15471
15472
15473
15474
15475
15476
15477
15478
15479 case $opsys in
15480 aix4-2 )
15481 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
15482
15483 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
15484
15485 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
15486
15487 ;;
15488
15489 cygwin )
15490 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15491
15492 $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
15493
15494 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15495
15496 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15497
15498 ;;
15499
15500 darwin )
15501 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15502
15503 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15504
15505 $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
15506
15507 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15508
15509 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15510
15511 ;;
15512
15513 gnu | openbsd )
15514 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15515
15516 ;;
15517
15518 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
15519 if test "x$ac_cv_func_grantpt" = xyes; then
15520
15521 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
15522
15523 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15524
15525 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
15526
15527 if test "x$ac_cv_func_posix_openpt" = xyes; then
15528 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15529
15530 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15531
15532 elif test "x$ac_cv_func_getpt" = xyes; then
15533 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
15534
15535 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15536
15537 else
15538 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
15539
15540 fi
15541 else
15542 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15543
15544 fi
15545 ;;
15546
15547 hpux*)
15548 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15549
15550 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
15551
15552 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
15553
15554 ;;
15555
15556 irix6-5 )
15557 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
15558
15559 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
15560
15561 $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
15562
15563 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15564
15565 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15566
15567 ;;
15568
15569 sol2* )
15570 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
15571
15572 ;;
15573
15574 unixware )
15575 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
15576
15577 ;;
15578 esac
15579
15580
15581 case $opsys in
15582 sol2* | unixware )
15583 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15584
15585 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
15586
15587
15588 $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
15589
15590 ;;
15591 esac
15592
15593
15594
15595
15596 case $opsys in
15597 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
15598 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15599
15600 ;;
15601
15602 gnu-linux | gnu-kfreebsd )
15603
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15605 $as_echo_n "checking for signals via characters... " >&6; }
15606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15607 /* end confdefs.h. */
15608
15609 #include <linux/version.h>
15610 #if LINUX_VERSION_CODE < 0x20400
15611 # error "Linux version too old"
15612 #endif
15613
15614 int
15615 main ()
15616 {
15617
15618 ;
15619 return 0;
15620 }
15621 _ACEOF
15622 if ac_fn_c_try_cpp "$LINENO"; then :
15623 emacs_signals_via_chars=yes
15624 else
15625 emacs_signals_via_chars=no
15626 fi
15627 rm -f conftest.err conftest.$ac_ext
15628
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15630 $as_echo "$emacs_signals_via_chars" >&6; }
15631 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15632
15633 ;;
15634 esac
15635
15636
15637
15638
15639
15640 case $opsys in
15641 gnu)
15642 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
15643
15644 ;;
15645
15646 hpux*)
15647 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
15648
15649 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
15650
15651 ;;
15652 irix6-5)
15653 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
15654
15655 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
15656
15657 ;;
15658 esac
15659
15660
15661
15662
15663 case $opsys in
15664 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15665 ;;
15666
15667 gnu | freebsd | netbsd | openbsd )
15668
15669 $as_echo "#define TABDLY OXTABS" >>confdefs.h
15670
15671 $as_echo "#define TAB3 OXTABS" >>confdefs.h
15672
15673 ;;
15674
15675 gnu-linux | gnu-kfreebsd )
15676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15677 /* end confdefs.h. */
15678
15679 #ifndef __ia64__
15680 # error "not ia64"
15681 #endif
15682
15683 int
15684 main ()
15685 {
15686
15687 ;
15688 return 0;
15689 }
15690 _ACEOF
15691 if ac_fn_c_try_cpp "$LINENO"; then :
15692
15693 $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
15694
15695 fi
15696 rm -f conftest.err conftest.$ac_ext
15697 ;;
15698
15699 hpux*)
15700
15701 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
15702
15703 ;;
15704 esac
15705
15706
15707
15708
15709
15710
15711
15712 case $opsys in
15713 aix4-2 | hpux* | unixware)
15714 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
15715
15716 ;;
15717
15718 gnu-linux | gnu-kfreebsd )
15719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15720 /* end confdefs.h. */
15721
15722 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15723 || defined __alpha__ || defined __mips__ || defined __s390__ \
15724 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15725 || defined __ia64__ || defined __sh__
15726 /* ok */
15727 #else
15728 # error "setjmp not known to work on this arch"
15729 #endif
15730
15731 int
15732 main ()
15733 {
15734
15735 ;
15736 return 0;
15737 }
15738 _ACEOF
15739 if ac_fn_c_try_cpp "$LINENO"; then :
15740 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15741
15742 else
15743 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
15744
15745 fi
15746 rm -f conftest.err conftest.$ac_ext
15747 ;;
15748 esac
15749
15750
15751 if test x$GCC = xyes; then
15752 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15753
15754 else
15755 case $opsys in
15756 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15757 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15758
15759 ;;
15760 esac
15761 fi
15762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
15763 $as_echo_n "checking for _setjmp... " >&6; }
15764 if test "${emacs_cv_func__setjmp+set}" = set; then :
15765 $as_echo_n "(cached) " >&6
15766 else
15767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15768 /* end confdefs.h. */
15769 #include <setjmp.h>
15770
15771 int
15772 main ()
15773 {
15774 jmp_buf j;
15775 if (! _setjmp (j))
15776 _longjmp (j, 1);
15777 ;
15778 return 0;
15779 }
15780 _ACEOF
15781 if ac_fn_c_try_link "$LINENO"; then :
15782 emacs_cv_func__setjmp=yes
15783 else
15784 emacs_cv_func__setjmp=no
15785 fi
15786 rm -f core conftest.err conftest.$ac_objext \
15787 conftest$ac_exeext conftest.$ac_ext
15788 fi
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
15790 $as_echo "$emacs_cv_func__setjmp" >&6; }
15791 if test $emacs_cv_func__setjmp = yes; then
15792
15793 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
15794
15795 else
15796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
15797 $as_echo_n "checking for sigsetjmp... " >&6; }
15798 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
15799 $as_echo_n "(cached) " >&6
15800 else
15801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15802 /* end confdefs.h. */
15803 #include <setjmp.h>
15804
15805 int
15806 main ()
15807 {
15808 sigjmp_buf j;
15809 if (! sigsetjmp (j, 1))
15810 siglongjmp (j, 1);
15811 ;
15812 return 0;
15813 }
15814 _ACEOF
15815 if ac_fn_c_try_link "$LINENO"; then :
15816 emacs_cv_func_sigsetjmp=yes
15817 else
15818 emacs_cv_func_sigsetjmp=no
15819 fi
15820 rm -f core conftest.err conftest.$ac_objext \
15821 conftest$ac_exeext conftest.$ac_ext
15822 fi
15823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
15824 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
15825 if test $emacs_cv_func_sigsetjmp = yes; then
15826
15827 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
15828
15829 fi
15830 fi
15831
15832 case $opsys in
15833 sol2* | unixware )
15834
15835 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15836
15837 ;;
15838 esac
15839
15840
15841 case $opsys in
15842 hpux* | sol2* )
15843
15844 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
15845
15846 ;;
15847 esac
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857 case $opsys in
15858 aix4-2)
15859 $as_echo "#define USG /**/" >>confdefs.h
15860
15861 $as_echo "#define USG5 /**/" >>confdefs.h
15862
15863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15864 /* end confdefs.h. */
15865
15866 #ifndef _AIX
15867 # error "_AIX not defined"
15868 #endif
15869
15870 int
15871 main ()
15872 {
15873
15874 ;
15875 return 0;
15876 }
15877 _ACEOF
15878 if ac_fn_c_try_cpp "$LINENO"; then :
15879
15880 else
15881
15882 $as_echo "#define _AIX /**/" >>confdefs.h
15883
15884 fi
15885 rm -f conftest.err conftest.$ac_ext
15886 ;;
15887
15888 cygwin)
15889
15890 $as_echo "#define CYGWIN 1" >>confdefs.h
15891
15892 ;;
15893
15894 darwin)
15895 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
15896
15897
15898 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
15899
15900 ;;
15901
15902 freebsd)
15903
15904 $as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
15905
15906 ;;
15907
15908 gnu | netbsd | openbsd )
15909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15910 /* end confdefs.h. */
15911
15912 #ifndef BSD_SYSTEM
15913 # error "BSD_SYSTEM not defined"
15914 #endif
15915
15916 int
15917 main ()
15918 {
15919
15920 ;
15921 return 0;
15922 }
15923 _ACEOF
15924 if ac_fn_c_try_cpp "$LINENO"; then :
15925
15926 else
15927 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
15928
15929 fi
15930 rm -f conftest.err conftest.$ac_ext
15931 ;;
15932
15933 gnu-linux | gnu-kfreebsd )
15934 $as_echo "#define USG /**/" >>confdefs.h
15935
15936
15937 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
15938
15939 ;;
15940
15941 hpux*)
15942 $as_echo "#define USG /**/" >>confdefs.h
15943
15944 $as_echo "#define USG5 /**/" >>confdefs.h
15945
15946
15947 $as_echo "#define HPUX /**/" >>confdefs.h
15948
15949 ;;
15950
15951 irix6-5)
15952 $as_echo "#define USG /**/" >>confdefs.h
15953
15954 $as_echo "#define USG5 /**/" >>confdefs.h
15955
15956 $as_echo "#define USG5_4 /**/" >>confdefs.h
15957
15958
15959 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
15960
15961 ;;
15962
15963 sol2*)
15964 $as_echo "#define USG /**/" >>confdefs.h
15965
15966 $as_echo "#define USG5 /**/" >>confdefs.h
15967
15968 $as_echo "#define USG5_4 /**/" >>confdefs.h
15969
15970
15971 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
15972
15973 ;;
15974
15975 unixware)
15976 $as_echo "#define USG /**/" >>confdefs.h
15977
15978 $as_echo "#define USG5 /**/" >>confdefs.h
15979
15980 $as_echo "#define USG5_4 /**/" >>confdefs.h
15981
15982 ;;
15983 esac
15984
15985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
15986 $as_echo_n "checking for usable FIONREAD... " >&6; }
15987 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
15988 $as_echo_n "(cached) " >&6
15989 else
15990 case $opsys in
15991 aix4-2)
15992 emacs_cv_usable_FIONREAD=no
15993 ;;
15994
15995 *)
15996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15997 /* end confdefs.h. */
15998 #include <sys/types.h>
15999 #include <sys/ioctl.h>
16000 #ifdef USG5_4
16001 # include <sys/filio.h>
16002 #endif
16003
16004 int
16005 main ()
16006 {
16007 int foo = ioctl (0, FIONREAD, &foo);
16008 ;
16009 return 0;
16010 }
16011 _ACEOF
16012 if ac_fn_c_try_compile "$LINENO"; then :
16013 emacs_cv_usable_FIONREAD=yes
16014 else
16015 emacs_cv_usable_FIONREAD=no
16016 fi
16017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16018 ;;
16019 esac
16020 fi
16021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16022 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16023 if test $emacs_cv_usable_FIONREAD = yes; then
16024
16025 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16026
16027
16028 if test $emacs_broken_SIGIO = no; then
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16030 $as_echo_n "checking for usable SIGIO... " >&6; }
16031 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16032 $as_echo_n "(cached) " >&6
16033 else
16034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16035 /* end confdefs.h. */
16036 #include <fcntl.h>
16037 #include <signal.h>
16038
16039 int
16040 main ()
16041 {
16042 int foo = SIGIO | F_SETFL | FASYNC;
16043 ;
16044 return 0;
16045 }
16046 _ACEOF
16047 if ac_fn_c_try_compile "$LINENO"; then :
16048 emacs_cv_usable_SIGIO=yes
16049 else
16050 emacs_cv_usable_SIGIO=no
16051 fi
16052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16053 fi
16054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16055 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
16056 if test $emacs_cv_usable_SIGIO = yes; then
16057
16058 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16059
16060 fi
16061 fi
16062 fi
16063
16064
16065 case $opsys in
16066 cygwin)
16067
16068 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
16069
16070 ;;
16071
16072 hpux11)
16073
16074 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
16075
16076 ;;
16077
16078 irix6-5)
16079
16080 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
16081
16082 ;;
16083
16084 sol2-10)
16085
16086 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
16087
16088 ;;
16089 esac
16090
16091 # Set up the CFLAGS for real compilation, so we can substitute it.
16092 CFLAGS="$REAL_CFLAGS"
16093 CPPFLAGS="$REAL_CPPFLAGS"
16094
16095 ## Hack to detect a buggy GCC version.
16096 if test "x$GCC" = xyes \
16097 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16098 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16099 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16100 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16101 fi
16102
16103 version=$PACKAGE_VERSION
16104
16105 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
16106
16107 cat >>confdefs.h <<_ACEOF
16108 #define COPYRIGHT "$copyright"
16109 _ACEOF
16110
16111
16112
16113 ### Specify what sort of things we'll be editing into Makefile and config.h.
16114 ### Use configuration here uncanonicalized to avoid exceeding size limits.
16115
16116
16117 ## Unused?
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16141 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16142 ## end of LIBX_BASE, but nothing ever set it.
16143
16144
16145
16146
16147 ## Used in lwlib/Makefile.in.
16148
16149
16150
16151
16152
16153
16154
16155
16156 if test -n "${term_header}"; then
16157
16158 cat >>confdefs.h <<_ACEOF
16159 #define TERM_HEADER "${term_header}"
16160 _ACEOF
16161
16162 fi
16163
16164
16165 cat >>confdefs.h <<_ACEOF
16166 #define EMACS_CONFIGURATION "${canonical}"
16167 _ACEOF
16168
16169 emacs_config_options=`echo "$emacs_config_options" | sed -e "s/\"/'/g"`
16170
16171 cat >>confdefs.h <<_ACEOF
16172 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
16173 _ACEOF
16174
16175
16176
16177 XMENU_OBJ=
16178 XOBJ=
16179 FONT_OBJ=
16180 if test "${HAVE_X_WINDOWS}" = "yes" ; then
16181
16182 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
16183
16184 XMENU_OBJ=xmenu.o
16185 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
16186 FONT_OBJ=xfont.o
16187 if test "$HAVE_XFT" = "yes"; then
16188 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
16189 elif test "$HAVE_FREETYPE" = "yes"; then
16190 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
16191 fi
16192
16193 fi
16194
16195
16196
16197
16198 WIDGET_OBJ=
16199 MOTIF_LIBW=
16200 if test "${USE_X_TOOLKIT}" != "none" ; then
16201 WIDGET_OBJ=widget.o
16202
16203 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
16204
16205 if test "${USE_X_TOOLKIT}" = "LUCID"; then
16206
16207 $as_echo "#define USE_LUCID 1" >>confdefs.h
16208
16209 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
16210
16211 $as_echo "#define USE_MOTIF 1" >>confdefs.h
16212
16213 MOTIF_LIBW=-lXm
16214 case "$opsys" in
16215 gnu-linux)
16216 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
16217 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
16218 ;;
16219
16220 unixware)
16221 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
16222 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
16223 MOTIF_LIBW="MOTIF_LIBW -lXimp"
16224 ;;
16225
16226 aix4-2)
16227 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
16228 MOTIF_LIBW="$MOTIF_LIBW -li18n"
16229 ;;
16230 esac
16231 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
16232 fi
16233 fi
16234
16235
16236 TOOLKIT_LIBW=
16237 case "$USE_X_TOOLKIT" in
16238 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
16239 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
16240 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
16241 esac
16242
16243
16244 if test "$USE_X_TOOLKIT" = "none"; then
16245 LIBXT_OTHER="\$(LIBXSM)"
16246 OLDXMENU_TARGET="really-oldXMenu"
16247 else
16248 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
16249 OLDXMENU_TARGET="really-lwlib"
16250 fi
16251
16252
16253 ## The X Menu stuff is present in the X10 distribution, but missing
16254 ## from X11. If we have X10, just use the installed library;
16255 ## otherwise, use our own copy.
16256 if test "${HAVE_X11}" = "yes" ; then
16257
16258 $as_echo "#define HAVE_X11 1" >>confdefs.h
16259
16260
16261 if test "$USE_X_TOOLKIT" = "none"; then
16262 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
16263 else
16264 OLDXMENU="\${lwlibdir}/liblw.a"
16265 fi
16266 LIBXMENU="\$(OLDXMENU)"
16267 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16268 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
16269 else
16270 ## For a syntactically valid Makefile; not actually used for anything.
16271 ## See comments in src/Makefile.in.
16272 OLDXMENU=nothing
16273 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
16274 if test "${HAVE_X_WINDOWS}" = "yes"; then
16275 LIBXMENU="-lXMenu"
16276 else
16277 LIBXMENU=
16278 fi
16279 LIBX_OTHER=
16280 OLDXMENU_DEPS=
16281 fi
16282
16283 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
16284 OLDXMENU_TARGET=
16285 OLDXMENU=nothing
16286 LIBXMENU=
16287 OLDXMENU_DEPS=
16288 fi
16289
16290
16291
16292
16293
16294
16295
16296 if test "${HAVE_MENUS}" = "yes" ; then
16297
16298 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
16299
16300 fi
16301
16302 if test "${GNU_MALLOC}" = "yes" ; then
16303
16304 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
16305
16306 fi
16307
16308 RALLOC_OBJ=
16309 if test "${REL_ALLOC}" = "yes" ; then
16310
16311 $as_echo "#define REL_ALLOC 1" >>confdefs.h
16312
16313
16314 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
16315 fi
16316
16317
16318 if test "$opsys" = "cygwin"; then
16319 CYGWIN_OBJ="sheap.o cygw32.o"
16320 ## Cygwin differs because of its unexec().
16321 PRE_ALLOC_OBJ=
16322 POST_ALLOC_OBJ=lastfile.o
16323 else
16324 CYGWIN_OBJ=
16325 PRE_ALLOC_OBJ=lastfile.o
16326 POST_ALLOC_OBJ=
16327 fi
16328
16329
16330
16331
16332 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
16333 # it temporarily reverts them to their pre-pkg-config values,
16334 # because gnulib needs to work with both src (which uses the
16335 # pkg-config stuff) and lib-src (which does not). For example, gnulib
16336 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
16337 # and it therefore needs to run in an environment where LIBS does not
16338 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
16339 # for some package unrelated to lib-src.
16340 SAVE_CFLAGS=$CFLAGS
16341 SAVE_LIBS=$LIBS
16342 CFLAGS=$pre_PKG_CONFIG_CFLAGS
16343 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355 LIBC_FATAL_STDERR_=1
16356 export LIBC_FATAL_STDERR_
16357
16358 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16359 # for constant arguments. Useless!
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16361 $as_echo_n "checking for working alloca.h... " >&6; }
16362 if test "${ac_cv_working_alloca_h+set}" = set; then :
16363 $as_echo_n "(cached) " >&6
16364 else
16365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366 /* end confdefs.h. */
16367 #include <alloca.h>
16368 int
16369 main ()
16370 {
16371 char *p = (char *) alloca (2 * sizeof (int));
16372 if (p) return 0;
16373 ;
16374 return 0;
16375 }
16376 _ACEOF
16377 if ac_fn_c_try_link "$LINENO"; then :
16378 ac_cv_working_alloca_h=yes
16379 else
16380 ac_cv_working_alloca_h=no
16381 fi
16382 rm -f core conftest.err conftest.$ac_objext \
16383 conftest$ac_exeext conftest.$ac_ext
16384 fi
16385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16386 $as_echo "$ac_cv_working_alloca_h" >&6; }
16387 if test $ac_cv_working_alloca_h = yes; then
16388
16389 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
16390
16391 fi
16392
16393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16394 $as_echo_n "checking for alloca... " >&6; }
16395 if test "${ac_cv_func_alloca_works+set}" = set; then :
16396 $as_echo_n "(cached) " >&6
16397 else
16398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16399 /* end confdefs.h. */
16400 #ifdef __GNUC__
16401 # define alloca __builtin_alloca
16402 #else
16403 # ifdef _MSC_VER
16404 # include <malloc.h>
16405 # define alloca _alloca
16406 # else
16407 # ifdef HAVE_ALLOCA_H
16408 # include <alloca.h>
16409 # else
16410 # ifdef _AIX
16411 #pragma alloca
16412 # else
16413 # ifndef alloca /* predefined by HP cc +Olibcalls */
16414 char *alloca ();
16415 # endif
16416 # endif
16417 # endif
16418 # endif
16419 #endif
16420
16421 int
16422 main ()
16423 {
16424 char *p = (char *) alloca (1);
16425 if (p) return 0;
16426 ;
16427 return 0;
16428 }
16429 _ACEOF
16430 if ac_fn_c_try_link "$LINENO"; then :
16431 ac_cv_func_alloca_works=yes
16432 else
16433 ac_cv_func_alloca_works=no
16434 fi
16435 rm -f core conftest.err conftest.$ac_objext \
16436 conftest$ac_exeext conftest.$ac_ext
16437 fi
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16439 $as_echo "$ac_cv_func_alloca_works" >&6; }
16440
16441 if test $ac_cv_func_alloca_works = yes; then
16442
16443 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16444
16445 else
16446 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16447 # that cause trouble. Some versions do not even contain alloca or
16448 # contain a buggy version. If you still want to use their alloca,
16449 # use ar to extract alloca.o from them instead of compiling alloca.c.
16450
16451
16452
16453
16454
16455 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
16456
16457 $as_echo "#define C_ALLOCA 1" >>confdefs.h
16458
16459
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16461 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16462 if test "${ac_cv_os_cray+set}" = set; then :
16463 $as_echo_n "(cached) " >&6
16464 else
16465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16466 /* end confdefs.h. */
16467 #if defined CRAY && ! defined CRAY2
16468 webecray
16469 #else
16470 wenotbecray
16471 #endif
16472
16473 _ACEOF
16474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16475 $EGREP "webecray" >/dev/null 2>&1; then :
16476 ac_cv_os_cray=yes
16477 else
16478 ac_cv_os_cray=no
16479 fi
16480 rm -f conftest*
16481
16482 fi
16483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16484 $as_echo "$ac_cv_os_cray" >&6; }
16485 if test $ac_cv_os_cray = yes; then
16486 for ac_func in _getb67 GETB67 getb67; do
16487 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16488 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16489 eval as_val=\$$as_ac_var
16490 if test "x$as_val" = x""yes; then :
16491
16492 cat >>confdefs.h <<_ACEOF
16493 #define CRAY_STACKSEG_END $ac_func
16494 _ACEOF
16495
16496 break
16497 fi
16498
16499 done
16500 fi
16501
16502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16503 $as_echo_n "checking stack direction for C alloca... " >&6; }
16504 if test "${ac_cv_c_stack_direction+set}" = set; then :
16505 $as_echo_n "(cached) " >&6
16506 else
16507 if test "$cross_compiling" = yes; then :
16508 ac_cv_c_stack_direction=0
16509 else
16510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16511 /* end confdefs.h. */
16512 $ac_includes_default
16513 int
16514 find_stack_direction (int *addr, int depth)
16515 {
16516 int dir, dummy = 0;
16517 if (! addr)
16518 addr = &dummy;
16519 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16520 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16521 return dir + dummy;
16522 }
16523
16524 int
16525 main (int argc, char **argv)
16526 {
16527 return find_stack_direction (0, argc + !argv + 20) < 0;
16528 }
16529 _ACEOF
16530 if ac_fn_c_try_run "$LINENO"; then :
16531 ac_cv_c_stack_direction=1
16532 else
16533 ac_cv_c_stack_direction=-1
16534 fi
16535 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16536 conftest.$ac_objext conftest.beam conftest.$ac_ext
16537 fi
16538
16539 fi
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16541 $as_echo "$ac_cv_c_stack_direction" >&6; }
16542 cat >>confdefs.h <<_ACEOF
16543 #define STACK_DIRECTION $ac_cv_c_stack_direction
16544 _ACEOF
16545
16546
16547 fi
16548
16549
16550
16551
16552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16553 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16554 if test "${ac_cv_c_bigendian+set}" = set; then :
16555 $as_echo_n "(cached) " >&6
16556 else
16557 ac_cv_c_bigendian=unknown
16558 # See if we're dealing with a universal compiler.
16559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16560 /* end confdefs.h. */
16561 #ifndef __APPLE_CC__
16562 not a universal capable compiler
16563 #endif
16564 typedef int dummy;
16565
16566 _ACEOF
16567 if ac_fn_c_try_compile "$LINENO"; then :
16568
16569 # Check for potential -arch flags. It is not universal unless
16570 # there are at least two -arch flags with different values.
16571 ac_arch=
16572 ac_prev=
16573 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16574 if test -n "$ac_prev"; then
16575 case $ac_word in
16576 i?86 | x86_64 | ppc | ppc64)
16577 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16578 ac_arch=$ac_word
16579 else
16580 ac_cv_c_bigendian=universal
16581 break
16582 fi
16583 ;;
16584 esac
16585 ac_prev=
16586 elif test "x$ac_word" = "x-arch"; then
16587 ac_prev=arch
16588 fi
16589 done
16590 fi
16591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16592 if test $ac_cv_c_bigendian = unknown; then
16593 # See if sys/param.h defines the BYTE_ORDER macro.
16594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16595 /* end confdefs.h. */
16596 #include <sys/types.h>
16597 #include <sys/param.h>
16598
16599 int
16600 main ()
16601 {
16602 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16603 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16604 && LITTLE_ENDIAN)
16605 bogus endian macros
16606 #endif
16607
16608 ;
16609 return 0;
16610 }
16611 _ACEOF
16612 if ac_fn_c_try_compile "$LINENO"; then :
16613 # It does; now see whether it defined to BIG_ENDIAN or not.
16614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16615 /* end confdefs.h. */
16616 #include <sys/types.h>
16617 #include <sys/param.h>
16618
16619 int
16620 main ()
16621 {
16622 #if BYTE_ORDER != BIG_ENDIAN
16623 not big endian
16624 #endif
16625
16626 ;
16627 return 0;
16628 }
16629 _ACEOF
16630 if ac_fn_c_try_compile "$LINENO"; then :
16631 ac_cv_c_bigendian=yes
16632 else
16633 ac_cv_c_bigendian=no
16634 fi
16635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16636 fi
16637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16638 fi
16639 if test $ac_cv_c_bigendian = unknown; then
16640 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16642 /* end confdefs.h. */
16643 #include <limits.h>
16644
16645 int
16646 main ()
16647 {
16648 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16649 bogus endian macros
16650 #endif
16651
16652 ;
16653 return 0;
16654 }
16655 _ACEOF
16656 if ac_fn_c_try_compile "$LINENO"; then :
16657 # It does; now see whether it defined to _BIG_ENDIAN or not.
16658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16659 /* end confdefs.h. */
16660 #include <limits.h>
16661
16662 int
16663 main ()
16664 {
16665 #ifndef _BIG_ENDIAN
16666 not big endian
16667 #endif
16668
16669 ;
16670 return 0;
16671 }
16672 _ACEOF
16673 if ac_fn_c_try_compile "$LINENO"; then :
16674 ac_cv_c_bigendian=yes
16675 else
16676 ac_cv_c_bigendian=no
16677 fi
16678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16679 fi
16680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16681 fi
16682 if test $ac_cv_c_bigendian = unknown; then
16683 # Compile a test program.
16684 if test "$cross_compiling" = yes; then :
16685 # Try to guess by grepping values from an object file.
16686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16687 /* end confdefs.h. */
16688 short int ascii_mm[] =
16689 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16690 short int ascii_ii[] =
16691 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16692 int use_ascii (int i) {
16693 return ascii_mm[i] + ascii_ii[i];
16694 }
16695 short int ebcdic_ii[] =
16696 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16697 short int ebcdic_mm[] =
16698 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16699 int use_ebcdic (int i) {
16700 return ebcdic_mm[i] + ebcdic_ii[i];
16701 }
16702 extern int foo;
16703
16704 int
16705 main ()
16706 {
16707 return use_ascii (foo) == use_ebcdic (foo);
16708 ;
16709 return 0;
16710 }
16711 _ACEOF
16712 if ac_fn_c_try_compile "$LINENO"; then :
16713 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16714 ac_cv_c_bigendian=yes
16715 fi
16716 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16717 if test "$ac_cv_c_bigendian" = unknown; then
16718 ac_cv_c_bigendian=no
16719 else
16720 # finding both strings is unlikely to happen, but who knows?
16721 ac_cv_c_bigendian=unknown
16722 fi
16723 fi
16724 fi
16725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16726 else
16727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16728 /* end confdefs.h. */
16729 $ac_includes_default
16730 int
16731 main ()
16732 {
16733
16734 /* Are we little or big endian? From Harbison&Steele. */
16735 union
16736 {
16737 long int l;
16738 char c[sizeof (long int)];
16739 } u;
16740 u.l = 1;
16741 return u.c[sizeof (long int) - 1] == 1;
16742
16743 ;
16744 return 0;
16745 }
16746 _ACEOF
16747 if ac_fn_c_try_run "$LINENO"; then :
16748 ac_cv_c_bigendian=no
16749 else
16750 ac_cv_c_bigendian=yes
16751 fi
16752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16753 conftest.$ac_objext conftest.beam conftest.$ac_ext
16754 fi
16755
16756 fi
16757 fi
16758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16759 $as_echo "$ac_cv_c_bigendian" >&6; }
16760 case $ac_cv_c_bigendian in #(
16761 yes)
16762 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16763 ;; #(
16764 no)
16765 ;; #(
16766 universal)
16767
16768 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16769
16770 ;; #(
16771 *)
16772 as_fn_error "unknown endianness
16773 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16774 esac
16775
16776
16777
16778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
16779 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
16780 if test "${gl_cv_func_c99_strtold+set}" = set; then :
16781 $as_echo_n "(cached) " >&6
16782 else
16783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16784 /* end confdefs.h. */
16785 /* On HP-UX before 11.23, strtold returns a struct instead of
16786 long double. Reject implementations like that, by requiring
16787 compatibility with the C99 prototype. */
16788 #include <stdlib.h>
16789 static long double (*p) (char const *, char **) = strtold;
16790 static long double
16791 test (char const *nptr, char **endptr)
16792 {
16793 long double r;
16794 r = strtold (nptr, endptr);
16795 return r;
16796 }
16797 int
16798 main ()
16799 {
16800 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
16801 ;
16802 return 0;
16803 }
16804 _ACEOF
16805 if ac_fn_c_try_link "$LINENO"; then :
16806 gl_cv_func_c99_strtold=yes
16807 else
16808 gl_cv_func_c99_strtold=no
16809 fi
16810 rm -f core conftest.err conftest.$ac_objext \
16811 conftest$ac_exeext conftest.$ac_ext
16812 fi
16813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
16814 $as_echo "$gl_cv_func_c99_strtold" >&6; }
16815 if test $gl_cv_func_c99_strtold = yes; then
16816
16817 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
16818
16819 fi
16820
16821
16822 GNULIB_CHDIR=0;
16823 GNULIB_CHOWN=0;
16824 GNULIB_CLOSE=0;
16825 GNULIB_DUP=0;
16826 GNULIB_DUP2=0;
16827 GNULIB_DUP3=0;
16828 GNULIB_ENVIRON=0;
16829 GNULIB_EUIDACCESS=0;
16830 GNULIB_FACCESSAT=0;
16831 GNULIB_FCHDIR=0;
16832 GNULIB_FCHOWNAT=0;
16833 GNULIB_FDATASYNC=0;
16834 GNULIB_FSYNC=0;
16835 GNULIB_FTRUNCATE=0;
16836 GNULIB_GETCWD=0;
16837 GNULIB_GETDOMAINNAME=0;
16838 GNULIB_GETDTABLESIZE=0;
16839 GNULIB_GETGROUPS=0;
16840 GNULIB_GETHOSTNAME=0;
16841 GNULIB_GETLOGIN=0;
16842 GNULIB_GETLOGIN_R=0;
16843 GNULIB_GETPAGESIZE=0;
16844 GNULIB_GETUSERSHELL=0;
16845 GNULIB_GROUP_MEMBER=0;
16846 GNULIB_ISATTY=0;
16847 GNULIB_LCHOWN=0;
16848 GNULIB_LINK=0;
16849 GNULIB_LINKAT=0;
16850 GNULIB_LSEEK=0;
16851 GNULIB_PIPE=0;
16852 GNULIB_PIPE2=0;
16853 GNULIB_PREAD=0;
16854 GNULIB_PWRITE=0;
16855 GNULIB_READ=0;
16856 GNULIB_READLINK=0;
16857 GNULIB_READLINKAT=0;
16858 GNULIB_RMDIR=0;
16859 GNULIB_SETHOSTNAME=0;
16860 GNULIB_SLEEP=0;
16861 GNULIB_SYMLINK=0;
16862 GNULIB_SYMLINKAT=0;
16863 GNULIB_TTYNAME_R=0;
16864 GNULIB_UNISTD_H_NONBLOCKING=0;
16865 GNULIB_UNISTD_H_SIGPIPE=0;
16866 GNULIB_UNLINK=0;
16867 GNULIB_UNLINKAT=0;
16868 GNULIB_USLEEP=0;
16869 GNULIB_WRITE=0;
16870 HAVE_CHOWN=1;
16871 HAVE_DUP2=1;
16872 HAVE_DUP3=1;
16873 HAVE_EUIDACCESS=1;
16874 HAVE_FACCESSAT=1;
16875 HAVE_FCHDIR=1;
16876 HAVE_FCHOWNAT=1;
16877 HAVE_FDATASYNC=1;
16878 HAVE_FSYNC=1;
16879 HAVE_FTRUNCATE=1;
16880 HAVE_GETDTABLESIZE=1;
16881 HAVE_GETGROUPS=1;
16882 HAVE_GETHOSTNAME=1;
16883 HAVE_GETLOGIN=1;
16884 HAVE_GETPAGESIZE=1;
16885 HAVE_GROUP_MEMBER=1;
16886 HAVE_LCHOWN=1;
16887 HAVE_LINK=1;
16888 HAVE_LINKAT=1;
16889 HAVE_PIPE=1;
16890 HAVE_PIPE2=1;
16891 HAVE_PREAD=1;
16892 HAVE_PWRITE=1;
16893 HAVE_READLINK=1;
16894 HAVE_READLINKAT=1;
16895 HAVE_SETHOSTNAME=1;
16896 HAVE_SLEEP=1;
16897 HAVE_SYMLINK=1;
16898 HAVE_SYMLINKAT=1;
16899 HAVE_UNLINKAT=1;
16900 HAVE_USLEEP=1;
16901 HAVE_DECL_ENVIRON=1;
16902 HAVE_DECL_FCHDIR=1;
16903 HAVE_DECL_FDATASYNC=1;
16904 HAVE_DECL_GETDOMAINNAME=1;
16905 HAVE_DECL_GETLOGIN_R=1;
16906 HAVE_DECL_GETPAGESIZE=1;
16907 HAVE_DECL_GETUSERSHELL=1;
16908 HAVE_DECL_SETHOSTNAME=1;
16909 HAVE_DECL_TTYNAME_R=1;
16910 HAVE_OS_H=0;
16911 HAVE_SYS_PARAM_H=0;
16912 REPLACE_CHOWN=0;
16913 REPLACE_CLOSE=0;
16914 REPLACE_DUP=0;
16915 REPLACE_DUP2=0;
16916 REPLACE_FCHOWNAT=0;
16917 REPLACE_FTRUNCATE=0;
16918 REPLACE_GETCWD=0;
16919 REPLACE_GETDOMAINNAME=0;
16920 REPLACE_GETLOGIN_R=0;
16921 REPLACE_GETGROUPS=0;
16922 REPLACE_GETPAGESIZE=0;
16923 REPLACE_ISATTY=0;
16924 REPLACE_LCHOWN=0;
16925 REPLACE_LINK=0;
16926 REPLACE_LINKAT=0;
16927 REPLACE_LSEEK=0;
16928 REPLACE_PREAD=0;
16929 REPLACE_PWRITE=0;
16930 REPLACE_READ=0;
16931 REPLACE_READLINK=0;
16932 REPLACE_RMDIR=0;
16933 REPLACE_SLEEP=0;
16934 REPLACE_SYMLINK=0;
16935 REPLACE_TTYNAME_R=0;
16936 REPLACE_UNLINK=0;
16937 REPLACE_UNLINKAT=0;
16938 REPLACE_USLEEP=0;
16939 REPLACE_WRITE=0;
16940 UNISTD_H_HAVE_WINSOCK2_H=0;
16941 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
16952 $as_echo_n "checking if environ is properly declared... " >&6; }
16953 if test "${gt_cv_var_environ_declaration+set}" = set; then :
16954 $as_echo_n "(cached) " >&6
16955 else
16956
16957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958 /* end confdefs.h. */
16959 #if HAVE_UNISTD_H
16960 #include <unistd.h>
16961 #endif
16962 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
16963 #include <stdlib.h>
16964
16965 extern struct { int foo; } environ;
16966 int
16967 main ()
16968 {
16969 environ.foo = 1;
16970 ;
16971 return 0;
16972 }
16973 _ACEOF
16974 if ac_fn_c_try_compile "$LINENO"; then :
16975 gt_cv_var_environ_declaration=no
16976 else
16977 gt_cv_var_environ_declaration=yes
16978 fi
16979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16980 fi
16981
16982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
16983 $as_echo "$gt_cv_var_environ_declaration" >&6; }
16984 if test $gt_cv_var_environ_declaration = yes; then
16985
16986 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
16987
16988 fi
16989
16990
16991 if test $gt_cv_var_environ_declaration != yes; then
16992 HAVE_DECL_ENVIRON=0
16993 fi
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003 GNULIB_FCNTL=0;
17004 GNULIB_NONBLOCKING=0;
17005 GNULIB_OPEN=0;
17006 GNULIB_OPENAT=0;
17007 HAVE_FCNTL=1;
17008 HAVE_OPENAT=1;
17009 REPLACE_FCNTL=0;
17010 REPLACE_OPEN=0;
17011 REPLACE_OPENAT=0;
17012
17013
17014
17015
17016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17017 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17018 if test "${gl_cv_have_include_next+set}" = set; then :
17019 $as_echo_n "(cached) " >&6
17020 else
17021 rm -rf conftestd1a conftestd1b conftestd2
17022 mkdir conftestd1a conftestd1b conftestd2
17023 cat <<EOF > conftestd1a/conftest.h
17024 #define DEFINED_IN_CONFTESTD1
17025 #include_next <conftest.h>
17026 #ifdef DEFINED_IN_CONFTESTD2
17027 int foo;
17028 #else
17029 #error "include_next doesn't work"
17030 #endif
17031 EOF
17032 cat <<EOF > conftestd1b/conftest.h
17033 #define DEFINED_IN_CONFTESTD1
17034 #include <stdio.h>
17035 #include_next <conftest.h>
17036 #ifdef DEFINED_IN_CONFTESTD2
17037 int foo;
17038 #else
17039 #error "include_next doesn't work"
17040 #endif
17041 EOF
17042 cat <<EOF > conftestd2/conftest.h
17043 #ifndef DEFINED_IN_CONFTESTD1
17044 #error "include_next test doesn't work"
17045 #endif
17046 #define DEFINED_IN_CONFTESTD2
17047 EOF
17048 gl_save_CPPFLAGS="$CPPFLAGS"
17049 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17051 /* end confdefs.h. */
17052 #include <conftest.h>
17053 _ACEOF
17054 if ac_fn_c_try_compile "$LINENO"; then :
17055 gl_cv_have_include_next=yes
17056 else
17057 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17059 /* end confdefs.h. */
17060 #include <conftest.h>
17061 _ACEOF
17062 if ac_fn_c_try_compile "$LINENO"; then :
17063 gl_cv_have_include_next=buggy
17064 else
17065 gl_cv_have_include_next=no
17066 fi
17067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17068
17069 fi
17070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17071 CPPFLAGS="$gl_save_CPPFLAGS"
17072 rm -rf conftestd1a conftestd1b conftestd2
17073
17074 fi
17075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17076 $as_echo "$gl_cv_have_include_next" >&6; }
17077 PRAGMA_SYSTEM_HEADER=
17078 if test $gl_cv_have_include_next = yes; then
17079 INCLUDE_NEXT=include_next
17080 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17081 if test -n "$GCC"; then
17082 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17083 fi
17084 else
17085 if test $gl_cv_have_include_next = buggy; then
17086 INCLUDE_NEXT=include
17087 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17088 else
17089 INCLUDE_NEXT=include
17090 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17091 fi
17092 fi
17093
17094
17095
17096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17097 $as_echo_n "checking whether system header files limit the line length... " >&6; }
17098 if test "${gl_cv_pragma_columns+set}" = set; then :
17099 $as_echo_n "(cached) " >&6
17100 else
17101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17102 /* end confdefs.h. */
17103
17104 #ifdef __TANDEM
17105 choke me
17106 #endif
17107
17108 _ACEOF
17109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17110 $EGREP "choke me" >/dev/null 2>&1; then :
17111 gl_cv_pragma_columns=yes
17112 else
17113 gl_cv_pragma_columns=no
17114 fi
17115 rm -f conftest*
17116
17117
17118 fi
17119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17120 $as_echo "$gl_cv_pragma_columns" >&6; }
17121 if test $gl_cv_pragma_columns = yes; then
17122 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17123 else
17124 PRAGMA_COLUMNS=
17125 fi
17126
17127
17128 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
17129 if test "x$ac_cv_type_mode_t" = x""yes; then :
17130
17131 else
17132
17133 cat >>confdefs.h <<_ACEOF
17134 #define mode_t int
17135 _ACEOF
17136
17137 fi
17138
17139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
17140 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
17141 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
17142 $as_echo_n "(cached) " >&6
17143 else
17144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h. */
17146
17147 #include <sys/types.h>
17148 #include <sys/stat.h>
17149 int
17150 main ()
17151 {
17152 struct stat s; s.st_dm_mode;
17153 ;
17154 return 0;
17155 }
17156 _ACEOF
17157 if ac_fn_c_try_compile "$LINENO"; then :
17158 ac_cv_struct_st_dm_mode=yes
17159 else
17160 ac_cv_struct_st_dm_mode=no
17161 fi
17162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17163 fi
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
17165 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
17166
17167 if test $ac_cv_struct_st_dm_mode = yes; then
17168
17169 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
17170
17171 fi
17172
17173
17174 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
17175 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
17176 ac_have_decl=1
17177 else
17178 ac_have_decl=0
17179 fi
17180
17181 cat >>confdefs.h <<_ACEOF
17182 #define HAVE_DECL_STRMODE $ac_have_decl
17183 _ACEOF
17184
17185
17186
17187
17188
17189
17190 GNULIB__EXIT=0;
17191 GNULIB_ATOLL=0;
17192 GNULIB_CALLOC_POSIX=0;
17193 GNULIB_CANONICALIZE_FILE_NAME=0;
17194 GNULIB_GETLOADAVG=0;
17195 GNULIB_GETSUBOPT=0;
17196 GNULIB_GRANTPT=0;
17197 GNULIB_MALLOC_POSIX=0;
17198 GNULIB_MBTOWC=0;
17199 GNULIB_MKDTEMP=0;
17200 GNULIB_MKOSTEMP=0;
17201 GNULIB_MKOSTEMPS=0;
17202 GNULIB_MKSTEMP=0;
17203 GNULIB_MKSTEMPS=0;
17204 GNULIB_POSIX_OPENPT=0;
17205 GNULIB_PTSNAME=0;
17206 GNULIB_PTSNAME_R=0;
17207 GNULIB_PUTENV=0;
17208 GNULIB_RANDOM=0;
17209 GNULIB_RANDOM_R=0;
17210 GNULIB_REALLOC_POSIX=0;
17211 GNULIB_REALPATH=0;
17212 GNULIB_RPMATCH=0;
17213 GNULIB_SETENV=0;
17214 GNULIB_STRTOD=0;
17215 GNULIB_STRTOLL=0;
17216 GNULIB_STRTOULL=0;
17217 GNULIB_SYSTEM_POSIX=0;
17218 GNULIB_UNLOCKPT=0;
17219 GNULIB_UNSETENV=0;
17220 GNULIB_WCTOMB=0;
17221 HAVE__EXIT=1;
17222 HAVE_ATOLL=1;
17223 HAVE_CANONICALIZE_FILE_NAME=1;
17224 HAVE_DECL_GETLOADAVG=1;
17225 HAVE_GETSUBOPT=1;
17226 HAVE_GRANTPT=1;
17227 HAVE_MKDTEMP=1;
17228 HAVE_MKOSTEMP=1;
17229 HAVE_MKOSTEMPS=1;
17230 HAVE_MKSTEMP=1;
17231 HAVE_MKSTEMPS=1;
17232 HAVE_POSIX_OPENPT=1;
17233 HAVE_PTSNAME=1;
17234 HAVE_PTSNAME_R=1;
17235 HAVE_RANDOM=1;
17236 HAVE_RANDOM_H=1;
17237 HAVE_RANDOM_R=1;
17238 HAVE_REALPATH=1;
17239 HAVE_RPMATCH=1;
17240 HAVE_SETENV=1;
17241 HAVE_DECL_SETENV=1;
17242 HAVE_STRTOD=1;
17243 HAVE_STRTOLL=1;
17244 HAVE_STRTOULL=1;
17245 HAVE_STRUCT_RANDOM_DATA=1;
17246 HAVE_SYS_LOADAVG_H=0;
17247 HAVE_UNLOCKPT=1;
17248 HAVE_DECL_UNSETENV=1;
17249 REPLACE_CALLOC=0;
17250 REPLACE_CANONICALIZE_FILE_NAME=0;
17251 REPLACE_MALLOC=0;
17252 REPLACE_MBTOWC=0;
17253 REPLACE_MKSTEMP=0;
17254 REPLACE_PTSNAME=0;
17255 REPLACE_PTSNAME_R=0;
17256 REPLACE_PUTENV=0;
17257 REPLACE_RANDOM_R=0;
17258 REPLACE_REALLOC=0;
17259 REPLACE_REALPATH=0;
17260 REPLACE_SETENV=0;
17261 REPLACE_STRTOD=0;
17262 REPLACE_UNSETENV=0;
17263 REPLACE_WCTOMB=0;
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280 if test $gl_cv_have_include_next = yes; then
17281 gl_cv_next_getopt_h='<'getopt.h'>'
17282 else
17283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
17284 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
17285 if test "${gl_cv_next_getopt_h+set}" = set; then :
17286 $as_echo_n "(cached) " >&6
17287 else
17288
17289 if test $ac_cv_header_getopt_h = yes; then
17290
17291
17292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17293 /* end confdefs.h. */
17294 #include <getopt.h>
17295
17296 _ACEOF
17297 case "$host_os" in
17298 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17299 *) gl_absname_cpp="$ac_cpp" ;;
17300 esac
17301
17302 case "$host_os" in
17303 mingw*)
17304 gl_dirsep_regex='[/\\]'
17305 ;;
17306 *)
17307 gl_dirsep_regex='\/'
17308 ;;
17309 esac
17310 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17311
17312 gl_header_literal_regex=`echo 'getopt.h' \
17313 | sed -e "$gl_make_literal_regex_sed"`
17314 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17315 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17316 s|^/[^/]|//&|
17317 p
17318 q
17319 }'
17320 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17321 sed -n "$gl_absolute_header_sed"`'"'
17322 else
17323 gl_cv_next_getopt_h='<'getopt.h'>'
17324 fi
17325
17326
17327 fi
17328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
17329 $as_echo "$gl_cv_next_getopt_h" >&6; }
17330 fi
17331 NEXT_GETOPT_H=$gl_cv_next_getopt_h
17332
17333 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17334 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17335 gl_next_as_first_directive='<'getopt.h'>'
17336 else
17337 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17338 gl_next_as_first_directive=$gl_cv_next_getopt_h
17339 fi
17340 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
17341
17342
17343
17344
17345 if test $ac_cv_header_getopt_h = yes; then
17346 HAVE_GETOPT_H=1
17347 else
17348 HAVE_GETOPT_H=0
17349 fi
17350
17351
17352 gl_replace_getopt=
17353
17354 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17355 for ac_header in getopt.h
17356 do :
17357 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
17358 if test "x$ac_cv_header_getopt_h" = x""yes; then :
17359 cat >>confdefs.h <<_ACEOF
17360 #define HAVE_GETOPT_H 1
17361 _ACEOF
17362
17363 else
17364 gl_replace_getopt=yes
17365 fi
17366
17367 done
17368
17369 fi
17370
17371 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17372 for ac_func in getopt_long_only
17373 do :
17374 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
17375 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
17376 cat >>confdefs.h <<_ACEOF
17377 #define HAVE_GETOPT_LONG_ONLY 1
17378 _ACEOF
17379
17380 else
17381 gl_replace_getopt=yes
17382 fi
17383 done
17384
17385 fi
17386
17387 if test -z "$gl_replace_getopt"; then
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
17389 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
17390 if test "${gl_cv_func_getopt_posix+set}" = set; then :
17391 $as_echo_n "(cached) " >&6
17392 else
17393
17394 if test $cross_compiling = no; then
17395 if test "$cross_compiling" = yes; then :
17396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17397 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17398 as_fn_error "cannot run test program while cross compiling
17399 See \`config.log' for more details." "$LINENO" 5; }
17400 else
17401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17402 /* end confdefs.h. */
17403
17404 #include <unistd.h>
17405 #include <stdlib.h>
17406 #include <string.h>
17407
17408 int
17409 main ()
17410 {
17411 static char program[] = "program";
17412 static char a[] = "-a";
17413 static char foo[] = "foo";
17414 static char bar[] = "bar";
17415 char *argv[] = { program, a, foo, bar, NULL };
17416 int c;
17417
17418 c = getopt (4, argv, "ab");
17419 if (!(c == 'a'))
17420 return 1;
17421 c = getopt (4, argv, "ab");
17422 if (!(c == -1))
17423 return 2;
17424 if (!(optind == 2))
17425 return 3;
17426 return 0;
17427 }
17428
17429 _ACEOF
17430 if ac_fn_c_try_run "$LINENO"; then :
17431 gl_cv_func_getopt_posix=maybe
17432 else
17433 gl_cv_func_getopt_posix=no
17434 fi
17435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17436 conftest.$ac_objext conftest.beam conftest.$ac_ext
17437 fi
17438
17439 if test $gl_cv_func_getopt_posix = maybe; then
17440 if test "$cross_compiling" = yes; then :
17441 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17442 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17443 as_fn_error "cannot run test program while cross compiling
17444 See \`config.log' for more details." "$LINENO" 5; }
17445 else
17446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17447 /* end confdefs.h. */
17448
17449 #include <unistd.h>
17450 #include <stdlib.h>
17451 #include <string.h>
17452
17453 int
17454 main ()
17455 {
17456 static char program[] = "program";
17457 static char donald[] = "donald";
17458 static char p[] = "-p";
17459 static char billy[] = "billy";
17460 static char duck[] = "duck";
17461 static char a[] = "-a";
17462 static char bar[] = "bar";
17463 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
17464 int c;
17465
17466 c = getopt (7, argv, "+abp:q:");
17467 if (!(c == -1))
17468 return 4;
17469 if (!(strcmp (argv[0], "program") == 0))
17470 return 5;
17471 if (!(strcmp (argv[1], "donald") == 0))
17472 return 6;
17473 if (!(strcmp (argv[2], "-p") == 0))
17474 return 7;
17475 if (!(strcmp (argv[3], "billy") == 0))
17476 return 8;
17477 if (!(strcmp (argv[4], "duck") == 0))
17478 return 9;
17479 if (!(strcmp (argv[5], "-a") == 0))
17480 return 10;
17481 if (!(strcmp (argv[6], "bar") == 0))
17482 return 11;
17483 if (!(optind == 1))
17484 return 12;
17485 return 0;
17486 }
17487
17488 _ACEOF
17489 if ac_fn_c_try_run "$LINENO"; then :
17490 gl_cv_func_getopt_posix=maybe
17491 else
17492 gl_cv_func_getopt_posix=no
17493 fi
17494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17495 conftest.$ac_objext conftest.beam conftest.$ac_ext
17496 fi
17497
17498 fi
17499 if test $gl_cv_func_getopt_posix = maybe; then
17500 if test "$cross_compiling" = yes; then :
17501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17502 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17503 as_fn_error "cannot run test program while cross compiling
17504 See \`config.log' for more details." "$LINENO" 5; }
17505 else
17506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17507 /* end confdefs.h. */
17508
17509 #include <unistd.h>
17510 #include <stdlib.h>
17511 #include <string.h>
17512
17513 int
17514 main ()
17515 {
17516 static char program[] = "program";
17517 static char ab[] = "-ab";
17518 char *argv[3] = { program, ab, NULL };
17519 if (getopt (2, argv, "ab:") != 'a')
17520 return 13;
17521 if (getopt (2, argv, "ab:") != '?')
17522 return 14;
17523 if (optopt != 'b')
17524 return 15;
17525 if (optind != 2)
17526 return 16;
17527 return 0;
17528 }
17529
17530 _ACEOF
17531 if ac_fn_c_try_run "$LINENO"; then :
17532 gl_cv_func_getopt_posix=yes
17533 else
17534 gl_cv_func_getopt_posix=no
17535 fi
17536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17537 conftest.$ac_objext conftest.beam conftest.$ac_ext
17538 fi
17539
17540 fi
17541 else
17542 case "$host_os" in
17543 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
17544 *) gl_cv_func_getopt_posix="guessing yes";;
17545 esac
17546 fi
17547
17548 fi
17549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17550 $as_echo "$gl_cv_func_getopt_posix" >&6; }
17551 case "$gl_cv_func_getopt_posix" in
17552 *no) gl_replace_getopt=yes ;;
17553 esac
17554 fi
17555
17556 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17558 $as_echo_n "checking for working GNU getopt function... " >&6; }
17559 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17560 $as_echo_n "(cached) " >&6
17561 else
17562 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17563 # optstring is necessary for programs like m4 that have POSIX-mandated
17564 # semantics for supporting options interspersed with files.
17565 # Also, since getopt_long is a GNU extension, we require optind=0.
17566 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17567 # so take care to revert to the correct (non-)export state.
17568 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17569 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17570 xx) gl_had_POSIXLY_CORRECT=exported ;;
17571 x) gl_had_POSIXLY_CORRECT=yes ;;
17572 *) gl_had_POSIXLY_CORRECT= ;;
17573 esac
17574 POSIXLY_CORRECT=1
17575 export POSIXLY_CORRECT
17576 if test "$cross_compiling" = yes; then :
17577 gl_cv_func_getopt_gnu="guessing no"
17578
17579 else
17580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h. */
17582 #include <getopt.h>
17583 #include <stddef.h>
17584 #include <string.h>
17585
17586 #include <stdlib.h>
17587 #if defined __MACH__ && defined __APPLE__
17588 /* Avoid a crash on Mac OS X. */
17589 #include <mach/mach.h>
17590 #include <mach/mach_error.h>
17591 #include <mach/thread_status.h>
17592 #include <mach/exception.h>
17593 #include <mach/task.h>
17594 #include <pthread.h>
17595 /* The exception port on which our thread listens. */
17596 static mach_port_t our_exception_port;
17597 /* The main function of the thread listening for exceptions of type
17598 EXC_BAD_ACCESS. */
17599 static void *
17600 mach_exception_thread (void *arg)
17601 {
17602 /* Buffer for a message to be received. */
17603 struct {
17604 mach_msg_header_t head;
17605 mach_msg_body_t msgh_body;
17606 char data[1024];
17607 } msg;
17608 mach_msg_return_t retval;
17609 /* Wait for a message on the exception port. */
17610 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17611 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17612 if (retval != MACH_MSG_SUCCESS)
17613 abort ();
17614 exit (1);
17615 }
17616 static void
17617 nocrash_init (void)
17618 {
17619 mach_port_t self = mach_task_self ();
17620 /* Allocate a port on which the thread shall listen for exceptions. */
17621 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17622 == KERN_SUCCESS) {
17623 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17624 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17625 MACH_MSG_TYPE_MAKE_SEND)
17626 == KERN_SUCCESS) {
17627 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17628 for us. */
17629 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17630 /* Create the thread listening on the exception port. */
17631 pthread_attr_t attr;
17632 pthread_t thread;
17633 if (pthread_attr_init (&attr) == 0
17634 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17635 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17636 pthread_attr_destroy (&attr);
17637 /* Replace the exception port info for these exceptions with our own.
17638 Note that we replace the exception port for the entire task, not only
17639 for a particular thread. This has the effect that when our exception
17640 port gets the message, the thread specific exception port has already
17641 been asked, and we don't need to bother about it.
17642 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17643 task_set_exception_ports (self, mask, our_exception_port,
17644 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17645 }
17646 }
17647 }
17648 }
17649 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17650 /* Avoid a crash on native Windows. */
17651 #define WIN32_LEAN_AND_MEAN
17652 #include <windows.h>
17653 #include <winerror.h>
17654 static LONG WINAPI
17655 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17656 {
17657 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17658 {
17659 case EXCEPTION_ACCESS_VIOLATION:
17660 case EXCEPTION_IN_PAGE_ERROR:
17661 case EXCEPTION_STACK_OVERFLOW:
17662 case EXCEPTION_GUARD_PAGE:
17663 case EXCEPTION_PRIV_INSTRUCTION:
17664 case EXCEPTION_ILLEGAL_INSTRUCTION:
17665 case EXCEPTION_DATATYPE_MISALIGNMENT:
17666 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17667 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17668 exit (1);
17669 }
17670 return EXCEPTION_CONTINUE_SEARCH;
17671 }
17672 static void
17673 nocrash_init (void)
17674 {
17675 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17676 }
17677 #else
17678 /* Avoid a crash on POSIX systems. */
17679 #include <signal.h>
17680 /* A POSIX signal handler. */
17681 static void
17682 exception_handler (int sig)
17683 {
17684 exit (1);
17685 }
17686 static void
17687 nocrash_init (void)
17688 {
17689 #ifdef SIGSEGV
17690 signal (SIGSEGV, exception_handler);
17691 #endif
17692 #ifdef SIGBUS
17693 signal (SIGBUS, exception_handler);
17694 #endif
17695 }
17696 #endif
17697
17698
17699 int
17700 main ()
17701 {
17702
17703 int result = 0;
17704
17705 nocrash_init();
17706
17707 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17708 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17709 OSF/1 5.1, Solaris 10. */
17710 {
17711 static char conftest[] = "conftest";
17712 static char plus[] = "-+";
17713 char *argv[3] = { conftest, plus, NULL };
17714 opterr = 0;
17715 if (getopt (2, argv, "+a") != '?')
17716 result |= 1;
17717 }
17718 /* This code succeeds on glibc 2.8, mingw,
17719 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17720 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17721 {
17722 static char program[] = "program";
17723 static char p[] = "-p";
17724 static char foo[] = "foo";
17725 static char bar[] = "bar";
17726 char *argv[] = { program, p, foo, bar, NULL };
17727
17728 optind = 1;
17729 if (getopt (4, argv, "p::") != 'p')
17730 result |= 2;
17731 else if (optarg != NULL)
17732 result |= 4;
17733 else if (getopt (4, argv, "p::") != -1)
17734 result |= 6;
17735 else if (optind != 2)
17736 result |= 8;
17737 }
17738 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17739 {
17740 static char program[] = "program";
17741 static char foo[] = "foo";
17742 static char p[] = "-p";
17743 char *argv[] = { program, foo, p, NULL };
17744 optind = 0;
17745 if (getopt (3, argv, "-p") != 1)
17746 result |= 16;
17747 else if (getopt (3, argv, "-p") != 'p')
17748 result |= 16;
17749 }
17750 /* This code fails on glibc 2.11. */
17751 {
17752 static char program[] = "program";
17753 static char b[] = "-b";
17754 static char a[] = "-a";
17755 char *argv[] = { program, b, a, NULL };
17756 optind = opterr = 0;
17757 if (getopt (3, argv, "+:a:b") != 'b')
17758 result |= 32;
17759 else if (getopt (3, argv, "+:a:b") != ':')
17760 result |= 32;
17761 }
17762 /* This code dumps core on glibc 2.14. */
17763 {
17764 static char program[] = "program";
17765 static char w[] = "-W";
17766 static char dummy[] = "dummy";
17767 char *argv[] = { program, w, dummy, NULL };
17768 optind = opterr = 1;
17769 if (getopt (3, argv, "W;") != 'W')
17770 result |= 64;
17771 }
17772 return result;
17773
17774 ;
17775 return 0;
17776 }
17777 _ACEOF
17778 if ac_fn_c_try_run "$LINENO"; then :
17779 gl_cv_func_getopt_gnu=yes
17780 else
17781 gl_cv_func_getopt_gnu=no
17782 fi
17783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17784 conftest.$ac_objext conftest.beam conftest.$ac_ext
17785 fi
17786
17787 case $gl_had_POSIXLY_CORRECT in
17788 exported) ;;
17789 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17790 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17791 esac
17792
17793 fi
17794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17795 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
17796 if test "$gl_cv_func_getopt_gnu" != yes; then
17797 gl_replace_getopt=yes
17798 else
17799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17800 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
17801 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
17802 $as_echo_n "(cached) " >&6
17803 else
17804 if test "$cross_compiling" = yes; then :
17805 case "$host_os" in
17806 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17807 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17808 esac
17809
17810 else
17811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17812 /* end confdefs.h. */
17813 #include <getopt.h>
17814 #include <stddef.h>
17815 #include <string.h>
17816
17817 int
17818 main ()
17819 {
17820 static const struct option long_options[] =
17821 {
17822 { "xtremely-",no_argument, NULL, 1003 },
17823 { "xtra", no_argument, NULL, 1001 },
17824 { "xtreme", no_argument, NULL, 1002 },
17825 { "xtremely", no_argument, NULL, 1003 },
17826 { NULL, 0, NULL, 0 }
17827 };
17828 /* This code fails on OpenBSD 5.0. */
17829 {
17830 static char program[] = "program";
17831 static char xtremel[] = "--xtremel";
17832 char *argv[] = { program, xtremel, NULL };
17833 int option_index;
17834 optind = 1; opterr = 0;
17835 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
17836 return 1;
17837 }
17838 return 0;
17839
17840 ;
17841 return 0;
17842 }
17843 _ACEOF
17844 if ac_fn_c_try_run "$LINENO"; then :
17845 gl_cv_func_getopt_long_gnu=yes
17846 else
17847 gl_cv_func_getopt_long_gnu=no
17848 fi
17849 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17850 conftest.$ac_objext conftest.beam conftest.$ac_ext
17851 fi
17852
17853
17854 fi
17855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
17856 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
17857 case "$gl_cv_func_getopt_long_gnu" in
17858 *yes) ;;
17859 *) gl_replace_getopt=yes ;;
17860 esac
17861 fi
17862 fi
17863
17864
17865
17866
17867
17868
17869 REPLACE_GETOPT=0
17870 if test -n "$gl_replace_getopt"; then
17871 REPLACE_GETOPT=1
17872 fi
17873
17874 if test $REPLACE_GETOPT = 1; then
17875
17876 GETOPT_H=getopt.h
17877
17878 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
17879
17880
17881
17882 fi
17883
17884 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
17885 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
17886 ac_have_decl=1
17887 else
17888 ac_have_decl=0
17889 fi
17890
17891 cat >>confdefs.h <<_ACEOF
17892 #define HAVE_DECL_GETENV $ac_have_decl
17893 _ACEOF
17894
17895 :
17896
17897
17898
17899
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
17901 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
17902 if test "${ac_cv_c_restrict+set}" = set; then :
17903 $as_echo_n "(cached) " >&6
17904 else
17905 ac_cv_c_restrict=no
17906 # The order here caters to the fact that C++ does not require restrict.
17907 for ac_kw in __restrict __restrict__ _Restrict restrict; do
17908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17909 /* end confdefs.h. */
17910 typedef int * int_ptr;
17911 int foo (int_ptr $ac_kw ip) {
17912 return ip[0];
17913 }
17914 int
17915 main ()
17916 {
17917 int s[1];
17918 int * $ac_kw t = s;
17919 t[0] = 0;
17920 return foo(t)
17921 ;
17922 return 0;
17923 }
17924 _ACEOF
17925 if ac_fn_c_try_compile "$LINENO"; then :
17926 ac_cv_c_restrict=$ac_kw
17927 fi
17928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17929 test "$ac_cv_c_restrict" != no && break
17930 done
17931
17932 fi
17933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
17934 $as_echo "$ac_cv_c_restrict" >&6; }
17935
17936 case $ac_cv_c_restrict in
17937 restrict) ;;
17938 no) $as_echo "#define restrict /**/" >>confdefs.h
17939 ;;
17940 *) cat >>confdefs.h <<_ACEOF
17941 #define restrict $ac_cv_c_restrict
17942 _ACEOF
17943 ;;
17944 esac
17945
17946
17947 GNULIB_GETTIMEOFDAY=0;
17948 HAVE_GETTIMEOFDAY=1;
17949 HAVE_STRUCT_TIMEVAL=1;
17950 HAVE_SYS_TIME_H=1;
17951 REPLACE_GETTIMEOFDAY=0;
17952 REPLACE_STRUCT_TIMEVAL=0;
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969 if test $gl_cv_have_include_next = yes; then
17970 gl_cv_next_sys_time_h='<'sys/time.h'>'
17971 else
17972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
17973 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
17974 if test "${gl_cv_next_sys_time_h+set}" = set; then :
17975 $as_echo_n "(cached) " >&6
17976 else
17977
17978 if test $ac_cv_header_sys_time_h = yes; then
17979
17980
17981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17982 /* end confdefs.h. */
17983 #include <sys/time.h>
17984
17985 _ACEOF
17986 case "$host_os" in
17987 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17988 *) gl_absname_cpp="$ac_cpp" ;;
17989 esac
17990
17991 case "$host_os" in
17992 mingw*)
17993 gl_dirsep_regex='[/\\]'
17994 ;;
17995 *)
17996 gl_dirsep_regex='\/'
17997 ;;
17998 esac
17999 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18000
18001 gl_header_literal_regex=`echo 'sys/time.h' \
18002 | sed -e "$gl_make_literal_regex_sed"`
18003 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18004 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18005 s|^/[^/]|//&|
18006 p
18007 q
18008 }'
18009 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18010 sed -n "$gl_absolute_header_sed"`'"'
18011 else
18012 gl_cv_next_sys_time_h='<'sys/time.h'>'
18013 fi
18014
18015
18016 fi
18017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
18018 $as_echo "$gl_cv_next_sys_time_h" >&6; }
18019 fi
18020 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
18021
18022 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18023 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18024 gl_next_as_first_directive='<'sys/time.h'>'
18025 else
18026 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18027 gl_next_as_first_directive=$gl_cv_next_sys_time_h
18028 fi
18029 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
18030
18031
18032
18033
18034
18035 if test $ac_cv_header_sys_time_h != yes; then
18036 HAVE_SYS_TIME_H=0
18037 fi
18038
18039
18040
18041
18042
18043 if test $ac_cv_header_sys_socket_h != yes; then
18044 for ac_header in winsock2.h
18045 do :
18046 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18047 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
18048 cat >>confdefs.h <<_ACEOF
18049 #define HAVE_WINSOCK2_H 1
18050 _ACEOF
18051
18052 fi
18053
18054 done
18055
18056 fi
18057 if test "$ac_cv_header_winsock2_h" = yes; then
18058 HAVE_WINSOCK2_H=1
18059 UNISTD_H_HAVE_WINSOCK2_H=1
18060 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18061 else
18062 HAVE_WINSOCK2_H=0
18063 fi
18064
18065
18066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
18067 $as_echo_n "checking for struct timeval... " >&6; }
18068 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
18069 $as_echo_n "(cached) " >&6
18070 else
18071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18072 /* end confdefs.h. */
18073 #if HAVE_SYS_TIME_H
18074 #include <sys/time.h>
18075 #endif
18076 #include <time.h>
18077 #if HAVE_WINSOCK2_H
18078 # include <winsock2.h>
18079 #endif
18080
18081 int
18082 main ()
18083 {
18084 static struct timeval x; x.tv_sec = x.tv_usec;
18085 ;
18086 return 0;
18087 }
18088 _ACEOF
18089 if ac_fn_c_try_compile "$LINENO"; then :
18090 gl_cv_sys_struct_timeval=yes
18091 else
18092 gl_cv_sys_struct_timeval=no
18093 fi
18094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18095
18096 fi
18097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
18098 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
18099 if test $gl_cv_sys_struct_timeval != yes; then
18100 HAVE_STRUCT_TIMEVAL=0
18101 else
18102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
18103 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
18104 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
18105 $as_echo_n "(cached) " >&6
18106 else
18107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18108 /* end confdefs.h. */
18109 #if HAVE_SYS_TIME_H
18110 #include <sys/time.h>
18111 #endif
18112 #include <time.h>
18113 #if HAVE_WINSOCK2_H
18114 # include <winsock2.h>
18115 #endif
18116
18117 int
18118 main ()
18119 {
18120 static struct timeval x;
18121 typedef int verify_tv_sec_type[
18122 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
18123 ];
18124
18125 ;
18126 return 0;
18127 }
18128 _ACEOF
18129 if ac_fn_c_try_compile "$LINENO"; then :
18130 gl_cv_sys_struct_timeval_tv_sec=yes
18131 else
18132 gl_cv_sys_struct_timeval_tv_sec=no
18133 fi
18134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18135
18136 fi
18137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
18138 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
18139 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
18140 REPLACE_STRUCT_TIMEVAL=1
18141 fi
18142 fi
18143
18144
18145
18146
18147
18148
18149
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
18151 $as_echo_n "checking for unsigned long long int... " >&6; }
18152 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
18153 $as_echo_n "(cached) " >&6
18154 else
18155 ac_cv_type_unsigned_long_long_int=yes
18156 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18158 /* end confdefs.h. */
18159
18160 /* For now, do not test the preprocessor; as of 2007 there are too many
18161 implementations with broken preprocessors. Perhaps this can
18162 be revisited in 2012. In the meantime, code should not expect
18163 #if to work with literals wider than 32 bits. */
18164 /* Test literals. */
18165 long long int ll = 9223372036854775807ll;
18166 long long int nll = -9223372036854775807LL;
18167 unsigned long long int ull = 18446744073709551615ULL;
18168 /* Test constant expressions. */
18169 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
18170 ? 1 : -1)];
18171 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
18172 ? 1 : -1)];
18173 int i = 63;
18174 int
18175 main ()
18176 {
18177 /* Test availability of runtime routines for shift and division. */
18178 long long int llmax = 9223372036854775807ll;
18179 unsigned long long int ullmax = 18446744073709551615ull;
18180 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
18181 | (llmax / ll) | (llmax % ll)
18182 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
18183 | (ullmax / ull) | (ullmax % ull));
18184 ;
18185 return 0;
18186 }
18187
18188 _ACEOF
18189 if ac_fn_c_try_link "$LINENO"; then :
18190
18191 else
18192 ac_cv_type_unsigned_long_long_int=no
18193 fi
18194 rm -f core conftest.err conftest.$ac_objext \
18195 conftest$ac_exeext conftest.$ac_ext
18196 fi
18197 fi
18198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
18199 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
18200 if test $ac_cv_type_unsigned_long_long_int = yes; then
18201
18202 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
18203
18204 fi
18205
18206
18207
18208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
18209 $as_echo_n "checking for long long int... " >&6; }
18210 if test "${ac_cv_type_long_long_int+set}" = set; then :
18211 $as_echo_n "(cached) " >&6
18212 else
18213 ac_cv_type_long_long_int=yes
18214 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18215 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
18216 if test $ac_cv_type_long_long_int = yes; then
18217 if test "$cross_compiling" = yes; then :
18218 :
18219 else
18220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18221 /* end confdefs.h. */
18222 #include <limits.h>
18223 #ifndef LLONG_MAX
18224 # define HALF \
18225 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
18226 # define LLONG_MAX (HALF - 1 + HALF)
18227 #endif
18228 int
18229 main ()
18230 {
18231 long long int n = 1;
18232 int i;
18233 for (i = 0; ; i++)
18234 {
18235 long long int m = n << i;
18236 if (m >> i != n)
18237 return 1;
18238 if (LLONG_MAX / 2 < m)
18239 break;
18240 }
18241 return 0;
18242 ;
18243 return 0;
18244 }
18245 _ACEOF
18246 if ac_fn_c_try_run "$LINENO"; then :
18247
18248 else
18249 ac_cv_type_long_long_int=no
18250 fi
18251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18252 conftest.$ac_objext conftest.beam conftest.$ac_ext
18253 fi
18254
18255 fi
18256 fi
18257 fi
18258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
18259 $as_echo "$ac_cv_type_long_long_int" >&6; }
18260 if test $ac_cv_type_long_long_int = yes; then
18261
18262 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
18263
18264 fi
18265
18266
18267
18268
18269
18270
18271 gl_cv_c_multiarch=no
18272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18273 /* end confdefs.h. */
18274 #ifndef __APPLE_CC__
18275 not a universal capable compiler
18276 #endif
18277 typedef int dummy;
18278
18279 _ACEOF
18280 if ac_fn_c_try_compile "$LINENO"; then :
18281
18282 arch=
18283 prev=
18284 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18285 if test -n "$prev"; then
18286 case $word in
18287 i?86 | x86_64 | ppc | ppc64)
18288 if test -z "$arch" || test "$arch" = "$word"; then
18289 arch="$word"
18290 else
18291 gl_cv_c_multiarch=yes
18292 fi
18293 ;;
18294 esac
18295 prev=
18296 else
18297 if test "x$word" = "x-arch"; then
18298 prev=arch
18299 fi
18300 fi
18301 done
18302
18303 fi
18304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18305 if test $gl_cv_c_multiarch = yes; then
18306 APPLE_UNIVERSAL_BUILD=1
18307 else
18308 APPLE_UNIVERSAL_BUILD=0
18309 fi
18310
18311
18312
18313
18314
18315 if test $ac_cv_type_long_long_int = yes; then
18316 HAVE_LONG_LONG_INT=1
18317 else
18318 HAVE_LONG_LONG_INT=0
18319 fi
18320
18321
18322 if test $ac_cv_type_unsigned_long_long_int = yes; then
18323 HAVE_UNSIGNED_LONG_LONG_INT=1
18324 else
18325 HAVE_UNSIGNED_LONG_LONG_INT=0
18326 fi
18327
18328
18329
18330 if test $ac_cv_header_wchar_h = yes; then
18331 HAVE_WCHAR_H=1
18332 else
18333 HAVE_WCHAR_H=0
18334 fi
18335
18336
18337 if test $ac_cv_header_inttypes_h = yes; then
18338 HAVE_INTTYPES_H=1
18339 else
18340 HAVE_INTTYPES_H=0
18341 fi
18342
18343
18344 if test $ac_cv_header_sys_types_h = yes; then
18345 HAVE_SYS_TYPES_H=1
18346 else
18347 HAVE_SYS_TYPES_H=0
18348 fi
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360 if test $gl_cv_have_include_next = yes; then
18361 gl_cv_next_stdint_h='<'stdint.h'>'
18362 else
18363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18364 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
18365 if test "${gl_cv_next_stdint_h+set}" = set; then :
18366 $as_echo_n "(cached) " >&6
18367 else
18368
18369 if test $ac_cv_header_stdint_h = yes; then
18370
18371
18372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18373 /* end confdefs.h. */
18374 #include <stdint.h>
18375
18376 _ACEOF
18377 case "$host_os" in
18378 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18379 *) gl_absname_cpp="$ac_cpp" ;;
18380 esac
18381
18382 case "$host_os" in
18383 mingw*)
18384 gl_dirsep_regex='[/\\]'
18385 ;;
18386 *)
18387 gl_dirsep_regex='\/'
18388 ;;
18389 esac
18390 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18391
18392 gl_header_literal_regex=`echo 'stdint.h' \
18393 | sed -e "$gl_make_literal_regex_sed"`
18394 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18395 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18396 s|^/[^/]|//&|
18397 p
18398 q
18399 }'
18400 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18401 sed -n "$gl_absolute_header_sed"`'"'
18402 else
18403 gl_cv_next_stdint_h='<'stdint.h'>'
18404 fi
18405
18406
18407 fi
18408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18409 $as_echo "$gl_cv_next_stdint_h" >&6; }
18410 fi
18411 NEXT_STDINT_H=$gl_cv_next_stdint_h
18412
18413 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18414 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18415 gl_next_as_first_directive='<'stdint.h'>'
18416 else
18417 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18418 gl_next_as_first_directive=$gl_cv_next_stdint_h
18419 fi
18420 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
18421
18422
18423
18424
18425 if test $ac_cv_header_stdint_h = yes; then
18426 HAVE_STDINT_H=1
18427 else
18428 HAVE_STDINT_H=0
18429 fi
18430
18431
18432 if test $ac_cv_header_stdint_h = yes; then
18433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18434 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
18435 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
18436 $as_echo_n "(cached) " >&6
18437 else
18438 gl_cv_header_working_stdint_h=no
18439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18440 /* end confdefs.h. */
18441
18442
18443 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18444 #include <stdint.h>
18445 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18446 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
18447 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18448 #endif
18449
18450
18451 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18452 included before <wchar.h>. */
18453 #include <stddef.h>
18454 #include <signal.h>
18455 #if HAVE_WCHAR_H
18456 # include <stdio.h>
18457 # include <time.h>
18458 # include <wchar.h>
18459 #endif
18460
18461
18462 #ifdef INT8_MAX
18463 int8_t a1 = INT8_MAX;
18464 int8_t a1min = INT8_MIN;
18465 #endif
18466 #ifdef INT16_MAX
18467 int16_t a2 = INT16_MAX;
18468 int16_t a2min = INT16_MIN;
18469 #endif
18470 #ifdef INT32_MAX
18471 int32_t a3 = INT32_MAX;
18472 int32_t a3min = INT32_MIN;
18473 #endif
18474 #ifdef INT64_MAX
18475 int64_t a4 = INT64_MAX;
18476 int64_t a4min = INT64_MIN;
18477 #endif
18478 #ifdef UINT8_MAX
18479 uint8_t b1 = UINT8_MAX;
18480 #else
18481 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18482 #endif
18483 #ifdef UINT16_MAX
18484 uint16_t b2 = UINT16_MAX;
18485 #endif
18486 #ifdef UINT32_MAX
18487 uint32_t b3 = UINT32_MAX;
18488 #endif
18489 #ifdef UINT64_MAX
18490 uint64_t b4 = UINT64_MAX;
18491 #endif
18492 int_least8_t c1 = INT8_C (0x7f);
18493 int_least8_t c1max = INT_LEAST8_MAX;
18494 int_least8_t c1min = INT_LEAST8_MIN;
18495 int_least16_t c2 = INT16_C (0x7fff);
18496 int_least16_t c2max = INT_LEAST16_MAX;
18497 int_least16_t c2min = INT_LEAST16_MIN;
18498 int_least32_t c3 = INT32_C (0x7fffffff);
18499 int_least32_t c3max = INT_LEAST32_MAX;
18500 int_least32_t c3min = INT_LEAST32_MIN;
18501 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18502 int_least64_t c4max = INT_LEAST64_MAX;
18503 int_least64_t c4min = INT_LEAST64_MIN;
18504 uint_least8_t d1 = UINT8_C (0xff);
18505 uint_least8_t d1max = UINT_LEAST8_MAX;
18506 uint_least16_t d2 = UINT16_C (0xffff);
18507 uint_least16_t d2max = UINT_LEAST16_MAX;
18508 uint_least32_t d3 = UINT32_C (0xffffffff);
18509 uint_least32_t d3max = UINT_LEAST32_MAX;
18510 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18511 uint_least64_t d4max = UINT_LEAST64_MAX;
18512 int_fast8_t e1 = INT_FAST8_MAX;
18513 int_fast8_t e1min = INT_FAST8_MIN;
18514 int_fast16_t e2 = INT_FAST16_MAX;
18515 int_fast16_t e2min = INT_FAST16_MIN;
18516 int_fast32_t e3 = INT_FAST32_MAX;
18517 int_fast32_t e3min = INT_FAST32_MIN;
18518 int_fast64_t e4 = INT_FAST64_MAX;
18519 int_fast64_t e4min = INT_FAST64_MIN;
18520 uint_fast8_t f1 = UINT_FAST8_MAX;
18521 uint_fast16_t f2 = UINT_FAST16_MAX;
18522 uint_fast32_t f3 = UINT_FAST32_MAX;
18523 uint_fast64_t f4 = UINT_FAST64_MAX;
18524 #ifdef INTPTR_MAX
18525 intptr_t g = INTPTR_MAX;
18526 intptr_t gmin = INTPTR_MIN;
18527 #endif
18528 #ifdef UINTPTR_MAX
18529 uintptr_t h = UINTPTR_MAX;
18530 #endif
18531 intmax_t i = INTMAX_MAX;
18532 uintmax_t j = UINTMAX_MAX;
18533
18534 #include <limits.h> /* for CHAR_BIT */
18535 #define TYPE_MINIMUM(t) \
18536 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18537 #define TYPE_MAXIMUM(t) \
18538 ((t) ((t) 0 < (t) -1 \
18539 ? (t) -1 \
18540 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18541 struct s {
18542 int check_PTRDIFF:
18543 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18544 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18545 ? 1 : -1;
18546 /* Detect bug in FreeBSD 6.0 / ia64. */
18547 int check_SIG_ATOMIC:
18548 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18549 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18550 ? 1 : -1;
18551 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18552 int check_WCHAR:
18553 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18554 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18555 ? 1 : -1;
18556 /* Detect bug in mingw. */
18557 int check_WINT:
18558 WINT_MIN == TYPE_MINIMUM (wint_t)
18559 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18560 ? 1 : -1;
18561
18562 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18563 int check_UINT8_C:
18564 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18565 int check_UINT16_C:
18566 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18567
18568 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18569 #ifdef UINT8_MAX
18570 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
18571 #endif
18572 #ifdef UINT16_MAX
18573 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18574 #endif
18575 #ifdef UINT32_MAX
18576 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18577 #endif
18578 #ifdef UINT64_MAX
18579 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18580 #endif
18581 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18582 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18583 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18584 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18585 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18586 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18587 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18588 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18589 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18590 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18591 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18592 };
18593
18594 int
18595 main ()
18596 {
18597
18598 ;
18599 return 0;
18600 }
18601 _ACEOF
18602 if ac_fn_c_try_compile "$LINENO"; then :
18603 if test "$cross_compiling" = yes; then :
18604 gl_cv_header_working_stdint_h=yes
18605
18606 else
18607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18608 /* end confdefs.h. */
18609
18610
18611 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18612 #include <stdint.h>
18613
18614
18615 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18616 included before <wchar.h>. */
18617 #include <stddef.h>
18618 #include <signal.h>
18619 #if HAVE_WCHAR_H
18620 # include <stdio.h>
18621 # include <time.h>
18622 # include <wchar.h>
18623 #endif
18624
18625
18626 #include <stdio.h>
18627 #include <string.h>
18628 #define MVAL(macro) MVAL1(macro)
18629 #define MVAL1(expression) #expression
18630 static const char *macro_values[] =
18631 {
18632 #ifdef INT8_MAX
18633 MVAL (INT8_MAX),
18634 #endif
18635 #ifdef INT16_MAX
18636 MVAL (INT16_MAX),
18637 #endif
18638 #ifdef INT32_MAX
18639 MVAL (INT32_MAX),
18640 #endif
18641 #ifdef INT64_MAX
18642 MVAL (INT64_MAX),
18643 #endif
18644 #ifdef UINT8_MAX
18645 MVAL (UINT8_MAX),
18646 #endif
18647 #ifdef UINT16_MAX
18648 MVAL (UINT16_MAX),
18649 #endif
18650 #ifdef UINT32_MAX
18651 MVAL (UINT32_MAX),
18652 #endif
18653 #ifdef UINT64_MAX
18654 MVAL (UINT64_MAX),
18655 #endif
18656 NULL
18657 };
18658
18659 int
18660 main ()
18661 {
18662
18663 const char **mv;
18664 for (mv = macro_values; *mv != NULL; mv++)
18665 {
18666 const char *value = *mv;
18667 /* Test whether it looks like a cast expression. */
18668 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18669 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18670 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18671 || strncmp (value, "((int)"/*)*/, 6) == 0
18672 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18673 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18674 return mv - macro_values + 1;
18675 }
18676 return 0;
18677
18678 ;
18679 return 0;
18680 }
18681 _ACEOF
18682 if ac_fn_c_try_run "$LINENO"; then :
18683 gl_cv_header_working_stdint_h=yes
18684 fi
18685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18686 conftest.$ac_objext conftest.beam conftest.$ac_ext
18687 fi
18688
18689
18690 fi
18691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18692
18693 fi
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18695 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
18696 fi
18697 if test "$gl_cv_header_working_stdint_h" = yes; then
18698 STDINT_H=
18699 else
18700 for ac_header in sys/inttypes.h sys/bitypes.h
18701 do :
18702 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18703 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18704 eval as_val=\$$as_ac_Header
18705 if test "x$as_val" = x""yes; then :
18706 cat >>confdefs.h <<_ACEOF
18707 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18708 _ACEOF
18709
18710 fi
18711
18712 done
18713
18714 if test $ac_cv_header_sys_inttypes_h = yes; then
18715 HAVE_SYS_INTTYPES_H=1
18716 else
18717 HAVE_SYS_INTTYPES_H=0
18718 fi
18719
18720 if test $ac_cv_header_sys_bitypes_h = yes; then
18721 HAVE_SYS_BITYPES_H=1
18722 else
18723 HAVE_SYS_BITYPES_H=0
18724 fi
18725
18726
18727
18728
18729 if test $APPLE_UNIVERSAL_BUILD = 0; then
18730
18731
18732 for gltype in ptrdiff_t size_t ; do
18733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18734 $as_echo_n "checking for bit size of $gltype... " >&6; }
18735 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18736 $as_echo_n "(cached) " >&6
18737 else
18738 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18739 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18740 included before <wchar.h>. */
18741 #include <stddef.h>
18742 #include <signal.h>
18743 #if HAVE_WCHAR_H
18744 # include <stdio.h>
18745 # include <time.h>
18746 # include <wchar.h>
18747 #endif
18748
18749 #include <limits.h>"; then :
18750
18751 else
18752 result=unknown
18753 fi
18754
18755 eval gl_cv_bitsizeof_${gltype}=\$result
18756
18757 fi
18758 eval ac_res=\$gl_cv_bitsizeof_${gltype}
18759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18760 $as_echo "$ac_res" >&6; }
18761 eval result=\$gl_cv_bitsizeof_${gltype}
18762 if test $result = unknown; then
18763 result=0
18764 fi
18765 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18766 cat >>confdefs.h <<_ACEOF
18767 #define BITSIZEOF_${GLTYPE} $result
18768 _ACEOF
18769
18770 eval BITSIZEOF_${GLTYPE}=\$result
18771 done
18772
18773
18774 fi
18775
18776
18777 for gltype in sig_atomic_t wchar_t wint_t ; do
18778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18779 $as_echo_n "checking for bit size of $gltype... " >&6; }
18780 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18781 $as_echo_n "(cached) " >&6
18782 else
18783 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18784 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18785 included before <wchar.h>. */
18786 #include <stddef.h>
18787 #include <signal.h>
18788 #if HAVE_WCHAR_H
18789 # include <stdio.h>
18790 # include <time.h>
18791 # include <wchar.h>
18792 #endif
18793
18794 #include <limits.h>"; then :
18795
18796 else
18797 result=unknown
18798 fi
18799
18800 eval gl_cv_bitsizeof_${gltype}=\$result
18801
18802 fi
18803 eval ac_res=\$gl_cv_bitsizeof_${gltype}
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18805 $as_echo "$ac_res" >&6; }
18806 eval result=\$gl_cv_bitsizeof_${gltype}
18807 if test $result = unknown; then
18808 result=0
18809 fi
18810 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18811 cat >>confdefs.h <<_ACEOF
18812 #define BITSIZEOF_${GLTYPE} $result
18813 _ACEOF
18814
18815 eval BITSIZEOF_${GLTYPE}=\$result
18816 done
18817
18818
18819
18820
18821 for gltype in sig_atomic_t wchar_t wint_t ; do
18822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18823 $as_echo_n "checking whether $gltype is signed... " >&6; }
18824 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
18825 $as_echo_n "(cached) " >&6
18826 else
18827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18828 /* end confdefs.h. */
18829
18830 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18831 included before <wchar.h>. */
18832 #include <stddef.h>
18833 #include <signal.h>
18834 #if HAVE_WCHAR_H
18835 # include <stdio.h>
18836 # include <time.h>
18837 # include <wchar.h>
18838 #endif
18839
18840 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
18841 int
18842 main ()
18843 {
18844
18845 ;
18846 return 0;
18847 }
18848 _ACEOF
18849 if ac_fn_c_try_compile "$LINENO"; then :
18850 result=yes
18851 else
18852 result=no
18853 fi
18854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18855 eval gl_cv_type_${gltype}_signed=\$result
18856
18857 fi
18858 eval ac_res=\$gl_cv_type_${gltype}_signed
18859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18860 $as_echo "$ac_res" >&6; }
18861 eval result=\$gl_cv_type_${gltype}_signed
18862 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18863 if test "$result" = yes; then
18864 cat >>confdefs.h <<_ACEOF
18865 #define HAVE_SIGNED_${GLTYPE} 1
18866 _ACEOF
18867
18868 eval HAVE_SIGNED_${GLTYPE}=1
18869 else
18870 eval HAVE_SIGNED_${GLTYPE}=0
18871 fi
18872 done
18873
18874
18875 gl_cv_type_ptrdiff_t_signed=yes
18876 gl_cv_type_size_t_signed=no
18877 if test $APPLE_UNIVERSAL_BUILD = 0; then
18878
18879
18880 for gltype in ptrdiff_t size_t ; do
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18882 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18883 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
18884 $as_echo_n "(cached) " >&6
18885 else
18886 eval gl_cv_type_${gltype}_suffix=no
18887 eval result=\$gl_cv_type_${gltype}_signed
18888 if test "$result" = yes; then
18889 glsufu=
18890 else
18891 glsufu=u
18892 fi
18893 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18894 case $glsuf in
18895 '') gltype1='int';;
18896 l) gltype1='long int';;
18897 ll) gltype1='long long int';;
18898 i64) gltype1='__int64';;
18899 u) gltype1='unsigned int';;
18900 ul) gltype1='unsigned long int';;
18901 ull) gltype1='unsigned long long int';;
18902 ui64)gltype1='unsigned __int64';;
18903 esac
18904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18905 /* end confdefs.h. */
18906
18907 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18908 included before <wchar.h>. */
18909 #include <stddef.h>
18910 #include <signal.h>
18911 #if HAVE_WCHAR_H
18912 # include <stdio.h>
18913 # include <time.h>
18914 # include <wchar.h>
18915 #endif
18916
18917 extern $gltype foo;
18918 extern $gltype1 foo;
18919 int
18920 main ()
18921 {
18922
18923 ;
18924 return 0;
18925 }
18926 _ACEOF
18927 if ac_fn_c_try_compile "$LINENO"; then :
18928 eval gl_cv_type_${gltype}_suffix=\$glsuf
18929 fi
18930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18931 eval result=\$gl_cv_type_${gltype}_suffix
18932 test "$result" != no && break
18933 done
18934 fi
18935 eval ac_res=\$gl_cv_type_${gltype}_suffix
18936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18937 $as_echo "$ac_res" >&6; }
18938 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18939 eval result=\$gl_cv_type_${gltype}_suffix
18940 test "$result" = no && result=
18941 eval ${GLTYPE}_SUFFIX=\$result
18942 cat >>confdefs.h <<_ACEOF
18943 #define ${GLTYPE}_SUFFIX $result
18944 _ACEOF
18945
18946 done
18947
18948
18949 fi
18950
18951
18952 for gltype in sig_atomic_t wchar_t wint_t ; do
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18954 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18955 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
18956 $as_echo_n "(cached) " >&6
18957 else
18958 eval gl_cv_type_${gltype}_suffix=no
18959 eval result=\$gl_cv_type_${gltype}_signed
18960 if test "$result" = yes; then
18961 glsufu=
18962 else
18963 glsufu=u
18964 fi
18965 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18966 case $glsuf in
18967 '') gltype1='int';;
18968 l) gltype1='long int';;
18969 ll) gltype1='long long int';;
18970 i64) gltype1='__int64';;
18971 u) gltype1='unsigned int';;
18972 ul) gltype1='unsigned long int';;
18973 ull) gltype1='unsigned long long int';;
18974 ui64)gltype1='unsigned __int64';;
18975 esac
18976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18977 /* end confdefs.h. */
18978
18979 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18980 included before <wchar.h>. */
18981 #include <stddef.h>
18982 #include <signal.h>
18983 #if HAVE_WCHAR_H
18984 # include <stdio.h>
18985 # include <time.h>
18986 # include <wchar.h>
18987 #endif
18988
18989 extern $gltype foo;
18990 extern $gltype1 foo;
18991 int
18992 main ()
18993 {
18994
18995 ;
18996 return 0;
18997 }
18998 _ACEOF
18999 if ac_fn_c_try_compile "$LINENO"; then :
19000 eval gl_cv_type_${gltype}_suffix=\$glsuf
19001 fi
19002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19003 eval result=\$gl_cv_type_${gltype}_suffix
19004 test "$result" != no && break
19005 done
19006 fi
19007 eval ac_res=\$gl_cv_type_${gltype}_suffix
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19009 $as_echo "$ac_res" >&6; }
19010 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19011 eval result=\$gl_cv_type_${gltype}_suffix
19012 test "$result" = no && result=
19013 eval ${GLTYPE}_SUFFIX=\$result
19014 cat >>confdefs.h <<_ACEOF
19015 #define ${GLTYPE}_SUFFIX $result
19016 _ACEOF
19017
19018 done
19019
19020
19021
19022 if test $BITSIZEOF_WINT_T -lt 32; then
19023 BITSIZEOF_WINT_T=32
19024 fi
19025
19026 STDINT_H=stdint.h
19027 fi
19028
19029 if test -n "$STDINT_H"; then
19030 GL_GENERATE_STDINT_H_TRUE=
19031 GL_GENERATE_STDINT_H_FALSE='#'
19032 else
19033 GL_GENERATE_STDINT_H_TRUE='#'
19034 GL_GENERATE_STDINT_H_FALSE=
19035 fi
19036
19037
19038
19039
19040
19041 GNULIB_IMAXABS=0;
19042 GNULIB_IMAXDIV=0;
19043 GNULIB_STRTOIMAX=0;
19044 GNULIB_STRTOUMAX=0;
19045 HAVE_DECL_IMAXABS=1;
19046 HAVE_DECL_IMAXDIV=1;
19047 HAVE_DECL_STRTOIMAX=1;
19048 HAVE_DECL_STRTOUMAX=1;
19049 REPLACE_STRTOIMAX=0;
19050 INT32_MAX_LT_INTMAX_MAX=1;
19051 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19052 PRI_MACROS_BROKEN=0;
19053 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19054 UINT32_MAX_LT_UINTMAX_MAX=1;
19055 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071 if test $gl_cv_have_include_next = yes; then
19072 gl_cv_next_inttypes_h='<'inttypes.h'>'
19073 else
19074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19075 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19076 if test "${gl_cv_next_inttypes_h+set}" = set; then :
19077 $as_echo_n "(cached) " >&6
19078 else
19079
19080 if test $ac_cv_header_inttypes_h = yes; then
19081
19082
19083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19084 /* end confdefs.h. */
19085 #include <inttypes.h>
19086
19087 _ACEOF
19088 case "$host_os" in
19089 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19090 *) gl_absname_cpp="$ac_cpp" ;;
19091 esac
19092
19093 case "$host_os" in
19094 mingw*)
19095 gl_dirsep_regex='[/\\]'
19096 ;;
19097 *)
19098 gl_dirsep_regex='\/'
19099 ;;
19100 esac
19101 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19102
19103 gl_header_literal_regex=`echo 'inttypes.h' \
19104 | sed -e "$gl_make_literal_regex_sed"`
19105 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19106 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19107 s|^/[^/]|//&|
19108 p
19109 q
19110 }'
19111 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19112 sed -n "$gl_absolute_header_sed"`'"'
19113 else
19114 gl_cv_next_inttypes_h='<'inttypes.h'>'
19115 fi
19116
19117
19118 fi
19119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19120 $as_echo "$gl_cv_next_inttypes_h" >&6; }
19121 fi
19122 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
19123
19124 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19125 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19126 gl_next_as_first_directive='<'inttypes.h'>'
19127 else
19128 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19129 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19130 fi
19131 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143 case "$host_os" in
19144 mingw*)
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19146 $as_echo_n "checking for 64-bit off_t... " >&6; }
19147 if test "${gl_cv_type_off_t_64+set}" = set; then :
19148 $as_echo_n "(cached) " >&6
19149 else
19150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19151 /* end confdefs.h. */
19152 #include <sys/types.h>
19153 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19154
19155 int
19156 main ()
19157 {
19158
19159 ;
19160 return 0;
19161 }
19162 _ACEOF
19163 if ac_fn_c_try_compile "$LINENO"; then :
19164 gl_cv_type_off_t_64=yes
19165 else
19166 gl_cv_type_off_t_64=no
19167 fi
19168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19169
19170 fi
19171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
19172 $as_echo "$gl_cv_type_off_t_64" >&6; }
19173 if test $gl_cv_type_off_t_64 = no; then
19174 WINDOWS_64_BIT_OFF_T=1
19175 else
19176 WINDOWS_64_BIT_OFF_T=0
19177 fi
19178 WINDOWS_64_BIT_ST_SIZE=1
19179 ;;
19180 *)
19181 WINDOWS_64_BIT_OFF_T=0
19182 WINDOWS_64_BIT_ST_SIZE=0
19183 ;;
19184 esac
19185
19186
19187 GNULIB_FCHMODAT=0;
19188 GNULIB_FSTAT=0;
19189 GNULIB_FSTATAT=0;
19190 GNULIB_FUTIMENS=0;
19191 GNULIB_LCHMOD=0;
19192 GNULIB_LSTAT=0;
19193 GNULIB_MKDIRAT=0;
19194 GNULIB_MKFIFO=0;
19195 GNULIB_MKFIFOAT=0;
19196 GNULIB_MKNOD=0;
19197 GNULIB_MKNODAT=0;
19198 GNULIB_STAT=0;
19199 GNULIB_UTIMENSAT=0;
19200 HAVE_FCHMODAT=1;
19201 HAVE_FSTATAT=1;
19202 HAVE_FUTIMENS=1;
19203 HAVE_LCHMOD=1;
19204 HAVE_LSTAT=1;
19205 HAVE_MKDIRAT=1;
19206 HAVE_MKFIFO=1;
19207 HAVE_MKFIFOAT=1;
19208 HAVE_MKNOD=1;
19209 HAVE_MKNODAT=1;
19210 HAVE_UTIMENSAT=1;
19211 REPLACE_FSTAT=0;
19212 REPLACE_FSTATAT=0;
19213 REPLACE_FUTIMENS=0;
19214 REPLACE_LSTAT=0;
19215 REPLACE_MKDIR=0;
19216 REPLACE_MKFIFO=0;
19217 REPLACE_MKNOD=0;
19218 REPLACE_STAT=0;
19219 REPLACE_UTIMENSAT=0;
19220
19221
19222
19223
19224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
19225 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
19226 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
19227 $as_echo_n "(cached) " >&6
19228 else
19229 rm -f conftest.sym conftest.file
19230 echo >conftest.file
19231 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
19232 if test "$cross_compiling" = yes; then :
19233 case "$host_os" in
19234 # Guess yes on glibc systems.
19235 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19236 # If we don't know, assume the worst.
19237 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
19238 esac
19239
19240 else
19241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19242 /* end confdefs.h. */
19243 $ac_includes_default
19244 int
19245 main ()
19246 {
19247 struct stat sbuf;
19248 /* Linux will dereference the symlink and fail, as required by
19249 POSIX. That is better in the sense that it means we will not
19250 have to compile and use the lstat wrapper. */
19251 return lstat ("conftest.sym/", &sbuf) == 0;
19252
19253 ;
19254 return 0;
19255 }
19256 _ACEOF
19257 if ac_fn_c_try_run "$LINENO"; then :
19258 gl_cv_func_lstat_dereferences_slashed_symlink=yes
19259 else
19260 gl_cv_func_lstat_dereferences_slashed_symlink=no
19261 fi
19262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19263 conftest.$ac_objext conftest.beam conftest.$ac_ext
19264 fi
19265
19266 else
19267 # If the 'ln -s' command failed, then we probably don't even
19268 # have an lstat function.
19269 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
19270 fi
19271 rm -f conftest.sym conftest.file
19272
19273 fi
19274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
19275 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
19276 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19277 *yes)
19278
19279 cat >>confdefs.h <<_ACEOF
19280 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
19281 _ACEOF
19282
19283 ;;
19284 esac
19285
19286
19287 GNULIB_MKTIME=0;
19288 GNULIB_NANOSLEEP=0;
19289 GNULIB_STRPTIME=0;
19290 GNULIB_TIMEGM=0;
19291 GNULIB_TIME_R=0;
19292 HAVE_DECL_LOCALTIME_R=1;
19293 HAVE_NANOSLEEP=1;
19294 HAVE_STRPTIME=1;
19295 HAVE_TIMEGM=1;
19296 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19297 REPLACE_MKTIME=GNULIB_PORTCHECK;
19298 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19299 REPLACE_TIMEGM=GNULIB_PORTCHECK;
19300
19301
19302
19303
19304 GNULIB_PSELECT=0;
19305 GNULIB_SELECT=0;
19306 HAVE_PSELECT=1;
19307 REPLACE_PSELECT=0;
19308 REPLACE_SELECT=0;
19309
19310
19311
19312
19313
19314
19315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19316 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19317 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
19318 $as_echo_n "(cached) " >&6
19319 else
19320
19321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19322 /* end confdefs.h. */
19323 #include <sys/select.h>
19324 int
19325 main ()
19326 {
19327 struct timeval b;
19328 ;
19329 return 0;
19330 }
19331 _ACEOF
19332 if ac_fn_c_try_compile "$LINENO"; then :
19333 gl_cv_header_sys_select_h_selfcontained=yes
19334 else
19335 gl_cv_header_sys_select_h_selfcontained=no
19336 fi
19337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19338 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19340 /* end confdefs.h. */
19341 #include <sys/select.h>
19342 int
19343 main ()
19344 {
19345 int memset; int bzero;
19346 ;
19347 return 0;
19348 }
19349
19350 _ACEOF
19351 if ac_fn_c_try_compile "$LINENO"; then :
19352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19353 /* end confdefs.h. */
19354 #include <sys/select.h>
19355 int
19356 main ()
19357 {
19358
19359 #undef memset
19360 #define memset nonexistent_memset
19361 extern
19362 #ifdef __cplusplus
19363 "C"
19364 #endif
19365 void *memset (void *, int, unsigned long);
19366 #undef bzero
19367 #define bzero nonexistent_bzero
19368 extern
19369 #ifdef __cplusplus
19370 "C"
19371 #endif
19372 void bzero (void *, unsigned long);
19373 fd_set fds;
19374 FD_ZERO (&fds);
19375
19376 ;
19377 return 0;
19378 }
19379
19380 _ACEOF
19381 if ac_fn_c_try_link "$LINENO"; then :
19382
19383 else
19384 gl_cv_header_sys_select_h_selfcontained=no
19385 fi
19386 rm -f core conftest.err conftest.$ac_objext \
19387 conftest$ac_exeext conftest.$ac_ext
19388
19389 fi
19390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19391 fi
19392
19393 fi
19394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19395 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405 if test $gl_cv_have_include_next = yes; then
19406 gl_cv_next_sys_select_h='<'sys/select.h'>'
19407 else
19408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19409 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19410 if test "${gl_cv_next_sys_select_h+set}" = set; then :
19411 $as_echo_n "(cached) " >&6
19412 else
19413
19414 if test $ac_cv_header_sys_select_h = yes; then
19415
19416
19417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19418 /* end confdefs.h. */
19419 #include <sys/select.h>
19420
19421 _ACEOF
19422 case "$host_os" in
19423 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19424 *) gl_absname_cpp="$ac_cpp" ;;
19425 esac
19426
19427 case "$host_os" in
19428 mingw*)
19429 gl_dirsep_regex='[/\\]'
19430 ;;
19431 *)
19432 gl_dirsep_regex='\/'
19433 ;;
19434 esac
19435 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19436
19437 gl_header_literal_regex=`echo 'sys/select.h' \
19438 | sed -e "$gl_make_literal_regex_sed"`
19439 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19440 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19441 s|^/[^/]|//&|
19442 p
19443 q
19444 }'
19445 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19446 sed -n "$gl_absolute_header_sed"`'"'
19447 else
19448 gl_cv_next_sys_select_h='<'sys/select.h'>'
19449 fi
19450
19451
19452 fi
19453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19454 $as_echo "$gl_cv_next_sys_select_h" >&6; }
19455 fi
19456 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
19457
19458 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19459 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19460 gl_next_as_first_directive='<'sys/select.h'>'
19461 else
19462 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19463 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19464 fi
19465 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
19466
19467
19468
19469
19470 if test $ac_cv_header_sys_select_h = yes; then
19471 HAVE_SYS_SELECT_H=1
19472 else
19473 HAVE_SYS_SELECT_H=0
19474 fi
19475
19476
19477
19478
19479
19480 if test $ac_cv_header_sys_socket_h != yes; then
19481 for ac_header in winsock2.h
19482 do :
19483 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19484 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19485 cat >>confdefs.h <<_ACEOF
19486 #define HAVE_WINSOCK2_H 1
19487 _ACEOF
19488
19489 fi
19490
19491 done
19492
19493 fi
19494 if test "$ac_cv_header_winsock2_h" = yes; then
19495 HAVE_WINSOCK2_H=1
19496 UNISTD_H_HAVE_WINSOCK2_H=1
19497 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19498 else
19499 HAVE_WINSOCK2_H=0
19500 fi
19501
19502
19503
19504
19505
19506
19507
19508
19509 GNULIB_PTHREAD_SIGMASK=0;
19510 GNULIB_RAISE=0;
19511 GNULIB_SIGNAL_H_SIGPIPE=0;
19512 GNULIB_SIGPROCMASK=0;
19513 GNULIB_SIGACTION=0;
19514 HAVE_POSIX_SIGNALBLOCKING=1;
19515 HAVE_PTHREAD_SIGMASK=1;
19516 HAVE_RAISE=1;
19517 HAVE_SIGSET_T=1;
19518 HAVE_SIGINFO_T=1;
19519 HAVE_SIGACTION=1;
19520 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19521
19522 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
19523
19524 HAVE_SIGHANDLER_T=1;
19525 REPLACE_PTHREAD_SIGMASK=0;
19526 REPLACE_RAISE=0;
19527
19528
19529
19530
19531
19532
19533
19534 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19535 #include <signal.h>
19536 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19537 #include <sys/types.h>
19538
19539 "
19540 if test "x$ac_cv_type_sigset_t" = x""yes; then :
19541
19542 cat >>confdefs.h <<_ACEOF
19543 #define HAVE_SIGSET_T 1
19544 _ACEOF
19545
19546 gl_cv_type_sigset_t=yes
19547 else
19548 gl_cv_type_sigset_t=no
19549 fi
19550
19551 if test $gl_cv_type_sigset_t != yes; then
19552 HAVE_SIGSET_T=0
19553 fi
19554
19555
19556
19557 if test $ac_cv_header_sys_socket_h = no; then
19558 for ac_header in ws2tcpip.h
19559 do :
19560 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
19561 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
19562 cat >>confdefs.h <<_ACEOF
19563 #define HAVE_WS2TCPIP_H 1
19564 _ACEOF
19565
19566 fi
19567
19568 done
19569
19570 fi
19571
19572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19573 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19574 if test "${ac_cv_header_stdbool_h+set}" = set; then :
19575 $as_echo_n "(cached) " >&6
19576 else
19577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19578 /* end confdefs.h. */
19579
19580 #include <stdbool.h>
19581 #ifndef bool
19582 "error: bool is not defined"
19583 #endif
19584 #ifndef false
19585 "error: false is not defined"
19586 #endif
19587 #if false
19588 "error: false is not 0"
19589 #endif
19590 #ifndef true
19591 "error: true is not defined"
19592 #endif
19593 #if true != 1
19594 "error: true is not 1"
19595 #endif
19596 #ifndef __bool_true_false_are_defined
19597 "error: __bool_true_false_are_defined is not defined"
19598 #endif
19599
19600 struct s { _Bool s: 1; _Bool t; } s;
19601
19602 char a[true == 1 ? 1 : -1];
19603 char b[false == 0 ? 1 : -1];
19604 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19605 char d[(bool) 0.5 == true ? 1 : -1];
19606 /* See body of main program for 'e'. */
19607 char f[(_Bool) 0.0 == false ? 1 : -1];
19608 char g[true];
19609 char h[sizeof (_Bool)];
19610 char i[sizeof s.t];
19611 enum { j = false, k = true, l = false * true, m = true * 256 };
19612 /* The following fails for
19613 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19614 _Bool n[m];
19615 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19616 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19617 /* Catch a bug in an HP-UX C compiler. See
19618 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19619 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19620 */
19621 _Bool q = true;
19622 _Bool *pq = &q;
19623
19624 int
19625 main ()
19626 {
19627
19628 bool e = &s;
19629 *pq |= q;
19630 *pq |= ! q;
19631 /* Refer to every declared value, to avoid compiler optimizations. */
19632 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19633 + !m + !n + !o + !p + !q + !pq);
19634
19635 ;
19636 return 0;
19637 }
19638 _ACEOF
19639 if ac_fn_c_try_compile "$LINENO"; then :
19640 ac_cv_header_stdbool_h=yes
19641 else
19642 ac_cv_header_stdbool_h=no
19643 fi
19644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19645 fi
19646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19647 $as_echo "$ac_cv_header_stdbool_h" >&6; }
19648 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19649 if test "x$ac_cv_type__Bool" = x""yes; then :
19650
19651 cat >>confdefs.h <<_ACEOF
19652 #define HAVE__BOOL 1
19653 _ACEOF
19654
19655
19656 fi
19657
19658
19659
19660 REPLACE_NULL=0;
19661 HAVE_WCHAR_T=1;
19662
19663
19664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19665 $as_echo_n "checking for wchar_t... " >&6; }
19666 if test "${gt_cv_c_wchar_t+set}" = set; then :
19667 $as_echo_n "(cached) " >&6
19668 else
19669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19670 /* end confdefs.h. */
19671 #include <stddef.h>
19672 wchar_t foo = (wchar_t)'\0';
19673 int
19674 main ()
19675 {
19676
19677 ;
19678 return 0;
19679 }
19680 _ACEOF
19681 if ac_fn_c_try_compile "$LINENO"; then :
19682 gt_cv_c_wchar_t=yes
19683 else
19684 gt_cv_c_wchar_t=no
19685 fi
19686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19687 fi
19688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19689 $as_echo "$gt_cv_c_wchar_t" >&6; }
19690 if test $gt_cv_c_wchar_t = yes; then
19691
19692 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
19693
19694 fi
19695
19696
19697 GNULIB_DPRINTF=0;
19698 GNULIB_FCLOSE=0;
19699 GNULIB_FDOPEN=0;
19700 GNULIB_FFLUSH=0;
19701 GNULIB_FGETC=0;
19702 GNULIB_FGETS=0;
19703 GNULIB_FOPEN=0;
19704 GNULIB_FPRINTF=0;
19705 GNULIB_FPRINTF_POSIX=0;
19706 GNULIB_FPURGE=0;
19707 GNULIB_FPUTC=0;
19708 GNULIB_FPUTS=0;
19709 GNULIB_FREAD=0;
19710 GNULIB_FREOPEN=0;
19711 GNULIB_FSCANF=0;
19712 GNULIB_FSEEK=0;
19713 GNULIB_FSEEKO=0;
19714 GNULIB_FTELL=0;
19715 GNULIB_FTELLO=0;
19716 GNULIB_FWRITE=0;
19717 GNULIB_GETC=0;
19718 GNULIB_GETCHAR=0;
19719 GNULIB_GETDELIM=0;
19720 GNULIB_GETLINE=0;
19721 GNULIB_OBSTACK_PRINTF=0;
19722 GNULIB_OBSTACK_PRINTF_POSIX=0;
19723 GNULIB_PCLOSE=0;
19724 GNULIB_PERROR=0;
19725 GNULIB_POPEN=0;
19726 GNULIB_PRINTF=0;
19727 GNULIB_PRINTF_POSIX=0;
19728 GNULIB_PUTC=0;
19729 GNULIB_PUTCHAR=0;
19730 GNULIB_PUTS=0;
19731 GNULIB_REMOVE=0;
19732 GNULIB_RENAME=0;
19733 GNULIB_RENAMEAT=0;
19734 GNULIB_SCANF=0;
19735 GNULIB_SNPRINTF=0;
19736 GNULIB_SPRINTF_POSIX=0;
19737 GNULIB_STDIO_H_NONBLOCKING=0;
19738 GNULIB_STDIO_H_SIGPIPE=0;
19739 GNULIB_TMPFILE=0;
19740 GNULIB_VASPRINTF=0;
19741 GNULIB_VFSCANF=0;
19742 GNULIB_VSCANF=0;
19743 GNULIB_VDPRINTF=0;
19744 GNULIB_VFPRINTF=0;
19745 GNULIB_VFPRINTF_POSIX=0;
19746 GNULIB_VPRINTF=0;
19747 GNULIB_VPRINTF_POSIX=0;
19748 GNULIB_VSNPRINTF=0;
19749 GNULIB_VSPRINTF_POSIX=0;
19750 HAVE_DECL_FPURGE=1;
19751 HAVE_DECL_FSEEKO=1;
19752 HAVE_DECL_FTELLO=1;
19753 HAVE_DECL_GETDELIM=1;
19754 HAVE_DECL_GETLINE=1;
19755 HAVE_DECL_OBSTACK_PRINTF=1;
19756 HAVE_DECL_SNPRINTF=1;
19757 HAVE_DECL_VSNPRINTF=1;
19758 HAVE_DPRINTF=1;
19759 HAVE_FSEEKO=1;
19760 HAVE_FTELLO=1;
19761 HAVE_PCLOSE=1;
19762 HAVE_POPEN=1;
19763 HAVE_RENAMEAT=1;
19764 HAVE_VASPRINTF=1;
19765 HAVE_VDPRINTF=1;
19766 REPLACE_DPRINTF=0;
19767 REPLACE_FCLOSE=0;
19768 REPLACE_FDOPEN=0;
19769 REPLACE_FFLUSH=0;
19770 REPLACE_FOPEN=0;
19771 REPLACE_FPRINTF=0;
19772 REPLACE_FPURGE=0;
19773 REPLACE_FREOPEN=0;
19774 REPLACE_FSEEK=0;
19775 REPLACE_FSEEKO=0;
19776 REPLACE_FTELL=0;
19777 REPLACE_FTELLO=0;
19778 REPLACE_GETDELIM=0;
19779 REPLACE_GETLINE=0;
19780 REPLACE_OBSTACK_PRINTF=0;
19781 REPLACE_PERROR=0;
19782 REPLACE_POPEN=0;
19783 REPLACE_PRINTF=0;
19784 REPLACE_REMOVE=0;
19785 REPLACE_RENAME=0;
19786 REPLACE_RENAMEAT=0;
19787 REPLACE_SNPRINTF=0;
19788 REPLACE_SPRINTF=0;
19789 REPLACE_STDIO_READ_FUNCS=0;
19790 REPLACE_STDIO_WRITE_FUNCS=0;
19791 REPLACE_TMPFILE=0;
19792 REPLACE_VASPRINTF=0;
19793 REPLACE_VDPRINTF=0;
19794 REPLACE_VFPRINTF=0;
19795 REPLACE_VPRINTF=0;
19796 REPLACE_VSNPRINTF=0;
19797 REPLACE_VSPRINTF=0;
19798
19799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19800 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19801 if test "${ac_cv_struct_tm+set}" = set; then :
19802 $as_echo_n "(cached) " >&6
19803 else
19804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19805 /* end confdefs.h. */
19806 #include <sys/types.h>
19807 #include <time.h>
19808
19809 int
19810 main ()
19811 {
19812 struct tm tm;
19813 int *p = &tm.tm_sec;
19814 return !p;
19815 ;
19816 return 0;
19817 }
19818 _ACEOF
19819 if ac_fn_c_try_compile "$LINENO"; then :
19820 ac_cv_struct_tm=time.h
19821 else
19822 ac_cv_struct_tm=sys/time.h
19823 fi
19824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19825 fi
19826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19827 $as_echo "$ac_cv_struct_tm" >&6; }
19828 if test $ac_cv_struct_tm = sys/time.h; then
19829
19830 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
19831
19832 fi
19833
19834 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19835 #include <$ac_cv_struct_tm>
19836
19837 "
19838 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
19839
19840 cat >>confdefs.h <<_ACEOF
19841 #define HAVE_STRUCT_TM_TM_ZONE 1
19842 _ACEOF
19843
19844
19845 fi
19846
19847 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19848
19849 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
19850
19851 else
19852 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
19853 "
19854 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
19855 ac_have_decl=1
19856 else
19857 ac_have_decl=0
19858 fi
19859
19860 cat >>confdefs.h <<_ACEOF
19861 #define HAVE_DECL_TZNAME $ac_have_decl
19862 _ACEOF
19863
19864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
19865 $as_echo_n "checking for tzname... " >&6; }
19866 if test "${ac_cv_var_tzname+set}" = set; then :
19867 $as_echo_n "(cached) " >&6
19868 else
19869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19870 /* end confdefs.h. */
19871 #include <time.h>
19872 #if !HAVE_DECL_TZNAME
19873 extern char *tzname[];
19874 #endif
19875
19876 int
19877 main ()
19878 {
19879 return tzname[0][0];
19880 ;
19881 return 0;
19882 }
19883 _ACEOF
19884 if ac_fn_c_try_link "$LINENO"; then :
19885 ac_cv_var_tzname=yes
19886 else
19887 ac_cv_var_tzname=no
19888 fi
19889 rm -f core conftest.err conftest.$ac_objext \
19890 conftest$ac_exeext conftest.$ac_ext
19891 fi
19892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
19893 $as_echo "$ac_cv_var_tzname" >&6; }
19894 if test $ac_cv_var_tzname = yes; then
19895
19896 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
19897
19898 fi
19899 fi
19900
19901
19902 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
19903 "
19904 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
19905
19906 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
19907
19908 fi
19909
19910
19911
19912
19913 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
19914 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
19915 ac_have_decl=1
19916 else
19917 ac_have_decl=0
19918 fi
19919
19920 cat >>confdefs.h <<_ACEOF
19921 #define HAVE_DECL_STRTOIMAX $ac_have_decl
19922 _ACEOF
19923
19924
19925
19926 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
19927 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
19928 ac_have_decl=1
19929 else
19930 ac_have_decl=0
19931 fi
19932
19933 cat >>confdefs.h <<_ACEOF
19934 #define HAVE_DECL_STRTOUMAX $ac_have_decl
19935 _ACEOF
19936
19937
19938
19939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
19940 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
19941 if test "${ac_cv_header_stat_broken+set}" = set; then :
19942 $as_echo_n "(cached) " >&6
19943 else
19944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19945 /* end confdefs.h. */
19946 #include <sys/types.h>
19947 #include <sys/stat.h>
19948
19949 #if defined S_ISBLK && defined S_IFDIR
19950 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
19951 #endif
19952
19953 #if defined S_ISBLK && defined S_IFCHR
19954 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
19955 #endif
19956
19957 #if defined S_ISLNK && defined S_IFREG
19958 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
19959 #endif
19960
19961 #if defined S_ISSOCK && defined S_IFREG
19962 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
19963 #endif
19964
19965 _ACEOF
19966 if ac_fn_c_try_compile "$LINENO"; then :
19967 ac_cv_header_stat_broken=no
19968 else
19969 ac_cv_header_stat_broken=yes
19970 fi
19971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19972 fi
19973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
19974 $as_echo "$ac_cv_header_stat_broken" >&6; }
19975 if test $ac_cv_header_stat_broken = yes; then
19976
19977 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
19978
19979 fi
19980
19981
19982
19983
19984
19985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19986 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19987 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
19988 $as_echo_n "(cached) " >&6
19989 else
19990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19991 /* end confdefs.h. */
19992 #include <time.h>
19993
19994 int
19995 main ()
19996 {
19997 static struct timespec x; x.tv_sec = x.tv_nsec;
19998 ;
19999 return 0;
20000 }
20001 _ACEOF
20002 if ac_fn_c_try_compile "$LINENO"; then :
20003 gl_cv_sys_struct_timespec_in_time_h=yes
20004 else
20005 gl_cv_sys_struct_timespec_in_time_h=no
20006 fi
20007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20008 fi
20009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
20010 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
20011
20012 TIME_H_DEFINES_STRUCT_TIMESPEC=0
20013 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
20014 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
20015 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
20016 TIME_H_DEFINES_STRUCT_TIMESPEC=1
20017 else
20018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
20019 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
20020 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
20021 $as_echo_n "(cached) " >&6
20022 else
20023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20024 /* end confdefs.h. */
20025 #include <sys/time.h>
20026
20027 int
20028 main ()
20029 {
20030 static struct timespec x; x.tv_sec = x.tv_nsec;
20031 ;
20032 return 0;
20033 }
20034 _ACEOF
20035 if ac_fn_c_try_compile "$LINENO"; then :
20036 gl_cv_sys_struct_timespec_in_sys_time_h=yes
20037 else
20038 gl_cv_sys_struct_timespec_in_sys_time_h=no
20039 fi
20040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20041 fi
20042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
20043 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
20044 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
20045 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
20046 else
20047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
20048 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
20049 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
20050 $as_echo_n "(cached) " >&6
20051 else
20052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20053 /* end confdefs.h. */
20054 #include <pthread.h>
20055
20056 int
20057 main ()
20058 {
20059 static struct timespec x; x.tv_sec = x.tv_nsec;
20060 ;
20061 return 0;
20062 }
20063 _ACEOF
20064 if ac_fn_c_try_compile "$LINENO"; then :
20065 gl_cv_sys_struct_timespec_in_pthread_h=yes
20066 else
20067 gl_cv_sys_struct_timespec_in_pthread_h=no
20068 fi
20069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20070 fi
20071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20072 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20073 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20074 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20075 fi
20076 fi
20077 fi
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093 if test $gl_cv_have_include_next = yes; then
20094 gl_cv_next_time_h='<'time.h'>'
20095 else
20096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
20097 $as_echo_n "checking absolute name of <time.h>... " >&6; }
20098 if test "${gl_cv_next_time_h+set}" = set; then :
20099 $as_echo_n "(cached) " >&6
20100 else
20101
20102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20103 /* end confdefs.h. */
20104 #include <time.h>
20105
20106 _ACEOF
20107 case "$host_os" in
20108 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20109 *) gl_absname_cpp="$ac_cpp" ;;
20110 esac
20111
20112 case "$host_os" in
20113 mingw*)
20114 gl_dirsep_regex='[/\\]'
20115 ;;
20116 *)
20117 gl_dirsep_regex='\/'
20118 ;;
20119 esac
20120 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20121
20122 gl_header_literal_regex=`echo 'time.h' \
20123 | sed -e "$gl_make_literal_regex_sed"`
20124 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20125 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20126 s|^/[^/]|//&|
20127 p
20128 q
20129 }'
20130 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20131 sed -n "$gl_absolute_header_sed"`'"'
20132
20133
20134 fi
20135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
20136 $as_echo "$gl_cv_next_time_h" >&6; }
20137 fi
20138 NEXT_TIME_H=$gl_cv_next_time_h
20139
20140 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20141 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20142 gl_next_as_first_directive='<'time.h'>'
20143 else
20144 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20145 gl_next_as_first_directive=$gl_cv_next_time_h
20146 fi
20147 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
20163 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
20164 ac_have_decl=1
20165 else
20166 ac_have_decl=0
20167 fi
20168
20169 cat >>confdefs.h <<_ACEOF
20170 #define HAVE_DECL_UNSETENV $ac_have_decl
20171 _ACEOF
20172
20173
20174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
20175 $as_echo_n "checking whether the utimes function works... " >&6; }
20176 if test "${gl_cv_func_working_utimes+set}" = set; then :
20177 $as_echo_n "(cached) " >&6
20178 else
20179
20180 if test "$cross_compiling" = yes; then :
20181 gl_cv_func_working_utimes=no
20182 else
20183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20184 /* end confdefs.h. */
20185
20186 #include <sys/types.h>
20187 #include <sys/stat.h>
20188 #include <fcntl.h>
20189 #include <sys/time.h>
20190 #include <time.h>
20191 #include <unistd.h>
20192 #include <stdlib.h>
20193 #include <stdio.h>
20194 #include <utime.h>
20195
20196 static int
20197 inorder (time_t a, time_t b, time_t c)
20198 {
20199 return a <= b && b <= c;
20200 }
20201
20202 int
20203 main ()
20204 {
20205 int result = 0;
20206 char const *file = "conftest.utimes";
20207 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
20208
20209 /* Test whether utimes() essentially works. */
20210 {
20211 struct stat sbuf;
20212 FILE *f = fopen (file, "w");
20213 if (f == NULL)
20214 result |= 1;
20215 else if (fclose (f) != 0)
20216 result |= 1;
20217 else if (utimes (file, timeval) != 0)
20218 result |= 2;
20219 else if (lstat (file, &sbuf) != 0)
20220 result |= 1;
20221 else if (!(sbuf.st_atime == timeval[0].tv_sec
20222 && sbuf.st_mtime == timeval[1].tv_sec))
20223 result |= 4;
20224 if (unlink (file) != 0)
20225 result |= 1;
20226 }
20227
20228 /* Test whether utimes() with a NULL argument sets the file's timestamp
20229 to the current time. Use 'fstat' as well as 'time' to
20230 determine the "current" time, to accommodate NFS file systems
20231 if there is a time skew between the host and the NFS server. */
20232 {
20233 int fd = open (file, O_WRONLY|O_CREAT, 0644);
20234 if (fd < 0)
20235 result |= 1;
20236 else
20237 {
20238 time_t t0, t2;
20239 struct stat st0, st1, st2;
20240 if (time (&t0) == (time_t) -1)
20241 result |= 1;
20242 else if (fstat (fd, &st0) != 0)
20243 result |= 1;
20244 else if (utimes (file, timeval) != 0)
20245 result |= 2;
20246 else if (utimes (file, NULL) != 0)
20247 result |= 8;
20248 else if (fstat (fd, &st1) != 0)
20249 result |= 1;
20250 else if (write (fd, "\n", 1) != 1)
20251 result |= 1;
20252 else if (fstat (fd, &st2) != 0)
20253 result |= 1;
20254 else if (time (&t2) == (time_t) -1)
20255 result |= 1;
20256 else
20257 {
20258 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
20259 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
20260 if (! (st1.st_atime == st1.st_mtime))
20261 result |= 16;
20262 if (! (m_ok_POSIX || m_ok_NFS))
20263 result |= 32;
20264 }
20265 if (close (fd) != 0)
20266 result |= 1;
20267 }
20268 if (unlink (file) != 0)
20269 result |= 1;
20270 }
20271
20272 /* Test whether utimes() with a NULL argument works on read-only files. */
20273 {
20274 int fd = open (file, O_WRONLY|O_CREAT, 0444);
20275 if (fd < 0)
20276 result |= 1;
20277 else if (close (fd) != 0)
20278 result |= 1;
20279 else if (utimes (file, NULL) != 0)
20280 result |= 64;
20281 if (unlink (file) != 0)
20282 result |= 1;
20283 }
20284
20285 return result;
20286 }
20287
20288 _ACEOF
20289 if ac_fn_c_try_run "$LINENO"; then :
20290 gl_cv_func_working_utimes=yes
20291 else
20292 gl_cv_func_working_utimes=no
20293 fi
20294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20295 conftest.$ac_objext conftest.beam conftest.$ac_ext
20296 fi
20297
20298 fi
20299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
20300 $as_echo "$gl_cv_func_working_utimes" >&6; }
20301
20302 if test $gl_cv_func_working_utimes = yes; then
20303
20304 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
20305
20306 fi
20307
20308
20309
20310
20311
20312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
20313 $as_echo_n "checking for struct utimbuf... " >&6; }
20314 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
20315 $as_echo_n "(cached) " >&6
20316 else
20317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20318 /* end confdefs.h. */
20319 #if HAVE_SYS_TIME_H
20320 #include <sys/time.h>
20321 #endif
20322 #include <time.h>
20323 #ifdef HAVE_UTIME_H
20324 #include <utime.h>
20325 #endif
20326
20327 int
20328 main ()
20329 {
20330 static struct utimbuf x; x.actime = x.modtime;
20331 ;
20332 return 0;
20333 }
20334 _ACEOF
20335 if ac_fn_c_try_compile "$LINENO"; then :
20336 gl_cv_sys_struct_utimbuf=yes
20337 else
20338 gl_cv_sys_struct_utimbuf=no
20339 fi
20340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20341 fi
20342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
20343 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
20344
20345 if test $gl_cv_sys_struct_utimbuf = yes; then
20346
20347 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
20348
20349 fi
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
20362 $as_echo_n "checking type of array argument to getgroups... " >&6; }
20363 if test "${ac_cv_type_getgroups+set}" = set; then :
20364 $as_echo_n "(cached) " >&6
20365 else
20366 if test "$cross_compiling" = yes; then :
20367 ac_cv_type_getgroups=cross
20368 else
20369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20370 /* end confdefs.h. */
20371 /* Thanks to Mike Rendell for this test. */
20372 $ac_includes_default
20373 #define NGID 256
20374 #undef MAX
20375 #define MAX(x, y) ((x) > (y) ? (x) : (y))
20376
20377 int
20378 main ()
20379 {
20380 gid_t gidset[NGID];
20381 int i, n;
20382 union { gid_t gval; long int lval; } val;
20383
20384 val.lval = -1;
20385 for (i = 0; i < NGID; i++)
20386 gidset[i] = val.gval;
20387 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
20388 gidset);
20389 /* Exit non-zero if getgroups seems to require an array of ints. This
20390 happens when gid_t is short int but getgroups modifies an array
20391 of ints. */
20392 return n > 0 && gidset[n] != val.gval;
20393 }
20394 _ACEOF
20395 if ac_fn_c_try_run "$LINENO"; then :
20396 ac_cv_type_getgroups=gid_t
20397 else
20398 ac_cv_type_getgroups=int
20399 fi
20400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20401 conftest.$ac_objext conftest.beam conftest.$ac_ext
20402 fi
20403
20404 if test $ac_cv_type_getgroups = cross; then
20405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20406 /* end confdefs.h. */
20407 #include <unistd.h>
20408
20409 _ACEOF
20410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20411 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
20412 ac_cv_type_getgroups=gid_t
20413 else
20414 ac_cv_type_getgroups=int
20415 fi
20416 rm -f conftest*
20417
20418 fi
20419 fi
20420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
20421 $as_echo "$ac_cv_type_getgroups" >&6; }
20422
20423 cat >>confdefs.h <<_ACEOF
20424 #define GETGROUPS_T $ac_cv_type_getgroups
20425 _ACEOF
20426
20427
20428
20429
20430 if false; then
20431 GL_COND_LIBTOOL_TRUE=
20432 GL_COND_LIBTOOL_FALSE='#'
20433 else
20434 GL_COND_LIBTOOL_TRUE='#'
20435 GL_COND_LIBTOOL_FALSE=
20436 fi
20437
20438 gl_cond_libtool=false
20439 gl_libdeps=
20440 gl_ltlibdeps=
20441 gl_m4_base='m4'
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451 gl_source_base='lib'
20452
20453
20454 if test $ac_cv_func_alloca_works = no; then
20455 :
20456 fi
20457
20458 # Define an additional variable used in the Makefile substitution.
20459 if test $ac_cv_working_alloca_h = yes; then
20460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20461 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20462 if test "${gl_cv_rpl_alloca+set}" = set; then :
20463 $as_echo_n "(cached) " >&6
20464 else
20465
20466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20467 /* end confdefs.h. */
20468
20469 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
20470 Need own alloca
20471 #endif
20472
20473 _ACEOF
20474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20475 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20476 gl_cv_rpl_alloca=yes
20477 else
20478 gl_cv_rpl_alloca=no
20479 fi
20480 rm -f conftest*
20481
20482
20483 fi
20484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20485 $as_echo "$gl_cv_rpl_alloca" >&6; }
20486 if test $gl_cv_rpl_alloca = yes; then
20487
20488 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20489
20490 ALLOCA_H=alloca.h
20491 else
20492 ALLOCA_H=
20493 fi
20494 else
20495 ALLOCA_H=alloca.h
20496 fi
20497
20498 if test -n "$ALLOCA_H"; then
20499 GL_GENERATE_ALLOCA_H_TRUE=
20500 GL_GENERATE_ALLOCA_H_FALSE='#'
20501 else
20502 GL_GENERATE_ALLOCA_H_TRUE='#'
20503 GL_GENERATE_ALLOCA_H_FALSE=
20504 fi
20505
20506
20507
20508
20509
20510
20511 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20512 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
20513
20514 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20515 # programs in the package would end up linked with that potentially-shared
20516 # library, inducing unnecessary run-time overhead.
20517 LIB_CLOCK_GETTIME=
20518
20519 gl_saved_libs=$LIBS
20520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20521 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20522 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20523 $as_echo_n "(cached) " >&6
20524 else
20525 ac_func_search_save_LIBS=$LIBS
20526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20527 /* end confdefs.h. */
20528
20529 /* Override any GCC internal prototype to avoid an error.
20530 Use char because int might match the return type of a GCC
20531 builtin and then its argument prototype would still apply. */
20532 #ifdef __cplusplus
20533 extern "C"
20534 #endif
20535 char clock_gettime ();
20536 int
20537 main ()
20538 {
20539 return clock_gettime ();
20540 ;
20541 return 0;
20542 }
20543 _ACEOF
20544 for ac_lib in '' rt posix4; do
20545 if test -z "$ac_lib"; then
20546 ac_res="none required"
20547 else
20548 ac_res=-l$ac_lib
20549 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20550 fi
20551 if ac_fn_c_try_link "$LINENO"; then :
20552 ac_cv_search_clock_gettime=$ac_res
20553 fi
20554 rm -f core conftest.err conftest.$ac_objext \
20555 conftest$ac_exeext
20556 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20557 break
20558 fi
20559 done
20560 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20561
20562 else
20563 ac_cv_search_clock_gettime=no
20564 fi
20565 rm conftest.$ac_ext
20566 LIBS=$ac_func_search_save_LIBS
20567 fi
20568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20569 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20570 ac_res=$ac_cv_search_clock_gettime
20571 if test "$ac_res" != no; then :
20572 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20573 test "$ac_cv_search_clock_gettime" = "none required" ||
20574 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20575 fi
20576
20577 for ac_func in clock_gettime clock_settime
20578 do :
20579 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20580 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20581 eval as_val=\$$as_ac_var
20582 if test "x$as_val" = x""yes; then :
20583 cat >>confdefs.h <<_ACEOF
20584 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20585 _ACEOF
20586
20587 fi
20588 done
20589
20590 LIBS=$gl_saved_libs
20591
20592
20593 :
20594
20595
20596
20597 cat >>confdefs.h <<_ACEOF
20598 #define GNULIB_CLOSE_STREAM 1
20599 _ACEOF
20600
20601
20602
20603
20604 :
20605
20606
20607
20608 :
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
20623
20624
20625 if test $HAVE_DUP2 = 1; then
20626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20627 $as_echo_n "checking whether dup2 works... " >&6; }
20628 if test "${gl_cv_func_dup2_works+set}" = set; then :
20629 $as_echo_n "(cached) " >&6
20630 else
20631 if test "$cross_compiling" = yes; then :
20632 case "$host_os" in
20633 mingw*) # on this platform, dup2 always returns 0 for success
20634 gl_cv_func_dup2_works="guessing no" ;;
20635 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20636 gl_cv_func_dup2_works="guessing no" ;;
20637 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20638 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20639 gl_cv_func_dup2_works="guessing no" ;;
20640 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20641 gl_cv_func_dup2_works="guessing no" ;;
20642 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20643 gl_cv_func_dup2_works="guessing no" ;;
20644 *) gl_cv_func_dup2_works="guessing yes" ;;
20645 esac
20646 else
20647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20648 /* end confdefs.h. */
20649
20650 #include <unistd.h>
20651 #include <fcntl.h>
20652 #include <errno.h>
20653 int
20654 main ()
20655 {
20656 int result = 0;
20657 #ifdef FD_CLOEXEC
20658 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20659 result |= 1;
20660 #endif
20661 if (dup2 (1, 1) == 0)
20662 result |= 2;
20663 #ifdef FD_CLOEXEC
20664 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20665 result |= 4;
20666 #endif
20667 close (0);
20668 if (dup2 (0, 0) != -1)
20669 result |= 8;
20670 /* Many gnulib modules require POSIX conformance of EBADF. */
20671 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20672 result |= 16;
20673 return result;
20674
20675 ;
20676 return 0;
20677 }
20678
20679 _ACEOF
20680 if ac_fn_c_try_run "$LINENO"; then :
20681 gl_cv_func_dup2_works=yes
20682 else
20683 gl_cv_func_dup2_works=no
20684 fi
20685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20686 conftest.$ac_objext conftest.beam conftest.$ac_ext
20687 fi
20688
20689
20690 fi
20691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20692 $as_echo "$gl_cv_func_dup2_works" >&6; }
20693 case "$gl_cv_func_dup2_works" in
20694 *yes) ;;
20695 *)
20696 REPLACE_DUP2=1
20697 ;;
20698 esac
20699 fi
20700
20701
20702 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
20703
20704
20705
20706
20707
20708
20709
20710
20711 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20712
20713
20714 fi
20715
20716
20717
20718
20719
20720 GNULIB_DUP2=1
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732 GNULIB_ENVIRON=1
20733
20734
20735
20736
20737
20738
20739
20740
20741 LIB_EXECINFO=''
20742 EXECINFO_H='execinfo.h'
20743
20744 if test $ac_cv_header_execinfo_h = yes; then
20745 gl_saved_libs=$LIBS
20746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
20747 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
20748 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20749 $as_echo_n "(cached) " >&6
20750 else
20751 ac_func_search_save_LIBS=$LIBS
20752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20753 /* end confdefs.h. */
20754
20755 /* Override any GCC internal prototype to avoid an error.
20756 Use char because int might match the return type of a GCC
20757 builtin and then its argument prototype would still apply. */
20758 #ifdef __cplusplus
20759 extern "C"
20760 #endif
20761 char backtrace_symbols_fd ();
20762 int
20763 main ()
20764 {
20765 return backtrace_symbols_fd ();
20766 ;
20767 return 0;
20768 }
20769 _ACEOF
20770 for ac_lib in '' execinfo; do
20771 if test -z "$ac_lib"; then
20772 ac_res="none required"
20773 else
20774 ac_res=-l$ac_lib
20775 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20776 fi
20777 if ac_fn_c_try_link "$LINENO"; then :
20778 ac_cv_search_backtrace_symbols_fd=$ac_res
20779 fi
20780 rm -f core conftest.err conftest.$ac_objext \
20781 conftest$ac_exeext
20782 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20783 break
20784 fi
20785 done
20786 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20787
20788 else
20789 ac_cv_search_backtrace_symbols_fd=no
20790 fi
20791 rm conftest.$ac_ext
20792 LIBS=$ac_func_search_save_LIBS
20793 fi
20794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
20795 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
20796 ac_res=$ac_cv_search_backtrace_symbols_fd
20797 if test "$ac_res" != no; then :
20798 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20799 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
20800 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
20801 fi
20802
20803 LIBS=$gl_saved_libs
20804 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
20805 fi
20806
20807 if test -n "$EXECINFO_H"; then
20808
20809
20810
20811
20812
20813
20814
20815
20816 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
20817
20818 fi
20819
20820
20821
20822 if test -n "$EXECINFO_H"; then
20823 GL_GENERATE_EXECINFO_H_TRUE=
20824 GL_GENERATE_EXECINFO_H_FALSE='#'
20825 else
20826 GL_GENERATE_EXECINFO_H_TRUE='#'
20827 GL_GENERATE_EXECINFO_H_FALSE=
20828 fi
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838 if test $ac_cv_func_faccessat = no; then
20839 HAVE_FACCESSAT=0
20840 fi
20841
20842 if test $HAVE_FACCESSAT = 0; then
20843
20844
20845
20846
20847
20848
20849
20850
20851 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
20852
20853
20854 for ac_func in access
20855 do :
20856 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
20857 if test "x$ac_cv_func_access" = x""yes; then :
20858 cat >>confdefs.h <<_ACEOF
20859 #define HAVE_ACCESS 1
20860 _ACEOF
20861
20862 fi
20863 done
20864
20865
20866 fi
20867
20868
20869 cat >>confdefs.h <<_ACEOF
20870 #define GNULIB_FACCESSAT 1
20871 _ACEOF
20872
20873
20874
20875
20876
20877
20878
20879 GNULIB_FACCESSAT=1
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896 if test $gl_cv_have_include_next = yes; then
20897 gl_cv_next_fcntl_h='<'fcntl.h'>'
20898 else
20899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20900 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
20901 if test "${gl_cv_next_fcntl_h+set}" = set; then :
20902 $as_echo_n "(cached) " >&6
20903 else
20904
20905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20906 /* end confdefs.h. */
20907 #include <fcntl.h>
20908
20909 _ACEOF
20910 case "$host_os" in
20911 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20912 *) gl_absname_cpp="$ac_cpp" ;;
20913 esac
20914
20915 case "$host_os" in
20916 mingw*)
20917 gl_dirsep_regex='[/\\]'
20918 ;;
20919 *)
20920 gl_dirsep_regex='\/'
20921 ;;
20922 esac
20923 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20924
20925 gl_header_literal_regex=`echo 'fcntl.h' \
20926 | sed -e "$gl_make_literal_regex_sed"`
20927 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20928 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20929 s|^/[^/]|//&|
20930 p
20931 q
20932 }'
20933 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20934 sed -n "$gl_absolute_header_sed"`'"'
20935
20936
20937 fi
20938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20939 $as_echo "$gl_cv_next_fcntl_h" >&6; }
20940 fi
20941 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20942
20943 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20944 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20945 gl_next_as_first_directive='<'fcntl.h'>'
20946 else
20947 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20948 gl_next_as_first_directive=$gl_cv_next_fcntl_h
20949 fi
20950 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969 fp_headers='
20970 # include <stdio.h>
20971 # if HAVE_STDIO_EXT_H
20972 # include <stdio_ext.h>
20973 # endif
20974 '
20975 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
20976 "
20977 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
20978 ac_have_decl=1
20979 else
20980 ac_have_decl=0
20981 fi
20982
20983 cat >>confdefs.h <<_ACEOF
20984 #define HAVE_DECL___FPENDING $ac_have_decl
20985 _ACEOF
20986
20987
20988 if test $ac_cv_func___fpending = no; then
20989
20990
20991
20992
20993
20994
20995
20996
20997 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
20998
20999
21000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
21001 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
21002 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
21003 $as_echo_n "(cached) " >&6
21004 else
21005
21006 for ac_expr in \
21007 \
21008 '# glibc2' \
21009 'fp->_IO_write_ptr - fp->_IO_write_base' \
21010 \
21011 '# traditional Unix' \
21012 'fp->_ptr - fp->_base' \
21013 \
21014 '# BSD' \
21015 'fp->_p - fp->_bf._base' \
21016 \
21017 '# SCO, Unixware' \
21018 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
21019 \
21020 '# QNX' \
21021 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
21022 \
21023 '# old glibc?' \
21024 'fp->__bufp - fp->__buffer' \
21025 \
21026 '# old glibc iostream?' \
21027 'fp->_pptr - fp->_pbase' \
21028 \
21029 '# emx+gcc' \
21030 'fp->_ptr - fp->_buffer' \
21031 \
21032 '# Minix' \
21033 'fp->_ptr - fp->_buf' \
21034 \
21035 '# Plan9' \
21036 'fp->wp - fp->buf' \
21037 \
21038 '# VMS' \
21039 '(*fp)->_ptr - (*fp)->_base' \
21040 \
21041 '# e.g., DGUX R4.11; the info is not available' \
21042 1 \
21043 ; do
21044
21045 # Skip each embedded comment.
21046 case "$ac_expr" in '#'*) continue;; esac
21047
21048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21049 /* end confdefs.h. */
21050 #include <stdio.h>
21051 int
21052 main ()
21053 {
21054 FILE *fp = stdin; (void) ($ac_expr);
21055 ;
21056 return 0;
21057 }
21058 _ACEOF
21059 if ac_fn_c_try_compile "$LINENO"; then :
21060 fp_done=yes
21061
21062 fi
21063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21064 test "$fp_done" = yes && break
21065 done
21066
21067 ac_cv_sys_pending_output_n_bytes=$ac_expr
21068
21069
21070 fi
21071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
21072 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
21073
21074 cat >>confdefs.h <<_ACEOF
21075 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
21076 _ACEOF
21077
21078
21079 fi
21080
21081
21082 # Persuade glibc <stdlib.h> to declare getloadavg().
21083
21084
21085 gl_save_LIBS=$LIBS
21086
21087 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
21088 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
21089 HAVE_GETLOADAVG=1
21090 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
21091 if test "x$ac_cv_func_getloadavg" = x""yes; then :
21092
21093 else
21094 gl_func_getloadavg_done=no
21095
21096 # Some systems with -lutil have (and need) -lkvm as well, some do not.
21097 # On Solaris, -lkvm requires nlist from -lelf, so check that first
21098 # to get the right answer into the cache.
21099 # For kstat on solaris, we need to test for libelf and libkvm to force the
21100 # definition of SVR4 below.
21101 if test $gl_func_getloadavg_done = no; then
21102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
21103 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
21104 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
21105 $as_echo_n "(cached) " >&6
21106 else
21107 ac_check_lib_save_LIBS=$LIBS
21108 LIBS="-lelf $LIBS"
21109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21110 /* end confdefs.h. */
21111
21112 /* Override any GCC internal prototype to avoid an error.
21113 Use char because int might match the return type of a GCC
21114 builtin and then its argument prototype would still apply. */
21115 #ifdef __cplusplus
21116 extern "C"
21117 #endif
21118 char elf_begin ();
21119 int
21120 main ()
21121 {
21122 return elf_begin ();
21123 ;
21124 return 0;
21125 }
21126 _ACEOF
21127 if ac_fn_c_try_link "$LINENO"; then :
21128 ac_cv_lib_elf_elf_begin=yes
21129 else
21130 ac_cv_lib_elf_elf_begin=no
21131 fi
21132 rm -f core conftest.err conftest.$ac_objext \
21133 conftest$ac_exeext conftest.$ac_ext
21134 LIBS=$ac_check_lib_save_LIBS
21135 fi
21136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
21137 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
21138 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
21139 LIBS="-lelf $LIBS"
21140 fi
21141
21142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
21143 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
21144 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
21145 $as_echo_n "(cached) " >&6
21146 else
21147 ac_check_lib_save_LIBS=$LIBS
21148 LIBS="-lkvm $LIBS"
21149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21150 /* end confdefs.h. */
21151
21152 /* Override any GCC internal prototype to avoid an error.
21153 Use char because int might match the return type of a GCC
21154 builtin and then its argument prototype would still apply. */
21155 #ifdef __cplusplus
21156 extern "C"
21157 #endif
21158 char kvm_open ();
21159 int
21160 main ()
21161 {
21162 return kvm_open ();
21163 ;
21164 return 0;
21165 }
21166 _ACEOF
21167 if ac_fn_c_try_link "$LINENO"; then :
21168 ac_cv_lib_kvm_kvm_open=yes
21169 else
21170 ac_cv_lib_kvm_kvm_open=no
21171 fi
21172 rm -f core conftest.err conftest.$ac_objext \
21173 conftest$ac_exeext conftest.$ac_ext
21174 LIBS=$ac_check_lib_save_LIBS
21175 fi
21176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
21177 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
21178 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
21179 LIBS="-lkvm $LIBS"
21180 fi
21181
21182 # Check for the 4.4BSD definition of getloadavg.
21183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
21184 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
21185 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
21186 $as_echo_n "(cached) " >&6
21187 else
21188 ac_check_lib_save_LIBS=$LIBS
21189 LIBS="-lutil $LIBS"
21190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21191 /* end confdefs.h. */
21192
21193 /* Override any GCC internal prototype to avoid an error.
21194 Use char because int might match the return type of a GCC
21195 builtin and then its argument prototype would still apply. */
21196 #ifdef __cplusplus
21197 extern "C"
21198 #endif
21199 char getloadavg ();
21200 int
21201 main ()
21202 {
21203 return getloadavg ();
21204 ;
21205 return 0;
21206 }
21207 _ACEOF
21208 if ac_fn_c_try_link "$LINENO"; then :
21209 ac_cv_lib_util_getloadavg=yes
21210 else
21211 ac_cv_lib_util_getloadavg=no
21212 fi
21213 rm -f core conftest.err conftest.$ac_objext \
21214 conftest$ac_exeext conftest.$ac_ext
21215 LIBS=$ac_check_lib_save_LIBS
21216 fi
21217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
21218 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
21219 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
21220 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
21221 fi
21222
21223 fi
21224
21225 if test $gl_func_getloadavg_done = no; then
21226 # There is a commonly available library for RS/6000 AIX.
21227 # Since it is not a standard part of AIX, it might be installed locally.
21228 gl_getloadavg_LIBS=$LIBS
21229 LIBS="-L/usr/local/lib $LIBS"
21230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
21231 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
21232 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
21233 $as_echo_n "(cached) " >&6
21234 else
21235 ac_check_lib_save_LIBS=$LIBS
21236 LIBS="-lgetloadavg $LIBS"
21237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21238 /* end confdefs.h. */
21239
21240 /* Override any GCC internal prototype to avoid an error.
21241 Use char because int might match the return type of a GCC
21242 builtin and then its argument prototype would still apply. */
21243 #ifdef __cplusplus
21244 extern "C"
21245 #endif
21246 char getloadavg ();
21247 int
21248 main ()
21249 {
21250 return getloadavg ();
21251 ;
21252 return 0;
21253 }
21254 _ACEOF
21255 if ac_fn_c_try_link "$LINENO"; then :
21256 ac_cv_lib_getloadavg_getloadavg=yes
21257 else
21258 ac_cv_lib_getloadavg_getloadavg=no
21259 fi
21260 rm -f core conftest.err conftest.$ac_objext \
21261 conftest$ac_exeext conftest.$ac_ext
21262 LIBS=$ac_check_lib_save_LIBS
21263 fi
21264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
21265 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
21266 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
21267 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
21268 else
21269 LIBS=$gl_getloadavg_LIBS
21270 fi
21271
21272 fi
21273
21274 # Set up the replacement function if necessary.
21275 if test $gl_func_getloadavg_done = no; then
21276 HAVE_GETLOADAVG=0
21277
21278 # Solaris has libkstat which does not require root.
21279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
21280 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
21281 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
21282 $as_echo_n "(cached) " >&6
21283 else
21284 ac_check_lib_save_LIBS=$LIBS
21285 LIBS="-lkstat $LIBS"
21286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287 /* end confdefs.h. */
21288
21289 /* Override any GCC internal prototype to avoid an error.
21290 Use char because int might match the return type of a GCC
21291 builtin and then its argument prototype would still apply. */
21292 #ifdef __cplusplus
21293 extern "C"
21294 #endif
21295 char kstat_open ();
21296 int
21297 main ()
21298 {
21299 return kstat_open ();
21300 ;
21301 return 0;
21302 }
21303 _ACEOF
21304 if ac_fn_c_try_link "$LINENO"; then :
21305 ac_cv_lib_kstat_kstat_open=yes
21306 else
21307 ac_cv_lib_kstat_kstat_open=no
21308 fi
21309 rm -f core conftest.err conftest.$ac_objext \
21310 conftest$ac_exeext conftest.$ac_ext
21311 LIBS=$ac_check_lib_save_LIBS
21312 fi
21313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
21314 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
21315 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
21316 cat >>confdefs.h <<_ACEOF
21317 #define HAVE_LIBKSTAT 1
21318 _ACEOF
21319
21320 LIBS="-lkstat $LIBS"
21321
21322 fi
21323
21324 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
21325
21326 # AIX has libperfstat which does not require root
21327 if test $gl_func_getloadavg_done = no; then
21328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
21329 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
21330 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
21331 $as_echo_n "(cached) " >&6
21332 else
21333 ac_check_lib_save_LIBS=$LIBS
21334 LIBS="-lperfstat $LIBS"
21335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21336 /* end confdefs.h. */
21337
21338 /* Override any GCC internal prototype to avoid an error.
21339 Use char because int might match the return type of a GCC
21340 builtin and then its argument prototype would still apply. */
21341 #ifdef __cplusplus
21342 extern "C"
21343 #endif
21344 char perfstat_cpu_total ();
21345 int
21346 main ()
21347 {
21348 return perfstat_cpu_total ();
21349 ;
21350 return 0;
21351 }
21352 _ACEOF
21353 if ac_fn_c_try_link "$LINENO"; then :
21354 ac_cv_lib_perfstat_perfstat_cpu_total=yes
21355 else
21356 ac_cv_lib_perfstat_perfstat_cpu_total=no
21357 fi
21358 rm -f core conftest.err conftest.$ac_objext \
21359 conftest$ac_exeext conftest.$ac_ext
21360 LIBS=$ac_check_lib_save_LIBS
21361 fi
21362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
21363 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
21364 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
21365 cat >>confdefs.h <<_ACEOF
21366 #define HAVE_LIBPERFSTAT 1
21367 _ACEOF
21368
21369 LIBS="-lperfstat $LIBS"
21370
21371 fi
21372
21373 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
21374 fi
21375
21376 if test $gl_func_getloadavg_done = no; then
21377 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
21378 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
21379 gl_func_getloadavg_done=yes
21380
21381 $as_echo "#define DGUX 1" >>confdefs.h
21382
21383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
21384 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
21385 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
21386 $as_echo_n "(cached) " >&6
21387 else
21388 ac_check_lib_save_LIBS=$LIBS
21389 LIBS="-ldgc $LIBS"
21390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21391 /* end confdefs.h. */
21392
21393 /* Override any GCC internal prototype to avoid an error.
21394 Use char because int might match the return type of a GCC
21395 builtin and then its argument prototype would still apply. */
21396 #ifdef __cplusplus
21397 extern "C"
21398 #endif
21399 char dg_sys_info ();
21400 int
21401 main ()
21402 {
21403 return dg_sys_info ();
21404 ;
21405 return 0;
21406 }
21407 _ACEOF
21408 if ac_fn_c_try_link "$LINENO"; then :
21409 ac_cv_lib_dgc_dg_sys_info=yes
21410 else
21411 ac_cv_lib_dgc_dg_sys_info=no
21412 fi
21413 rm -f core conftest.err conftest.$ac_objext \
21414 conftest$ac_exeext conftest.$ac_ext
21415 LIBS=$ac_check_lib_save_LIBS
21416 fi
21417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
21418 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
21419 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
21420 cat >>confdefs.h <<_ACEOF
21421 #define HAVE_LIBDGC 1
21422 _ACEOF
21423
21424 LIBS="-ldgc $LIBS"
21425
21426 fi
21427
21428 fi
21429
21430
21431 fi
21432 fi
21433 fi
21434
21435
21436 if test "x$gl_save_LIBS" = x; then
21437 GETLOADAVG_LIBS=$LIBS
21438 else
21439 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
21440 fi
21441 LIBS=$gl_save_LIBS
21442
21443
21444 # Test whether the system declares getloadavg. Solaris has the function
21445 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
21446 for ac_header in sys/loadavg.h
21447 do :
21448 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
21449 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
21450 cat >>confdefs.h <<_ACEOF
21451 #define HAVE_SYS_LOADAVG_H 1
21452 _ACEOF
21453
21454 fi
21455
21456 done
21457
21458 if test $ac_cv_header_sys_loadavg_h = yes; then
21459 HAVE_SYS_LOADAVG_H=1
21460 else
21461 HAVE_SYS_LOADAVG_H=0
21462 fi
21463 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
21464 # include <sys/loadavg.h>
21465 #endif
21466 #include <stdlib.h>
21467 "
21468 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
21469
21470 else
21471 HAVE_DECL_GETLOADAVG=0
21472 fi
21473
21474
21475 if test $HAVE_GETLOADAVG = 0; then
21476
21477
21478
21479
21480
21481
21482
21483
21484 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
21485
21486
21487 # Figure out what our getloadavg.c needs.
21488
21489
21490
21491 # On HPUX9, an unprivileged user can get load averages this way.
21492 if test $gl_func_getloadavg_done = no; then
21493 for ac_func in pstat_getdynamic
21494 do :
21495 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
21496 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
21497 cat >>confdefs.h <<_ACEOF
21498 #define HAVE_PSTAT_GETDYNAMIC 1
21499 _ACEOF
21500 gl_func_getloadavg_done=yes
21501 fi
21502 done
21503
21504 fi
21505
21506 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
21507 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
21508 # Irix 4.0.5F has the header but not the library.
21509 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
21510 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
21511 gl_func_getloadavg_done=yes
21512
21513 $as_echo "#define SVR4 1" >>confdefs.h
21514
21515 fi
21516
21517 if test $gl_func_getloadavg_done = no; then
21518 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
21519 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
21520 gl_func_getloadavg_done=yes
21521
21522 $as_echo "#define UMAX 1" >>confdefs.h
21523
21524
21525 $as_echo "#define UMAX4_3 1" >>confdefs.h
21526
21527 fi
21528
21529
21530 fi
21531
21532 if test $gl_func_getloadavg_done = no; then
21533 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
21534 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
21535 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
21536
21537 fi
21538
21539
21540 fi
21541
21542 if test $gl_func_getloadavg_done = no; then
21543 for ac_header in mach/mach.h
21544 do :
21545 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
21546 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
21547 cat >>confdefs.h <<_ACEOF
21548 #define HAVE_MACH_MACH_H 1
21549 _ACEOF
21550
21551 fi
21552
21553 done
21554
21555 fi
21556
21557 for ac_header in nlist.h
21558 do :
21559 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
21560 if test "x$ac_cv_header_nlist_h" = x""yes; then :
21561 cat >>confdefs.h <<_ACEOF
21562 #define HAVE_NLIST_H 1
21563 _ACEOF
21564 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
21565 "
21566 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
21567
21568 cat >>confdefs.h <<_ACEOF
21569 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
21570 _ACEOF
21571
21572
21573 fi
21574
21575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21576 /* end confdefs.h. */
21577 #include <nlist.h>
21578 int
21579 main ()
21580 {
21581 struct nlist x;
21582 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
21583 x.n_un.n_name = "";
21584 #else
21585 x.n_name = "";
21586 #endif
21587 ;
21588 return 0;
21589 }
21590 _ACEOF
21591 if ac_fn_c_try_link "$LINENO"; then :
21592
21593 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
21594
21595 fi
21596 rm -f core conftest.err conftest.$ac_objext \
21597 conftest$ac_exeext conftest.$ac_ext
21598
21599 fi
21600
21601 done
21602
21603 fi
21604
21605
21606
21607
21608
21609 GNULIB_GETLOADAVG=1
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620 if test $REPLACE_GETOPT = 1; then
21621
21622
21623
21624
21625
21626
21627
21628
21629 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21640
21641
21642
21643
21644 GNULIB_GL_UNISTD_H_GETOPT=1
21645 fi
21646
21647
21648
21649
21650
21651
21652
21653 REPLACE_GETOPT=0
21654 if test -n "$gl_replace_getopt"; then
21655 REPLACE_GETOPT=1
21656 fi
21657
21658 if test $REPLACE_GETOPT = 1; then
21659
21660 GETOPT_H=getopt.h
21661
21662 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21663
21664
21665
21666 fi
21667
21668 if test $REPLACE_GETOPT = 1; then
21669
21670
21671
21672
21673
21674
21675
21676
21677 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21688
21689
21690
21691
21692 GNULIB_GL_UNISTD_H_GETOPT=1
21693 fi
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706 gl_gettimeofday_timezone=void
21707 if test $ac_cv_func_gettimeofday != yes; then
21708 HAVE_GETTIMEOFDAY=0
21709 else
21710
21711
21712
21713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21714 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21715 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
21716 $as_echo_n "(cached) " >&6
21717 else
21718 if test "$cross_compiling" = yes; then :
21719 # When cross-compiling:
21720 case "$host_os" in
21721 # Guess all is fine on glibc systems.
21722 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21723 # If we don't know, assume the worst.
21724 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21725 esac
21726
21727 else
21728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21729 /* end confdefs.h. */
21730 #include <string.h>
21731 #include <sys/time.h>
21732 #include <time.h>
21733 #include <stdlib.h>
21734
21735 int
21736 main ()
21737 {
21738
21739 time_t t = 0;
21740 struct tm *lt;
21741 struct tm saved_lt;
21742 struct timeval tv;
21743 lt = localtime (&t);
21744 saved_lt = *lt;
21745 gettimeofday (&tv, NULL);
21746 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21747
21748 ;
21749 return 0;
21750 }
21751 _ACEOF
21752 if ac_fn_c_try_run "$LINENO"; then :
21753 gl_cv_func_gettimeofday_clobber=no
21754 else
21755 gl_cv_func_gettimeofday_clobber=yes
21756 fi
21757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21758 conftest.$ac_objext conftest.beam conftest.$ac_ext
21759 fi
21760
21761 fi
21762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21763 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
21764
21765 case "$gl_cv_func_gettimeofday_clobber" in
21766 *yes)
21767 REPLACE_GETTIMEOFDAY=1
21768
21769
21770 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
21771
21772
21773 $as_echo "#define localtime rpl_localtime" >>confdefs.h
21774
21775
21776
21777 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21778
21779 ;;
21780 esac
21781
21782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21783 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21784 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
21785 $as_echo_n "(cached) " >&6
21786 else
21787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21788 /* end confdefs.h. */
21789 #include <sys/time.h>
21790 struct timeval c;
21791 int gettimeofday (struct timeval *restrict, void *restrict);
21792
21793 int
21794 main ()
21795 {
21796 /* glibc uses struct timezone * rather than the POSIX void *
21797 if _GNU_SOURCE is defined. However, since the only portable
21798 use of gettimeofday uses NULL as the second parameter, and
21799 since the glibc definition is actually more typesafe, it is
21800 not worth wrapping this to get a compliant signature. */
21801 int (*f) (struct timeval *restrict, void *restrict)
21802 = gettimeofday;
21803 int x = f (&c, 0);
21804 return !(x | c.tv_sec | c.tv_usec);
21805
21806 ;
21807 return 0;
21808 }
21809 _ACEOF
21810 if ac_fn_c_try_compile "$LINENO"; then :
21811 gl_cv_func_gettimeofday_posix_signature=yes
21812 else
21813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21814 /* end confdefs.h. */
21815 #include <sys/time.h>
21816 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21817
21818 int
21819 main ()
21820 {
21821
21822 ;
21823 return 0;
21824 }
21825 _ACEOF
21826 if ac_fn_c_try_compile "$LINENO"; then :
21827 gl_cv_func_gettimeofday_posix_signature=almost
21828 else
21829 gl_cv_func_gettimeofday_posix_signature=no
21830 fi
21831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21832 fi
21833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21834 fi
21835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21836 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21837 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21838 gl_gettimeofday_timezone='struct timezone'
21839 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21840 REPLACE_GETTIMEOFDAY=1
21841 fi
21842 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21843 REPLACE_GETTIMEOFDAY=1
21844 fi
21845
21846 fi
21847
21848 cat >>confdefs.h <<_ACEOF
21849 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21850 _ACEOF
21851
21852
21853 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21854
21855
21856
21857
21858
21859
21860
21861
21862 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21863
21864
21865 for ac_header in sys/timeb.h
21866 do :
21867 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21868 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
21869 cat >>confdefs.h <<_ACEOF
21870 #define HAVE_SYS_TIMEB_H 1
21871 _ACEOF
21872
21873 fi
21874
21875 done
21876
21877 for ac_func in _ftime
21878 do :
21879 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21880 if test "x$ac_cv_func__ftime" = x""yes; then :
21881 cat >>confdefs.h <<_ACEOF
21882 #define HAVE__FTIME 1
21883 _ACEOF
21884
21885 fi
21886 done
21887
21888
21889 fi
21890
21891
21892
21893
21894
21895 GNULIB_GETTIMEOFDAY=1
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906 if test $ac_cv_func_lstat = yes; then
21907
21908 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21909 *no)
21910 REPLACE_LSTAT=1
21911 ;;
21912 esac
21913 else
21914 HAVE_LSTAT=0
21915 fi
21916
21917 if test $REPLACE_LSTAT = 1; then
21918
21919
21920
21921
21922
21923
21924
21925
21926 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
21927
21928 :
21929 fi
21930
21931
21932
21933
21934
21935 GNULIB_LSTAT=1
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947 if test $APPLE_UNIVERSAL_BUILD = 1; then
21948 # A universal build on Apple Mac OS X platforms.
21949 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
21950 # But we need a configuration result that is valid in both modes.
21951 gl_cv_func_working_mktime=no
21952 fi
21953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
21954 $as_echo_n "checking for working mktime... " >&6; }
21955 if test "${gl_cv_func_working_mktime+set}" = set; then :
21956 $as_echo_n "(cached) " >&6
21957 else
21958 if test "$cross_compiling" = yes; then :
21959 gl_cv_func_working_mktime=no
21960 else
21961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21962 /* end confdefs.h. */
21963 /* Test program from Paul Eggert and Tony Leneis. */
21964 #include <limits.h>
21965 #include <stdlib.h>
21966 #include <time.h>
21967
21968 #ifdef HAVE_UNISTD_H
21969 # include <unistd.h>
21970 #endif
21971
21972 #ifndef HAVE_ALARM
21973 # define alarm(X) /* empty */
21974 #endif
21975
21976 /* Work around redefinition to rpl_putenv by other config tests. */
21977 #undef putenv
21978
21979 static time_t time_t_max;
21980 static time_t time_t_min;
21981
21982 /* Values we'll use to set the TZ environment variable. */
21983 static char *tz_strings[] = {
21984 (char *) 0, "TZ=GMT0", "TZ=JST-9",
21985 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
21986 };
21987 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
21988
21989 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
21990 Based on a problem report from Andreas Jaeger. */
21991 static int
21992 spring_forward_gap ()
21993 {
21994 /* glibc (up to about 1998-10-07) failed this test. */
21995 struct tm tm;
21996
21997 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21998 instead of "TZ=America/Vancouver" in order to detect the bug even
21999 on systems that don't support the Olson extension, or don't have the
22000 full zoneinfo tables installed. */
22001 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
22002
22003 tm.tm_year = 98;
22004 tm.tm_mon = 3;
22005 tm.tm_mday = 5;
22006 tm.tm_hour = 2;
22007 tm.tm_min = 0;
22008 tm.tm_sec = 0;
22009 tm.tm_isdst = -1;
22010 return mktime (&tm) != (time_t) -1;
22011 }
22012
22013 static int
22014 mktime_test1 (time_t now)
22015 {
22016 struct tm *lt;
22017 return ! (lt = localtime (&now)) || mktime (lt) == now;
22018 }
22019
22020 static int
22021 mktime_test (time_t now)
22022 {
22023 return (mktime_test1 (now)
22024 && mktime_test1 ((time_t) (time_t_max - now))
22025 && mktime_test1 ((time_t) (time_t_min + now)));
22026 }
22027
22028 static int
22029 irix_6_4_bug ()
22030 {
22031 /* Based on code from Ariel Faigon. */
22032 struct tm tm;
22033 tm.tm_year = 96;
22034 tm.tm_mon = 3;
22035 tm.tm_mday = 0;
22036 tm.tm_hour = 0;
22037 tm.tm_min = 0;
22038 tm.tm_sec = 0;
22039 tm.tm_isdst = -1;
22040 mktime (&tm);
22041 return tm.tm_mon == 2 && tm.tm_mday == 31;
22042 }
22043
22044 static int
22045 bigtime_test (int j)
22046 {
22047 struct tm tm;
22048 time_t now;
22049 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
22050 now = mktime (&tm);
22051 if (now != (time_t) -1)
22052 {
22053 struct tm *lt = localtime (&now);
22054 if (! (lt
22055 && lt->tm_year == tm.tm_year
22056 && lt->tm_mon == tm.tm_mon
22057 && lt->tm_mday == tm.tm_mday
22058 && lt->tm_hour == tm.tm_hour
22059 && lt->tm_min == tm.tm_min
22060 && lt->tm_sec == tm.tm_sec
22061 && lt->tm_yday == tm.tm_yday
22062 && lt->tm_wday == tm.tm_wday
22063 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
22064 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
22065 return 0;
22066 }
22067 return 1;
22068 }
22069
22070 static int
22071 year_2050_test ()
22072 {
22073 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
22074 ignoring leap seconds. */
22075 unsigned long int answer = 2527315200UL;
22076
22077 struct tm tm;
22078 time_t t;
22079 tm.tm_year = 2050 - 1900;
22080 tm.tm_mon = 2 - 1;
22081 tm.tm_mday = 1;
22082 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
22083 tm.tm_isdst = -1;
22084
22085 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22086 instead of "TZ=America/Vancouver" in order to detect the bug even
22087 on systems that don't support the Olson extension, or don't have the
22088 full zoneinfo tables installed. */
22089 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
22090
22091 t = mktime (&tm);
22092
22093 /* Check that the result is either a failure, or close enough
22094 to the correct answer that we can assume the discrepancy is
22095 due to leap seconds. */
22096 return (t == (time_t) -1
22097 || (0 < t && answer - 120 <= t && t <= answer + 120));
22098 }
22099
22100 int
22101 main ()
22102 {
22103 int result = 0;
22104 time_t t, delta;
22105 int i, j;
22106 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
22107 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
22108
22109 /* This test makes some buggy mktime implementations loop.
22110 Give up after 60 seconds; a mktime slower than that
22111 isn't worth using anyway. */
22112 alarm (60);
22113
22114 time_t_max = (! time_t_signed
22115 ? (time_t) -1
22116 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
22117 * 2 + 1));
22118 time_t_min = (! time_t_signed
22119 ? (time_t) 0
22120 : time_t_signed_magnitude
22121 ? ~ (time_t) 0
22122 : ~ time_t_max);
22123
22124 delta = time_t_max / 997; /* a suitable prime number */
22125 for (i = 0; i < N_STRINGS; i++)
22126 {
22127 if (tz_strings[i])
22128 putenv (tz_strings[i]);
22129
22130 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
22131 if (! mktime_test (t))
22132 result |= 1;
22133 if ((result & 2) == 0
22134 && ! (mktime_test ((time_t) 1)
22135 && mktime_test ((time_t) (60 * 60))
22136 && mktime_test ((time_t) (60 * 60 * 24))))
22137 result |= 2;
22138
22139 for (j = 1; (result & 4) == 0; j <<= 1)
22140 {
22141 if (! bigtime_test (j))
22142 result |= 4;
22143 if (INT_MAX / 2 < j)
22144 break;
22145 }
22146 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
22147 result |= 8;
22148 }
22149 if (! irix_6_4_bug ())
22150 result |= 16;
22151 if (! spring_forward_gap ())
22152 result |= 32;
22153 if (! year_2050_test ())
22154 result |= 64;
22155 return result;
22156 }
22157 _ACEOF
22158 if ac_fn_c_try_run "$LINENO"; then :
22159 gl_cv_func_working_mktime=yes
22160 else
22161 gl_cv_func_working_mktime=no
22162 fi
22163 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22164 conftest.$ac_objext conftest.beam conftest.$ac_ext
22165 fi
22166
22167
22168 fi
22169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
22170 $as_echo "$gl_cv_func_working_mktime" >&6; }
22171
22172 if test $gl_cv_func_working_mktime = no; then
22173 REPLACE_MKTIME=1
22174 else
22175 REPLACE_MKTIME=0
22176 fi
22177
22178 if test $REPLACE_MKTIME = 1; then
22179
22180
22181
22182
22183
22184
22185
22186
22187 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
22188
22189 :
22190 fi
22191
22192
22193
22194
22195
22196 GNULIB_MKTIME=1
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208 if test $ac_cv_func_pselect = yes; then
22209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
22210 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
22211 if test "${gl_cv_sig_pselect+set}" = set; then :
22212 $as_echo_n "(cached) " >&6
22213 else
22214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22215 /* end confdefs.h. */
22216 #include <sys/select.h>
22217
22218 int
22219 main ()
22220 {
22221 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
22222 struct timespec const *restrict,
22223 sigset_t const *restrict) = pselect;
22224 return !p;
22225 ;
22226 return 0;
22227 }
22228 _ACEOF
22229 if ac_fn_c_try_link "$LINENO"; then :
22230 gl_cv_sig_pselect=yes
22231 else
22232 gl_cv_sig_pselect=no
22233 fi
22234 rm -f core conftest.err conftest.$ac_objext \
22235 conftest$ac_exeext conftest.$ac_ext
22236 fi
22237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
22238 $as_echo "$gl_cv_sig_pselect" >&6; }
22239
22240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
22241 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
22242 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
22243 $as_echo_n "(cached) " >&6
22244 else
22245
22246 if test "$cross_compiling" = yes; then :
22247
22248 case "$host_os" in
22249 # Guess yes on glibc systems.
22250 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
22251 # If we don't know, assume the worst.
22252 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
22253 esac
22254
22255 else
22256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22257 /* end confdefs.h. */
22258
22259 #include <sys/types.h>
22260 #include <sys/time.h>
22261 #if HAVE_SYS_SELECT_H
22262 # include <sys/select.h>
22263 #endif
22264 #include <unistd.h>
22265 #include <errno.h>
22266
22267 int
22268 main ()
22269 {
22270
22271 fd_set set;
22272 dup2(0, 16);
22273 FD_ZERO(&set);
22274 FD_SET(16, &set);
22275 close(16);
22276 struct timespec timeout;
22277 timeout.tv_sec = 0;
22278 timeout.tv_nsec = 5000;
22279 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
22280
22281 ;
22282 return 0;
22283 }
22284 _ACEOF
22285 if ac_fn_c_try_run "$LINENO"; then :
22286 gl_cv_func_pselect_detects_ebadf=yes
22287 else
22288 gl_cv_func_pselect_detects_ebadf=no
22289 fi
22290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22291 conftest.$ac_objext conftest.beam conftest.$ac_ext
22292 fi
22293
22294
22295 fi
22296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
22297 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
22298 case $gl_cv_func_pselect_detects_ebadf in
22299 *yes) ;;
22300 *) REPLACE_PSELECT=1 ;;
22301 esac
22302 fi
22303
22304 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
22305 REPLACE_PSELECT=1
22306 fi
22307
22308 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
22309
22310
22311
22312
22313
22314
22315
22316
22317 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
22318
22319 fi
22320
22321
22322
22323
22324
22325 GNULIB_PSELECT=1
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335 LIB_PTHREAD_SIGMASK=
22336
22337
22338
22339
22340 if test "$gl_threads_api" = posix; then
22341 if test $ac_cv_func_pthread_sigmask = yes; then
22342 :
22343 else
22344 if test -n "$LIBMULTITHREAD"; then
22345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
22346 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
22347 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
22348 $as_echo_n "(cached) " >&6
22349 else
22350 gl_save_LIBS="$LIBS"
22351 LIBS="$LIBS $LIBMULTITHREAD"
22352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22353 /* end confdefs.h. */
22354 #include <pthread.h>
22355 #include <signal.h>
22356
22357 int
22358 main ()
22359 {
22360 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
22361 ;
22362 return 0;
22363 }
22364
22365 _ACEOF
22366 if ac_fn_c_try_link "$LINENO"; then :
22367 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
22368 else
22369 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
22370 fi
22371 rm -f core conftest.err conftest.$ac_objext \
22372 conftest$ac_exeext conftest.$ac_ext
22373 LIBS="$gl_save_LIBS"
22374
22375 fi
22376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
22377 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
22378 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
22379 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
22380 else
22381 HAVE_PTHREAD_SIGMASK=0
22382 fi
22383 else
22384 HAVE_PTHREAD_SIGMASK=0
22385 fi
22386 fi
22387 else
22388 if test $ac_cv_func_pthread_sigmask = yes; then
22389 REPLACE_PTHREAD_SIGMASK=1
22390 else
22391 HAVE_PTHREAD_SIGMASK=0
22392 fi
22393 fi
22394
22395
22396
22397
22398 if test $HAVE_PTHREAD_SIGMASK = 1; then
22399
22400
22401 if test -z "$LIB_PTHREAD_SIGMASK"; then
22402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
22403 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
22404 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
22405 $as_echo_n "(cached) " >&6
22406 else
22407
22408 if test "$cross_compiling" = yes; then :
22409
22410 case "$host_os" in
22411 freebsd* | hpux* | solaris | solaris2.[2-9]*)
22412 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
22413 *)
22414 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
22415 esac
22416
22417 else
22418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22419 /* end confdefs.h. */
22420
22421 #include <pthread.h>
22422 #include <signal.h>
22423 #include <stddef.h>
22424 int main ()
22425 {
22426 sigset_t set;
22427 sigemptyset (&set);
22428 return pthread_sigmask (1729, &set, NULL) != 0;
22429 }
22430 _ACEOF
22431 if ac_fn_c_try_run "$LINENO"; then :
22432 gl_cv_func_pthread_sigmask_in_libc_works=no
22433 else
22434 gl_cv_func_pthread_sigmask_in_libc_works=yes
22435 fi
22436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22437 conftest.$ac_objext conftest.beam conftest.$ac_ext
22438 fi
22439
22440
22441 fi
22442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
22443 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
22444 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
22445 *no)
22446 REPLACE_PTHREAD_SIGMASK=1
22447
22448 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
22449
22450 ;;
22451 esac
22452 fi
22453
22454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
22455 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
22456 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
22457 $as_echo_n "(cached) " >&6
22458 else
22459
22460 gl_save_LIBS="$LIBS"
22461 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
22462 if test "$cross_compiling" = yes; then :
22463 case "$host_os" in
22464 cygwin*)
22465 gl_cv_func_pthread_sigmask_return_works="guessing no";;
22466 *)
22467 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
22468 esac
22469
22470 else
22471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22472 /* end confdefs.h. */
22473
22474 #include <pthread.h>
22475 #include <signal.h>
22476 #include <stddef.h>
22477 int main ()
22478 {
22479 sigset_t set;
22480 sigemptyset (&set);
22481 if (pthread_sigmask (1729, &set, NULL) == -1)
22482 return 1;
22483 return 0;
22484 }
22485 _ACEOF
22486 if ac_fn_c_try_run "$LINENO"; then :
22487 gl_cv_func_pthread_sigmask_return_works=yes
22488 else
22489 gl_cv_func_pthread_sigmask_return_works=no
22490 fi
22491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22492 conftest.$ac_objext conftest.beam conftest.$ac_ext
22493 fi
22494
22495 LIBS="$gl_save_LIBS"
22496
22497 fi
22498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
22499 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
22500 case "$gl_cv_func_pthread_sigmask_return_works" in
22501 *no)
22502 REPLACE_PTHREAD_SIGMASK=1
22503
22504 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
22505
22506 ;;
22507 esac
22508
22509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
22510 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
22511 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
22512 $as_echo_n "(cached) " >&6
22513 else
22514
22515 case "$host_os" in
22516 irix*)
22517 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
22518 *)
22519 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
22520 esac
22521 gl_save_LIBS="$LIBS"
22522 LIBS="$LIBS $LIBMULTITHREAD"
22523 if test "$cross_compiling" = yes; then :
22524 :
22525 else
22526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22527 /* end confdefs.h. */
22528
22529 #include <pthread.h>
22530 #include <signal.h>
22531 #include <stdio.h>
22532 #include <stdlib.h>
22533 #include <unistd.h>
22534 static volatile int sigint_occurred;
22535 static void
22536 sigint_handler (int sig)
22537 {
22538 sigint_occurred++;
22539 }
22540 int main ()
22541 {
22542 sigset_t set;
22543 int pid = getpid ();
22544 char command[80];
22545 signal (SIGINT, sigint_handler);
22546 sigemptyset (&set);
22547 sigaddset (&set, SIGINT);
22548 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
22549 return 1;
22550 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
22551 if (!(system (command) == 0))
22552 return 2;
22553 sleep (2);
22554 if (!(sigint_occurred == 0))
22555 return 3;
22556 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
22557 return 4;
22558 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
22559 return 5;
22560 return 0;
22561 }
22562 _ACEOF
22563 if ac_fn_c_try_run "$LINENO"; then :
22564 :
22565 else
22566 gl_cv_func_pthread_sigmask_unblock_works=no
22567 fi
22568 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22569 conftest.$ac_objext conftest.beam conftest.$ac_ext
22570 fi
22571
22572 LIBS="$gl_save_LIBS"
22573
22574 fi
22575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
22576 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
22577 case "$gl_cv_func_pthread_sigmask_unblock_works" in
22578 *no)
22579 REPLACE_PTHREAD_SIGMASK=1
22580
22581 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
22582
22583 ;;
22584 esac
22585 fi
22586
22587 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
22588
22589
22590
22591
22592
22593
22594
22595
22596 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
22597
22598
22599 if test $HAVE_PTHREAD_SIGMASK = 1; then
22600
22601 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
22602
22603 fi
22604
22605 fi
22606
22607
22608
22609
22610
22611 GNULIB_PTHREAD_SIGMASK=1
22612
22613
22614
22615
22616
22617
22618
22619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
22620 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
22621 if test "${gl_cv_func_svid_putenv+set}" = set; then :
22622 $as_echo_n "(cached) " >&6
22623 else
22624 if test "$cross_compiling" = yes; then :
22625 case "$host_os" in
22626 # Guess yes on glibc systems.
22627 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
22628 # If we don't know, assume the worst.
22629 *) gl_cv_func_svid_putenv="guessing no" ;;
22630 esac
22631
22632 else
22633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22634 /* end confdefs.h. */
22635 $ac_includes_default
22636 int
22637 main ()
22638 {
22639
22640 /* Put it in env. */
22641 if (putenv ("CONFTEST_putenv=val"))
22642 return 1;
22643
22644 /* Try to remove it. */
22645 if (putenv ("CONFTEST_putenv"))
22646 return 2;
22647
22648 /* Make sure it was deleted. */
22649 if (getenv ("CONFTEST_putenv") != 0)
22650 return 3;
22651
22652 return 0;
22653
22654 ;
22655 return 0;
22656 }
22657 _ACEOF
22658 if ac_fn_c_try_run "$LINENO"; then :
22659 gl_cv_func_svid_putenv=yes
22660 else
22661 gl_cv_func_svid_putenv=no
22662 fi
22663 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22664 conftest.$ac_objext conftest.beam conftest.$ac_ext
22665 fi
22666
22667
22668 fi
22669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
22670 $as_echo "$gl_cv_func_svid_putenv" >&6; }
22671 case "$gl_cv_func_svid_putenv" in
22672 *yes) ;;
22673 *)
22674 REPLACE_PUTENV=1
22675 ;;
22676 esac
22677
22678 if test $REPLACE_PUTENV = 1; then
22679
22680
22681
22682
22683
22684
22685
22686
22687 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
22688
22689 fi
22690
22691
22692
22693
22694
22695 GNULIB_PUTENV=1
22696
22697
22698
22699
22700
22701
22702
22703
22704 if test $ac_cv_func_readlink = no; then
22705 HAVE_READLINK=0
22706 else
22707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
22708 $as_echo_n "checking whether readlink signature is correct... " >&6; }
22709 if test "${gl_cv_decl_readlink_works+set}" = set; then :
22710 $as_echo_n "(cached) " >&6
22711 else
22712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22713 /* end confdefs.h. */
22714 #include <unistd.h>
22715 /* Cause compilation failure if original declaration has wrong type. */
22716 ssize_t readlink (const char *, char *, size_t);
22717 int
22718 main ()
22719 {
22720
22721 ;
22722 return 0;
22723 }
22724 _ACEOF
22725 if ac_fn_c_try_compile "$LINENO"; then :
22726 gl_cv_decl_readlink_works=yes
22727 else
22728 gl_cv_decl_readlink_works=no
22729 fi
22730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22731 fi
22732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
22733 $as_echo "$gl_cv_decl_readlink_works" >&6; }
22734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
22735 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
22736 if test "${gl_cv_func_readlink_works+set}" = set; then :
22737 $as_echo_n "(cached) " >&6
22738 else
22739 # We have readlink, so assume ln -s works.
22740 ln -s conftest.no-such conftest.link
22741 ln -s conftest.link conftest.lnk2
22742 if test "$cross_compiling" = yes; then :
22743 case "$host_os" in
22744 # Guess yes on glibc systems.
22745 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
22746 # If we don't know, assume the worst.
22747 *) gl_cv_func_readlink_works="guessing no" ;;
22748 esac
22749
22750 else
22751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22752 /* end confdefs.h. */
22753 #include <unistd.h>
22754
22755 int
22756 main ()
22757 {
22758 char buf[20];
22759 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
22760 ;
22761 return 0;
22762 }
22763 _ACEOF
22764 if ac_fn_c_try_run "$LINENO"; then :
22765 gl_cv_func_readlink_works=yes
22766 else
22767 gl_cv_func_readlink_works=no
22768 fi
22769 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22770 conftest.$ac_objext conftest.beam conftest.$ac_ext
22771 fi
22772
22773 rm -f conftest.link conftest.lnk2
22774 fi
22775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
22776 $as_echo "$gl_cv_func_readlink_works" >&6; }
22777 case "$gl_cv_func_readlink_works" in
22778 *yes)
22779 if test "$gl_cv_decl_readlink_works" != yes; then
22780 REPLACE_READLINK=1
22781 fi
22782 ;;
22783 *)
22784
22785 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
22786
22787 REPLACE_READLINK=1
22788 ;;
22789 esac
22790 fi
22791
22792 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
22793
22794
22795
22796
22797
22798
22799
22800
22801 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
22802
22803
22804 :
22805
22806 fi
22807
22808
22809
22810
22811
22812 GNULIB_READLINK=1
22813
22814
22815
22816
22817
22818
22819 for ac_func in sig2str
22820 do :
22821 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
22822 if test "x$ac_cv_func_sig2str" = x""yes; then :
22823 cat >>confdefs.h <<_ACEOF
22824 #define HAVE_SIG2STR 1
22825 _ACEOF
22826
22827 fi
22828 done
22829
22830
22831 if test $ac_cv_func_sig2str = no; then
22832
22833
22834
22835
22836
22837
22838
22839
22840 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
22841
22842
22843 :
22844
22845 fi
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857 if test $gl_cv_have_include_next = yes; then
22858 gl_cv_next_signal_h='<'signal.h'>'
22859 else
22860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
22861 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
22862 if test "${gl_cv_next_signal_h+set}" = set; then :
22863 $as_echo_n "(cached) " >&6
22864 else
22865
22866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22867 /* end confdefs.h. */
22868 #include <signal.h>
22869
22870 _ACEOF
22871 case "$host_os" in
22872 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22873 *) gl_absname_cpp="$ac_cpp" ;;
22874 esac
22875
22876 case "$host_os" in
22877 mingw*)
22878 gl_dirsep_regex='[/\\]'
22879 ;;
22880 *)
22881 gl_dirsep_regex='\/'
22882 ;;
22883 esac
22884 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22885
22886 gl_header_literal_regex=`echo 'signal.h' \
22887 | sed -e "$gl_make_literal_regex_sed"`
22888 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22889 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22890 s|^/[^/]|//&|
22891 p
22892 q
22893 }'
22894 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22895 sed -n "$gl_absolute_header_sed"`'"'
22896
22897
22898 fi
22899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
22900 $as_echo "$gl_cv_next_signal_h" >&6; }
22901 fi
22902 NEXT_SIGNAL_H=$gl_cv_next_signal_h
22903
22904 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22905 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22906 gl_next_as_first_directive='<'signal.h'>'
22907 else
22908 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22909 gl_next_as_first_directive=$gl_cv_next_signal_h
22910 fi
22911 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
22912
22913
22914
22915
22916
22917 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
22918 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
22919 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
22920 #include <signal.h>
22921
22922 "
22923 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
22924
22925 else
22926 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
22927 fi
22928
22929
22930
22931
22932
22933
22934
22935 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
22936 #include <signal.h>
22937
22938 "
22939 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
22940
22941 else
22942 HAVE_SIGHANDLER_T=0
22943 fi
22944
22945
22946
22947
22948 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
22949 /* <sys/types.h> is not needed according to POSIX, but the
22950 <sys/socket.h> in i386-unknown-freebsd4.10 and
22951 powerpc-apple-darwin5.5 required it. */
22952 #include <sys/types.h>
22953 #if HAVE_SYS_SOCKET_H
22954 # include <sys/socket.h>
22955 #elif HAVE_WS2TCPIP_H
22956 # include <ws2tcpip.h>
22957 #endif
22958
22959 "
22960 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22961
22962 else
22963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
22964 $as_echo_n "checking for socklen_t equivalent... " >&6; }
22965 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
22966 $as_echo_n "(cached) " >&6
22967 else
22968 # Systems have either "struct sockaddr *" or
22969 # "void *" as the second argument to getpeername
22970 gl_cv_socklen_t_equiv=
22971 for arg2 in "struct sockaddr" void; do
22972 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
22973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22974 /* end confdefs.h. */
22975 #include <sys/types.h>
22976 #include <sys/socket.h>
22977
22978 int getpeername (int, $arg2 *, $t *);
22979 int
22980 main ()
22981 {
22982 $t len;
22983 getpeername (0, 0, &len);
22984 ;
22985 return 0;
22986 }
22987 _ACEOF
22988 if ac_fn_c_try_compile "$LINENO"; then :
22989 gl_cv_socklen_t_equiv="$t"
22990 fi
22991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22992 test "$gl_cv_socklen_t_equiv" != "" && break
22993 done
22994 test "$gl_cv_socklen_t_equiv" != "" && break
22995 done
22996
22997 fi
22998
22999 if test "$gl_cv_socklen_t_equiv" = ""; then
23000 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23001 fi
23002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
23003 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
23004
23005 cat >>confdefs.h <<_ACEOF
23006 #define socklen_t $gl_cv_socklen_t_equiv
23007 _ACEOF
23008
23009 fi
23010
23011
23012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23013 $as_echo_n "checking for ssize_t... " >&6; }
23014 if test "${gt_cv_ssize_t+set}" = set; then :
23015 $as_echo_n "(cached) " >&6
23016 else
23017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23018 /* end confdefs.h. */
23019 #include <sys/types.h>
23020 int
23021 main ()
23022 {
23023 int x = sizeof (ssize_t *) + sizeof (ssize_t);
23024 return !x;
23025 ;
23026 return 0;
23027 }
23028 _ACEOF
23029 if ac_fn_c_try_compile "$LINENO"; then :
23030 gt_cv_ssize_t=yes
23031 else
23032 gt_cv_ssize_t=no
23033 fi
23034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23035 fi
23036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23037 $as_echo "$gt_cv_ssize_t" >&6; }
23038 if test $gt_cv_ssize_t = no; then
23039
23040 $as_echo "#define ssize_t int" >>confdefs.h
23041
23042 fi
23043
23044
23045
23046
23047
23048 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>
23049 #include <sys/stat.h>
23050 "
23051 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
23052
23053 cat >>confdefs.h <<_ACEOF
23054 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
23055 _ACEOF
23056
23057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
23058 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
23059 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
23060 $as_echo_n "(cached) " >&6
23061 else
23062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23063 /* end confdefs.h. */
23064
23065 #include <sys/types.h>
23066 #include <sys/stat.h>
23067 #if HAVE_SYS_TIME_H
23068 # include <sys/time.h>
23069 #endif
23070 #include <time.h>
23071 struct timespec ts;
23072 struct stat st;
23073
23074 int
23075 main ()
23076 {
23077
23078 st.st_atim = ts;
23079
23080 ;
23081 return 0;
23082 }
23083 _ACEOF
23084 if ac_fn_c_try_compile "$LINENO"; then :
23085 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
23086 else
23087 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
23088 fi
23089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23090 fi
23091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
23092 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
23093 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
23094
23095 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
23096
23097 fi
23098 else
23099 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>
23100 #include <sys/stat.h>
23101 "
23102 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
23103
23104 cat >>confdefs.h <<_ACEOF
23105 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
23106 _ACEOF
23107
23108
23109 else
23110 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
23111 #include <sys/stat.h>
23112 "
23113 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
23114
23115 cat >>confdefs.h <<_ACEOF
23116 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
23117 _ACEOF
23118
23119
23120 else
23121 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>
23122 #include <sys/stat.h>
23123 "
23124 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
23125
23126 cat >>confdefs.h <<_ACEOF
23127 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
23128 _ACEOF
23129
23130
23131 fi
23132
23133 fi
23134
23135 fi
23136
23137 fi
23138
23139
23140
23141
23142
23143 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>
23144 #include <sys/stat.h>
23145 "
23146 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
23147
23148 cat >>confdefs.h <<_ACEOF
23149 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
23150 _ACEOF
23151
23152
23153 else
23154 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
23155 #include <sys/stat.h>
23156 "
23157 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
23158
23159 cat >>confdefs.h <<_ACEOF
23160 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
23161 _ACEOF
23162
23163
23164 else
23165 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>
23166 #include <sys/stat.h>
23167 "
23168 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
23169
23170 cat >>confdefs.h <<_ACEOF
23171 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
23172 _ACEOF
23173
23174
23175 fi
23176
23177 fi
23178
23179 fi
23180
23181
23182
23183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
23184 $as_echo_n "checking for working stdalign.h... " >&6; }
23185 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
23186 $as_echo_n "(cached) " >&6
23187 else
23188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23189 /* end confdefs.h. */
23190 #include <stdalign.h>
23191 #include <stddef.h>
23192
23193 /* Test that alignof yields a result consistent with offsetof.
23194 This catches GCC bug 52023
23195 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
23196 #ifdef __cplusplus
23197 template <class t> struct alignof_helper { char a; t b; };
23198 # define ao(type) offsetof (alignof_helper<type>, b)
23199 #else
23200 # define ao(type) offsetof (struct { char a; type b; }, b)
23201 #endif
23202 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
23203 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
23204 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
23205
23206 /* Test _Alignas only on platforms where gnulib can help. */
23207 #if \
23208 (__GNUC__ || __IBMC__ || __IBMCPP__ \
23209 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
23210 int alignas (8) alignas_int = 1;
23211 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
23212 #endif
23213
23214 int
23215 main ()
23216 {
23217
23218 ;
23219 return 0;
23220 }
23221 _ACEOF
23222 if ac_fn_c_try_compile "$LINENO"; then :
23223 gl_cv_header_working_stdalign_h=yes
23224 else
23225 gl_cv_header_working_stdalign_h=no
23226 fi
23227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23228 fi
23229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
23230 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
23231
23232 if test $gl_cv_header_working_stdalign_h = yes; then
23233 STDALIGN_H=''
23234 else
23235 STDALIGN_H='stdalign.h'
23236 fi
23237
23238
23239 if test -n "$STDALIGN_H"; then
23240 GL_GENERATE_STDALIGN_H_TRUE=
23241 GL_GENERATE_STDALIGN_H_FALSE='#'
23242 else
23243 GL_GENERATE_STDALIGN_H_TRUE='#'
23244 GL_GENERATE_STDALIGN_H_FALSE=
23245 fi
23246
23247
23248
23249 STDARG_H=''
23250 NEXT_STDARG_H='<stdarg.h>'
23251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
23252 $as_echo_n "checking for va_copy... " >&6; }
23253 if test "${gl_cv_func_va_copy+set}" = set; then :
23254 $as_echo_n "(cached) " >&6
23255 else
23256
23257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23258 /* end confdefs.h. */
23259 #include <stdarg.h>
23260 int
23261 main ()
23262 {
23263
23264 #ifndef va_copy
23265 void (*func) (va_list, va_list) = va_copy;
23266 #endif
23267
23268 ;
23269 return 0;
23270 }
23271 _ACEOF
23272 if ac_fn_c_try_compile "$LINENO"; then :
23273 gl_cv_func_va_copy=yes
23274 else
23275 gl_cv_func_va_copy=no
23276 fi
23277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23278 fi
23279
23280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
23281 $as_echo "$gl_cv_func_va_copy" >&6; }
23282 if test $gl_cv_func_va_copy = no; then
23283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23284 /* end confdefs.h. */
23285 #if defined _AIX && !defined __GNUC__
23286 AIX vaccine
23287 #endif
23288
23289 _ACEOF
23290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23291 $EGREP "vaccine" >/dev/null 2>&1; then :
23292 gl_aixcc=yes
23293 else
23294 gl_aixcc=no
23295 fi
23296 rm -f conftest*
23297
23298 if test $gl_aixcc = yes; then
23299 STDARG_H=stdarg.h
23300
23301
23302
23303
23304
23305
23306
23307
23308 if test $gl_cv_have_include_next = yes; then
23309 gl_cv_next_stdarg_h='<'stdarg.h'>'
23310 else
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
23312 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
23313 if test "${gl_cv_next_stdarg_h+set}" = set; then :
23314 $as_echo_n "(cached) " >&6
23315 else
23316
23317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23318 /* end confdefs.h. */
23319 #include <stdarg.h>
23320
23321 _ACEOF
23322 case "$host_os" in
23323 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23324 *) gl_absname_cpp="$ac_cpp" ;;
23325 esac
23326
23327 case "$host_os" in
23328 mingw*)
23329 gl_dirsep_regex='[/\\]'
23330 ;;
23331 *)
23332 gl_dirsep_regex='\/'
23333 ;;
23334 esac
23335 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23336
23337 gl_header_literal_regex=`echo 'stdarg.h' \
23338 | sed -e "$gl_make_literal_regex_sed"`
23339 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23340 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23341 s|^/[^/]|//&|
23342 p
23343 q
23344 }'
23345 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23346 sed -n "$gl_absolute_header_sed"`'"'
23347
23348
23349 fi
23350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
23351 $as_echo "$gl_cv_next_stdarg_h" >&6; }
23352 fi
23353 NEXT_STDARG_H=$gl_cv_next_stdarg_h
23354
23355 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23356 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23357 gl_next_as_first_directive='<'stdarg.h'>'
23358 else
23359 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23360 gl_next_as_first_directive=$gl_cv_next_stdarg_h
23361 fi
23362 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
23363
23364
23365
23366
23367 if test "$gl_cv_next_stdarg_h" = '""'; then
23368 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
23369 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
23370 fi
23371 else
23372
23373 saved_as_echo_n="$as_echo_n"
23374 as_echo_n=':'
23375 if test "${gl_cv_func___va_copy+set}" = set; then :
23376 $as_echo_n "(cached) " >&6
23377 else
23378
23379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23380 /* end confdefs.h. */
23381 #include <stdarg.h>
23382 int
23383 main ()
23384 {
23385
23386 #ifndef __va_copy
23387 error, bail out
23388 #endif
23389
23390 ;
23391 return 0;
23392 }
23393 _ACEOF
23394 if ac_fn_c_try_compile "$LINENO"; then :
23395 gl_cv_func___va_copy=yes
23396 else
23397 gl_cv_func___va_copy=no
23398 fi
23399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23400 fi
23401
23402 as_echo_n="$saved_as_echo_n"
23403
23404 if test $gl_cv_func___va_copy = yes; then
23405
23406 $as_echo "#define va_copy __va_copy" >>confdefs.h
23407
23408 else
23409
23410
23411 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
23412
23413 fi
23414 fi
23415 fi
23416
23417 if test -n "$STDARG_H"; then
23418 GL_GENERATE_STDARG_H_TRUE=
23419 GL_GENERATE_STDARG_H_FALSE='#'
23420 else
23421 GL_GENERATE_STDARG_H_TRUE='#'
23422 GL_GENERATE_STDARG_H_FALSE=
23423 fi
23424
23425
23426
23427
23428
23429
23430 # Define two additional variables used in the Makefile substitution.
23431
23432 if test "$ac_cv_header_stdbool_h" = yes; then
23433 STDBOOL_H=''
23434 else
23435 STDBOOL_H='stdbool.h'
23436 fi
23437
23438 if test -n "$STDBOOL_H"; then
23439 GL_GENERATE_STDBOOL_H_TRUE=
23440 GL_GENERATE_STDBOOL_H_FALSE='#'
23441 else
23442 GL_GENERATE_STDBOOL_H_TRUE='#'
23443 GL_GENERATE_STDBOOL_H_FALSE=
23444 fi
23445
23446
23447 if test "$ac_cv_type__Bool" = yes; then
23448 HAVE__BOOL=1
23449 else
23450 HAVE__BOOL=0
23451 fi
23452
23453
23454
23455
23456
23457 STDDEF_H=
23458 if test $gt_cv_c_wchar_t = no; then
23459 HAVE_WCHAR_T=0
23460 STDDEF_H=stddef.h
23461 fi
23462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
23463 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
23464 if test "${gl_cv_decl_null_works+set}" = set; then :
23465 $as_echo_n "(cached) " >&6
23466 else
23467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23468 /* end confdefs.h. */
23469 #include <stddef.h>
23470 int test[2 * (sizeof NULL == sizeof (void *)) -1];
23471
23472 int
23473 main ()
23474 {
23475
23476 ;
23477 return 0;
23478 }
23479 _ACEOF
23480 if ac_fn_c_try_compile "$LINENO"; then :
23481 gl_cv_decl_null_works=yes
23482 else
23483 gl_cv_decl_null_works=no
23484 fi
23485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23486 fi
23487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
23488 $as_echo "$gl_cv_decl_null_works" >&6; }
23489 if test $gl_cv_decl_null_works = no; then
23490 REPLACE_NULL=1
23491 STDDEF_H=stddef.h
23492 fi
23493
23494 if test -n "$STDDEF_H"; then
23495 GL_GENERATE_STDDEF_H_TRUE=
23496 GL_GENERATE_STDDEF_H_FALSE='#'
23497 else
23498 GL_GENERATE_STDDEF_H_TRUE='#'
23499 GL_GENERATE_STDDEF_H_FALSE=
23500 fi
23501
23502 if test -n "$STDDEF_H"; then
23503
23504
23505
23506
23507
23508
23509
23510
23511 if test $gl_cv_have_include_next = yes; then
23512 gl_cv_next_stddef_h='<'stddef.h'>'
23513 else
23514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
23515 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
23516 if test "${gl_cv_next_stddef_h+set}" = set; then :
23517 $as_echo_n "(cached) " >&6
23518 else
23519
23520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23521 /* end confdefs.h. */
23522 #include <stddef.h>
23523
23524 _ACEOF
23525 case "$host_os" in
23526 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23527 *) gl_absname_cpp="$ac_cpp" ;;
23528 esac
23529
23530 case "$host_os" in
23531 mingw*)
23532 gl_dirsep_regex='[/\\]'
23533 ;;
23534 *)
23535 gl_dirsep_regex='\/'
23536 ;;
23537 esac
23538 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23539
23540 gl_header_literal_regex=`echo 'stddef.h' \
23541 | sed -e "$gl_make_literal_regex_sed"`
23542 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23543 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23544 s|^/[^/]|//&|
23545 p
23546 q
23547 }'
23548 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23549 sed -n "$gl_absolute_header_sed"`'"'
23550
23551
23552 fi
23553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
23554 $as_echo "$gl_cv_next_stddef_h" >&6; }
23555 fi
23556 NEXT_STDDEF_H=$gl_cv_next_stddef_h
23557
23558 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23559 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23560 gl_next_as_first_directive='<'stddef.h'>'
23561 else
23562 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23563 gl_next_as_first_directive=$gl_cv_next_stddef_h
23564 fi
23565 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
23566
23567
23568
23569
23570 fi
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583 if test $gl_cv_have_include_next = yes; then
23584 gl_cv_next_stdio_h='<'stdio.h'>'
23585 else
23586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23587 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
23588 if test "${gl_cv_next_stdio_h+set}" = set; then :
23589 $as_echo_n "(cached) " >&6
23590 else
23591
23592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23593 /* end confdefs.h. */
23594 #include <stdio.h>
23595
23596 _ACEOF
23597 case "$host_os" in
23598 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23599 *) gl_absname_cpp="$ac_cpp" ;;
23600 esac
23601
23602 case "$host_os" in
23603 mingw*)
23604 gl_dirsep_regex='[/\\]'
23605 ;;
23606 *)
23607 gl_dirsep_regex='\/'
23608 ;;
23609 esac
23610 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23611
23612 gl_header_literal_regex=`echo 'stdio.h' \
23613 | sed -e "$gl_make_literal_regex_sed"`
23614 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23615 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23616 s|^/[^/]|//&|
23617 p
23618 q
23619 }'
23620 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23621 sed -n "$gl_absolute_header_sed"`'"'
23622
23623
23624 fi
23625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23626 $as_echo "$gl_cv_next_stdio_h" >&6; }
23627 fi
23628 NEXT_STDIO_H=$gl_cv_next_stdio_h
23629
23630 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23631 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23632 gl_next_as_first_directive='<'stdio.h'>'
23633 else
23634 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23635 gl_next_as_first_directive=$gl_cv_next_stdio_h
23636 fi
23637 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23638
23639
23640
23641
23642
23643 GNULIB_FSCANF=1
23644
23645
23646 cat >>confdefs.h <<_ACEOF
23647 #define GNULIB_FSCANF 1
23648 _ACEOF
23649
23650
23651 GNULIB_SCANF=1
23652
23653
23654 cat >>confdefs.h <<_ACEOF
23655 #define GNULIB_SCANF 1
23656 _ACEOF
23657
23658
23659 GNULIB_FGETC=1
23660 GNULIB_GETC=1
23661 GNULIB_GETCHAR=1
23662 GNULIB_FGETS=1
23663 GNULIB_FREAD=1
23664
23665
23666 GNULIB_FPRINTF=1
23667 GNULIB_PRINTF=1
23668 GNULIB_VFPRINTF=1
23669 GNULIB_VPRINTF=1
23670 GNULIB_FPUTC=1
23671 GNULIB_PUTC=1
23672 GNULIB_PUTCHAR=1
23673 GNULIB_FPUTS=1
23674 GNULIB_PUTS=1
23675 GNULIB_FWRITE=1
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691 if test $gl_cv_have_include_next = yes; then
23692 gl_cv_next_stdlib_h='<'stdlib.h'>'
23693 else
23694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
23695 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
23696 if test "${gl_cv_next_stdlib_h+set}" = set; then :
23697 $as_echo_n "(cached) " >&6
23698 else
23699
23700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23701 /* end confdefs.h. */
23702 #include <stdlib.h>
23703
23704 _ACEOF
23705 case "$host_os" in
23706 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23707 *) gl_absname_cpp="$ac_cpp" ;;
23708 esac
23709
23710 case "$host_os" in
23711 mingw*)
23712 gl_dirsep_regex='[/\\]'
23713 ;;
23714 *)
23715 gl_dirsep_regex='\/'
23716 ;;
23717 esac
23718 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23719
23720 gl_header_literal_regex=`echo 'stdlib.h' \
23721 | sed -e "$gl_make_literal_regex_sed"`
23722 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23723 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23724 s|^/[^/]|//&|
23725 p
23726 q
23727 }'
23728 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23729 sed -n "$gl_absolute_header_sed"`'"'
23730
23731
23732 fi
23733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
23734 $as_echo "$gl_cv_next_stdlib_h" >&6; }
23735 fi
23736 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
23737
23738 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23740 gl_next_as_first_directive='<'stdlib.h'>'
23741 else
23742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23743 gl_next_as_first_directive=$gl_cv_next_stdlib_h
23744 fi
23745 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
23756
23757
23758
23759
23760
23761
23762
23763 $as_echo "#define my_strftime nstrftime" >>confdefs.h
23764
23765
23766
23767
23768
23769
23770
23771
23772 if test "$ac_cv_have_decl_strtoimax" != yes; then
23773 HAVE_DECL_STRTOIMAX=0
23774 fi
23775
23776 if test $ac_cv_func_strtoimax = yes; then
23777 HAVE_STRTOIMAX=1
23778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
23779 $as_echo_n "checking whether strtoimax works... " >&6; }
23780 if test "${gl_cv_func_strtoimax+set}" = set; then :
23781 $as_echo_n "(cached) " >&6
23782 else
23783 if test "$cross_compiling" = yes; then :
23784 case "$host_os" in
23785 # Guess no on AIX 5.
23786 aix5*) gl_cv_func_strtoimax="guessing no" ;;
23787 # Guess yes otherwise.
23788 *) gl_cv_func_strtoimax="guessing yes" ;;
23789 esac
23790
23791 else
23792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23793 /* end confdefs.h. */
23794
23795 #include <errno.h>
23796 #include <string.h>
23797 #include <inttypes.h>
23798 int main ()
23799 {
23800 if (sizeof (intmax_t) > sizeof (int))
23801 {
23802 const char *s = "4294967295";
23803 char *p;
23804 intmax_t res;
23805 errno = 0;
23806 res = strtoimax (s, &p, 10);
23807 if (p != s + strlen (s))
23808 return 1;
23809 if (errno != 0)
23810 return 2;
23811 if (res != (intmax_t) 65535 * (intmax_t) 65537)
23812 return 3;
23813 }
23814 else
23815 {
23816 const char *s = "2147483647";
23817 char *p;
23818 intmax_t res;
23819 errno = 0;
23820 res = strtoimax (s, &p, 10);
23821 if (p != s + strlen (s))
23822 return 1;
23823 if (errno != 0)
23824 return 2;
23825 if (res != 2147483647)
23826 return 3;
23827 }
23828 return 0;
23829 }
23830
23831 _ACEOF
23832 if ac_fn_c_try_run "$LINENO"; then :
23833 gl_cv_func_strtoimax=yes
23834 else
23835 gl_cv_func_strtoimax=no
23836 fi
23837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23838 conftest.$ac_objext conftest.beam conftest.$ac_ext
23839 fi
23840
23841
23842 fi
23843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
23844 $as_echo "$gl_cv_func_strtoimax" >&6; }
23845 case "$gl_cv_func_strtoimax" in
23846 *no) REPLACE_STRTOIMAX=1 ;;
23847 esac
23848 else
23849 HAVE_STRTOIMAX=0
23850 fi
23851
23852 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
23853
23854
23855
23856
23857
23858
23859
23860
23861 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
23862
23863
23864 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
23865 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
23866 ac_have_decl=1
23867 else
23868 ac_have_decl=0
23869 fi
23870
23871 cat >>confdefs.h <<_ACEOF
23872 #define HAVE_DECL_STRTOLL $ac_have_decl
23873 _ACEOF
23874
23875
23876
23877 fi
23878
23879
23880
23881
23882
23883 GNULIB_STRTOIMAX=1
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893 if test "$ac_cv_have_decl_strtoumax" != yes; then
23894 HAVE_DECL_STRTOUMAX=0
23895 fi
23896
23897 if test $ac_cv_func_strtoumax = no; then
23898
23899
23900
23901
23902
23903
23904
23905
23906 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
23907
23908
23909 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
23910 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
23911 ac_have_decl=1
23912 else
23913 ac_have_decl=0
23914 fi
23915
23916 cat >>confdefs.h <<_ACEOF
23917 #define HAVE_DECL_STRTOULL $ac_have_decl
23918 _ACEOF
23919
23920
23921
23922 fi
23923
23924
23925
23926
23927
23928 GNULIB_STRTOUMAX=1
23929
23930
23931
23932
23933
23934
23935
23936 if test $ac_cv_func_symlink = no; then
23937 HAVE_SYMLINK=0
23938 else
23939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
23940 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
23941 if test "${gl_cv_func_symlink_works+set}" = set; then :
23942 $as_echo_n "(cached) " >&6
23943 else
23944 if test "$cross_compiling" = yes; then :
23945 case "$host_os" in
23946 # Guess yes on glibc systems.
23947 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
23948 # If we don't know, assume the worst.
23949 *) gl_cv_func_symlink_works="guessing no" ;;
23950 esac
23951
23952 else
23953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23954 /* end confdefs.h. */
23955 #include <unistd.h>
23956
23957 int
23958 main ()
23959 {
23960 int result = 0;
23961 if (!symlink ("a", "conftest.link/"))
23962 result |= 1;
23963 if (symlink ("conftest.f", "conftest.lnk2"))
23964 result |= 2;
23965 else if (!symlink ("a", "conftest.lnk2/"))
23966 result |= 4;
23967 return result;
23968
23969 ;
23970 return 0;
23971 }
23972 _ACEOF
23973 if ac_fn_c_try_run "$LINENO"; then :
23974 gl_cv_func_symlink_works=yes
23975 else
23976 gl_cv_func_symlink_works=no
23977 fi
23978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23979 conftest.$ac_objext conftest.beam conftest.$ac_ext
23980 fi
23981
23982 rm -f conftest.f conftest.link conftest.lnk2
23983 fi
23984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
23985 $as_echo "$gl_cv_func_symlink_works" >&6; }
23986 case "$gl_cv_func_symlink_works" in
23987 *yes) ;;
23988 *)
23989 REPLACE_SYMLINK=1
23990 ;;
23991 esac
23992 fi
23993
23994 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
23995
23996
23997
23998
23999
24000
24001
24002
24003 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
24004
24005 fi
24006
24007
24008
24009
24010
24011 GNULIB_SYMLINK=1
24012
24013
24014
24015
24016
24017
24018
24019
24020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
24021 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
24022 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
24023 $as_echo_n "(cached) " >&6
24024 else
24025
24026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24027 /* end confdefs.h. */
24028 #include <sys/select.h>
24029 int
24030 main ()
24031 {
24032 struct timeval b;
24033 ;
24034 return 0;
24035 }
24036 _ACEOF
24037 if ac_fn_c_try_compile "$LINENO"; then :
24038 gl_cv_header_sys_select_h_selfcontained=yes
24039 else
24040 gl_cv_header_sys_select_h_selfcontained=no
24041 fi
24042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24043 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
24044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24045 /* end confdefs.h. */
24046 #include <sys/select.h>
24047 int
24048 main ()
24049 {
24050 int memset; int bzero;
24051 ;
24052 return 0;
24053 }
24054
24055 _ACEOF
24056 if ac_fn_c_try_compile "$LINENO"; then :
24057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24058 /* end confdefs.h. */
24059 #include <sys/select.h>
24060 int
24061 main ()
24062 {
24063
24064 #undef memset
24065 #define memset nonexistent_memset
24066 extern
24067 #ifdef __cplusplus
24068 "C"
24069 #endif
24070 void *memset (void *, int, unsigned long);
24071 #undef bzero
24072 #define bzero nonexistent_bzero
24073 extern
24074 #ifdef __cplusplus
24075 "C"
24076 #endif
24077 void bzero (void *, unsigned long);
24078 fd_set fds;
24079 FD_ZERO (&fds);
24080
24081 ;
24082 return 0;
24083 }
24084
24085 _ACEOF
24086 if ac_fn_c_try_link "$LINENO"; then :
24087
24088 else
24089 gl_cv_header_sys_select_h_selfcontained=no
24090 fi
24091 rm -f core conftest.err conftest.$ac_objext \
24092 conftest$ac_exeext conftest.$ac_ext
24093
24094 fi
24095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24096 fi
24097
24098 fi
24099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
24100 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110 if test $gl_cv_have_include_next = yes; then
24111 gl_cv_next_sys_select_h='<'sys/select.h'>'
24112 else
24113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
24114 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
24115 if test "${gl_cv_next_sys_select_h+set}" = set; then :
24116 $as_echo_n "(cached) " >&6
24117 else
24118
24119 if test $ac_cv_header_sys_select_h = yes; then
24120
24121
24122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24123 /* end confdefs.h. */
24124 #include <sys/select.h>
24125
24126 _ACEOF
24127 case "$host_os" in
24128 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24129 *) gl_absname_cpp="$ac_cpp" ;;
24130 esac
24131
24132 case "$host_os" in
24133 mingw*)
24134 gl_dirsep_regex='[/\\]'
24135 ;;
24136 *)
24137 gl_dirsep_regex='\/'
24138 ;;
24139 esac
24140 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24141
24142 gl_header_literal_regex=`echo 'sys/select.h' \
24143 | sed -e "$gl_make_literal_regex_sed"`
24144 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24145 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24146 s|^/[^/]|//&|
24147 p
24148 q
24149 }'
24150 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24151 sed -n "$gl_absolute_header_sed"`'"'
24152 else
24153 gl_cv_next_sys_select_h='<'sys/select.h'>'
24154 fi
24155
24156
24157 fi
24158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
24159 $as_echo "$gl_cv_next_sys_select_h" >&6; }
24160 fi
24161 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
24162
24163 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24164 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24165 gl_next_as_first_directive='<'sys/select.h'>'
24166 else
24167 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24168 gl_next_as_first_directive=$gl_cv_next_sys_select_h
24169 fi
24170 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
24171
24172
24173
24174
24175 if test $ac_cv_header_sys_select_h = yes; then
24176 HAVE_SYS_SELECT_H=1
24177 else
24178 HAVE_SYS_SELECT_H=0
24179 fi
24180
24181
24182
24183
24184
24185 if test $ac_cv_header_sys_socket_h != yes; then
24186 for ac_header in winsock2.h
24187 do :
24188 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24189 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
24190 cat >>confdefs.h <<_ACEOF
24191 #define HAVE_WINSOCK2_H 1
24192 _ACEOF
24193
24194 fi
24195
24196 done
24197
24198 fi
24199 if test "$ac_cv_header_winsock2_h" = yes; then
24200 HAVE_WINSOCK2_H=1
24201 UNISTD_H_HAVE_WINSOCK2_H=1
24202 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24203 else
24204 HAVE_WINSOCK2_H=0
24205 fi
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226 if test $gl_cv_have_include_next = yes; then
24227 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24228 else
24229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24230 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
24231 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
24232 $as_echo_n "(cached) " >&6
24233 else
24234
24235 if test $ac_cv_header_sys_stat_h = yes; then
24236
24237
24238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24239 /* end confdefs.h. */
24240 #include <sys/stat.h>
24241
24242 _ACEOF
24243 case "$host_os" in
24244 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24245 *) gl_absname_cpp="$ac_cpp" ;;
24246 esac
24247
24248 case "$host_os" in
24249 mingw*)
24250 gl_dirsep_regex='[/\\]'
24251 ;;
24252 *)
24253 gl_dirsep_regex='\/'
24254 ;;
24255 esac
24256 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24257
24258 gl_header_literal_regex=`echo 'sys/stat.h' \
24259 | sed -e "$gl_make_literal_regex_sed"`
24260 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24261 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24262 s|^/[^/]|//&|
24263 p
24264 q
24265 }'
24266 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24267 sed -n "$gl_absolute_header_sed"`'"'
24268 else
24269 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24270 fi
24271
24272
24273 fi
24274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
24275 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
24276 fi
24277 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
24278
24279 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24280 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24281 gl_next_as_first_directive='<'sys/stat.h'>'
24282 else
24283 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24284 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
24285 fi
24286 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
24299
24300 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
24301
24302 fi
24303
24304 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
24305 #include <sys/stat.h>
24306 "
24307 if test "x$ac_cv_type_nlink_t" = x""yes; then :
24308
24309 else
24310
24311 $as_echo "#define nlink_t int" >>confdefs.h
24312
24313 fi
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
24333 "
24334 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
24335 ac_have_decl=1
24336 else
24337 ac_have_decl=0
24338 fi
24339
24340 cat >>confdefs.h <<_ACEOF
24341 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
24342 _ACEOF
24343
24344 if test $ac_cv_have_decl_localtime_r = no; then
24345 HAVE_DECL_LOCALTIME_R=0
24346 fi
24347
24348
24349 if test $ac_cv_func_localtime_r = yes; then
24350 HAVE_LOCALTIME_R=1
24351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
24352 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
24353 if test "${gl_cv_time_r_posix+set}" = set; then :
24354 $as_echo_n "(cached) " >&6
24355 else
24356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24357 /* end confdefs.h. */
24358 #include <time.h>
24359 int
24360 main ()
24361 {
24362 /* We don't need to append 'restrict's to the argument types,
24363 even though the POSIX signature has the 'restrict's,
24364 since C99 says they can't affect type compatibility. */
24365 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
24366 if (ptr) return 0;
24367 /* Check the return type is a pointer.
24368 On HP-UX 10 it is 'int'. */
24369 *localtime_r (0, 0);
24370 ;
24371 return 0;
24372 }
24373
24374 _ACEOF
24375 if ac_fn_c_try_compile "$LINENO"; then :
24376 gl_cv_time_r_posix=yes
24377 else
24378 gl_cv_time_r_posix=no
24379 fi
24380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24381
24382 fi
24383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
24384 $as_echo "$gl_cv_time_r_posix" >&6; }
24385 if test $gl_cv_time_r_posix = yes; then
24386 REPLACE_LOCALTIME_R=0
24387 else
24388 REPLACE_LOCALTIME_R=1
24389 fi
24390 else
24391 HAVE_LOCALTIME_R=0
24392 fi
24393
24394 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
24395
24396
24397
24398
24399
24400
24401
24402
24403 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
24404
24405
24406 :
24407
24408 fi
24409
24410
24411
24412
24413
24414 GNULIB_TIME_R=1
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425 LIB_TIMER_TIME=
24426
24427 gl_saved_libs=$LIBS
24428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
24429 $as_echo_n "checking for library containing timer_settime... " >&6; }
24430 if test "${ac_cv_search_timer_settime+set}" = set; then :
24431 $as_echo_n "(cached) " >&6
24432 else
24433 ac_func_search_save_LIBS=$LIBS
24434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24435 /* end confdefs.h. */
24436
24437 /* Override any GCC internal prototype to avoid an error.
24438 Use char because int might match the return type of a GCC
24439 builtin and then its argument prototype would still apply. */
24440 #ifdef __cplusplus
24441 extern "C"
24442 #endif
24443 char timer_settime ();
24444 int
24445 main ()
24446 {
24447 return timer_settime ();
24448 ;
24449 return 0;
24450 }
24451 _ACEOF
24452 for ac_lib in '' rt posix4; do
24453 if test -z "$ac_lib"; then
24454 ac_res="none required"
24455 else
24456 ac_res=-l$ac_lib
24457 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24458 fi
24459 if ac_fn_c_try_link "$LINENO"; then :
24460 ac_cv_search_timer_settime=$ac_res
24461 fi
24462 rm -f core conftest.err conftest.$ac_objext \
24463 conftest$ac_exeext
24464 if test "${ac_cv_search_timer_settime+set}" = set; then :
24465 break
24466 fi
24467 done
24468 if test "${ac_cv_search_timer_settime+set}" = set; then :
24469
24470 else
24471 ac_cv_search_timer_settime=no
24472 fi
24473 rm conftest.$ac_ext
24474 LIBS=$ac_func_search_save_LIBS
24475 fi
24476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
24477 $as_echo "$ac_cv_search_timer_settime" >&6; }
24478 ac_res=$ac_cv_search_timer_settime
24479 if test "$ac_res" != no; then :
24480 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24481 test "$ac_cv_search_timer_settime" = "none required" ||
24482 LIB_TIMER_TIME=$ac_cv_search_timer_settime
24483 fi
24484
24485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24486 /* end confdefs.h. */
24487
24488 #include <features.h>
24489 #ifdef __GNU_LIBRARY__
24490 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
24491 && !defined __UCLIBC__
24492 Thread emulation available
24493 #endif
24494 #endif
24495
24496 _ACEOF
24497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24498 $EGREP "Thread" >/dev/null 2>&1; then :
24499 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
24500 fi
24501 rm -f conftest*
24502
24503 for ac_func in timer_settime
24504 do :
24505 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
24506 if test "x$ac_cv_func_timer_settime" = x""yes; then :
24507 cat >>confdefs.h <<_ACEOF
24508 #define HAVE_TIMER_SETTIME 1
24509 _ACEOF
24510
24511 fi
24512 done
24513
24514 LIBS=$gl_saved_libs
24515
24516 :
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529 if test $gl_cv_have_include_next = yes; then
24530 gl_cv_next_unistd_h='<'unistd.h'>'
24531 else
24532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24533 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
24534 if test "${gl_cv_next_unistd_h+set}" = set; then :
24535 $as_echo_n "(cached) " >&6
24536 else
24537
24538 if test $ac_cv_header_unistd_h = yes; then
24539
24540
24541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24542 /* end confdefs.h. */
24543 #include <unistd.h>
24544
24545 _ACEOF
24546 case "$host_os" in
24547 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24548 *) gl_absname_cpp="$ac_cpp" ;;
24549 esac
24550
24551 case "$host_os" in
24552 mingw*)
24553 gl_dirsep_regex='[/\\]'
24554 ;;
24555 *)
24556 gl_dirsep_regex='\/'
24557 ;;
24558 esac
24559 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24560
24561 gl_header_literal_regex=`echo 'unistd.h' \
24562 | sed -e "$gl_make_literal_regex_sed"`
24563 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24564 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24565 s|^/[^/]|//&|
24566 p
24567 q
24568 }'
24569 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24570 sed -n "$gl_absolute_header_sed"`'"'
24571 else
24572 gl_cv_next_unistd_h='<'unistd.h'>'
24573 fi
24574
24575
24576 fi
24577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
24578 $as_echo "$gl_cv_next_unistd_h" >&6; }
24579 fi
24580 NEXT_UNISTD_H=$gl_cv_next_unistd_h
24581
24582 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24583 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24584 gl_next_as_first_directive='<'unistd.h'>'
24585 else
24586 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24587 gl_next_as_first_directive=$gl_cv_next_unistd_h
24588 fi
24589 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
24590
24591
24592
24593
24594 if test $ac_cv_header_unistd_h = yes; then
24595 HAVE_UNISTD_H=1
24596 else
24597 HAVE_UNISTD_H=0
24598 fi
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610 if test $ac_cv_have_decl_unsetenv = no; then
24611 HAVE_DECL_UNSETENV=0
24612 fi
24613 for ac_func in unsetenv
24614 do :
24615 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
24616 if test "x$ac_cv_func_unsetenv" = x""yes; then :
24617 cat >>confdefs.h <<_ACEOF
24618 #define HAVE_UNSETENV 1
24619 _ACEOF
24620
24621 fi
24622 done
24623
24624 if test $ac_cv_func_unsetenv = no; then
24625 HAVE_UNSETENV=0
24626 else
24627 HAVE_UNSETENV=1
24628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
24629 $as_echo_n "checking for unsetenv() return type... " >&6; }
24630 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
24631 $as_echo_n "(cached) " >&6
24632 else
24633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24634 /* end confdefs.h. */
24635
24636 #undef _BSD
24637 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
24638 #include <stdlib.h>
24639 extern
24640 #ifdef __cplusplus
24641 "C"
24642 #endif
24643 int unsetenv (const char *name);
24644
24645 int
24646 main ()
24647 {
24648
24649 ;
24650 return 0;
24651 }
24652 _ACEOF
24653 if ac_fn_c_try_compile "$LINENO"; then :
24654 gt_cv_func_unsetenv_ret='int'
24655 else
24656 gt_cv_func_unsetenv_ret='void'
24657 fi
24658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24659 fi
24660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
24661 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
24662 if test $gt_cv_func_unsetenv_ret = 'void'; then
24663
24664 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
24665
24666 REPLACE_UNSETENV=1
24667 fi
24668
24669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
24670 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
24671 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
24672 $as_echo_n "(cached) " >&6
24673 else
24674 if test "$cross_compiling" = yes; then :
24675 case "$host_os" in
24676 # Guess yes on glibc systems.
24677 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
24678 # If we don't know, assume the worst.
24679 *) gl_cv_func_unsetenv_works="guessing no" ;;
24680 esac
24681
24682 else
24683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24684 /* end confdefs.h. */
24685
24686 #include <stdlib.h>
24687 #include <errno.h>
24688 extern char **environ;
24689
24690 int
24691 main ()
24692 {
24693
24694 char entry1[] = "a=1";
24695 char entry2[] = "b=2";
24696 char *env[] = { entry1, entry2, NULL };
24697 if (putenv ((char *) "a=1")) return 1;
24698 if (putenv (entry2)) return 2;
24699 entry2[0] = 'a';
24700 unsetenv ("a");
24701 if (getenv ("a")) return 3;
24702 if (!unsetenv ("") || errno != EINVAL) return 4;
24703 entry2[0] = 'b';
24704 environ = env;
24705 if (!getenv ("a")) return 5;
24706 entry2[0] = 'a';
24707 unsetenv ("a");
24708 if (getenv ("a")) return 6;
24709
24710 ;
24711 return 0;
24712 }
24713 _ACEOF
24714 if ac_fn_c_try_run "$LINENO"; then :
24715 gl_cv_func_unsetenv_works=yes
24716 else
24717 gl_cv_func_unsetenv_works=no
24718 fi
24719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24720 conftest.$ac_objext conftest.beam conftest.$ac_ext
24721 fi
24722
24723 fi
24724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
24725 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
24726 case "$gl_cv_func_unsetenv_works" in
24727 *yes) ;;
24728 *)
24729 REPLACE_UNSETENV=1
24730 ;;
24731 esac
24732 fi
24733
24734 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
24735
24736
24737
24738
24739
24740
24741
24742
24743 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
24744
24745
24746
24747
24748
24749 fi
24750
24751
24752
24753
24754
24755 GNULIB_UNSETENV=1
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
24768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
24769 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
24770 if test "${gl_cv_func_futimesat_works+set}" = set; then :
24771 $as_echo_n "(cached) " >&6
24772 else
24773 touch conftest.file
24774 if test "$cross_compiling" = yes; then :
24775 case "$host_os" in
24776 # Guess yes on glibc systems.
24777 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
24778 # If we don't know, assume the worst.
24779 *) gl_cv_func_futimesat_works="guessing no" ;;
24780 esac
24781
24782 else
24783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24784 /* end confdefs.h. */
24785
24786 #include <stddef.h>
24787 #include <sys/times.h>
24788 #include <fcntl.h>
24789
24790 int
24791 main ()
24792 {
24793 int fd = open ("conftest.file", O_RDWR);
24794 if (fd < 0) return 1;
24795 if (futimesat (fd, NULL, NULL)) return 2;
24796
24797 ;
24798 return 0;
24799 }
24800 _ACEOF
24801 if ac_fn_c_try_run "$LINENO"; then :
24802 gl_cv_func_futimesat_works=yes
24803 else
24804 gl_cv_func_futimesat_works=no
24805 fi
24806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24807 conftest.$ac_objext conftest.beam conftest.$ac_ext
24808 fi
24809
24810 rm -f conftest.file
24811 fi
24812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
24813 $as_echo "$gl_cv_func_futimesat_works" >&6; }
24814 case "$gl_cv_func_futimesat_works" in
24815 *yes) ;;
24816 *)
24817
24818 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
24819
24820 ;;
24821 esac
24822 fi
24823
24824 gl_gnulib_enabled_dosname=false
24825 gl_gnulib_enabled_euidaccess=false
24826 gl_gnulib_enabled_getgroups=false
24827 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
24828 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
24829 gl_gnulib_enabled_pathmax=false
24830 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
24831 gl_gnulib_enabled_stat=false
24832 gl_gnulib_enabled_strtoll=false
24833 gl_gnulib_enabled_strtoull=false
24834 gl_gnulib_enabled_verify=false
24835 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
24836 func_gl_gnulib_m4code_dosname ()
24837 {
24838 if ! $gl_gnulib_enabled_dosname; then
24839 gl_gnulib_enabled_dosname=true
24840 fi
24841 }
24842 func_gl_gnulib_m4code_euidaccess ()
24843 {
24844 if ! $gl_gnulib_enabled_euidaccess; then
24845
24846
24847
24848
24849
24850 for ac_func in euidaccess
24851 do :
24852 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
24853 if test "x$ac_cv_func_euidaccess" = x""yes; then :
24854 cat >>confdefs.h <<_ACEOF
24855 #define HAVE_EUIDACCESS 1
24856 _ACEOF
24857
24858 fi
24859 done
24860
24861 if test $ac_cv_func_euidaccess = no; then
24862 HAVE_EUIDACCESS=0
24863 fi
24864
24865 if test $HAVE_EUIDACCESS = 0; then
24866
24867
24868
24869
24870
24871
24872
24873
24874 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
24875
24876
24877
24878 for ac_header in libgen.h
24879 do :
24880 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
24881 if test "x$ac_cv_header_libgen_h" = x""yes; then :
24882 cat >>confdefs.h <<_ACEOF
24883 #define HAVE_LIBGEN_H 1
24884 _ACEOF
24885
24886 fi
24887
24888 done
24889
24890
24891 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
24892 if test "x$ac_cv_func_getgroups" = x""yes; then :
24893
24894 fi
24895
24896
24897 # If we don't yet have getgroups, see if it's in -lbsd.
24898 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
24899 ac_save_LIBS=$LIBS
24900 if test $ac_cv_func_getgroups = no; then
24901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
24902 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
24903 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
24904 $as_echo_n "(cached) " >&6
24905 else
24906 ac_check_lib_save_LIBS=$LIBS
24907 LIBS="-lbsd $LIBS"
24908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24909 /* end confdefs.h. */
24910
24911 /* Override any GCC internal prototype to avoid an error.
24912 Use char because int might match the return type of a GCC
24913 builtin and then its argument prototype would still apply. */
24914 #ifdef __cplusplus
24915 extern "C"
24916 #endif
24917 char getgroups ();
24918 int
24919 main ()
24920 {
24921 return getgroups ();
24922 ;
24923 return 0;
24924 }
24925 _ACEOF
24926 if ac_fn_c_try_link "$LINENO"; then :
24927 ac_cv_lib_bsd_getgroups=yes
24928 else
24929 ac_cv_lib_bsd_getgroups=no
24930 fi
24931 rm -f core conftest.err conftest.$ac_objext \
24932 conftest$ac_exeext conftest.$ac_ext
24933 LIBS=$ac_check_lib_save_LIBS
24934 fi
24935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
24936 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
24937 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
24938 GETGROUPS_LIB=-lbsd
24939 fi
24940
24941 fi
24942
24943 # Run the program to test the functionality of the system-supplied
24944 # getgroups function only if there is such a function.
24945 if test $ac_cv_func_getgroups = yes; then
24946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
24947 $as_echo_n "checking for working getgroups... " >&6; }
24948 if test "${ac_cv_func_getgroups_works+set}" = set; then :
24949 $as_echo_n "(cached) " >&6
24950 else
24951 if test "$cross_compiling" = yes; then :
24952 case "$host_os" in # ((
24953 # Guess yes on glibc systems.
24954 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
24955 # If we don't know, assume the worst.
24956 *) ac_cv_func_getgroups_works="guessing no" ;;
24957 esac
24958
24959 else
24960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24961 /* end confdefs.h. */
24962 $ac_includes_default
24963 int
24964 main ()
24965 {
24966 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
24967 return getgroups (0, 0) == -1;
24968 ;
24969 return 0;
24970 }
24971
24972 _ACEOF
24973 if ac_fn_c_try_run "$LINENO"; then :
24974 ac_cv_func_getgroups_works=yes
24975 else
24976 ac_cv_func_getgroups_works=no
24977 fi
24978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24979 conftest.$ac_objext conftest.beam conftest.$ac_ext
24980 fi
24981
24982
24983 fi
24984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
24985 $as_echo "$ac_cv_func_getgroups_works" >&6; }
24986 else
24987 ac_cv_func_getgroups_works=no
24988 fi
24989 case "$ac_cv_func_getgroups_works" in
24990 *yes)
24991
24992 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
24993
24994 ;;
24995 esac
24996 LIBS=$ac_save_LIBS
24997
24998
24999 # Solaris 9 and 10 need -lgen to get the eaccess function.
25000 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
25001 # programs in the package would end up linked with that potentially-shared
25002 # library, inducing unnecessary run-time overhead.
25003 LIB_EACCESS=
25004
25005 gl_saved_libs=$LIBS
25006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
25007 $as_echo_n "checking for library containing eaccess... " >&6; }
25008 if test "${ac_cv_search_eaccess+set}" = set; then :
25009 $as_echo_n "(cached) " >&6
25010 else
25011 ac_func_search_save_LIBS=$LIBS
25012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25013 /* end confdefs.h. */
25014
25015 /* Override any GCC internal prototype to avoid an error.
25016 Use char because int might match the return type of a GCC
25017 builtin and then its argument prototype would still apply. */
25018 #ifdef __cplusplus
25019 extern "C"
25020 #endif
25021 char eaccess ();
25022 int
25023 main ()
25024 {
25025 return eaccess ();
25026 ;
25027 return 0;
25028 }
25029 _ACEOF
25030 for ac_lib in '' gen; do
25031 if test -z "$ac_lib"; then
25032 ac_res="none required"
25033 else
25034 ac_res=-l$ac_lib
25035 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25036 fi
25037 if ac_fn_c_try_link "$LINENO"; then :
25038 ac_cv_search_eaccess=$ac_res
25039 fi
25040 rm -f core conftest.err conftest.$ac_objext \
25041 conftest$ac_exeext
25042 if test "${ac_cv_search_eaccess+set}" = set; then :
25043 break
25044 fi
25045 done
25046 if test "${ac_cv_search_eaccess+set}" = set; then :
25047
25048 else
25049 ac_cv_search_eaccess=no
25050 fi
25051 rm conftest.$ac_ext
25052 LIBS=$ac_func_search_save_LIBS
25053 fi
25054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
25055 $as_echo "$ac_cv_search_eaccess" >&6; }
25056 ac_res=$ac_cv_search_eaccess
25057 if test "$ac_res" != no; then :
25058 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25059 test "$ac_cv_search_eaccess" = "none required" ||
25060 LIB_EACCESS=$ac_cv_search_eaccess
25061 fi
25062
25063 for ac_func in eaccess
25064 do :
25065 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
25066 if test "x$ac_cv_func_eaccess" = x""yes; then :
25067 cat >>confdefs.h <<_ACEOF
25068 #define HAVE_EACCESS 1
25069 _ACEOF
25070
25071 fi
25072 done
25073
25074 LIBS=$gl_saved_libs
25075
25076 fi
25077
25078
25079
25080
25081
25082 GNULIB_EUIDACCESS=1
25083
25084
25085
25086
25087
25088 gl_gnulib_enabled_euidaccess=true
25089 if test $HAVE_EUIDACCESS = 0; then
25090 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
25091 fi
25092 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
25093 if test $HAVE_EUIDACCESS = 0; then
25094 func_gl_gnulib_m4code_stat
25095 fi
25096 fi
25097 }
25098 func_gl_gnulib_m4code_getgroups ()
25099 {
25100 if ! $gl_gnulib_enabled_getgroups; then
25101
25102
25103
25104
25105
25106 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25107 if test "x$ac_cv_func_getgroups" = x""yes; then :
25108
25109 fi
25110
25111
25112 # If we don't yet have getgroups, see if it's in -lbsd.
25113 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25114 ac_save_LIBS=$LIBS
25115 if test $ac_cv_func_getgroups = no; then
25116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25117 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
25118 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
25119 $as_echo_n "(cached) " >&6
25120 else
25121 ac_check_lib_save_LIBS=$LIBS
25122 LIBS="-lbsd $LIBS"
25123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25124 /* end confdefs.h. */
25125
25126 /* Override any GCC internal prototype to avoid an error.
25127 Use char because int might match the return type of a GCC
25128 builtin and then its argument prototype would still apply. */
25129 #ifdef __cplusplus
25130 extern "C"
25131 #endif
25132 char getgroups ();
25133 int
25134 main ()
25135 {
25136 return getgroups ();
25137 ;
25138 return 0;
25139 }
25140 _ACEOF
25141 if ac_fn_c_try_link "$LINENO"; then :
25142 ac_cv_lib_bsd_getgroups=yes
25143 else
25144 ac_cv_lib_bsd_getgroups=no
25145 fi
25146 rm -f core conftest.err conftest.$ac_objext \
25147 conftest$ac_exeext conftest.$ac_ext
25148 LIBS=$ac_check_lib_save_LIBS
25149 fi
25150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25151 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25152 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
25153 GETGROUPS_LIB=-lbsd
25154 fi
25155
25156 fi
25157
25158 # Run the program to test the functionality of the system-supplied
25159 # getgroups function only if there is such a function.
25160 if test $ac_cv_func_getgroups = yes; then
25161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25162 $as_echo_n "checking for working getgroups... " >&6; }
25163 if test "${ac_cv_func_getgroups_works+set}" = set; then :
25164 $as_echo_n "(cached) " >&6
25165 else
25166 if test "$cross_compiling" = yes; then :
25167 case "$host_os" in # ((
25168 # Guess yes on glibc systems.
25169 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
25170 # If we don't know, assume the worst.
25171 *) ac_cv_func_getgroups_works="guessing no" ;;
25172 esac
25173
25174 else
25175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25176 /* end confdefs.h. */
25177 $ac_includes_default
25178 int
25179 main ()
25180 {
25181 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
25182 return getgroups (0, 0) == -1;
25183 ;
25184 return 0;
25185 }
25186
25187 _ACEOF
25188 if ac_fn_c_try_run "$LINENO"; then :
25189 ac_cv_func_getgroups_works=yes
25190 else
25191 ac_cv_func_getgroups_works=no
25192 fi
25193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25194 conftest.$ac_objext conftest.beam conftest.$ac_ext
25195 fi
25196
25197
25198 fi
25199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25200 $as_echo "$ac_cv_func_getgroups_works" >&6; }
25201 else
25202 ac_cv_func_getgroups_works=no
25203 fi
25204 case "$ac_cv_func_getgroups_works" in
25205 *yes)
25206
25207 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25208
25209 ;;
25210 esac
25211 LIBS=$ac_save_LIBS
25212
25213 if test $ac_cv_func_getgroups != yes; then
25214 HAVE_GETGROUPS=0
25215 else
25216 if test "$ac_cv_type_getgroups" != gid_t \
25217 || { case "$ac_cv_func_getgroups_works" in
25218 *yes) false;;
25219 *) true;;
25220 esac
25221 }; then
25222 REPLACE_GETGROUPS=1
25223
25224 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
25225
25226 else
25227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
25228 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
25229 if test "${gl_cv_func_getgroups_works+set}" = set; then :
25230 $as_echo_n "(cached) " >&6
25231 else
25232 if test "$cross_compiling" = yes; then :
25233 case "$host_os" in
25234 # Guess yes on glibc systems.
25235 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
25236 # If we don't know, assume the worst.
25237 *) gl_cv_func_getgroups_works="guessing no" ;;
25238 esac
25239
25240 else
25241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25242 /* end confdefs.h. */
25243 $ac_includes_default
25244 int
25245 main ()
25246 {
25247 int size = getgroups (0, 0);
25248 gid_t *list = malloc (size * sizeof *list);
25249 return getgroups (-1, list) != -1;
25250 ;
25251 return 0;
25252 }
25253 _ACEOF
25254 if ac_fn_c_try_run "$LINENO"; then :
25255 gl_cv_func_getgroups_works=yes
25256 else
25257 gl_cv_func_getgroups_works=no
25258 fi
25259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25260 conftest.$ac_objext conftest.beam conftest.$ac_ext
25261 fi
25262
25263 fi
25264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
25265 $as_echo "$gl_cv_func_getgroups_works" >&6; }
25266 case "$gl_cv_func_getgroups_works" in
25267 *yes) ;;
25268 *) REPLACE_GETGROUPS=1 ;;
25269 esac
25270 fi
25271 fi
25272 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
25273
25274 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
25275
25276
25277
25278
25279
25280
25281
25282
25283 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
25284
25285 fi
25286
25287
25288
25289
25290
25291 GNULIB_GETGROUPS=1
25292
25293
25294
25295
25296
25297 gl_gnulib_enabled_getgroups=true
25298 fi
25299 }
25300 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
25301 {
25302 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
25303
25304
25305 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
25306 fi
25307 }
25308 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
25309 {
25310 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
25311
25312
25313
25314
25315
25316 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
25317 if test "x$ac_cv_func_group_member" = x""yes; then :
25318
25319 else
25320
25321 HAVE_GROUP_MEMBER=0
25322
25323 fi
25324
25325
25326 if test $HAVE_GROUP_MEMBER = 0; then
25327
25328
25329
25330
25331
25332
25333
25334
25335 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
25336
25337
25338
25339
25340 fi
25341
25342
25343
25344
25345
25346 GNULIB_GROUP_MEMBER=1
25347
25348
25349
25350
25351
25352 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
25353 if test $HAVE_GROUP_MEMBER = 0; then
25354 func_gl_gnulib_m4code_getgroups
25355 fi
25356 if test $HAVE_GROUP_MEMBER = 0; then
25357 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
25358 fi
25359 fi
25360 }
25361 func_gl_gnulib_m4code_pathmax ()
25362 {
25363 if ! $gl_gnulib_enabled_pathmax; then
25364
25365
25366
25367 gl_gnulib_enabled_pathmax=true
25368 fi
25369 }
25370 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
25371 {
25372 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
25373 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
25374 fi
25375 }
25376 func_gl_gnulib_m4code_stat ()
25377 {
25378 if ! $gl_gnulib_enabled_stat; then
25379
25380
25381
25382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25383 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25384 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
25385 $as_echo_n "(cached) " >&6
25386 else
25387 if test "$cross_compiling" = yes; then :
25388 case $host_os in
25389 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25390 *) gl_cv_func_stat_dir_slash="guessing yes";;
25391 esac
25392 else
25393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25394 /* end confdefs.h. */
25395 #include <sys/stat.h>
25396
25397 int
25398 main ()
25399 {
25400 struct stat st; return stat (".", &st) != stat ("./", &st);
25401 ;
25402 return 0;
25403 }
25404 _ACEOF
25405 if ac_fn_c_try_run "$LINENO"; then :
25406 gl_cv_func_stat_dir_slash=yes
25407 else
25408 gl_cv_func_stat_dir_slash=no
25409 fi
25410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25411 conftest.$ac_objext conftest.beam conftest.$ac_ext
25412 fi
25413
25414 fi
25415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25416 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25418 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25419 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
25420 $as_echo_n "(cached) " >&6
25421 else
25422 touch conftest.tmp
25423 # Assume that if we have lstat, we can also check symlinks.
25424 if test $ac_cv_func_lstat = yes; then
25425 ln -s conftest.tmp conftest.lnk
25426 fi
25427 if test "$cross_compiling" = yes; then :
25428 case "$host_os" in
25429 # Guess yes on glibc systems.
25430 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25431 # If we don't know, assume the worst.
25432 *) gl_cv_func_stat_file_slash="guessing no" ;;
25433 esac
25434
25435 else
25436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25437 /* end confdefs.h. */
25438 #include <sys/stat.h>
25439
25440 int
25441 main ()
25442 {
25443 int result = 0;
25444 struct stat st;
25445 if (!stat ("conftest.tmp/", &st))
25446 result |= 1;
25447 #if HAVE_LSTAT
25448 if (!stat ("conftest.lnk/", &st))
25449 result |= 2;
25450 #endif
25451 return result;
25452
25453 ;
25454 return 0;
25455 }
25456 _ACEOF
25457 if ac_fn_c_try_run "$LINENO"; then :
25458 gl_cv_func_stat_file_slash=yes
25459 else
25460 gl_cv_func_stat_file_slash=no
25461 fi
25462 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25463 conftest.$ac_objext conftest.beam conftest.$ac_ext
25464 fi
25465
25466 rm -f conftest.tmp conftest.lnk
25467 fi
25468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25469 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25470 case $gl_cv_func_stat_dir_slash in
25471 *no) REPLACE_STAT=1
25472
25473 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25474 ;;
25475 esac
25476 case $gl_cv_func_stat_file_slash in
25477 *no) REPLACE_STAT=1
25478
25479 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25480 ;;
25481 esac
25482
25483 if test $REPLACE_STAT = 1; then
25484
25485
25486
25487
25488
25489
25490
25491
25492 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25493
25494 :
25495 fi
25496
25497
25498
25499
25500
25501 GNULIB_STAT=1
25502
25503
25504
25505
25506
25507 gl_gnulib_enabled_stat=true
25508 if test $REPLACE_STAT = 1; then
25509 func_gl_gnulib_m4code_dosname
25510 fi
25511 if test $REPLACE_STAT = 1; then
25512 func_gl_gnulib_m4code_pathmax
25513 fi
25514 if test $REPLACE_STAT = 1; then
25515 func_gl_gnulib_m4code_verify
25516 fi
25517 fi
25518 }
25519 func_gl_gnulib_m4code_strtoll ()
25520 {
25521 if ! $gl_gnulib_enabled_strtoll; then
25522
25523
25524
25525 if test "$ac_cv_type_long_long_int" = yes; then
25526 for ac_func in strtoll
25527 do :
25528 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
25529 if test "x$ac_cv_func_strtoll" = x""yes; then :
25530 cat >>confdefs.h <<_ACEOF
25531 #define HAVE_STRTOLL 1
25532 _ACEOF
25533
25534 fi
25535 done
25536
25537 if test $ac_cv_func_strtoll = no; then
25538 HAVE_STRTOLL=0
25539 fi
25540 fi
25541
25542 if test $HAVE_STRTOLL = 0; then
25543
25544
25545
25546
25547
25548
25549
25550
25551 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
25552
25553
25554 :
25555
25556 fi
25557
25558
25559
25560
25561
25562 GNULIB_STRTOLL=1
25563
25564
25565
25566
25567
25568 gl_gnulib_enabled_strtoll=true
25569 fi
25570 }
25571 func_gl_gnulib_m4code_strtoull ()
25572 {
25573 if ! $gl_gnulib_enabled_strtoull; then
25574
25575
25576
25577 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
25578 for ac_func in strtoull
25579 do :
25580 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
25581 if test "x$ac_cv_func_strtoull" = x""yes; then :
25582 cat >>confdefs.h <<_ACEOF
25583 #define HAVE_STRTOULL 1
25584 _ACEOF
25585
25586 fi
25587 done
25588
25589 if test $ac_cv_func_strtoull = no; then
25590 HAVE_STRTOULL=0
25591 fi
25592 fi
25593
25594 if test $HAVE_STRTOULL = 0; then
25595
25596
25597
25598
25599
25600
25601
25602
25603 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
25604
25605
25606 :
25607
25608 fi
25609
25610
25611
25612
25613
25614 GNULIB_STRTOULL=1
25615
25616
25617
25618
25619
25620 gl_gnulib_enabled_strtoull=true
25621 fi
25622 }
25623 func_gl_gnulib_m4code_verify ()
25624 {
25625 if ! $gl_gnulib_enabled_verify; then
25626 gl_gnulib_enabled_verify=true
25627 fi
25628 }
25629 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
25630 {
25631 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
25632 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
25633 fi
25634 }
25635 if test $HAVE_FACCESSAT = 0; then
25636 func_gl_gnulib_m4code_dosname
25637 fi
25638 if test $HAVE_FACCESSAT = 0; then
25639 func_gl_gnulib_m4code_euidaccess
25640 fi
25641 if test $REPLACE_GETOPT = 1; then
25642 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
25643 fi
25644 if test $REPLACE_LSTAT = 1; then
25645 func_gl_gnulib_m4code_dosname
25646 fi
25647 if test $REPLACE_LSTAT = 1; then
25648 func_gl_gnulib_m4code_stat
25649 fi
25650 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25651 func_gl_gnulib_m4code_stat
25652 fi
25653 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
25654 func_gl_gnulib_m4code_strtoll
25655 fi
25656 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
25657 func_gl_gnulib_m4code_verify
25658 fi
25659 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
25660 func_gl_gnulib_m4code_strtoull
25661 fi
25662 if test $ac_cv_func_strtoumax = no; then
25663 func_gl_gnulib_m4code_verify
25664 fi
25665
25666 if $gl_gnulib_enabled_dosname; then
25667 gl_GNULIB_ENABLED_dosname_TRUE=
25668 gl_GNULIB_ENABLED_dosname_FALSE='#'
25669 else
25670 gl_GNULIB_ENABLED_dosname_TRUE='#'
25671 gl_GNULIB_ENABLED_dosname_FALSE=
25672 fi
25673
25674 if $gl_gnulib_enabled_euidaccess; then
25675 gl_GNULIB_ENABLED_euidaccess_TRUE=
25676 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
25677 else
25678 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
25679 gl_GNULIB_ENABLED_euidaccess_FALSE=
25680 fi
25681
25682 if $gl_gnulib_enabled_getgroups; then
25683 gl_GNULIB_ENABLED_getgroups_TRUE=
25684 gl_GNULIB_ENABLED_getgroups_FALSE='#'
25685 else
25686 gl_GNULIB_ENABLED_getgroups_TRUE='#'
25687 gl_GNULIB_ENABLED_getgroups_FALSE=
25688 fi
25689
25690 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
25691 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
25692 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
25693 else
25694 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
25695 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
25696 fi
25697
25698 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
25699 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
25700 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
25701 else
25702 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
25703 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
25704 fi
25705
25706 if $gl_gnulib_enabled_pathmax; then
25707 gl_GNULIB_ENABLED_pathmax_TRUE=
25708 gl_GNULIB_ENABLED_pathmax_FALSE='#'
25709 else
25710 gl_GNULIB_ENABLED_pathmax_TRUE='#'
25711 gl_GNULIB_ENABLED_pathmax_FALSE=
25712 fi
25713
25714 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
25715 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
25716 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
25717 else
25718 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
25719 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
25720 fi
25721
25722 if $gl_gnulib_enabled_stat; then
25723 gl_GNULIB_ENABLED_stat_TRUE=
25724 gl_GNULIB_ENABLED_stat_FALSE='#'
25725 else
25726 gl_GNULIB_ENABLED_stat_TRUE='#'
25727 gl_GNULIB_ENABLED_stat_FALSE=
25728 fi
25729
25730 if $gl_gnulib_enabled_strtoll; then
25731 gl_GNULIB_ENABLED_strtoll_TRUE=
25732 gl_GNULIB_ENABLED_strtoll_FALSE='#'
25733 else
25734 gl_GNULIB_ENABLED_strtoll_TRUE='#'
25735 gl_GNULIB_ENABLED_strtoll_FALSE=
25736 fi
25737
25738 if $gl_gnulib_enabled_strtoull; then
25739 gl_GNULIB_ENABLED_strtoull_TRUE=
25740 gl_GNULIB_ENABLED_strtoull_FALSE='#'
25741 else
25742 gl_GNULIB_ENABLED_strtoull_TRUE='#'
25743 gl_GNULIB_ENABLED_strtoull_FALSE=
25744 fi
25745
25746 if $gl_gnulib_enabled_verify; then
25747 gl_GNULIB_ENABLED_verify_TRUE=
25748 gl_GNULIB_ENABLED_verify_FALSE='#'
25749 else
25750 gl_GNULIB_ENABLED_verify_TRUE='#'
25751 gl_GNULIB_ENABLED_verify_FALSE=
25752 fi
25753
25754 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
25755 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
25756 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
25757 else
25758 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
25759 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
25760 fi
25761
25762 # End of code from modules
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772 gltests_libdeps=
25773 gltests_ltlibdeps=
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783 gl_source_base='tests'
25784 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
25785
25786 gl_module_indicator_condition=$gltests_WITNESS
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797 LIBGNU_LIBDEPS="$gl_libdeps"
25798
25799 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
25800
25801
25802 CFLAGS=$SAVE_CFLAGS
25803 LIBS=$SAVE_LIBS
25804
25805 case "$opsys" in
25806 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
25807
25808 darwin)
25809 ## The -headerpad option tells ld (see man page) to leave room at the
25810 ## end of the header for adding load commands. Needed for dumping.
25811 ## 0x690 is the total size of 30 segment load commands (at 56
25812 ## each); under Cocoa 31 commands are required.
25813 if test "$HAVE_NS" = "yes"; then
25814 libs_nsgui="-framework AppKit"
25815 headerpad_extra=6C8
25816 else
25817 libs_nsgui=
25818 headerpad_extra=690
25819 fi
25820 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
25821
25822 ## This is here because src/Makefile.in did some extra fiddling around
25823 ## with LD_SWITCH_SYSTEM. The cpp logic was:
25824 ## #ifndef LD_SWITCH_SYSTEM
25825 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
25826 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
25827 ## not using gcc, darwin.
25828 ## Because this was done in src/Makefile.in, the resulting part of
25829 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
25830 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
25831 ## rather than LD_SWITCH_SYSTEM.
25832 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
25833 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
25834 ;;
25835
25836 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
25837 ## find X at run-time.
25838 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
25839 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
25840 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
25841 ## had different values in configure (in ac_link) and src/Makefile.in.
25842 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
25843 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
25844
25845 *) LD_SWITCH_SYSTEM_TEMACS= ;;
25846 esac
25847
25848
25849
25850
25851 LD_FIRSTFLAG=
25852 ORDINARY_LINK=
25853 case "$opsys" in
25854 ## gnu: GNU needs its own crt0.
25855 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
25856
25857 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
25858 ## library search parth, i.e. it won't search /usr/lib for libc and
25859 ## friends. Using -nostartfiles instead avoids this problem, and
25860 ## will also work on earlier NetBSD releases.
25861 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
25862
25863 ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
25864 ## MkLinux/LinuxPPC needs this.
25865 ## s390x-* only supports opsys = gnu-linux so it can be added here.
25866 gnu-*)
25867 case "$canonical" in
25868 powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
25869 esac
25870 ;;
25871 esac
25872
25873
25874 if test "x$ORDINARY_LINK" = "xyes"; then
25875
25876 LD_FIRSTFLAG=""
25877
25878 $as_echo "#define ORDINARY_LINK 1" >>confdefs.h
25879
25880
25881 ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
25882 ## freebsd, gnu-* not on powerpc*|s390x*.
25883 elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
25884
25885 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
25886 ## places that are difficult to figure out at make time. Fortunately,
25887 ## these same versions allow you to pass arbitrary flags on to the
25888 ## linker, so there is no reason not to use it as a linker.
25889 ##
25890 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
25891 ## searching for libraries in its internal directories, so we have to
25892 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
25893 LD_FIRSTFLAG="-nostdlib"
25894 fi
25895
25896 ## FIXME? What setting of EDIT_LDFLAGS should this have?
25897 test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
25898
25899
25900
25901
25902 ## FIXME? The logic here is not precisely the same as that above.
25903 ## There is no check here for a pre-defined LD_FIRSTFLAG.
25904 ## Should we only be setting LIB_GCC if LD ~ -nostdlib?
25905 LIB_GCC=
25906 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
25907
25908 case "$opsys" in
25909 freebsd|netbsd|openbsd) LIB_GCC= ;;
25910
25911 gnu-*)
25912 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
25913 ## build on ARM EABI under GNU/Linux. (Bug#5518)
25914 case $host_cpu in
25915 arm*)
25916 LIB_GCC="-lgcc_s"
25917 ;;
25918 *)
25919 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
25920 ## immediately undefine it again and redefine it to empty.
25921 ## Was the C_SWITCH_X_SITE part really necessary?
25922 ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
25923 LIB_GCC=
25924 ;;
25925 esac
25926 ;;
25927
25928 ## Ask GCC where to find libgcc.a.
25929 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
25930 esac
25931 fi
25932
25933 ## Common for all window systems
25934 if test "$window_system" != "none"; then
25935
25936 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
25937
25938 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
25939 fi
25940
25941
25942
25943
25944
25945 #### Report on what we decided to do.
25946 #### Report GTK as a toolkit, even if it doesn't use Xt.
25947 #### It makes printing result more understandable as using GTK sets
25948 #### toolkit_scroll_bars to yes by default.
25949 if test "${HAVE_GTK}" = "yes"; then
25950 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
25951 fi
25952
25953 echo "
25954 Configured for \`${canonical}'.
25955
25956 Where should the build process find the source code? ${srcdir}
25957 What compiler should emacs be built with? ${CC} ${CFLAGS}
25958 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
25959 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
25960 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
25961 What window system should Emacs use? ${window_system}
25962 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
25963
25964 if test -n "${x_includes}"; then
25965 echo " Where do we find X Windows header files? ${x_includes}"
25966 else
25967 echo " Where do we find X Windows header files? Standard dirs"
25968 fi
25969 if test -n "${x_libraries}"; then
25970 echo " Where do we find X Windows libraries? ${x_libraries}"
25971 else
25972 echo " Where do we find X Windows libraries? Standard dirs"
25973 fi
25974
25975 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
25976 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
25977 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
25978 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
25979 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
25980 echo " Does Emacs use -lpng? ${HAVE_PNG}"
25981 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
25982 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
25983
25984 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
25985 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
25986 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
25987 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
25988 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
25989 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
25990 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
25991
25992 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
25993 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
25994 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
25995 echo " Does Emacs use -lxft? ${HAVE_XFT}"
25996
25997 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
25998 echo
25999
26000 if test -n "${EMACSDATA}"; then
26001 echo " Environment variable EMACSDATA set to: $EMACSDATA"
26002 fi
26003 if test -n "${EMACSDOC}"; then
26004 echo " Environment variable EMACSDOC set to: $EMACSDOC"
26005 fi
26006
26007 echo
26008
26009 if test "$HAVE_NS" = "yes"; then
26010 echo
26011 echo "You must run \"${MAKE-make} install\" in order to test the built application.
26012 The installed application will go to nextstep/Emacs.app and can be
26013 run or moved from there."
26014 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
26015 echo "The application will be fully self-contained."
26016 else
26017 echo "The lisp resources for the application will be installed under ${prefix}.
26018 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
26019 to run if these resources are not installed."
26020 fi
26021 echo
26022 fi
26023
26024 if test "${opsys}" = "cygwin"; then
26025 case `uname -r` in
26026 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
26027 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
26028 echo
26029 ;;
26030 esac
26031 fi
26032
26033 # Remove any trailing slashes in these variables.
26034 test "${prefix}" != NONE &&
26035 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
26036 test "${exec_prefix}" != NONE &&
26037 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
26038
26039 if test "$HAVE_NS" = "yes"; then
26040 if test "$NS_IMPL_GNUSTEP" = yes; then
26041 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"
26042
26043 else
26044 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"
26045
26046 fi
26047 fi
26048
26049 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"
26050
26051 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"
26052
26053
26054 opt_makefile=test/automated/Makefile
26055
26056 if test -f "$srcdir/$opt_makefile.in"; then
26057 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
26058 ac_config_files="$ac_config_files test/automated/Makefile"
26059
26060 fi
26061
26062
26063 opt_makefile=admin/unidata/Makefile
26064
26065 if test -f "$srcdir/$opt_makefile.in"; then
26066 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
26067 ac_config_files="$ac_config_files admin/unidata/Makefile"
26068
26069 fi
26070
26071
26072 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
26073
26074
26075
26076 ac_config_commands="$ac_config_commands mkdirs"
26077
26078
26079 ac_config_commands="$ac_config_commands epaths"
26080
26081
26082 ac_config_commands="$ac_config_commands gdbinit"
26083
26084
26085 cat >confcache <<\_ACEOF
26086 # This file is a shell script that caches the results of configure
26087 # tests run on this system so they can be shared between configure
26088 # scripts and configure runs, see configure's option --config-cache.
26089 # It is not useful on other systems. If it contains results you don't
26090 # want to keep, you may remove or edit it.
26091 #
26092 # config.status only pays attention to the cache file if you give it
26093 # the --recheck option to rerun configure.
26094 #
26095 # `ac_cv_env_foo' variables (set or unset) will be overridden when
26096 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26097 # following values.
26098
26099 _ACEOF
26100
26101 # The following way of writing the cache mishandles newlines in values,
26102 # but we know of no workaround that is simple, portable, and efficient.
26103 # So, we kill variables containing newlines.
26104 # Ultrix sh set writes to stderr and can't be redirected directly,
26105 # and sets the high bit in the cache file unless we assign to the vars.
26106 (
26107 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26108 eval ac_val=\$$ac_var
26109 case $ac_val in #(
26110 *${as_nl}*)
26111 case $ac_var in #(
26112 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26113 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26114 esac
26115 case $ac_var in #(
26116 _ | IFS | as_nl) ;; #(
26117 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26118 *) { eval $ac_var=; unset $ac_var;} ;;
26119 esac ;;
26120 esac
26121 done
26122
26123 (set) 2>&1 |
26124 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26125 *${as_nl}ac_space=\ *)
26126 # `set' does not quote correctly, so add quotes: double-quote
26127 # substitution turns \\\\ into \\, and sed turns \\ into \.
26128 sed -n \
26129 "s/'/'\\\\''/g;
26130 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26131 ;; #(
26132 *)
26133 # `set' quotes correctly as required by POSIX, so do not add quotes.
26134 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26135 ;;
26136 esac |
26137 sort
26138 ) |
26139 sed '
26140 /^ac_cv_env_/b end
26141 t clear
26142 :clear
26143 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26144 t end
26145 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26146 :end' >>confcache
26147 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26148 if test -w "$cache_file"; then
26149 test "x$cache_file" != "x/dev/null" &&
26150 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26151 $as_echo "$as_me: updating cache $cache_file" >&6;}
26152 cat confcache >$cache_file
26153 else
26154 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26155 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26156 fi
26157 fi
26158 rm -f confcache
26159
26160 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26161 # Let make expand exec_prefix.
26162 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26163
26164 DEFS=-DHAVE_CONFIG_H
26165
26166 ac_libobjs=
26167 ac_ltlibobjs=
26168 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26169 # 1. Remove the extension, and $U if already installed.
26170 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26171 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
26172 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26173 # will be set to the directory where LIBOBJS objects are built.
26174 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26175 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26176 done
26177 LIBOBJS=$ac_libobjs
26178
26179 LTLIBOBJS=$ac_ltlibobjs
26180
26181
26182 if test -n "$EXEEXT"; then
26183 am__EXEEXT_TRUE=
26184 am__EXEEXT_FALSE='#'
26185 else
26186 am__EXEEXT_TRUE='#'
26187 am__EXEEXT_FALSE=
26188 fi
26189
26190 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
26191 as_fn_error "conditional \"AMDEP\" was never defined.
26192 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26193 fi
26194 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
26195 as_fn_error "conditional \"am__fastdepCC\" was never defined.
26196 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26197 fi
26198 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
26199 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
26200 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26201 fi
26202 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
26203 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
26204 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26205 fi
26206
26207 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
26208 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
26209 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26210 fi
26211 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
26212 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
26213 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26214 fi
26215 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
26216 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
26217 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26218 fi
26219 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
26220 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
26221 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26222 fi
26223 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
26224 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
26225 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26226 fi
26227 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
26228 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
26229 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26230 fi
26231 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
26232 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
26233 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26234 fi
26235 if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
26236 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
26237 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26238 fi
26239 if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
26240 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
26241 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26242 fi
26243 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
26244 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
26245 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26246 fi
26247 if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
26248 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
26249 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26250 fi
26251 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
26252 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
26253 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26254 fi
26255 if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
26256 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
26257 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26258 fi
26259 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
26260 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
26261 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26262 fi
26263 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
26264 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
26265 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26266 fi
26267 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
26268 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
26269 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26270 fi
26271 if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
26272 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
26273 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26274 fi
26275 if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
26276 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
26277 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26278 fi
26279
26280 gl_libobjs=
26281 gl_ltlibobjs=
26282 if test -n "$gl_LIBOBJS"; then
26283 # Remove the extension.
26284 sed_drop_objext='s/\.o$//;s/\.obj$//'
26285 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26286 gl_libobjs="$gl_libobjs $i.$ac_objext"
26287 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
26288 done
26289 fi
26290 gl_LIBOBJS=$gl_libobjs
26291
26292 gl_LTLIBOBJS=$gl_ltlibobjs
26293
26294
26295
26296 gltests_libobjs=
26297 gltests_ltlibobjs=
26298 if test -n "$gltests_LIBOBJS"; then
26299 # Remove the extension.
26300 sed_drop_objext='s/\.o$//;s/\.obj$//'
26301 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26302 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
26303 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
26304 done
26305 fi
26306 gltests_LIBOBJS=$gltests_libobjs
26307
26308 gltests_LTLIBOBJS=$gltests_ltlibobjs
26309
26310
26311
26312 : ${CONFIG_STATUS=./config.status}
26313 ac_write_fail=0
26314 ac_clean_files_save=$ac_clean_files
26315 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26316 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26317 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26318 as_write_fail=0
26319 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26320 #! $SHELL
26321 # Generated by $as_me.
26322 # Run this file to recreate the current configuration.
26323 # Compiler output produced by configure, useful for debugging
26324 # configure, is in config.log if it exists.
26325
26326 debug=false
26327 ac_cs_recheck=false
26328 ac_cs_silent=false
26329
26330 SHELL=\${CONFIG_SHELL-$SHELL}
26331 export SHELL
26332 _ASEOF
26333 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26334 ## -------------------- ##
26335 ## M4sh Initialization. ##
26336 ## -------------------- ##
26337
26338 # Be more Bourne compatible
26339 DUALCASE=1; export DUALCASE # for MKS sh
26340 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26341 emulate sh
26342 NULLCMD=:
26343 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26344 # is contrary to our usage. Disable this feature.
26345 alias -g '${1+"$@"}'='"$@"'
26346 setopt NO_GLOB_SUBST
26347 else
26348 case `(set -o) 2>/dev/null` in #(
26349 *posix*) :
26350 set -o posix ;; #(
26351 *) :
26352 ;;
26353 esac
26354 fi
26355
26356
26357 as_nl='
26358 '
26359 export as_nl
26360 # Printing a long string crashes Solaris 7 /usr/bin/printf.
26361 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26362 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26363 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26364 # Prefer a ksh shell builtin over an external printf program on Solaris,
26365 # but without wasting forks for bash or zsh.
26366 if test -z "$BASH_VERSION$ZSH_VERSION" \
26367 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26368 as_echo='print -r --'
26369 as_echo_n='print -rn --'
26370 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26371 as_echo='printf %s\n'
26372 as_echo_n='printf %s'
26373 else
26374 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26375 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26376 as_echo_n='/usr/ucb/echo -n'
26377 else
26378 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26379 as_echo_n_body='eval
26380 arg=$1;
26381 case $arg in #(
26382 *"$as_nl"*)
26383 expr "X$arg" : "X\\(.*\\)$as_nl";
26384 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26385 esac;
26386 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26387 '
26388 export as_echo_n_body
26389 as_echo_n='sh -c $as_echo_n_body as_echo'
26390 fi
26391 export as_echo_body
26392 as_echo='sh -c $as_echo_body as_echo'
26393 fi
26394
26395 # The user is always right.
26396 if test "${PATH_SEPARATOR+set}" != set; then
26397 PATH_SEPARATOR=:
26398 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26399 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26400 PATH_SEPARATOR=';'
26401 }
26402 fi
26403
26404
26405 # IFS
26406 # We need space, tab and new line, in precisely that order. Quoting is
26407 # there to prevent editors from complaining about space-tab.
26408 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
26409 # splitting by setting IFS to empty value.)
26410 IFS=" "" $as_nl"
26411
26412 # Find who we are. Look in the path if we contain no directory separator.
26413 case $0 in #((
26414 *[\\/]* ) as_myself=$0 ;;
26415 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26416 for as_dir in $PATH
26417 do
26418 IFS=$as_save_IFS
26419 test -z "$as_dir" && as_dir=.
26420 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26421 done
26422 IFS=$as_save_IFS
26423
26424 ;;
26425 esac
26426 # We did not find ourselves, most probably we were run as `sh COMMAND'
26427 # in which case we are not to be found in the path.
26428 if test "x$as_myself" = x; then
26429 as_myself=$0
26430 fi
26431 if test ! -f "$as_myself"; then
26432 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26433 exit 1
26434 fi
26435
26436 # Unset variables that we do not need and which cause bugs (e.g. in
26437 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
26438 # suppresses any "Segmentation fault" message there. '((' could
26439 # trigger a bug in pdksh 5.2.14.
26440 for as_var in BASH_ENV ENV MAIL MAILPATH
26441 do eval test x\${$as_var+set} = xset \
26442 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26443 done
26444 PS1='$ '
26445 PS2='> '
26446 PS4='+ '
26447
26448 # NLS nuisances.
26449 LC_ALL=C
26450 export LC_ALL
26451 LANGUAGE=C
26452 export LANGUAGE
26453
26454 # CDPATH.
26455 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26456
26457
26458 # as_fn_error ERROR [LINENO LOG_FD]
26459 # ---------------------------------
26460 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26461 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26462 # script with status $?, using 1 if that was 0.
26463 as_fn_error ()
26464 {
26465 as_status=$?; test $as_status -eq 0 && as_status=1
26466 if test "$3"; then
26467 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26468 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
26469 fi
26470 $as_echo "$as_me: error: $1" >&2
26471 as_fn_exit $as_status
26472 } # as_fn_error
26473
26474
26475 # as_fn_set_status STATUS
26476 # -----------------------
26477 # Set $? to STATUS, without forking.
26478 as_fn_set_status ()
26479 {
26480 return $1
26481 } # as_fn_set_status
26482
26483 # as_fn_exit STATUS
26484 # -----------------
26485 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26486 as_fn_exit ()
26487 {
26488 set +e
26489 as_fn_set_status $1
26490 exit $1
26491 } # as_fn_exit
26492
26493 # as_fn_unset VAR
26494 # ---------------
26495 # Portably unset VAR.
26496 as_fn_unset ()
26497 {
26498 { eval $1=; unset $1;}
26499 }
26500 as_unset=as_fn_unset
26501 # as_fn_append VAR VALUE
26502 # ----------------------
26503 # Append the text in VALUE to the end of the definition contained in VAR. Take
26504 # advantage of any shell optimizations that allow amortized linear growth over
26505 # repeated appends, instead of the typical quadratic growth present in naive
26506 # implementations.
26507 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26508 eval 'as_fn_append ()
26509 {
26510 eval $1+=\$2
26511 }'
26512 else
26513 as_fn_append ()
26514 {
26515 eval $1=\$$1\$2
26516 }
26517 fi # as_fn_append
26518
26519 # as_fn_arith ARG...
26520 # ------------------
26521 # Perform arithmetic evaluation on the ARGs, and store the result in the
26522 # global $as_val. Take advantage of shells that can avoid forks. The arguments
26523 # must be portable across $(()) and expr.
26524 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26525 eval 'as_fn_arith ()
26526 {
26527 as_val=$(( $* ))
26528 }'
26529 else
26530 as_fn_arith ()
26531 {
26532 as_val=`expr "$@" || test $? -eq 1`
26533 }
26534 fi # as_fn_arith
26535
26536
26537 if expr a : '\(a\)' >/dev/null 2>&1 &&
26538 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26539 as_expr=expr
26540 else
26541 as_expr=false
26542 fi
26543
26544 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26545 as_basename=basename
26546 else
26547 as_basename=false
26548 fi
26549
26550 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26551 as_dirname=dirname
26552 else
26553 as_dirname=false
26554 fi
26555
26556 as_me=`$as_basename -- "$0" ||
26557 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26558 X"$0" : 'X\(//\)$' \| \
26559 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26560 $as_echo X/"$0" |
26561 sed '/^.*\/\([^/][^/]*\)\/*$/{
26562 s//\1/
26563 q
26564 }
26565 /^X\/\(\/\/\)$/{
26566 s//\1/
26567 q
26568 }
26569 /^X\/\(\/\).*/{
26570 s//\1/
26571 q
26572 }
26573 s/.*/./; q'`
26574
26575 # Avoid depending upon Character Ranges.
26576 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26577 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26578 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26579 as_cr_digits='0123456789'
26580 as_cr_alnum=$as_cr_Letters$as_cr_digits
26581
26582 ECHO_C= ECHO_N= ECHO_T=
26583 case `echo -n x` in #(((((
26584 -n*)
26585 case `echo 'xy\c'` in
26586 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26587 xy) ECHO_C='\c';;
26588 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
26589 ECHO_T=' ';;
26590 esac;;
26591 *)
26592 ECHO_N='-n';;
26593 esac
26594
26595 rm -f conf$$ conf$$.exe conf$$.file
26596 if test -d conf$$.dir; then
26597 rm -f conf$$.dir/conf$$.file
26598 else
26599 rm -f conf$$.dir
26600 mkdir conf$$.dir 2>/dev/null
26601 fi
26602 if (echo >conf$$.file) 2>/dev/null; then
26603 if ln -s conf$$.file conf$$ 2>/dev/null; then
26604 as_ln_s='ln -s'
26605 # ... but there are two gotchas:
26606 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26607 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26608 # In both cases, we have to default to `cp -p'.
26609 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26610 as_ln_s='cp -p'
26611 elif ln conf$$.file conf$$ 2>/dev/null; then
26612 as_ln_s=ln
26613 else
26614 as_ln_s='cp -p'
26615 fi
26616 else
26617 as_ln_s='cp -p'
26618 fi
26619 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26620 rmdir conf$$.dir 2>/dev/null
26621
26622
26623 # as_fn_mkdir_p
26624 # -------------
26625 # Create "$as_dir" as a directory, including parents if necessary.
26626 as_fn_mkdir_p ()
26627 {
26628
26629 case $as_dir in #(
26630 -*) as_dir=./$as_dir;;
26631 esac
26632 test -d "$as_dir" || eval $as_mkdir_p || {
26633 as_dirs=
26634 while :; do
26635 case $as_dir in #(
26636 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26637 *) as_qdir=$as_dir;;
26638 esac
26639 as_dirs="'$as_qdir' $as_dirs"
26640 as_dir=`$as_dirname -- "$as_dir" ||
26641 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26642 X"$as_dir" : 'X\(//\)[^/]' \| \
26643 X"$as_dir" : 'X\(//\)$' \| \
26644 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26645 $as_echo X"$as_dir" |
26646 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26647 s//\1/
26648 q
26649 }
26650 /^X\(\/\/\)[^/].*/{
26651 s//\1/
26652 q
26653 }
26654 /^X\(\/\/\)$/{
26655 s//\1/
26656 q
26657 }
26658 /^X\(\/\).*/{
26659 s//\1/
26660 q
26661 }
26662 s/.*/./; q'`
26663 test -d "$as_dir" && break
26664 done
26665 test -z "$as_dirs" || eval "mkdir $as_dirs"
26666 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
26667
26668
26669 } # as_fn_mkdir_p
26670 if mkdir -p . 2>/dev/null; then
26671 as_mkdir_p='mkdir -p "$as_dir"'
26672 else
26673 test -d ./-p && rmdir ./-p
26674 as_mkdir_p=false
26675 fi
26676
26677 if test -x / >/dev/null 2>&1; then
26678 as_test_x='test -x'
26679 else
26680 if ls -dL / >/dev/null 2>&1; then
26681 as_ls_L_option=L
26682 else
26683 as_ls_L_option=
26684 fi
26685 as_test_x='
26686 eval sh -c '\''
26687 if test -d "$1"; then
26688 test -d "$1/.";
26689 else
26690 case $1 in #(
26691 -*)set "./$1";;
26692 esac;
26693 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
26694 ???[sx]*):;;*)false;;esac;fi
26695 '\'' sh
26696 '
26697 fi
26698 as_executable_p=$as_test_x
26699
26700 # Sed expression to map a string onto a valid CPP name.
26701 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26702
26703 # Sed expression to map a string onto a valid variable name.
26704 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
26705
26706
26707 exec 6>&1
26708 ## ----------------------------------- ##
26709 ## Main body of $CONFIG_STATUS script. ##
26710 ## ----------------------------------- ##
26711 _ASEOF
26712 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
26713
26714 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26715 # Save the log message, to keep $0 and so on meaningful, and to
26716 # report actual input values of CONFIG_FILES etc. instead of their
26717 # values after options handling.
26718 ac_log="
26719 This file was extended by emacs $as_me 24.3.50, which was
26720 generated by GNU Autoconf 2.65. Invocation command line was
26721
26722 CONFIG_FILES = $CONFIG_FILES
26723 CONFIG_HEADERS = $CONFIG_HEADERS
26724 CONFIG_LINKS = $CONFIG_LINKS
26725 CONFIG_COMMANDS = $CONFIG_COMMANDS
26726 $ $0 $@
26727
26728 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26729 "
26730
26731 _ACEOF
26732
26733 case $ac_config_files in *"
26734 "*) set x $ac_config_files; shift; ac_config_files=$*;;
26735 esac
26736
26737 case $ac_config_headers in *"
26738 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26739 esac
26740
26741
26742 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26743 # Files that config.status was made for.
26744 config_files="$ac_config_files"
26745 config_headers="$ac_config_headers"
26746 config_commands="$ac_config_commands"
26747
26748 _ACEOF
26749
26750 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26751 ac_cs_usage="\
26752 \`$as_me' instantiates files and other configuration actions
26753 from templates according to the current configuration. Unless the files
26754 and actions are specified as TAGs, all are instantiated by default.
26755
26756 Usage: $0 [OPTION]... [TAG]...
26757
26758 -h, --help print this help, then exit
26759 -V, --version print version number and configuration settings, then exit
26760 --config print configuration, then exit
26761 -q, --quiet, --silent
26762 do not print progress messages
26763 -d, --debug don't remove temporary files
26764 --recheck update $as_me by reconfiguring in the same conditions
26765 --file=FILE[:TEMPLATE]
26766 instantiate the configuration file FILE
26767 --header=FILE[:TEMPLATE]
26768 instantiate the configuration header FILE
26769
26770 Configuration files:
26771 $config_files
26772
26773 Configuration headers:
26774 $config_headers
26775
26776 Configuration commands:
26777 $config_commands
26778
26779 Report bugs to the package provider."
26780
26781 _ACEOF
26782 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26783 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
26784 ac_cs_version="\\
26785 emacs config.status 24.3.50
26786 configured by $0, generated by GNU Autoconf 2.65,
26787 with options \\"\$ac_cs_config\\"
26788
26789 Copyright (C) 2009 Free Software Foundation, Inc.
26790 This config.status script is free software; the Free Software Foundation
26791 gives unlimited permission to copy, distribute and modify it."
26792
26793 ac_pwd='$ac_pwd'
26794 srcdir='$srcdir'
26795 INSTALL='$INSTALL'
26796 MKDIR_P='$MKDIR_P'
26797 AWK='$AWK'
26798 test -n "\$AWK" || AWK=awk
26799 _ACEOF
26800
26801 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26802 # The default lists apply if the user does not specify any file.
26803 ac_need_defaults=:
26804 while test $# != 0
26805 do
26806 case $1 in
26807 --*=*)
26808 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26809 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26810 ac_shift=:
26811 ;;
26812 *)
26813 ac_option=$1
26814 ac_optarg=$2
26815 ac_shift=shift
26816 ;;
26817 esac
26818
26819 case $ac_option in
26820 # Handling of the options.
26821 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26822 ac_cs_recheck=: ;;
26823 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26824 $as_echo "$ac_cs_version"; exit ;;
26825 --config | --confi | --conf | --con | --co | --c )
26826 $as_echo "$ac_cs_config"; exit ;;
26827 --debug | --debu | --deb | --de | --d | -d )
26828 debug=: ;;
26829 --file | --fil | --fi | --f )
26830 $ac_shift
26831 case $ac_optarg in
26832 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26833 esac
26834 as_fn_append CONFIG_FILES " '$ac_optarg'"
26835 ac_need_defaults=false;;
26836 --header | --heade | --head | --hea )
26837 $ac_shift
26838 case $ac_optarg in
26839 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26840 esac
26841 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
26842 ac_need_defaults=false;;
26843 --he | --h)
26844 # Conflict between --help and --header
26845 as_fn_error "ambiguous option: \`$1'
26846 Try \`$0 --help' for more information.";;
26847 --help | --hel | -h )
26848 $as_echo "$ac_cs_usage"; exit ;;
26849 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26850 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26851 ac_cs_silent=: ;;
26852
26853 # This is an error.
26854 -*) as_fn_error "unrecognized option: \`$1'
26855 Try \`$0 --help' for more information." ;;
26856
26857 *) as_fn_append ac_config_targets " $1"
26858 ac_need_defaults=false ;;
26859
26860 esac
26861 shift
26862 done
26863
26864 ac_configure_extra_args=
26865
26866 if $ac_cs_silent; then
26867 exec 6>/dev/null
26868 ac_configure_extra_args="$ac_configure_extra_args --silent"
26869 fi
26870
26871 _ACEOF
26872 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26873 if \$ac_cs_recheck; then
26874 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26875 shift
26876 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26877 CONFIG_SHELL='$SHELL'
26878 export CONFIG_SHELL
26879 exec "\$@"
26880 fi
26881
26882 _ACEOF
26883 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26884 exec 5>>config.log
26885 {
26886 echo
26887 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26888 ## Running $as_me. ##
26889 _ASBOX
26890 $as_echo "$ac_log"
26891 } >&5
26892
26893 _ACEOF
26894 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26895 #
26896 # INIT-COMMANDS
26897 #
26898 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
26899 GCC="$GCC" CPPFLAGS="$CPPFLAGS"
26900
26901 _ACEOF
26902
26903 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26904
26905 # Handling of arguments.
26906 for ac_config_target in $ac_config_targets
26907 do
26908 case $ac_config_target in
26909 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
26910 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
26911 "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" ;;
26912 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
26913 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
26914 "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" ;;
26915 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26916 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
26917 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
26918 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
26919 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
26920 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
26921 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
26922 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
26923 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
26924 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
26925 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
26926 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
26927 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
26928 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
26929 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
26930 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
26931 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
26932 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
26933
26934 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
26935 esac
26936 done
26937
26938
26939 # If the user did not use the arguments to specify the items to instantiate,
26940 # then the envvar interface is used. Set only those that are not.
26941 # We use the long form for the default assignment because of an extremely
26942 # bizarre bug on SunOS 4.1.3.
26943 if $ac_need_defaults; then
26944 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26945 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26946 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26947 fi
26948
26949 # Have a temporary directory for convenience. Make it in the build tree
26950 # simply because there is no reason against having it here, and in addition,
26951 # creating and moving files from /tmp can sometimes cause problems.
26952 # Hook for its removal unless debugging.
26953 # Note that there is a small window in which the directory will not be cleaned:
26954 # after its creation but before its name has been assigned to `$tmp'.
26955 $debug ||
26956 {
26957 tmp=
26958 trap 'exit_status=$?
26959 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26960 ' 0
26961 trap 'as_fn_exit 1' 1 2 13 15
26962 }
26963 # Create a (secure) tmp directory for tmp files.
26964
26965 {
26966 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
26967 test -n "$tmp" && test -d "$tmp"
26968 } ||
26969 {
26970 tmp=./conf$$-$RANDOM
26971 (umask 077 && mkdir "$tmp")
26972 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
26973
26974 # Set up the scripts for CONFIG_FILES section.
26975 # No need to generate them if there are no CONFIG_FILES.
26976 # This happens for instance with `./config.status config.h'.
26977 if test -n "$CONFIG_FILES"; then
26978
26979 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
26980 ac_cs_awk_getline=:
26981 ac_cs_awk_pipe_init=
26982 ac_cs_awk_read_file='
26983 while ((getline aline < (F[key])) > 0)
26984 print(aline)
26985 close(F[key])'
26986 ac_cs_awk_pipe_fini=
26987 else
26988 ac_cs_awk_getline=false
26989 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
26990 ac_cs_awk_read_file='
26991 print "|#_!!_#|"
26992 print "cat " F[key] " &&"
26993 '$ac_cs_awk_pipe_init
26994 # The final `:' finishes the AND list.
26995 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
26996 fi
26997 ac_cr=`echo X | tr X '\015'`
26998 # On cygwin, bash can eat \r inside `` if the user requested igncr.
26999 # But we know of no other shell where ac_cr would be empty at this
27000 # point, so we can use a bashism as a fallback.
27001 if test "x$ac_cr" = x; then
27002 eval ac_cr=\$\'\\r\'
27003 fi
27004 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27005 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27006 ac_cs_awk_cr='\r'
27007 else
27008 ac_cs_awk_cr=$ac_cr
27009 fi
27010
27011 echo 'BEGIN {' >"$tmp/subs1.awk" &&
27012 _ACEOF
27013
27014 # Create commands to substitute file output variables.
27015 {
27016 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
27017 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
27018 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
27019 echo "_ACAWK" &&
27020 echo "_ACEOF"
27021 } >conf$$files.sh &&
27022 . ./conf$$files.sh ||
27023 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
27024 rm -f conf$$files.sh
27025
27026 {
27027 echo "cat >conf$$subs.awk <<_ACEOF" &&
27028 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27029 echo "_ACEOF"
27030 } >conf$$subs.sh ||
27031 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
27032 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
27033 ac_delim='%!_!# '
27034 for ac_last_try in false false false false false :; do
27035 . ./conf$$subs.sh ||
27036 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
27037
27038 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27039 if test $ac_delim_n = $ac_delim_num; then
27040 break
27041 elif $ac_last_try; then
27042 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
27043 else
27044 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27045 fi
27046 done
27047 rm -f conf$$subs.sh
27048
27049 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27050 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
27051 _ACEOF
27052 sed -n '
27053 h
27054 s/^/S["/; s/!.*/"]=/
27055 p
27056 g
27057 s/^[^!]*!//
27058 :repl
27059 t repl
27060 s/'"$ac_delim"'$//
27061 t delim
27062 :nl
27063 h
27064 s/\(.\{148\}\)..*/\1/
27065 t more1
27066 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27067 p
27068 n
27069 b repl
27070 :more1
27071 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27072 p
27073 g
27074 s/.\{148\}//
27075 t nl
27076 :delim
27077 h
27078 s/\(.\{148\}\)..*/\1/
27079 t more2
27080 s/["\\]/\\&/g; s/^/"/; s/$/"/
27081 p
27082 b
27083 :more2
27084 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27085 p
27086 g
27087 s/.\{148\}//
27088 t delim
27089 ' <conf$$subs.awk | sed '
27090 /^[^""]/{
27091 N
27092 s/\n//
27093 }
27094 ' >>$CONFIG_STATUS || ac_write_fail=1
27095 rm -f conf$$subs.awk
27096 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27097 _ACAWK
27098 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
27099 for (key in S) S_is_set[key] = 1
27100 FS = "\a"
27101 \$ac_cs_awk_pipe_init
27102 }
27103 {
27104 line = $ 0
27105 nfields = split(line, field, "@")
27106 substed = 0
27107 len = length(field[1])
27108 for (i = 2; i < nfields; i++) {
27109 key = field[i]
27110 keylen = length(key)
27111 if (S_is_set[key]) {
27112 value = S[key]
27113 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27114 len += length(value) + length(field[++i])
27115 substed = 1
27116 } else
27117 len += 1 + keylen
27118 }
27119 if (nfields == 3 && !substed) {
27120 key = field[2]
27121 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
27122 \$ac_cs_awk_read_file
27123 next
27124 }
27125 }
27126 print line
27127 }
27128 \$ac_cs_awk_pipe_fini
27129 _ACAWK
27130 _ACEOF
27131 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27132 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27133 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27134 else
27135 cat
27136 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27137 || as_fn_error "could not setup config files machinery" "$LINENO" 5
27138 _ACEOF
27139
27140 # VPATH may cause trouble with some makes, so we remove $(srcdir),
27141 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27142 # trailing colons and then remove the whole line if VPATH becomes empty
27143 # (actually we leave an empty line to preserve line numbers).
27144 if test "x$srcdir" = x.; then
27145 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27146 s/:*\$(srcdir):*/:/
27147 s/:*\${srcdir}:*/:/
27148 s/:*@srcdir@:*/:/
27149 s/^\([^=]*=[ ]*\):*/\1/
27150 s/:*$//
27151 s/^[^=]*=[ ]*$//
27152 }'
27153 fi
27154
27155 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27156 fi # test -n "$CONFIG_FILES"
27157
27158 # Set up the scripts for CONFIG_HEADERS section.
27159 # No need to generate them if there are no CONFIG_HEADERS.
27160 # This happens for instance with `./config.status Makefile'.
27161 if test -n "$CONFIG_HEADERS"; then
27162 cat >"$tmp/defines.awk" <<\_ACAWK ||
27163 BEGIN {
27164 _ACEOF
27165
27166 # Transform confdefs.h into an awk script `defines.awk', embedded as
27167 # here-document in config.status, that substitutes the proper values into
27168 # config.h.in to produce config.h.
27169
27170 # Create a delimiter string that does not exist in confdefs.h, to ease
27171 # handling of long lines.
27172 ac_delim='%!_!# '
27173 for ac_last_try in false false :; do
27174 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
27175 if test -z "$ac_t"; then
27176 break
27177 elif $ac_last_try; then
27178 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
27179 else
27180 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27181 fi
27182 done
27183
27184 # For the awk script, D is an array of macro values keyed by name,
27185 # likewise P contains macro parameters if any. Preserve backslash
27186 # newline sequences.
27187
27188 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27189 sed -n '
27190 s/.\{148\}/&'"$ac_delim"'/g
27191 t rset
27192 :rset
27193 s/^[ ]*#[ ]*define[ ][ ]*/ /
27194 t def
27195 d
27196 :def
27197 s/\\$//
27198 t bsnl
27199 s/["\\]/\\&/g
27200 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27201 D["\1"]=" \3"/p
27202 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
27203 d
27204 :bsnl
27205 s/["\\]/\\&/g
27206 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27207 D["\1"]=" \3\\\\\\n"\\/p
27208 t cont
27209 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27210 t cont
27211 d
27212 :cont
27213 n
27214 s/.\{148\}/&'"$ac_delim"'/g
27215 t clear
27216 :clear
27217 s/\\$//
27218 t bsnlc
27219 s/["\\]/\\&/g; s/^/"/; s/$/"/p
27220 d
27221 :bsnlc
27222 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27223 b cont
27224 ' <confdefs.h | sed '
27225 s/'"$ac_delim"'/"\\\
27226 "/g' >>$CONFIG_STATUS || ac_write_fail=1
27227
27228 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27229 for (key in D) D_is_set[key] = 1
27230 FS = "\a"
27231 }
27232 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27233 line = \$ 0
27234 split(line, arg, " ")
27235 if (arg[1] == "#") {
27236 defundef = arg[2]
27237 mac1 = arg[3]
27238 } else {
27239 defundef = substr(arg[1], 2)
27240 mac1 = arg[2]
27241 }
27242 split(mac1, mac2, "(") #)
27243 macro = mac2[1]
27244 prefix = substr(line, 1, index(line, defundef) - 1)
27245 if (D_is_set[macro]) {
27246 # Preserve the white space surrounding the "#".
27247 print prefix "define", macro P[macro] D[macro]
27248 next
27249 } else {
27250 # Replace #undef with comments. This is necessary, for example,
27251 # in the case of _POSIX_SOURCE, which is predefined and required
27252 # on some systems where configure will not decide to define it.
27253 if (defundef == "undef") {
27254 print "/*", prefix defundef, macro, "*/"
27255 next
27256 }
27257 }
27258 }
27259 { print }
27260 _ACAWK
27261 _ACEOF
27262 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27263 as_fn_error "could not setup config headers machinery" "$LINENO" 5
27264 fi # test -n "$CONFIG_HEADERS"
27265
27266
27267 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
27268 shift
27269 for ac_tag
27270 do
27271 case $ac_tag in
27272 :[FHLC]) ac_mode=$ac_tag; continue;;
27273 esac
27274 case $ac_mode$ac_tag in
27275 :[FHL]*:*);;
27276 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
27277 :[FH]-) ac_tag=-:-;;
27278 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27279 esac
27280 ac_save_IFS=$IFS
27281 IFS=:
27282 set x $ac_tag
27283 IFS=$ac_save_IFS
27284 shift
27285 ac_file=$1
27286 shift
27287
27288 case $ac_mode in
27289 :L) ac_source=$1;;
27290 :[FH])
27291 ac_file_inputs=
27292 for ac_f
27293 do
27294 case $ac_f in
27295 -) ac_f="$tmp/stdin";;
27296 *) # Look for the file first in the build tree, then in the source tree
27297 # (if the path is not absolute). The absolute path cannot be DOS-style,
27298 # because $ac_f cannot contain `:'.
27299 test -f "$ac_f" ||
27300 case $ac_f in
27301 [\\/$]*) false;;
27302 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27303 esac ||
27304 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
27305 esac
27306 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27307 as_fn_append ac_file_inputs " '$ac_f'"
27308 done
27309
27310 # Let's still pretend it is `configure' which instantiates (i.e., don't
27311 # use $as_me), people would be surprised to read:
27312 # /* config.h. Generated by config.status. */
27313 configure_input='Generated from '`
27314 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27315 `' by configure.'
27316 if test x"$ac_file" != x-; then
27317 configure_input="$ac_file. $configure_input"
27318 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27319 $as_echo "$as_me: creating $ac_file" >&6;}
27320 fi
27321 # Neutralize special characters interpreted by sed in replacement strings.
27322 case $configure_input in #(
27323 *\&* | *\|* | *\\* )
27324 ac_sed_conf_input=`$as_echo "$configure_input" |
27325 sed 's/[\\\\&|]/\\\\&/g'`;; #(
27326 *) ac_sed_conf_input=$configure_input;;
27327 esac
27328
27329 case $ac_tag in
27330 *:-:* | *:-) cat >"$tmp/stdin" \
27331 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
27332 esac
27333 ;;
27334 esac
27335
27336 ac_dir=`$as_dirname -- "$ac_file" ||
27337 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27338 X"$ac_file" : 'X\(//\)[^/]' \| \
27339 X"$ac_file" : 'X\(//\)$' \| \
27340 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27341 $as_echo X"$ac_file" |
27342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27343 s//\1/
27344 q
27345 }
27346 /^X\(\/\/\)[^/].*/{
27347 s//\1/
27348 q
27349 }
27350 /^X\(\/\/\)$/{
27351 s//\1/
27352 q
27353 }
27354 /^X\(\/\).*/{
27355 s//\1/
27356 q
27357 }
27358 s/.*/./; q'`
27359 as_dir="$ac_dir"; as_fn_mkdir_p
27360 ac_builddir=.
27361
27362 case "$ac_dir" in
27363 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27364 *)
27365 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
27366 # A ".." for each directory in $ac_dir_suffix.
27367 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27368 case $ac_top_builddir_sub in
27369 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27370 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27371 esac ;;
27372 esac
27373 ac_abs_top_builddir=$ac_pwd
27374 ac_abs_builddir=$ac_pwd$ac_dir_suffix
27375 # for backward compatibility:
27376 ac_top_builddir=$ac_top_build_prefix
27377
27378 case $srcdir in
27379 .) # We are building in place.
27380 ac_srcdir=.
27381 ac_top_srcdir=$ac_top_builddir_sub
27382 ac_abs_top_srcdir=$ac_pwd ;;
27383 [\\/]* | ?:[\\/]* ) # Absolute name.
27384 ac_srcdir=$srcdir$ac_dir_suffix;
27385 ac_top_srcdir=$srcdir
27386 ac_abs_top_srcdir=$srcdir ;;
27387 *) # Relative name.
27388 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27389 ac_top_srcdir=$ac_top_build_prefix$srcdir
27390 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27391 esac
27392 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27393
27394
27395 case $ac_mode in
27396 :F)
27397 #
27398 # CONFIG_FILE
27399 #
27400
27401 case $INSTALL in
27402 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27403 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
27404 esac
27405 ac_MKDIR_P=$MKDIR_P
27406 case $MKDIR_P in
27407 [\\/$]* | ?:[\\/]* ) ;;
27408 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
27409 esac
27410 _ACEOF
27411
27412 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27413 # If the template does not know about datarootdir, expand it.
27414 # FIXME: This hack should be removed a few years after 2.60.
27415 ac_datarootdir_hack=; ac_datarootdir_seen=
27416 ac_sed_dataroot='
27417 /datarootdir/ {
27418 p
27419 q
27420 }
27421 /@datadir@/p
27422 /@docdir@/p
27423 /@infodir@/p
27424 /@localedir@/p
27425 /@mandir@/p'
27426 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27427 *datarootdir*) ac_datarootdir_seen=yes;;
27428 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27430 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27431 _ACEOF
27432 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27433 ac_datarootdir_hack='
27434 s&@datadir@&$datadir&g
27435 s&@docdir@&$docdir&g
27436 s&@infodir@&$infodir&g
27437 s&@localedir@&$localedir&g
27438 s&@mandir@&$mandir&g
27439 s&\\\${datarootdir}&$datarootdir&g' ;;
27440 esac
27441 _ACEOF
27442
27443 # Neutralize VPATH when `$srcdir' = `.'.
27444 # Shell code in configure.ac might set extrasub.
27445 # FIXME: do we really want to maintain this feature?
27446 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27447 ac_sed_extra="$ac_vpsub
27448 $extrasub
27449 _ACEOF
27450 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27451 :t
27452 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27453 s|@configure_input@|$ac_sed_conf_input|;t t
27454 s&@top_builddir@&$ac_top_builddir_sub&;t t
27455 s&@top_build_prefix@&$ac_top_build_prefix&;t t
27456 s&@srcdir@&$ac_srcdir&;t t
27457 s&@abs_srcdir@&$ac_abs_srcdir&;t t
27458 s&@top_srcdir@&$ac_top_srcdir&;t t
27459 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27460 s&@builddir@&$ac_builddir&;t t
27461 s&@abs_builddir@&$ac_abs_builddir&;t t
27462 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27463 s&@INSTALL@&$ac_INSTALL&;t t
27464 s&@MKDIR_P@&$ac_MKDIR_P&;t t
27465 $ac_datarootdir_hack
27466 "
27467 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
27468 if $ac_cs_awk_getline; then
27469 $AWK -f "$tmp/subs.awk"
27470 else
27471 $AWK -f "$tmp/subs.awk" | $SHELL
27472 fi >$tmp/out \
27473 || as_fn_error "could not create $ac_file" "$LINENO" 5
27474
27475 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27476 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27477 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
27478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27479 which seems to be undefined. Please make sure it is defined." >&5
27480 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27481 which seems to be undefined. Please make sure it is defined." >&2;}
27482
27483 rm -f "$tmp/stdin"
27484 case $ac_file in
27485 -) cat "$tmp/out" && rm -f "$tmp/out";;
27486 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27487 esac \
27488 || as_fn_error "could not create $ac_file" "$LINENO" 5
27489 ;;
27490 :H)
27491 #
27492 # CONFIG_HEADER
27493 #
27494 if test x"$ac_file" != x-; then
27495 {
27496 $as_echo "/* $configure_input */" \
27497 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27498 } >"$tmp/config.h" \
27499 || as_fn_error "could not create $ac_file" "$LINENO" 5
27500 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27501 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27502 $as_echo "$as_me: $ac_file is unchanged" >&6;}
27503 else
27504 rm -f "$ac_file"
27505 mv "$tmp/config.h" "$ac_file" \
27506 || as_fn_error "could not create $ac_file" "$LINENO" 5
27507 fi
27508 else
27509 $as_echo "/* $configure_input */" \
27510 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27511 || as_fn_error "could not create -" "$LINENO" 5
27512 fi
27513 # Compute "$ac_file"'s index in $config_headers.
27514 _am_arg="$ac_file"
27515 _am_stamp_count=1
27516 for _am_header in $config_headers :; do
27517 case $_am_header in
27518 $_am_arg | $_am_arg:* )
27519 break ;;
27520 * )
27521 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
27522 esac
27523 done
27524 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
27525 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27526 X"$_am_arg" : 'X\(//\)[^/]' \| \
27527 X"$_am_arg" : 'X\(//\)$' \| \
27528 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
27529 $as_echo X"$_am_arg" |
27530 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27531 s//\1/
27532 q
27533 }
27534 /^X\(\/\/\)[^/].*/{
27535 s//\1/
27536 q
27537 }
27538 /^X\(\/\/\)$/{
27539 s//\1/
27540 q
27541 }
27542 /^X\(\/\).*/{
27543 s//\1/
27544 q
27545 }
27546 s/.*/./; q'`/stamp-h$_am_stamp_count
27547 ;;
27548
27549 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
27550 $as_echo "$as_me: executing $ac_file commands" >&6;}
27551 ;;
27552 esac
27553
27554
27555 case $ac_file$ac_mode in
27556 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
27557 # Autoconf 2.62 quotes --file arguments for eval, but not when files
27558 # are listed without --file. Let's play safe and only enable the eval
27559 # if we detect the quoting.
27560 case $CONFIG_FILES in
27561 *\'*) eval set x "$CONFIG_FILES" ;;
27562 *) set x $CONFIG_FILES ;;
27563 esac
27564 shift
27565 for mf
27566 do
27567 # Strip MF so we end up with the name of the file.
27568 mf=`echo "$mf" | sed -e 's/:.*$//'`
27569 # Check whether this is an Automake generated Makefile or not.
27570 # We used to match only the files named `Makefile.in', but
27571 # some people rename them; so instead we look at the file content.
27572 # Grep'ing the first line is not enough: some people post-process
27573 # each Makefile.in and add a new line on top of each file to say so.
27574 # Grep'ing the whole file is not good either: AIX grep has a line
27575 # limit of 2048, but all sed's we know have understand at least 4000.
27576 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
27577 dirpart=`$as_dirname -- "$mf" ||
27578 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27579 X"$mf" : 'X\(//\)[^/]' \| \
27580 X"$mf" : 'X\(//\)$' \| \
27581 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
27582 $as_echo X"$mf" |
27583 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27584 s//\1/
27585 q
27586 }
27587 /^X\(\/\/\)[^/].*/{
27588 s//\1/
27589 q
27590 }
27591 /^X\(\/\/\)$/{
27592 s//\1/
27593 q
27594 }
27595 /^X\(\/\).*/{
27596 s//\1/
27597 q
27598 }
27599 s/.*/./; q'`
27600 else
27601 continue
27602 fi
27603 # Extract the definition of DEPDIR, am__include, and am__quote
27604 # from the Makefile without running `make'.
27605 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
27606 test -z "$DEPDIR" && continue
27607 am__include=`sed -n 's/^am__include = //p' < "$mf"`
27608 test -z "am__include" && continue
27609 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
27610 # When using ansi2knr, U may be empty or an underscore; expand it
27611 U=`sed -n 's/^U = //p' < "$mf"`
27612 # Find all dependency output files, they are included files with
27613 # $(DEPDIR) in their names. We invoke sed twice because it is the
27614 # simplest approach to changing $(DEPDIR) to its actual value in the
27615 # expansion.
27616 for file in `sed -n "
27617 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
27618 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
27619 # Make sure the directory exists.
27620 test -f "$dirpart/$file" && continue
27621 fdir=`$as_dirname -- "$file" ||
27622 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27623 X"$file" : 'X\(//\)[^/]' \| \
27624 X"$file" : 'X\(//\)$' \| \
27625 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
27626 $as_echo X"$file" |
27627 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27628 s//\1/
27629 q
27630 }
27631 /^X\(\/\/\)[^/].*/{
27632 s//\1/
27633 q
27634 }
27635 /^X\(\/\/\)$/{
27636 s//\1/
27637 q
27638 }
27639 /^X\(\/\).*/{
27640 s//\1/
27641 q
27642 }
27643 s/.*/./; q'`
27644 as_dir=$dirpart/$fdir; as_fn_mkdir_p
27645 # echo "creating $dirpart/$file"
27646 echo '# dummy' > "$dirpart/$file"
27647 done
27648 done
27649 }
27650 ;;
27651 "mkdirs":C)
27652 for dir in etc lisp ; do
27653 test -d ${dir} || mkdir ${dir}
27654 done
27655 ;;
27656 "epaths":C)
27657 echo creating src/epaths.h
27658 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
27659 ;;
27660 "gdbinit":C)
27661 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
27662 echo creating src/.gdbinit
27663 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
27664 fi
27665 ;;
27666
27667 esac
27668 done # for ac_tag
27669
27670
27671 as_fn_exit 0
27672 _ACEOF
27673 ac_clean_files=$ac_clean_files_save
27674
27675 test $ac_write_fail = 0 ||
27676 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
27677
27678
27679 # configure is writing to config.log, and then calls config.status.
27680 # config.status does its own redirection, appending to config.log.
27681 # Unfortunately, on DOS this fails, as config.log is still kept open
27682 # by configure, so config.status won't be able to write to it; its
27683 # output is simply discarded. So we exec the FD to /dev/null,
27684 # effectively closing config.log, so it can be properly (re)opened and
27685 # appended to by config.status. When coming back to configure, we
27686 # need to make the FD available again.
27687 if test "$no_create" != yes; then
27688 ac_cs_success=:
27689 ac_config_status_args=
27690 test "$silent" = yes &&
27691 ac_config_status_args="$ac_config_status_args --quiet"
27692 exec 5>/dev/null
27693 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27694 exec 5>>config.log
27695 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27696 # would make configure fail if this is the last instruction.
27697 $ac_cs_success || as_fn_exit $?
27698 fi
27699 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27701 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27702 fi
27703