Auto-commit of generated files.
[bpt/emacs.git] / autogen / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.65 for emacs 24.3.50.
4 #
5 #
6 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8 # Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26 else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52 else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" "" $as_nl"
90
91 # Find who we are. Look in the path if we contain no directory separator.
92 case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101 IFS=$as_save_IFS
102
103 ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108 as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there. '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136 if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144 else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150 esac
151 fi
152 "
153 as_required="as_fn_return () { (exit \$1); }
154 as_fn_success () { as_fn_return 0; }
155 as_fn_failure () { as_fn_return 1; }
156 as_fn_ret_success () { return 0; }
157 as_fn_ret_failure () { return 1; }
158
159 exitcode=0
160 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166 else
167 exitcode=1; echo positional parameters were not saved.
168 fi
169 test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174 test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177 else
178 as_have_required=no
179 fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182 else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184 as_found=false
185 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186 do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200 fi
201 fi
202 done;;
203 esac
204 as_found=false
205 done
206 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209 fi; }
210 IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
222 fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232 $0: including any error possibly output before this
233 $0: message. Then install a modern shell, or manually run
234 $0: the script under such a shell if you do have one."
235 fi
236 exit 1
237 fi
238 fi
239 fi
240 SHELL=${CONFIG_SHELL-/bin/sh}
241 export SHELL
242 # Unset more variables known to interfere with behavior of common tools.
243 CLICOLOR_FORCE= GREP_OPTIONS=
244 unset CLICOLOR_FORCE GREP_OPTIONS
245
246 ## --------------------- ##
247 ## M4sh Shell Functions. ##
248 ## --------------------- ##
249 # as_fn_unset VAR
250 # ---------------
251 # Portably unset VAR.
252 as_fn_unset ()
253 {
254 { eval $1=; unset $1;}
255 }
256 as_unset=as_fn_unset
257
258 # as_fn_set_status STATUS
259 # -----------------------
260 # Set $? to STATUS, without forking.
261 as_fn_set_status ()
262 {
263 return $1
264 } # as_fn_set_status
265
266 # as_fn_exit STATUS
267 # -----------------
268 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269 as_fn_exit ()
270 {
271 set +e
272 as_fn_set_status $1
273 exit $1
274 } # as_fn_exit
275
276 # as_fn_mkdir_p
277 # -------------
278 # Create "$as_dir" as a directory, including parents if necessary.
279 as_fn_mkdir_p ()
280 {
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298 $as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
320
321
322 } # as_fn_mkdir_p
323 # as_fn_append VAR VALUE
324 # ----------------------
325 # Append the text in VALUE to the end of the definition contained in VAR. Take
326 # advantage of any shell optimizations that allow amortized linear growth over
327 # repeated appends, instead of the typical quadratic growth present in naive
328 # implementations.
329 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334 else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339 fi # as_fn_append
340
341 # as_fn_arith ARG...
342 # ------------------
343 # Perform arithmetic evaluation on the ARGs, and store the result in the
344 # global $as_val. Take advantage of shells that can avoid forks. The arguments
345 # must be portable across $(()) and expr.
346 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351 else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356 fi # as_fn_arith
357
358
359 # as_fn_error ERROR [LINENO LOG_FD]
360 # ---------------------------------
361 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363 # script with status $?, using 1 if that was 0.
364 as_fn_error ()
365 {
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
370 fi
371 $as_echo "$as_me: error: $1" >&2
372 as_fn_exit $as_status
373 } # as_fn_error
374
375 if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
377 as_expr=expr
378 else
379 as_expr=false
380 fi
381
382 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383 as_basename=basename
384 else
385 as_basename=false
386 fi
387
388 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390 else
391 as_dirname=false
392 fi
393
394 as_me=`$as_basename -- "$0" ||
395 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
398 $as_echo X/"$0" |
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
412
413 # Avoid depending upon Character Ranges.
414 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417 as_cr_digits='0123456789'
418 as_cr_alnum=$as_cr_Letters$as_cr_digits
419
420
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
443
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
450 }
451
452 ECHO_C= ECHO_N= ECHO_T=
453 case `echo -n x` in #(((((
454 -n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461 *)
462 ECHO_N='-n';;
463 esac
464
465 rm -f conf$$ conf$$.exe conf$$.file
466 if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468 else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
471 fi
472 if (echo >conf$$.file) 2>/dev/null; then
473 if ln -s conf$$.file conf$$ 2>/dev/null; then
474 as_ln_s='ln -s'
475 # ... but there are two gotchas:
476 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
477 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
478 # In both cases, we have to default to `cp -p'.
479 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
480 as_ln_s='cp -p'
481 elif ln conf$$.file conf$$ 2>/dev/null; then
482 as_ln_s=ln
483 else
484 as_ln_s='cp -p'
485 fi
486 else
487 as_ln_s='cp -p'
488 fi
489 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490 rmdir conf$$.dir 2>/dev/null
491
492 if mkdir -p . 2>/dev/null; then
493 as_mkdir_p='mkdir -p "$as_dir"'
494 else
495 test -d ./-p && rmdir ./-p
496 as_mkdir_p=false
497 fi
498
499 if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
501 else
502 if ls -dL / >/dev/null 2>&1; then
503 as_ls_L_option=L
504 else
505 as_ls_L_option=
506 fi
507 as_test_x='
508 eval sh -c '\''
509 if test -d "$1"; then
510 test -d "$1/.";
511 else
512 case $1 in #(
513 -*)set "./$1";;
514 esac;
515 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516 ???[sx]*):;;*)false;;esac;fi
517 '\'' sh
518 '
519 fi
520 as_executable_p=$as_test_x
521
522 # Sed expression to map a string onto a valid CPP name.
523 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524
525 # Sed expression to map a string onto a valid variable name.
526 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529 test -n "$DJDIR" || exec 7<&0 </dev/null
530 exec 6>&1
531
532 # Name of the host.
533 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
534 # so uname gets run too.
535 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
537 #
538 # Initializations.
539 #
540 ac_default_prefix=/usr/local
541 ac_clean_files=
542 ac_config_libobj_dir=.
543 LIBOBJS=
544 cross_compiling=no
545 subdirs=
546 MFLAGS=
547 MAKEFLAGS=
548
549 # Identity of this package.
550 PACKAGE_NAME='emacs'
551 PACKAGE_TARNAME='emacs'
552 PACKAGE_VERSION='24.3.50'
553 PACKAGE_STRING='emacs 24.3.50'
554 PACKAGE_BUGREPORT=''
555 PACKAGE_URL=''
556
557 ac_unique_file="src/lisp.h"
558 # Factoring default headers for most tests.
559 ac_includes_default="\
560 #include <stdio.h>
561 #ifdef HAVE_SYS_TYPES_H
562 # include <sys/types.h>
563 #endif
564 #ifdef HAVE_SYS_STAT_H
565 # include <sys/stat.h>
566 #endif
567 #ifdef STDC_HEADERS
568 # include <stdlib.h>
569 # include <stddef.h>
570 #else
571 # ifdef HAVE_STDLIB_H
572 # include <stdlib.h>
573 # endif
574 #endif
575 #ifdef HAVE_STRING_H
576 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577 # include <memory.h>
578 # endif
579 # include <string.h>
580 #endif
581 #ifdef HAVE_STRINGS_H
582 # include <strings.h>
583 #endif
584 #ifdef HAVE_INTTYPES_H
585 # include <inttypes.h>
586 #endif
587 #ifdef HAVE_STDINT_H
588 # include <stdint.h>
589 #endif
590 #ifdef HAVE_UNISTD_H
591 # include <unistd.h>
592 #endif"
593
594 ac_header_list=
595 ac_func_list=
596 gl_getopt_required=POSIX
597 gl_getopt_required=POSIX
598 ac_subst_vars='gltests_LTLIBOBJS
599 gltests_LIBOBJS
600 gl_LTLIBOBJS
601 gl_LIBOBJS
602 am__EXEEXT_FALSE
603 am__EXEEXT_TRUE
604 LTLIBOBJS
605 LIBOBJS
606 SUBDIR_MAKEFILES_IN
607 WINDOW_SYSTEM_OBJ
608 EMACS_HEAPSIZE
609 TEMACS_POST_LINK
610 ADDSECTION
611 LD_SWITCH_SYSTEM_TEMACS
612 LIBGNU_LTLIBDEPS
613 LIBGNU_LIBDEPS
614 gltests_WITNESS
615 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
616 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
617 gl_GNULIB_ENABLED_verify_FALSE
618 gl_GNULIB_ENABLED_verify_TRUE
619 gl_GNULIB_ENABLED_strtoull_FALSE
620 gl_GNULIB_ENABLED_strtoull_TRUE
621 gl_GNULIB_ENABLED_strtoll_FALSE
622 gl_GNULIB_ENABLED_strtoll_TRUE
623 gl_GNULIB_ENABLED_stat_FALSE
624 gl_GNULIB_ENABLED_stat_TRUE
625 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
626 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
627 gl_GNULIB_ENABLED_pathmax_FALSE
628 gl_GNULIB_ENABLED_pathmax_TRUE
629 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
630 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
631 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
632 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
633 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
634 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
635 gl_GNULIB_ENABLED_getgroups_FALSE
636 gl_GNULIB_ENABLED_getgroups_TRUE
637 gl_GNULIB_ENABLED_euidaccess_FALSE
638 gl_GNULIB_ENABLED_euidaccess_TRUE
639 gl_GNULIB_ENABLED_dosname_FALSE
640 gl_GNULIB_ENABLED_dosname_TRUE
641 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
642 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
643 LTLIBINTL
644 LIBINTL
645 LIB_EACCESS
646 WINDOWS_64_BIT_OFF_T
647 HAVE_UNISTD_H
648 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
649 NEXT_UNISTD_H
650 LIB_TIMER_TIME
651 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
652 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
653 TIME_H_DEFINES_STRUCT_TIMESPEC
654 NEXT_AS_FIRST_DIRECTIVE_TIME_H
655 NEXT_TIME_H
656 WINDOWS_64_BIT_ST_SIZE
657 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
658 NEXT_SYS_STAT_H
659 NEXT_AS_FIRST_DIRECTIVE_STRING_H
660 NEXT_STRING_H
661 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
662 NEXT_STDLIB_H
663 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
664 NEXT_STDIO_H
665 REPLACE_VSPRINTF
666 REPLACE_VSNPRINTF
667 REPLACE_VPRINTF
668 REPLACE_VFPRINTF
669 REPLACE_VDPRINTF
670 REPLACE_VASPRINTF
671 REPLACE_TMPFILE
672 REPLACE_STDIO_WRITE_FUNCS
673 REPLACE_STDIO_READ_FUNCS
674 REPLACE_SPRINTF
675 REPLACE_SNPRINTF
676 REPLACE_RENAMEAT
677 REPLACE_RENAME
678 REPLACE_REMOVE
679 REPLACE_PRINTF
680 REPLACE_POPEN
681 REPLACE_PERROR
682 REPLACE_OBSTACK_PRINTF
683 REPLACE_GETLINE
684 REPLACE_GETDELIM
685 REPLACE_FTELLO
686 REPLACE_FTELL
687 REPLACE_FSEEKO
688 REPLACE_FSEEK
689 REPLACE_FREOPEN
690 REPLACE_FPURGE
691 REPLACE_FPRINTF
692 REPLACE_FOPEN
693 REPLACE_FFLUSH
694 REPLACE_FDOPEN
695 REPLACE_FCLOSE
696 REPLACE_DPRINTF
697 HAVE_VDPRINTF
698 HAVE_VASPRINTF
699 HAVE_RENAMEAT
700 HAVE_POPEN
701 HAVE_PCLOSE
702 HAVE_FTELLO
703 HAVE_FSEEKO
704 HAVE_DPRINTF
705 HAVE_DECL_VSNPRINTF
706 HAVE_DECL_SNPRINTF
707 HAVE_DECL_OBSTACK_PRINTF
708 HAVE_DECL_GETLINE
709 HAVE_DECL_GETDELIM
710 HAVE_DECL_FTELLO
711 HAVE_DECL_FSEEKO
712 HAVE_DECL_FPURGE
713 GNULIB_VSPRINTF_POSIX
714 GNULIB_VSNPRINTF
715 GNULIB_VPRINTF_POSIX
716 GNULIB_VPRINTF
717 GNULIB_VFPRINTF_POSIX
718 GNULIB_VFPRINTF
719 GNULIB_VDPRINTF
720 GNULIB_VSCANF
721 GNULIB_VFSCANF
722 GNULIB_VASPRINTF
723 GNULIB_TMPFILE
724 GNULIB_STDIO_H_SIGPIPE
725 GNULIB_STDIO_H_NONBLOCKING
726 GNULIB_SPRINTF_POSIX
727 GNULIB_SNPRINTF
728 GNULIB_SCANF
729 GNULIB_RENAMEAT
730 GNULIB_RENAME
731 GNULIB_REMOVE
732 GNULIB_PUTS
733 GNULIB_PUTCHAR
734 GNULIB_PUTC
735 GNULIB_PRINTF_POSIX
736 GNULIB_PRINTF
737 GNULIB_POPEN
738 GNULIB_PERROR
739 GNULIB_PCLOSE
740 GNULIB_OBSTACK_PRINTF_POSIX
741 GNULIB_OBSTACK_PRINTF
742 GNULIB_GETLINE
743 GNULIB_GETDELIM
744 GNULIB_GETCHAR
745 GNULIB_GETC
746 GNULIB_FWRITE
747 GNULIB_FTELLO
748 GNULIB_FTELL
749 GNULIB_FSEEKO
750 GNULIB_FSEEK
751 GNULIB_FSCANF
752 GNULIB_FREOPEN
753 GNULIB_FREAD
754 GNULIB_FPUTS
755 GNULIB_FPUTC
756 GNULIB_FPURGE
757 GNULIB_FPRINTF_POSIX
758 GNULIB_FPRINTF
759 GNULIB_FOPEN
760 GNULIB_FGETS
761 GNULIB_FGETC
762 GNULIB_FFLUSH
763 GNULIB_FDOPEN
764 GNULIB_FCLOSE
765 GNULIB_DPRINTF
766 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
767 NEXT_STDDEF_H
768 GL_GENERATE_STDDEF_H_FALSE
769 GL_GENERATE_STDDEF_H_TRUE
770 STDDEF_H
771 HAVE_WCHAR_T
772 REPLACE_NULL
773 HAVE__BOOL
774 GL_GENERATE_STDBOOL_H_FALSE
775 GL_GENERATE_STDBOOL_H_TRUE
776 STDBOOL_H
777 GL_GENERATE_STDARG_H_FALSE
778 GL_GENERATE_STDARG_H_TRUE
779 STDARG_H
780 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
781 NEXT_STDARG_H
782 GL_GENERATE_STDALIGN_H_FALSE
783 GL_GENERATE_STDALIGN_H_TRUE
784 STDALIGN_H
785 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
786 NEXT_SIGNAL_H
787 USE_ACL
788 LIB_ACL
789 LIB_PTHREAD_SIGMASK
790 REPLACE_RAISE
791 REPLACE_PTHREAD_SIGMASK
792 HAVE_SIGHANDLER_T
793 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
794 HAVE_STRUCT_SIGACTION_SA_SIGACTION
795 HAVE_SIGACTION
796 HAVE_SIGINFO_T
797 HAVE_SIGSET_T
798 HAVE_RAISE
799 HAVE_PTHREAD_SIGMASK
800 HAVE_POSIX_SIGNALBLOCKING
801 GNULIB_SIGACTION
802 GNULIB_SIGPROCMASK
803 GNULIB_SIGNAL_H_SIGPIPE
804 GNULIB_RAISE
805 GNULIB_PTHREAD_SIGMASK
806 HAVE_SYS_SELECT_H
807 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
808 NEXT_SYS_SELECT_H
809 REPLACE_SELECT
810 REPLACE_PSELECT
811 HAVE_PSELECT
812 GNULIB_SELECT
813 GNULIB_PSELECT
814 REPLACE_TIMEGM
815 REPLACE_NANOSLEEP
816 REPLACE_MKTIME
817 REPLACE_LOCALTIME_R
818 HAVE_TIMEGM
819 HAVE_STRPTIME
820 HAVE_NANOSLEEP
821 HAVE_DECL_LOCALTIME_R
822 GNULIB_TIME_R
823 GNULIB_TIMEGM
824 GNULIB_STRPTIME
825 GNULIB_NANOSLEEP
826 GNULIB_MKTIME
827 UNDEFINE_STRTOK_R
828 REPLACE_STRTOK_R
829 REPLACE_STRSIGNAL
830 REPLACE_STRNLEN
831 REPLACE_STRNDUP
832 REPLACE_STRNCAT
833 REPLACE_STRERROR_R
834 REPLACE_STRERROR
835 REPLACE_STRCHRNUL
836 REPLACE_STRCASESTR
837 REPLACE_STRSTR
838 REPLACE_STRDUP
839 REPLACE_STPNCPY
840 REPLACE_MEMMEM
841 REPLACE_MEMCHR
842 HAVE_STRVERSCMP
843 HAVE_DECL_STRSIGNAL
844 HAVE_DECL_STRERROR_R
845 HAVE_DECL_STRTOK_R
846 HAVE_STRCASESTR
847 HAVE_STRSEP
848 HAVE_STRPBRK
849 HAVE_DECL_STRNLEN
850 HAVE_DECL_STRNDUP
851 HAVE_DECL_STRDUP
852 HAVE_STRCHRNUL
853 HAVE_STPNCPY
854 HAVE_STPCPY
855 HAVE_RAWMEMCHR
856 HAVE_DECL_MEMRCHR
857 HAVE_MEMPCPY
858 HAVE_DECL_MEMMEM
859 HAVE_MEMCHR
860 HAVE_FFSLL
861 HAVE_FFSL
862 HAVE_MBSLEN
863 GNULIB_STRVERSCMP
864 GNULIB_STRSIGNAL
865 GNULIB_STRERROR_R
866 GNULIB_STRERROR
867 GNULIB_MBSTOK_R
868 GNULIB_MBSSEP
869 GNULIB_MBSSPN
870 GNULIB_MBSPBRK
871 GNULIB_MBSCSPN
872 GNULIB_MBSCASESTR
873 GNULIB_MBSPCASECMP
874 GNULIB_MBSNCASECMP
875 GNULIB_MBSCASECMP
876 GNULIB_MBSSTR
877 GNULIB_MBSRCHR
878 GNULIB_MBSCHR
879 GNULIB_MBSNLEN
880 GNULIB_MBSLEN
881 GNULIB_STRTOK_R
882 GNULIB_STRCASESTR
883 GNULIB_STRSTR
884 GNULIB_STRSEP
885 GNULIB_STRPBRK
886 GNULIB_STRNLEN
887 GNULIB_STRNDUP
888 GNULIB_STRNCAT
889 GNULIB_STRDUP
890 GNULIB_STRCHRNUL
891 GNULIB_STPNCPY
892 GNULIB_STPCPY
893 GNULIB_RAWMEMCHR
894 GNULIB_MEMRCHR
895 GNULIB_MEMPCPY
896 GNULIB_MEMMEM
897 GNULIB_MEMCHR
898 GNULIB_FFSLL
899 GNULIB_FFSL
900 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
901 NEXT_INTTYPES_H
902 UINT64_MAX_EQ_ULONG_MAX
903 UINT32_MAX_LT_UINTMAX_MAX
904 PRIPTR_PREFIX
905 PRI_MACROS_BROKEN
906 INT64_MAX_EQ_LONG_MAX
907 INT32_MAX_LT_INTMAX_MAX
908 REPLACE_STRTOIMAX
909 HAVE_DECL_STRTOUMAX
910 HAVE_DECL_STRTOIMAX
911 HAVE_DECL_IMAXDIV
912 HAVE_DECL_IMAXABS
913 GNULIB_STRTOUMAX
914 GNULIB_STRTOIMAX
915 GNULIB_IMAXDIV
916 GNULIB_IMAXABS
917 GL_GENERATE_STDINT_H_FALSE
918 GL_GENERATE_STDINT_H_TRUE
919 STDINT_H
920 WINT_T_SUFFIX
921 WCHAR_T_SUFFIX
922 SIG_ATOMIC_T_SUFFIX
923 SIZE_T_SUFFIX
924 PTRDIFF_T_SUFFIX
925 HAVE_SIGNED_WINT_T
926 HAVE_SIGNED_WCHAR_T
927 HAVE_SIGNED_SIG_ATOMIC_T
928 BITSIZEOF_WINT_T
929 BITSIZEOF_WCHAR_T
930 BITSIZEOF_SIG_ATOMIC_T
931 BITSIZEOF_SIZE_T
932 BITSIZEOF_PTRDIFF_T
933 APPLE_UNIVERSAL_BUILD
934 HAVE_SYS_BITYPES_H
935 HAVE_SYS_INTTYPES_H
936 HAVE_STDINT_H
937 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
938 NEXT_STDINT_H
939 HAVE_SYS_TYPES_H
940 HAVE_INTTYPES_H
941 HAVE_WCHAR_H
942 HAVE_UNSIGNED_LONG_LONG_INT
943 HAVE_LONG_LONG_INT
944 HAVE_WINSOCK2_H
945 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
946 NEXT_SYS_TIME_H
947 REPLACE_STRUCT_TIMEVAL
948 REPLACE_GETTIMEOFDAY
949 HAVE_SYS_TIME_H
950 HAVE_STRUCT_TIMEVAL
951 HAVE_GETTIMEOFDAY
952 GNULIB_GETTIMEOFDAY
953 GNULIB_GL_UNISTD_H_GETOPT
954 GETOPT_H
955 HAVE_GETOPT_H
956 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
957 NEXT_GETOPT_H
958 GETLOADAVG_LIBS
959 REPLACE_WCTOMB
960 REPLACE_UNSETENV
961 REPLACE_STRTOD
962 REPLACE_SETENV
963 REPLACE_REALPATH
964 REPLACE_REALLOC
965 REPLACE_RANDOM_R
966 REPLACE_PUTENV
967 REPLACE_PTSNAME_R
968 REPLACE_PTSNAME
969 REPLACE_MKSTEMP
970 REPLACE_MBTOWC
971 REPLACE_MALLOC
972 REPLACE_CANONICALIZE_FILE_NAME
973 REPLACE_CALLOC
974 HAVE_DECL_UNSETENV
975 HAVE_UNLOCKPT
976 HAVE_SYS_LOADAVG_H
977 HAVE_STRUCT_RANDOM_DATA
978 HAVE_STRTOULL
979 HAVE_STRTOLL
980 HAVE_STRTOD
981 HAVE_DECL_SETENV
982 HAVE_SETENV
983 HAVE_SECURE_GETENV
984 HAVE_RPMATCH
985 HAVE_REALPATH
986 HAVE_RANDOM_R
987 HAVE_RANDOM_H
988 HAVE_RANDOM
989 HAVE_PTSNAME_R
990 HAVE_PTSNAME
991 HAVE_POSIX_OPENPT
992 HAVE_MKSTEMPS
993 HAVE_MKSTEMP
994 HAVE_MKOSTEMPS
995 HAVE_MKOSTEMP
996 HAVE_MKDTEMP
997 HAVE_GRANTPT
998 HAVE_GETSUBOPT
999 HAVE_DECL_GETLOADAVG
1000 HAVE_CANONICALIZE_FILE_NAME
1001 HAVE_ATOLL
1002 HAVE__EXIT
1003 GNULIB_WCTOMB
1004 GNULIB_UNSETENV
1005 GNULIB_UNLOCKPT
1006 GNULIB_SYSTEM_POSIX
1007 GNULIB_STRTOULL
1008 GNULIB_STRTOLL
1009 GNULIB_STRTOD
1010 GNULIB_SETENV
1011 GNULIB_SECURE_GETENV
1012 GNULIB_RPMATCH
1013 GNULIB_REALPATH
1014 GNULIB_REALLOC_POSIX
1015 GNULIB_RANDOM_R
1016 GNULIB_RANDOM
1017 GNULIB_PUTENV
1018 GNULIB_PTSNAME_R
1019 GNULIB_PTSNAME
1020 GNULIB_POSIX_OPENPT
1021 GNULIB_MKSTEMPS
1022 GNULIB_MKSTEMP
1023 GNULIB_MKOSTEMPS
1024 GNULIB_MKOSTEMP
1025 GNULIB_MKDTEMP
1026 GNULIB_MBTOWC
1027 GNULIB_MALLOC_POSIX
1028 GNULIB_GRANTPT
1029 GNULIB_GETSUBOPT
1030 GNULIB_GETLOADAVG
1031 GNULIB_CANONICALIZE_FILE_NAME
1032 GNULIB_CALLOC_POSIX
1033 GNULIB_ATOLL
1034 GNULIB__EXIT
1035 REPLACE_UTIMENSAT
1036 REPLACE_STAT
1037 REPLACE_MKNOD
1038 REPLACE_MKFIFO
1039 REPLACE_MKDIR
1040 REPLACE_LSTAT
1041 REPLACE_FUTIMENS
1042 REPLACE_FSTATAT
1043 REPLACE_FSTAT
1044 HAVE_UTIMENSAT
1045 HAVE_MKNODAT
1046 HAVE_MKNOD
1047 HAVE_MKFIFOAT
1048 HAVE_MKFIFO
1049 HAVE_MKDIRAT
1050 HAVE_LSTAT
1051 HAVE_LCHMOD
1052 HAVE_FUTIMENS
1053 HAVE_FSTATAT
1054 HAVE_FCHMODAT
1055 GNULIB_UTIMENSAT
1056 GNULIB_STAT
1057 GNULIB_MKNODAT
1058 GNULIB_MKNOD
1059 GNULIB_MKFIFOAT
1060 GNULIB_MKFIFO
1061 GNULIB_MKDIRAT
1062 GNULIB_LSTAT
1063 GNULIB_LCHMOD
1064 GNULIB_FUTIMENS
1065 GNULIB_FSTATAT
1066 GNULIB_FSTAT
1067 GNULIB_FCHMODAT
1068 LIB_FDATASYNC
1069 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1070 NEXT_FCNTL_H
1071 REPLACE_OPENAT
1072 REPLACE_OPEN
1073 REPLACE_FCNTL
1074 HAVE_OPENAT
1075 HAVE_FCNTL
1076 GNULIB_OPENAT
1077 GNULIB_OPEN
1078 GNULIB_NONBLOCKING
1079 GNULIB_FCNTL
1080 GL_GENERATE_EXECINFO_H_FALSE
1081 GL_GENERATE_EXECINFO_H_TRUE
1082 LIB_EXECINFO
1083 EXECINFO_H
1084 EOVERFLOW_VALUE
1085 EOVERFLOW_HIDDEN
1086 ENOLINK_VALUE
1087 ENOLINK_HIDDEN
1088 EMULTIHOP_VALUE
1089 EMULTIHOP_HIDDEN
1090 GL_GENERATE_ERRNO_H_FALSE
1091 GL_GENERATE_ERRNO_H_TRUE
1092 ERRNO_H
1093 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1094 NEXT_ERRNO_H
1095 HAVE_DIRENT_H
1096 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1097 NEXT_DIRENT_H
1098 PRAGMA_COLUMNS
1099 PRAGMA_SYSTEM_HEADER
1100 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1101 INCLUDE_NEXT
1102 REPLACE_FDOPENDIR
1103 REPLACE_DIRFD
1104 REPLACE_CLOSEDIR
1105 REPLACE_OPENDIR
1106 HAVE_ALPHASORT
1107 HAVE_SCANDIR
1108 HAVE_FDOPENDIR
1109 HAVE_DECL_FDOPENDIR
1110 HAVE_DECL_DIRFD
1111 HAVE_CLOSEDIR
1112 HAVE_REWINDDIR
1113 HAVE_READDIR
1114 HAVE_OPENDIR
1115 GNULIB_ALPHASORT
1116 GNULIB_SCANDIR
1117 GNULIB_FDOPENDIR
1118 GNULIB_DIRFD
1119 GNULIB_CLOSEDIR
1120 GNULIB_REWINDDIR
1121 GNULIB_READDIR
1122 GNULIB_OPENDIR
1123 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1124 UNISTD_H_HAVE_WINSOCK2_H
1125 REPLACE_WRITE
1126 REPLACE_USLEEP
1127 REPLACE_UNLINKAT
1128 REPLACE_UNLINK
1129 REPLACE_TTYNAME_R
1130 REPLACE_SYMLINK
1131 REPLACE_SLEEP
1132 REPLACE_RMDIR
1133 REPLACE_READLINK
1134 REPLACE_READ
1135 REPLACE_PWRITE
1136 REPLACE_PREAD
1137 REPLACE_LSEEK
1138 REPLACE_LINKAT
1139 REPLACE_LINK
1140 REPLACE_LCHOWN
1141 REPLACE_ISATTY
1142 REPLACE_GETPAGESIZE
1143 REPLACE_GETGROUPS
1144 REPLACE_GETLOGIN_R
1145 REPLACE_GETDOMAINNAME
1146 REPLACE_GETCWD
1147 REPLACE_FTRUNCATE
1148 REPLACE_FCHOWNAT
1149 REPLACE_DUP2
1150 REPLACE_DUP
1151 REPLACE_CLOSE
1152 REPLACE_CHOWN
1153 HAVE_SYS_PARAM_H
1154 HAVE_OS_H
1155 HAVE_DECL_TTYNAME_R
1156 HAVE_DECL_SETHOSTNAME
1157 HAVE_DECL_GETUSERSHELL
1158 HAVE_DECL_GETPAGESIZE
1159 HAVE_DECL_GETLOGIN_R
1160 HAVE_DECL_GETDOMAINNAME
1161 HAVE_DECL_FDATASYNC
1162 HAVE_DECL_FCHDIR
1163 HAVE_DECL_ENVIRON
1164 HAVE_USLEEP
1165 HAVE_UNLINKAT
1166 HAVE_SYMLINKAT
1167 HAVE_SYMLINK
1168 HAVE_SLEEP
1169 HAVE_SETHOSTNAME
1170 HAVE_READLINKAT
1171 HAVE_READLINK
1172 HAVE_PWRITE
1173 HAVE_PREAD
1174 HAVE_PIPE2
1175 HAVE_PIPE
1176 HAVE_LINKAT
1177 HAVE_LINK
1178 HAVE_LCHOWN
1179 HAVE_GROUP_MEMBER
1180 HAVE_GETPAGESIZE
1181 HAVE_GETLOGIN
1182 HAVE_GETHOSTNAME
1183 HAVE_GETGROUPS
1184 HAVE_GETDTABLESIZE
1185 HAVE_FTRUNCATE
1186 HAVE_FSYNC
1187 HAVE_FDATASYNC
1188 HAVE_FCHOWNAT
1189 HAVE_FCHDIR
1190 HAVE_FACCESSAT
1191 HAVE_EUIDACCESS
1192 HAVE_DUP3
1193 HAVE_DUP2
1194 HAVE_CHOWN
1195 GNULIB_WRITE
1196 GNULIB_USLEEP
1197 GNULIB_UNLINKAT
1198 GNULIB_UNLINK
1199 GNULIB_UNISTD_H_SIGPIPE
1200 GNULIB_UNISTD_H_NONBLOCKING
1201 GNULIB_TTYNAME_R
1202 GNULIB_SYMLINKAT
1203 GNULIB_SYMLINK
1204 GNULIB_SLEEP
1205 GNULIB_SETHOSTNAME
1206 GNULIB_RMDIR
1207 GNULIB_READLINKAT
1208 GNULIB_READLINK
1209 GNULIB_READ
1210 GNULIB_PWRITE
1211 GNULIB_PREAD
1212 GNULIB_PIPE2
1213 GNULIB_PIPE
1214 GNULIB_LSEEK
1215 GNULIB_LINKAT
1216 GNULIB_LINK
1217 GNULIB_LCHOWN
1218 GNULIB_ISATTY
1219 GNULIB_GROUP_MEMBER
1220 GNULIB_GETUSERSHELL
1221 GNULIB_GETPAGESIZE
1222 GNULIB_GETLOGIN_R
1223 GNULIB_GETLOGIN
1224 GNULIB_GETHOSTNAME
1225 GNULIB_GETGROUPS
1226 GNULIB_GETDTABLESIZE
1227 GNULIB_GETDOMAINNAME
1228 GNULIB_GETCWD
1229 GNULIB_FTRUNCATE
1230 GNULIB_FSYNC
1231 GNULIB_FDATASYNC
1232 GNULIB_FCHOWNAT
1233 GNULIB_FCHDIR
1234 GNULIB_FACCESSAT
1235 GNULIB_EUIDACCESS
1236 GNULIB_ENVIRON
1237 GNULIB_DUP3
1238 GNULIB_DUP2
1239 GNULIB_DUP
1240 GNULIB_CLOSE
1241 GNULIB_CHOWN
1242 GNULIB_CHDIR
1243 LIB_CLOCK_GETTIME
1244 GL_GENERATE_ALLOCA_H_FALSE
1245 GL_GENERATE_ALLOCA_H_TRUE
1246 ALLOCA_H
1247 ALLOCA
1248 GL_COND_LIBTOOL_FALSE
1249 GL_COND_LIBTOOL_TRUE
1250 POST_ALLOC_OBJ
1251 PRE_ALLOC_OBJ
1252 CYGWIN_OBJ
1253 RALLOC_OBJ
1254 OLDXMENU_DEPS
1255 LIBX_OTHER
1256 LIBXMENU
1257 OLDXMENU
1258 OLDXMENU_TARGET
1259 LIBXT_OTHER
1260 TOOLKIT_LIBW
1261 WIDGET_OBJ
1262 XOBJ
1263 XMENU_OBJ
1264 FONT_OBJ
1265 OTHER_FILES
1266 GNU_OBJC_CFLAGS
1267 ns_appsrc
1268 ns_appresdir
1269 ns_appbindir
1270 ns_appdir
1271 X_TOOLKIT_TYPE
1272 GNUSTEP_CFLAGS
1273 C_SWITCH_X_SITE
1274 LD_SWITCH_X_SITE
1275 gameuser
1276 gamedir
1277 bitmapdir
1278 archlibdir
1279 etcdir
1280 x_default_search_path
1281 lisppath
1282 locallisppath
1283 standardlisppath
1284 leimdir
1285 lispdir
1286 srcdir
1287 canonical
1288 configuration
1289 version
1290 copyright
1291 KRB4LIB
1292 DESLIB
1293 KRB5LIB
1294 CRYPTOLIB
1295 COM_ERRLIB
1296 LIBRESOLV
1297 LIBHESIOD
1298 TERMCAP_OBJ
1299 LIBS_TERMCAP
1300 BLESSMAIL_TARGET
1301 LIBS_MAIL
1302 liblockfile
1303 LIBXML2_LIBS
1304 LIBXML2_CFLAGS
1305 XINERAMA_LIBS
1306 XINERAMA_CFLAGS
1307 XRANDR_LIBS
1308 XRANDR_CFLAGS
1309 LIBXSM
1310 LIBGPM
1311 LIBGIF
1312 LIBTIFF
1313 LIBPNG
1314 LIBJPEG
1315 LIBXPM
1316 M17N_FLT_LIBS
1317 M17N_FLT_CFLAGS
1318 LIBOTF_LIBS
1319 LIBOTF_CFLAGS
1320 FREETYPE_LIBS
1321 FREETYPE_CFLAGS
1322 XFT_LIBS
1323 XFT_CFLAGS
1324 FONTCONFIG_LIBS
1325 FONTCONFIG_CFLAGS
1326 LIBXMU
1327 LIBXTR6
1328 LIBGNUTLS_LIBS
1329 LIBGNUTLS_CFLAGS
1330 LIBSELINUX_LIBS
1331 SETTINGS_LIBS
1332 SETTINGS_CFLAGS
1333 GOBJECT_LIBS
1334 GOBJECT_CFLAGS
1335 GCONF_LIBS
1336 GCONF_CFLAGS
1337 GSETTINGS_LIBS
1338 GSETTINGS_CFLAGS
1339 DBUS_OBJ
1340 DBUS_LIBS
1341 DBUS_CFLAGS
1342 GTK_OBJ
1343 GTK_LIBS
1344 GTK_CFLAGS
1345 IMAGEMAGICK_LIBS
1346 IMAGEMAGICK_CFLAGS
1347 RSVG_LIBS
1348 RSVG_CFLAGS
1349 LIB_PTHREAD
1350 VMLIMIT_OBJ
1351 GMALLOC_OBJ
1352 HAVE_XSERVER
1353 XARGS_LIMIT
1354 NTLIB
1355 LIB_WSOCK32
1356 LIBS_ECLIENT
1357 CM_OBJ
1358 NTDIR
1359 FIRSTFILE_OBJ
1360 W32_RES_LINK
1361 CLIENTW
1362 CLIENTRES
1363 EMACS_MANIFEST
1364 EMACSRES
1365 W32_LIBS
1366 W32_OBJ
1367 WINDRES
1368 NS_OBJC_OBJ
1369 NS_OBJ
1370 ns_self_contained
1371 INSTALL_ARCH_INDEP_EXTRA
1372 LIBS_GNUSTEP
1373 LD_SWITCH_X_SITE_RPATH
1374 XMKMF
1375 DEPFLAGS
1376 MKDEPDIR
1377 CFLAGS_SOUND
1378 ALSA_LIBS
1379 ALSA_CFLAGS
1380 LIBSOUND
1381 PKG_CONFIG
1382 LIB_MATH
1383 LIBS_SYSTEM
1384 C_SWITCH_SYSTEM
1385 UNEXEC_OBJ
1386 C_SWITCH_MACHINE
1387 LD_SWITCH_SYSTEM
1388 CANNOT_DUMP
1389 INFO_OPTS
1390 INFO_EXT
1391 HAVE_MAKEINFO
1392 PAXCTL
1393 GZIP_PROG
1394 INSTALL_INFO
1395 LN_S_FILEONLY
1396 GNULIB_WARN_CFLAGS
1397 WARN_CFLAGS
1398 WERROR_CFLAGS
1399 RANLIB
1400 ARFLAGS
1401 AR
1402 EGREP
1403 GREP
1404 CPP
1405 BUILDING_FOR_WINDOWSNT_FALSE
1406 BUILDING_FOR_WINDOWSNT_TRUE
1407 am__fastdepCC_FALSE
1408 am__fastdepCC_TRUE
1409 CCDEPMODE
1410 AMDEPBACKSLASH
1411 AMDEP_FALSE
1412 AMDEP_TRUE
1413 am__quote
1414 am__include
1415 DEPDIR
1416 OBJEXT
1417 EXEEXT
1418 ac_ct_CC
1419 CPPFLAGS
1420 LDFLAGS
1421 CFLAGS
1422 CC
1423 host_os
1424 host_vendor
1425 host_cpu
1426 host
1427 build_os
1428 build_vendor
1429 build_cpu
1430 build
1431 PROFILING_CFLAGS
1432 GZIP_INFO
1433 cache_file
1434 am__untar
1435 am__tar
1436 AMTAR
1437 am__leading_dot
1438 SET_MAKE
1439 AWK
1440 mkdir_p
1441 MKDIR_P
1442 INSTALL_STRIP_PROGRAM
1443 STRIP
1444 install_sh
1445 MAKEINFO
1446 AUTOHEADER
1447 AUTOMAKE
1448 AUTOCONF
1449 ACLOCAL
1450 VERSION
1451 PACKAGE
1452 CYGPATH_W
1453 am__isrc
1454 INSTALL_DATA
1455 INSTALL_SCRIPT
1456 INSTALL_PROGRAM
1457 target_alias
1458 host_alias
1459 build_alias
1460 LIBS
1461 ECHO_T
1462 ECHO_N
1463 ECHO_C
1464 DEFS
1465 mandir
1466 localedir
1467 libdir
1468 psdir
1469 pdfdir
1470 dvidir
1471 htmldir
1472 infodir
1473 docdir
1474 oldincludedir
1475 includedir
1476 localstatedir
1477 sharedstatedir
1478 sysconfdir
1479 datadir
1480 datarootdir
1481 libexecdir
1482 sbindir
1483 bindir
1484 program_transform_name
1485 prefix
1486 exec_prefix
1487 PACKAGE_URL
1488 PACKAGE_BUGREPORT
1489 PACKAGE_STRING
1490 PACKAGE_VERSION
1491 PACKAGE_TARNAME
1492 PACKAGE_NAME
1493 PATH_SEPARATOR
1494 SHELL'
1495 ac_subst_files='deps_frag
1496 lisp_frag'
1497 ac_user_opts='
1498 enable_option_checking
1499 with_all
1500 with_pop
1501 with_kerberos
1502 with_kerberos5
1503 with_hesiod
1504 with_mmdf
1505 with_mail_unlink
1506 with_mailhost
1507 with_sound
1508 with_x_toolkit
1509 with_wide_int
1510 with_xpm
1511 with_jpeg
1512 with_tiff
1513 with_gif
1514 with_png
1515 with_rsvg
1516 with_xml2
1517 with_imagemagick
1518 with_xft
1519 with_libotf
1520 with_m17n_flt
1521 with_toolkit_scroll_bars
1522 with_xaw3d
1523 with_xim
1524 with_ns
1525 with_w32
1526 with_gpm
1527 with_dbus
1528 with_gconf
1529 with_gsettings
1530 with_selinux
1531 with_gnutls
1532 with_inotify
1533 with_makeinfo
1534 with_compress_info
1535 with_pkg_config_prog
1536 with_gameuser
1537 with_gnustep_conf
1538 enable_ns_self_contained
1539 enable_locallisppath
1540 enable_checking
1541 enable_check_lisp_object_type
1542 enable_profiling
1543 enable_autodepend
1544 enable_gtk_deprecation_warnings
1545 enable_dependency_tracking
1546 enable_largefile
1547 enable_gcc_warnings
1548 enable_link_time_optimization
1549 with_x
1550 enable_acl
1551 '
1552 ac_precious_vars='build_alias
1553 host_alias
1554 target_alias
1555 CC
1556 CFLAGS
1557 LDFLAGS
1558 LIBS
1559 CPPFLAGS
1560 CPP
1561 XMKMF'
1562
1563
1564 # Initialize some variables set by options.
1565 ac_init_help=
1566 ac_init_version=false
1567 ac_unrecognized_opts=
1568 ac_unrecognized_sep=
1569 # The variables have the same names as the options, with
1570 # dashes changed to underlines.
1571 cache_file=/dev/null
1572 exec_prefix=NONE
1573 no_create=
1574 no_recursion=
1575 prefix=NONE
1576 program_prefix=NONE
1577 program_suffix=NONE
1578 program_transform_name=s,x,x,
1579 silent=
1580 site=
1581 srcdir=
1582 verbose=
1583 x_includes=NONE
1584 x_libraries=NONE
1585
1586 # Installation directory options.
1587 # These are left unexpanded so users can "make install exec_prefix=/foo"
1588 # and all the variables that are supposed to be based on exec_prefix
1589 # by default will actually change.
1590 # Use braces instead of parens because sh, perl, etc. also accept them.
1591 # (The list follows the same order as the GNU Coding Standards.)
1592 bindir='${exec_prefix}/bin'
1593 sbindir='${exec_prefix}/sbin'
1594 libexecdir='${exec_prefix}/libexec'
1595 datarootdir='${prefix}/share'
1596 datadir='${datarootdir}'
1597 sysconfdir='${prefix}/etc'
1598 sharedstatedir='${prefix}/com'
1599 localstatedir='${prefix}/var'
1600 includedir='${prefix}/include'
1601 oldincludedir='/usr/include'
1602 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1603 infodir='${datarootdir}/info'
1604 htmldir='${docdir}'
1605 dvidir='${docdir}'
1606 pdfdir='${docdir}'
1607 psdir='${docdir}'
1608 libdir='${exec_prefix}/lib'
1609 localedir='${datarootdir}/locale'
1610 mandir='${datarootdir}/man'
1611
1612 ac_prev=
1613 ac_dashdash=
1614 for ac_option
1615 do
1616 # If the previous option needs an argument, assign it.
1617 if test -n "$ac_prev"; then
1618 eval $ac_prev=\$ac_option
1619 ac_prev=
1620 continue
1621 fi
1622
1623 case $ac_option in
1624 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1625 *) ac_optarg=yes ;;
1626 esac
1627
1628 # Accept the important Cygnus configure options, so we can diagnose typos.
1629
1630 case $ac_dashdash$ac_option in
1631 --)
1632 ac_dashdash=yes ;;
1633
1634 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1635 ac_prev=bindir ;;
1636 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1637 bindir=$ac_optarg ;;
1638
1639 -build | --build | --buil | --bui | --bu)
1640 ac_prev=build_alias ;;
1641 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1642 build_alias=$ac_optarg ;;
1643
1644 -cache-file | --cache-file | --cache-fil | --cache-fi \
1645 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1646 ac_prev=cache_file ;;
1647 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1648 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1649 cache_file=$ac_optarg ;;
1650
1651 --config-cache | -C)
1652 cache_file=config.cache ;;
1653
1654 -datadir | --datadir | --datadi | --datad)
1655 ac_prev=datadir ;;
1656 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1657 datadir=$ac_optarg ;;
1658
1659 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1660 | --dataroo | --dataro | --datar)
1661 ac_prev=datarootdir ;;
1662 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1663 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1664 datarootdir=$ac_optarg ;;
1665
1666 -disable-* | --disable-*)
1667 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1668 # Reject names that are not valid shell variable names.
1669 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1670 as_fn_error "invalid feature name: $ac_useropt"
1671 ac_useropt_orig=$ac_useropt
1672 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1673 case $ac_user_opts in
1674 *"
1675 "enable_$ac_useropt"
1676 "*) ;;
1677 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1678 ac_unrecognized_sep=', ';;
1679 esac
1680 eval enable_$ac_useropt=no ;;
1681
1682 -docdir | --docdir | --docdi | --doc | --do)
1683 ac_prev=docdir ;;
1684 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1685 docdir=$ac_optarg ;;
1686
1687 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1688 ac_prev=dvidir ;;
1689 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1690 dvidir=$ac_optarg ;;
1691
1692 -enable-* | --enable-*)
1693 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1694 # Reject names that are not valid shell variable names.
1695 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696 as_fn_error "invalid feature name: $ac_useropt"
1697 ac_useropt_orig=$ac_useropt
1698 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699 case $ac_user_opts in
1700 *"
1701 "enable_$ac_useropt"
1702 "*) ;;
1703 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1704 ac_unrecognized_sep=', ';;
1705 esac
1706 eval enable_$ac_useropt=\$ac_optarg ;;
1707
1708 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1709 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1710 | --exec | --exe | --ex)
1711 ac_prev=exec_prefix ;;
1712 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1713 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1714 | --exec=* | --exe=* | --ex=*)
1715 exec_prefix=$ac_optarg ;;
1716
1717 -gas | --gas | --ga | --g)
1718 # Obsolete; use --with-gas.
1719 with_gas=yes ;;
1720
1721 -help | --help | --hel | --he | -h)
1722 ac_init_help=long ;;
1723 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1724 ac_init_help=recursive ;;
1725 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1726 ac_init_help=short ;;
1727
1728 -host | --host | --hos | --ho)
1729 ac_prev=host_alias ;;
1730 -host=* | --host=* | --hos=* | --ho=*)
1731 host_alias=$ac_optarg ;;
1732
1733 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1734 ac_prev=htmldir ;;
1735 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1736 | --ht=*)
1737 htmldir=$ac_optarg ;;
1738
1739 -includedir | --includedir | --includedi | --included | --include \
1740 | --includ | --inclu | --incl | --inc)
1741 ac_prev=includedir ;;
1742 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1743 | --includ=* | --inclu=* | --incl=* | --inc=*)
1744 includedir=$ac_optarg ;;
1745
1746 -infodir | --infodir | --infodi | --infod | --info | --inf)
1747 ac_prev=infodir ;;
1748 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1749 infodir=$ac_optarg ;;
1750
1751 -libdir | --libdir | --libdi | --libd)
1752 ac_prev=libdir ;;
1753 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1754 libdir=$ac_optarg ;;
1755
1756 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1757 | --libexe | --libex | --libe)
1758 ac_prev=libexecdir ;;
1759 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1760 | --libexe=* | --libex=* | --libe=*)
1761 libexecdir=$ac_optarg ;;
1762
1763 -localedir | --localedir | --localedi | --localed | --locale)
1764 ac_prev=localedir ;;
1765 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1766 localedir=$ac_optarg ;;
1767
1768 -localstatedir | --localstatedir | --localstatedi | --localstated \
1769 | --localstate | --localstat | --localsta | --localst | --locals)
1770 ac_prev=localstatedir ;;
1771 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1772 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1773 localstatedir=$ac_optarg ;;
1774
1775 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1776 ac_prev=mandir ;;
1777 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1778 mandir=$ac_optarg ;;
1779
1780 -nfp | --nfp | --nf)
1781 # Obsolete; use --without-fp.
1782 with_fp=no ;;
1783
1784 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1785 | --no-cr | --no-c | -n)
1786 no_create=yes ;;
1787
1788 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1789 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1790 no_recursion=yes ;;
1791
1792 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1793 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1794 | --oldin | --oldi | --old | --ol | --o)
1795 ac_prev=oldincludedir ;;
1796 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1797 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1798 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1799 oldincludedir=$ac_optarg ;;
1800
1801 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1802 ac_prev=prefix ;;
1803 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1804 prefix=$ac_optarg ;;
1805
1806 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1807 | --program-pre | --program-pr | --program-p)
1808 ac_prev=program_prefix ;;
1809 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1810 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1811 program_prefix=$ac_optarg ;;
1812
1813 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1814 | --program-suf | --program-su | --program-s)
1815 ac_prev=program_suffix ;;
1816 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1817 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1818 program_suffix=$ac_optarg ;;
1819
1820 -program-transform-name | --program-transform-name \
1821 | --program-transform-nam | --program-transform-na \
1822 | --program-transform-n | --program-transform- \
1823 | --program-transform | --program-transfor \
1824 | --program-transfo | --program-transf \
1825 | --program-trans | --program-tran \
1826 | --progr-tra | --program-tr | --program-t)
1827 ac_prev=program_transform_name ;;
1828 -program-transform-name=* | --program-transform-name=* \
1829 | --program-transform-nam=* | --program-transform-na=* \
1830 | --program-transform-n=* | --program-transform-=* \
1831 | --program-transform=* | --program-transfor=* \
1832 | --program-transfo=* | --program-transf=* \
1833 | --program-trans=* | --program-tran=* \
1834 | --progr-tra=* | --program-tr=* | --program-t=*)
1835 program_transform_name=$ac_optarg ;;
1836
1837 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1838 ac_prev=pdfdir ;;
1839 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1840 pdfdir=$ac_optarg ;;
1841
1842 -psdir | --psdir | --psdi | --psd | --ps)
1843 ac_prev=psdir ;;
1844 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1845 psdir=$ac_optarg ;;
1846
1847 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1848 | -silent | --silent | --silen | --sile | --sil)
1849 silent=yes ;;
1850
1851 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1852 ac_prev=sbindir ;;
1853 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1854 | --sbi=* | --sb=*)
1855 sbindir=$ac_optarg ;;
1856
1857 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1858 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1859 | --sharedst | --shareds | --shared | --share | --shar \
1860 | --sha | --sh)
1861 ac_prev=sharedstatedir ;;
1862 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1863 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1864 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1865 | --sha=* | --sh=*)
1866 sharedstatedir=$ac_optarg ;;
1867
1868 -site | --site | --sit)
1869 ac_prev=site ;;
1870 -site=* | --site=* | --sit=*)
1871 site=$ac_optarg ;;
1872
1873 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1874 ac_prev=srcdir ;;
1875 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1876 srcdir=$ac_optarg ;;
1877
1878 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1879 | --syscon | --sysco | --sysc | --sys | --sy)
1880 ac_prev=sysconfdir ;;
1881 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1882 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1883 sysconfdir=$ac_optarg ;;
1884
1885 -target | --target | --targe | --targ | --tar | --ta | --t)
1886 ac_prev=target_alias ;;
1887 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1888 target_alias=$ac_optarg ;;
1889
1890 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1891 verbose=yes ;;
1892
1893 -version | --version | --versio | --versi | --vers | -V)
1894 ac_init_version=: ;;
1895
1896 -with-* | --with-*)
1897 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1898 # Reject names that are not valid shell variable names.
1899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1900 as_fn_error "invalid package name: $ac_useropt"
1901 ac_useropt_orig=$ac_useropt
1902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1903 case $ac_user_opts in
1904 *"
1905 "with_$ac_useropt"
1906 "*) ;;
1907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1908 ac_unrecognized_sep=', ';;
1909 esac
1910 eval with_$ac_useropt=\$ac_optarg ;;
1911
1912 -without-* | --without-*)
1913 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1914 # Reject names that are not valid shell variable names.
1915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1916 as_fn_error "invalid package name: $ac_useropt"
1917 ac_useropt_orig=$ac_useropt
1918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1919 case $ac_user_opts in
1920 *"
1921 "with_$ac_useropt"
1922 "*) ;;
1923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1924 ac_unrecognized_sep=', ';;
1925 esac
1926 eval with_$ac_useropt=no ;;
1927
1928 --x)
1929 # Obsolete; use --with-x.
1930 with_x=yes ;;
1931
1932 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1933 | --x-incl | --x-inc | --x-in | --x-i)
1934 ac_prev=x_includes ;;
1935 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1936 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1937 x_includes=$ac_optarg ;;
1938
1939 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1940 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1941 ac_prev=x_libraries ;;
1942 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1943 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1944 x_libraries=$ac_optarg ;;
1945
1946 -*) as_fn_error "unrecognized option: \`$ac_option'
1947 Try \`$0 --help' for more information."
1948 ;;
1949
1950 *=*)
1951 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1952 # Reject names that are not valid shell variable names.
1953 case $ac_envvar in #(
1954 '' | [0-9]* | *[!_$as_cr_alnum]* )
1955 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1956 esac
1957 eval $ac_envvar=\$ac_optarg
1958 export $ac_envvar ;;
1959
1960 *)
1961 # FIXME: should be removed in autoconf 3.0.
1962 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1963 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1964 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1965 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1966 ;;
1967
1968 esac
1969 done
1970
1971 if test -n "$ac_prev"; then
1972 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1973 as_fn_error "missing argument to $ac_option"
1974 fi
1975
1976 if test -n "$ac_unrecognized_opts"; then
1977 case $enable_option_checking in
1978 no) ;;
1979 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1980 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1981 esac
1982 fi
1983
1984 # Check all directory arguments for consistency.
1985 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1986 datadir sysconfdir sharedstatedir localstatedir includedir \
1987 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1988 libdir localedir mandir
1989 do
1990 eval ac_val=\$$ac_var
1991 # Remove trailing slashes.
1992 case $ac_val in
1993 */ )
1994 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1995 eval $ac_var=\$ac_val;;
1996 esac
1997 # Be sure to have absolute directory names.
1998 case $ac_val in
1999 [\\/$]* | ?:[\\/]* ) continue;;
2000 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2001 esac
2002 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2003 done
2004
2005 # There might be people who depend on the old broken behavior: `$host'
2006 # used to hold the argument of --host etc.
2007 # FIXME: To remove some day.
2008 build=$build_alias
2009 host=$host_alias
2010 target=$target_alias
2011
2012 # FIXME: To remove some day.
2013 if test "x$host_alias" != x; then
2014 if test "x$build_alias" = x; then
2015 cross_compiling=maybe
2016 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2017 If a cross compiler is detected then cross compile mode will be used." >&2
2018 elif test "x$build_alias" != "x$host_alias"; then
2019 cross_compiling=yes
2020 fi
2021 fi
2022
2023 ac_tool_prefix=
2024 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2025
2026 test "$silent" = yes && exec 6>/dev/null
2027
2028
2029 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2030 ac_ls_di=`ls -di .` &&
2031 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2032 as_fn_error "working directory cannot be determined"
2033 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2034 as_fn_error "pwd does not report name of working directory"
2035
2036
2037 # Find the source files, if location was not specified.
2038 if test -z "$srcdir"; then
2039 ac_srcdir_defaulted=yes
2040 # Try the directory containing this script, then the parent directory.
2041 ac_confdir=`$as_dirname -- "$as_myself" ||
2042 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2043 X"$as_myself" : 'X\(//\)[^/]' \| \
2044 X"$as_myself" : 'X\(//\)$' \| \
2045 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2046 $as_echo X"$as_myself" |
2047 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2048 s//\1/
2049 q
2050 }
2051 /^X\(\/\/\)[^/].*/{
2052 s//\1/
2053 q
2054 }
2055 /^X\(\/\/\)$/{
2056 s//\1/
2057 q
2058 }
2059 /^X\(\/\).*/{
2060 s//\1/
2061 q
2062 }
2063 s/.*/./; q'`
2064 srcdir=$ac_confdir
2065 if test ! -r "$srcdir/$ac_unique_file"; then
2066 srcdir=..
2067 fi
2068 else
2069 ac_srcdir_defaulted=no
2070 fi
2071 if test ! -r "$srcdir/$ac_unique_file"; then
2072 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2073 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2074 fi
2075 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2076 ac_abs_confdir=`(
2077 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2078 pwd)`
2079 # When building in place, set srcdir=.
2080 if test "$ac_abs_confdir" = "$ac_pwd"; then
2081 srcdir=.
2082 fi
2083 # Remove unnecessary trailing slashes from srcdir.
2084 # Double slashes in file names in object file debugging info
2085 # mess up M-x gdb in Emacs.
2086 case $srcdir in
2087 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2088 esac
2089 for ac_var in $ac_precious_vars; do
2090 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2091 eval ac_env_${ac_var}_value=\$${ac_var}
2092 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2093 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2094 done
2095
2096 #
2097 # Report the --help message.
2098 #
2099 if test "$ac_init_help" = "long"; then
2100 # Omit some internal or obsolete options to make the list less imposing.
2101 # This message is too long to be a string in the A/UX 3.1 sh.
2102 cat <<_ACEOF
2103 \`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
2104
2105 Usage: $0 [OPTION]... [VAR=VALUE]...
2106
2107 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2108 VAR=VALUE. See below for descriptions of some of the useful variables.
2109
2110 Defaults for the options are specified in brackets.
2111
2112 Configuration:
2113 -h, --help display this help and exit
2114 --help=short display options specific to this package
2115 --help=recursive display the short help of all the included packages
2116 -V, --version display version information and exit
2117 -q, --quiet, --silent do not print \`checking...' messages
2118 --cache-file=FILE cache test results in FILE [disabled]
2119 -C, --config-cache alias for \`--cache-file=config.cache'
2120 -n, --no-create do not create output files
2121 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2122
2123 Installation directories:
2124 --prefix=PREFIX install architecture-independent files in PREFIX
2125 [$ac_default_prefix]
2126 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2127 [PREFIX]
2128
2129 By default, \`make install' will install all the files in
2130 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2131 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2132 for instance \`--prefix=\$HOME'.
2133
2134 For better control, use the options below.
2135
2136 Fine tuning of the installation directories:
2137 --bindir=DIR user executables [EPREFIX/bin]
2138 --sbindir=DIR system admin executables [EPREFIX/sbin]
2139 --libexecdir=DIR program executables [EPREFIX/libexec]
2140 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2141 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2142 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2143 --libdir=DIR object code libraries [EPREFIX/lib]
2144 --includedir=DIR C header files [PREFIX/include]
2145 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2146 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2147 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2148 --infodir=DIR info documentation [DATAROOTDIR/info]
2149 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2150 --mandir=DIR man documentation [DATAROOTDIR/man]
2151 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2152 --htmldir=DIR html documentation [DOCDIR]
2153 --dvidir=DIR dvi documentation [DOCDIR]
2154 --pdfdir=DIR pdf documentation [DOCDIR]
2155 --psdir=DIR ps documentation [DOCDIR]
2156 _ACEOF
2157
2158 cat <<\_ACEOF
2159
2160 Program names:
2161 --program-prefix=PREFIX prepend PREFIX to installed program names
2162 --program-suffix=SUFFIX append SUFFIX to installed program names
2163 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2164
2165 X features:
2166 --x-includes=DIR X include files are in DIR
2167 --x-libraries=DIR X library files are in DIR
2168
2169 System types:
2170 --build=BUILD configure for building on BUILD [guessed]
2171 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2172 _ACEOF
2173 fi
2174
2175 if test -n "$ac_init_help"; then
2176 case $ac_init_help in
2177 short | recursive ) echo "Configuration of emacs 24.3.50:";;
2178 esac
2179 cat <<\_ACEOF
2180
2181 Optional Features:
2182 --disable-option-checking ignore unrecognized --enable/--with options
2183 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2184 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2185 --disable-ns-self-contained
2186 disable self contained build under NeXTstep
2187 --enable-locallisppath=PATH
2188 directories Emacs should search for lisp files
2189 specific to this site
2190 --enable-checking[=LIST]
2191 enable expensive run-time checks. With LIST, enable
2192 only specific categories of checks. Categories are:
2193 all,yes,no. Flags are: stringbytes, stringoverrun,
2194 stringfreelist, xmallocoverrun, conslist, glyphs
2195 --enable-check-lisp-object-type
2196 enable compile time checks for the Lisp_Object data
2197 type. This is useful for development for catching
2198 certain types of bugs.
2199 --enable-profiling build emacs with low-level, gprof profiling support.
2200 Mainly useful for debugging Emacs itself. May not
2201 work on all platforms. Stops profiler.el working.
2202 --enable-autodepend automatically generate dependencies to .h-files.
2203 Requires GNU Make and Gcc. Enabled if GNU Make and
2204 Gcc is found
2205 --enable-gtk-deprecation-warnings
2206 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
2207 --disable-dependency-tracking speeds up one-time build
2208 --enable-dependency-tracking do not reject slow dependency extractors
2209 --disable-largefile omit support for large files
2210 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2211 intended for developers, and may generate false
2212 alarms when used with older or non-GNU development
2213 tools.
2214 --enable-link-time-optimization
2215 build emacs with link-time optimization. This is
2216 supported only for GCC since 4.5.0.
2217 --disable-acl do not support ACLs
2218
2219 Optional Packages:
2220 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2221 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2222 --without-all omit almost all features and build small executable
2223 with minimal dependencies
2224 --without-pop don't support POP mail retrieval with movemail
2225 --with-kerberos support Kerberos-authenticated POP
2226 --with-kerberos5 support Kerberos version 5 authenticated POP
2227 --with-hesiod support Hesiod to get the POP server host
2228 --with-mmdf support MMDF mailboxes
2229 --with-mail-unlink unlink, rather than empty, mail spool after reading
2230 --with-mailhost=HOSTNAME
2231 string giving default POP mail host
2232 --without-sound don't compile with sound support
2233 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2234 gtk3, lucid or athena, motif, no)
2235 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2236 --without-xpm don't compile with XPM image support
2237 --without-jpeg don't compile with JPEG image support
2238 --without-tiff don't compile with TIFF image support
2239 --without-gif don't compile with GIF image support
2240 --without-png don't compile with PNG image support
2241 --without-rsvg don't compile with SVG image support
2242 --without-xml2 don't compile with XML parsing support
2243 --without-imagemagick don't compile with ImageMagick image support
2244 --without-xft don't use XFT for anti aliased fonts
2245 --without-libotf don't use libotf for OpenType font support
2246 --without-m17n-flt don't use m17n-flt for text shaping
2247 --without-toolkit-scroll-bars
2248 don't use Motif or Xaw3d scroll bars
2249 --without-xaw3d don't use Xaw3d
2250 --without-xim don't use X11 XIM
2251 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2252 --with-w32 use native MS Windows GUI in a Cygwin build
2253 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2254 console
2255 --without-dbus don't compile with D-Bus support
2256 --without-gconf don't compile with GConf support
2257 --without-gsettings don't compile with GSettings support
2258 --without-selinux don't compile with SELinux support
2259 --without-gnutls don't use -lgnutls for SSL/TLS support
2260 --without-inotify don't compile with inotify (file-watch) support
2261 --without-makeinfo don't require makeinfo for building manuals
2262 --without-compress-info don't compress the installed Info pages
2263 --with-pkg-config-prog=FILENAME
2264 file name of pkg-config for finding GTK and librsvg
2265 --with-gameuser=USER user for shared game score files
2266 --with-gnustep-conf=FILENAME
2267 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2268 or /etc/GNUstep/GNUstep.conf
2269 --with-x use the X Window System
2270
2271 Some influential environment variables:
2272 CC C compiler command
2273 CFLAGS C compiler flags
2274 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2275 nonstandard directory <lib dir>
2276 LIBS libraries to pass to the linker, e.g. -l<library>
2277 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2278 you have headers in a nonstandard directory <include dir>
2279 CPP C preprocessor
2280 XMKMF Path to xmkmf, Makefile generator for X Window System
2281
2282 Use these variables to override the choices made by `configure' or to help
2283 it to find libraries and programs with nonstandard names/locations.
2284
2285 Report bugs to the package provider.
2286 _ACEOF
2287 ac_status=$?
2288 fi
2289
2290 if test "$ac_init_help" = "recursive"; then
2291 # If there are subdirs, report their specific --help.
2292 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2293 test -d "$ac_dir" ||
2294 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2295 continue
2296 ac_builddir=.
2297
2298 case "$ac_dir" in
2299 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2300 *)
2301 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2302 # A ".." for each directory in $ac_dir_suffix.
2303 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2304 case $ac_top_builddir_sub in
2305 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2306 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2307 esac ;;
2308 esac
2309 ac_abs_top_builddir=$ac_pwd
2310 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2311 # for backward compatibility:
2312 ac_top_builddir=$ac_top_build_prefix
2313
2314 case $srcdir in
2315 .) # We are building in place.
2316 ac_srcdir=.
2317 ac_top_srcdir=$ac_top_builddir_sub
2318 ac_abs_top_srcdir=$ac_pwd ;;
2319 [\\/]* | ?:[\\/]* ) # Absolute name.
2320 ac_srcdir=$srcdir$ac_dir_suffix;
2321 ac_top_srcdir=$srcdir
2322 ac_abs_top_srcdir=$srcdir ;;
2323 *) # Relative name.
2324 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2325 ac_top_srcdir=$ac_top_build_prefix$srcdir
2326 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2327 esac
2328 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2329
2330 cd "$ac_dir" || { ac_status=$?; continue; }
2331 # Check for guested configure.
2332 if test -f "$ac_srcdir/configure.gnu"; then
2333 echo &&
2334 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2335 elif test -f "$ac_srcdir/configure"; then
2336 echo &&
2337 $SHELL "$ac_srcdir/configure" --help=recursive
2338 else
2339 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2340 fi || ac_status=$?
2341 cd "$ac_pwd" || { ac_status=$?; break; }
2342 done
2343 fi
2344
2345 test -n "$ac_init_help" && exit $ac_status
2346 if $ac_init_version; then
2347 cat <<\_ACEOF
2348 emacs configure 24.3.50
2349 generated by GNU Autoconf 2.65
2350
2351 Copyright (C) 2009 Free Software Foundation, Inc.
2352 This configure script is free software; the Free Software Foundation
2353 gives unlimited permission to copy, distribute and modify it.
2354 _ACEOF
2355 exit
2356 fi
2357
2358 ## ------------------------ ##
2359 ## Autoconf initialization. ##
2360 ## ------------------------ ##
2361
2362 # ac_fn_c_try_compile LINENO
2363 # --------------------------
2364 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2365 ac_fn_c_try_compile ()
2366 {
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 rm -f conftest.$ac_objext
2369 if { { ac_try="$ac_compile"
2370 case "(($ac_try" in
2371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2372 *) ac_try_echo=$ac_try;;
2373 esac
2374 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2375 $as_echo "$ac_try_echo"; } >&5
2376 (eval "$ac_compile") 2>conftest.err
2377 ac_status=$?
2378 if test -s conftest.err; then
2379 grep -v '^ *+' conftest.err >conftest.er1
2380 cat conftest.er1 >&5
2381 mv -f conftest.er1 conftest.err
2382 fi
2383 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2384 test $ac_status = 0; } && {
2385 test -z "$ac_c_werror_flag" ||
2386 test ! -s conftest.err
2387 } && test -s conftest.$ac_objext; then :
2388 ac_retval=0
2389 else
2390 $as_echo "$as_me: failed program was:" >&5
2391 sed 's/^/| /' conftest.$ac_ext >&5
2392
2393 ac_retval=1
2394 fi
2395 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2396 as_fn_set_status $ac_retval
2397
2398 } # ac_fn_c_try_compile
2399
2400 # ac_fn_c_try_cpp LINENO
2401 # ----------------------
2402 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2403 ac_fn_c_try_cpp ()
2404 {
2405 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2406 if { { ac_try="$ac_cpp conftest.$ac_ext"
2407 case "(($ac_try" in
2408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2409 *) ac_try_echo=$ac_try;;
2410 esac
2411 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2412 $as_echo "$ac_try_echo"; } >&5
2413 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2414 ac_status=$?
2415 if test -s conftest.err; then
2416 grep -v '^ *+' conftest.err >conftest.er1
2417 cat conftest.er1 >&5
2418 mv -f conftest.er1 conftest.err
2419 fi
2420 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2421 test $ac_status = 0; } >/dev/null && {
2422 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2423 test ! -s conftest.err
2424 }; then :
2425 ac_retval=0
2426 else
2427 $as_echo "$as_me: failed program was:" >&5
2428 sed 's/^/| /' conftest.$ac_ext >&5
2429
2430 ac_retval=1
2431 fi
2432 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2433 as_fn_set_status $ac_retval
2434
2435 } # ac_fn_c_try_cpp
2436
2437 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2438 # -------------------------------------------------------
2439 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2440 # the include files in INCLUDES and setting the cache variable VAR
2441 # accordingly.
2442 ac_fn_c_check_header_mongrel ()
2443 {
2444 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2445 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2447 $as_echo_n "checking for $2... " >&6; }
2448 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2449 $as_echo_n "(cached) " >&6
2450 fi
2451 eval ac_res=\$$3
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2453 $as_echo "$ac_res" >&6; }
2454 else
2455 # Is the header compilable?
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2457 $as_echo_n "checking $2 usability... " >&6; }
2458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2459 /* end confdefs.h. */
2460 $4
2461 #include <$2>
2462 _ACEOF
2463 if ac_fn_c_try_compile "$LINENO"; then :
2464 ac_header_compiler=yes
2465 else
2466 ac_header_compiler=no
2467 fi
2468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2470 $as_echo "$ac_header_compiler" >&6; }
2471
2472 # Is the header present?
2473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2474 $as_echo_n "checking $2 presence... " >&6; }
2475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2476 /* end confdefs.h. */
2477 #include <$2>
2478 _ACEOF
2479 if ac_fn_c_try_cpp "$LINENO"; then :
2480 ac_header_preproc=yes
2481 else
2482 ac_header_preproc=no
2483 fi
2484 rm -f conftest.err conftest.$ac_ext
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2486 $as_echo "$ac_header_preproc" >&6; }
2487
2488 # So? What about this header?
2489 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2490 yes:no: )
2491 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2492 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2493 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2494 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2495 ;;
2496 no:yes:* )
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2498 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2500 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2501 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2502 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2504 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2506 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2507 ;;
2508 esac
2509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2510 $as_echo_n "checking for $2... " >&6; }
2511 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2512 $as_echo_n "(cached) " >&6
2513 else
2514 eval "$3=\$ac_header_compiler"
2515 fi
2516 eval ac_res=\$$3
2517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2518 $as_echo "$ac_res" >&6; }
2519 fi
2520 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2521
2522 } # ac_fn_c_check_header_mongrel
2523
2524 # ac_fn_c_try_run LINENO
2525 # ----------------------
2526 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2527 # that executables *can* be run.
2528 ac_fn_c_try_run ()
2529 {
2530 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2531 if { { ac_try="$ac_link"
2532 case "(($ac_try" in
2533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2534 *) ac_try_echo=$ac_try;;
2535 esac
2536 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2537 $as_echo "$ac_try_echo"; } >&5
2538 (eval "$ac_link") 2>&5
2539 ac_status=$?
2540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2541 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2542 { { case "(($ac_try" in
2543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2544 *) ac_try_echo=$ac_try;;
2545 esac
2546 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2547 $as_echo "$ac_try_echo"; } >&5
2548 (eval "$ac_try") 2>&5
2549 ac_status=$?
2550 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2551 test $ac_status = 0; }; }; then :
2552 ac_retval=0
2553 else
2554 $as_echo "$as_me: program exited with status $ac_status" >&5
2555 $as_echo "$as_me: failed program was:" >&5
2556 sed 's/^/| /' conftest.$ac_ext >&5
2557
2558 ac_retval=$ac_status
2559 fi
2560 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2562 as_fn_set_status $ac_retval
2563
2564 } # ac_fn_c_try_run
2565
2566 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2567 # -------------------------------------------------------
2568 # Tests whether HEADER exists and can be compiled using the include files in
2569 # INCLUDES, setting the cache variable VAR accordingly.
2570 ac_fn_c_check_header_compile ()
2571 {
2572 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2574 $as_echo_n "checking for $2... " >&6; }
2575 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2576 $as_echo_n "(cached) " >&6
2577 else
2578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579 /* end confdefs.h. */
2580 $4
2581 #include <$2>
2582 _ACEOF
2583 if ac_fn_c_try_compile "$LINENO"; then :
2584 eval "$3=yes"
2585 else
2586 eval "$3=no"
2587 fi
2588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2589 fi
2590 eval ac_res=\$$3
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2592 $as_echo "$ac_res" >&6; }
2593 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2594
2595 } # ac_fn_c_check_header_compile
2596
2597 # ac_fn_c_try_link LINENO
2598 # -----------------------
2599 # Try to link conftest.$ac_ext, and return whether this succeeded.
2600 ac_fn_c_try_link ()
2601 {
2602 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603 rm -f conftest.$ac_objext conftest$ac_exeext
2604 if { { ac_try="$ac_link"
2605 case "(($ac_try" in
2606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2607 *) ac_try_echo=$ac_try;;
2608 esac
2609 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2610 $as_echo "$ac_try_echo"; } >&5
2611 (eval "$ac_link") 2>conftest.err
2612 ac_status=$?
2613 if test -s conftest.err; then
2614 grep -v '^ *+' conftest.err >conftest.er1
2615 cat conftest.er1 >&5
2616 mv -f conftest.er1 conftest.err
2617 fi
2618 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2619 test $ac_status = 0; } && {
2620 test -z "$ac_c_werror_flag" ||
2621 test ! -s conftest.err
2622 } && test -s conftest$ac_exeext && {
2623 test "$cross_compiling" = yes ||
2624 $as_test_x conftest$ac_exeext
2625 }; then :
2626 ac_retval=0
2627 else
2628 $as_echo "$as_me: failed program was:" >&5
2629 sed 's/^/| /' conftest.$ac_ext >&5
2630
2631 ac_retval=1
2632 fi
2633 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2634 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2635 # interfere with the next link command; also delete a directory that is
2636 # left behind by Apple's compiler. We do this before executing the actions.
2637 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2638 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2639 as_fn_set_status $ac_retval
2640
2641 } # ac_fn_c_try_link
2642
2643 # ac_fn_c_check_decl LINENO SYMBOL VAR
2644 # ------------------------------------
2645 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2646 ac_fn_c_check_decl ()
2647 {
2648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2650 $as_echo_n "checking whether $2 is declared... " >&6; }
2651 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2652 $as_echo_n "(cached) " >&6
2653 else
2654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2655 /* end confdefs.h. */
2656 $4
2657 int
2658 main ()
2659 {
2660 #ifndef $2
2661 (void) $2;
2662 #endif
2663
2664 ;
2665 return 0;
2666 }
2667 _ACEOF
2668 if ac_fn_c_try_compile "$LINENO"; then :
2669 eval "$3=yes"
2670 else
2671 eval "$3=no"
2672 fi
2673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2674 fi
2675 eval ac_res=\$$3
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2677 $as_echo "$ac_res" >&6; }
2678 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2679
2680 } # ac_fn_c_check_decl
2681
2682 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2683 # ----------------------------------------------
2684 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2685 ac_fn_c_check_header_preproc ()
2686 {
2687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2689 $as_echo_n "checking for $2... " >&6; }
2690 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2691 $as_echo_n "(cached) " >&6
2692 else
2693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2694 /* end confdefs.h. */
2695 #include <$2>
2696 _ACEOF
2697 if ac_fn_c_try_cpp "$LINENO"; then :
2698 eval "$3=yes"
2699 else
2700 eval "$3=no"
2701 fi
2702 rm -f conftest.err conftest.$ac_ext
2703 fi
2704 eval ac_res=\$$3
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2706 $as_echo "$ac_res" >&6; }
2707 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2708
2709 } # ac_fn_c_check_header_preproc
2710
2711 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2712 # ----------------------------------------------------
2713 # Tries to find if the field MEMBER exists in type AGGR, after including
2714 # INCLUDES, setting cache variable VAR accordingly.
2715 ac_fn_c_check_member ()
2716 {
2717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2719 $as_echo_n "checking for $2.$3... " >&6; }
2720 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2721 $as_echo_n "(cached) " >&6
2722 else
2723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724 /* end confdefs.h. */
2725 $5
2726 int
2727 main ()
2728 {
2729 static $2 ac_aggr;
2730 if (ac_aggr.$3)
2731 return 0;
2732 ;
2733 return 0;
2734 }
2735 _ACEOF
2736 if ac_fn_c_try_compile "$LINENO"; then :
2737 eval "$4=yes"
2738 else
2739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2740 /* end confdefs.h. */
2741 $5
2742 int
2743 main ()
2744 {
2745 static $2 ac_aggr;
2746 if (sizeof ac_aggr.$3)
2747 return 0;
2748 ;
2749 return 0;
2750 }
2751 _ACEOF
2752 if ac_fn_c_try_compile "$LINENO"; then :
2753 eval "$4=yes"
2754 else
2755 eval "$4=no"
2756 fi
2757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2758 fi
2759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2760 fi
2761 eval ac_res=\$$4
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2763 $as_echo "$ac_res" >&6; }
2764 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2765
2766 } # ac_fn_c_check_member
2767
2768 # ac_fn_c_check_func LINENO FUNC VAR
2769 # ----------------------------------
2770 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2771 ac_fn_c_check_func ()
2772 {
2773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2775 $as_echo_n "checking for $2... " >&6; }
2776 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2777 $as_echo_n "(cached) " >&6
2778 else
2779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780 /* end confdefs.h. */
2781 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2782 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2783 #define $2 innocuous_$2
2784
2785 /* System header to define __stub macros and hopefully few prototypes,
2786 which can conflict with char $2 (); below.
2787 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2788 <limits.h> exists even on freestanding compilers. */
2789
2790 #ifdef __STDC__
2791 # include <limits.h>
2792 #else
2793 # include <assert.h>
2794 #endif
2795
2796 #undef $2
2797
2798 /* Override any GCC internal prototype to avoid an error.
2799 Use char because int might match the return type of a GCC
2800 builtin and then its argument prototype would still apply. */
2801 #ifdef __cplusplus
2802 extern "C"
2803 #endif
2804 char $2 ();
2805 /* The GNU C library defines this for functions which it implements
2806 to always fail with ENOSYS. Some functions are actually named
2807 something starting with __ and the normal name is an alias. */
2808 #if defined __stub_$2 || defined __stub___$2
2809 choke me
2810 #endif
2811
2812 int
2813 main ()
2814 {
2815 return $2 ();
2816 ;
2817 return 0;
2818 }
2819 _ACEOF
2820 if ac_fn_c_try_link "$LINENO"; then :
2821 eval "$3=yes"
2822 else
2823 eval "$3=no"
2824 fi
2825 rm -f core conftest.err conftest.$ac_objext \
2826 conftest$ac_exeext conftest.$ac_ext
2827 fi
2828 eval ac_res=\$$3
2829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2830 $as_echo "$ac_res" >&6; }
2831 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2832
2833 } # ac_fn_c_check_func
2834
2835 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2836 # -------------------------------------------
2837 # Tests whether TYPE exists after having included INCLUDES, setting cache
2838 # variable VAR accordingly.
2839 ac_fn_c_check_type ()
2840 {
2841 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2843 $as_echo_n "checking for $2... " >&6; }
2844 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2845 $as_echo_n "(cached) " >&6
2846 else
2847 eval "$3=no"
2848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2849 /* end confdefs.h. */
2850 $4
2851 int
2852 main ()
2853 {
2854 if (sizeof ($2))
2855 return 0;
2856 ;
2857 return 0;
2858 }
2859 _ACEOF
2860 if ac_fn_c_try_compile "$LINENO"; then :
2861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862 /* end confdefs.h. */
2863 $4
2864 int
2865 main ()
2866 {
2867 if (sizeof (($2)))
2868 return 0;
2869 ;
2870 return 0;
2871 }
2872 _ACEOF
2873 if ac_fn_c_try_compile "$LINENO"; then :
2874
2875 else
2876 eval "$3=yes"
2877 fi
2878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879 fi
2880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2881 fi
2882 eval ac_res=\$$3
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2884 $as_echo "$ac_res" >&6; }
2885 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2886
2887 } # ac_fn_c_check_type
2888
2889 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2890 # --------------------------------------------
2891 # Tries to find the compile-time value of EXPR in a program that includes
2892 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2893 # computed
2894 ac_fn_c_compute_int ()
2895 {
2896 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2897 if test "$cross_compiling" = yes; then
2898 # Depending upon the size, compute the lo and hi bounds.
2899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2900 /* end confdefs.h. */
2901 $4
2902 int
2903 main ()
2904 {
2905 static int test_array [1 - 2 * !(($2) >= 0)];
2906 test_array [0] = 0
2907
2908 ;
2909 return 0;
2910 }
2911 _ACEOF
2912 if ac_fn_c_try_compile "$LINENO"; then :
2913 ac_lo=0 ac_mid=0
2914 while :; do
2915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2916 /* end confdefs.h. */
2917 $4
2918 int
2919 main ()
2920 {
2921 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2922 test_array [0] = 0
2923
2924 ;
2925 return 0;
2926 }
2927 _ACEOF
2928 if ac_fn_c_try_compile "$LINENO"; then :
2929 ac_hi=$ac_mid; break
2930 else
2931 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2932 if test $ac_lo -le $ac_mid; then
2933 ac_lo= ac_hi=
2934 break
2935 fi
2936 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2937 fi
2938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2939 done
2940 else
2941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2942 /* end confdefs.h. */
2943 $4
2944 int
2945 main ()
2946 {
2947 static int test_array [1 - 2 * !(($2) < 0)];
2948 test_array [0] = 0
2949
2950 ;
2951 return 0;
2952 }
2953 _ACEOF
2954 if ac_fn_c_try_compile "$LINENO"; then :
2955 ac_hi=-1 ac_mid=-1
2956 while :; do
2957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2958 /* end confdefs.h. */
2959 $4
2960 int
2961 main ()
2962 {
2963 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2964 test_array [0] = 0
2965
2966 ;
2967 return 0;
2968 }
2969 _ACEOF
2970 if ac_fn_c_try_compile "$LINENO"; then :
2971 ac_lo=$ac_mid; break
2972 else
2973 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2974 if test $ac_mid -le $ac_hi; then
2975 ac_lo= ac_hi=
2976 break
2977 fi
2978 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2979 fi
2980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2981 done
2982 else
2983 ac_lo= ac_hi=
2984 fi
2985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2986 fi
2987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2988 # Binary search between lo and hi bounds.
2989 while test "x$ac_lo" != "x$ac_hi"; do
2990 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992 /* end confdefs.h. */
2993 $4
2994 int
2995 main ()
2996 {
2997 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2998 test_array [0] = 0
2999
3000 ;
3001 return 0;
3002 }
3003 _ACEOF
3004 if ac_fn_c_try_compile "$LINENO"; then :
3005 ac_hi=$ac_mid
3006 else
3007 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3008 fi
3009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3010 done
3011 case $ac_lo in #((
3012 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3013 '') ac_retval=1 ;;
3014 esac
3015 else
3016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3017 /* end confdefs.h. */
3018 $4
3019 static long int longval () { return $2; }
3020 static unsigned long int ulongval () { return $2; }
3021 #include <stdio.h>
3022 #include <stdlib.h>
3023 int
3024 main ()
3025 {
3026
3027 FILE *f = fopen ("conftest.val", "w");
3028 if (! f)
3029 return 1;
3030 if (($2) < 0)
3031 {
3032 long int i = longval ();
3033 if (i != ($2))
3034 return 1;
3035 fprintf (f, "%ld", i);
3036 }
3037 else
3038 {
3039 unsigned long int i = ulongval ();
3040 if (i != ($2))
3041 return 1;
3042 fprintf (f, "%lu", i);
3043 }
3044 /* Do not output a trailing newline, as this causes \r\n confusion
3045 on some platforms. */
3046 return ferror (f) || fclose (f) != 0;
3047
3048 ;
3049 return 0;
3050 }
3051 _ACEOF
3052 if ac_fn_c_try_run "$LINENO"; then :
3053 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3054 else
3055 ac_retval=1
3056 fi
3057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3058 conftest.$ac_objext conftest.beam conftest.$ac_ext
3059 rm -f conftest.val
3060
3061 fi
3062 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3063 as_fn_set_status $ac_retval
3064
3065 } # ac_fn_c_compute_int
3066 cat >config.log <<_ACEOF
3067 This file contains any messages produced by compilers while
3068 running configure, to aid debugging if configure makes a mistake.
3069
3070 It was created by emacs $as_me 24.3.50, which was
3071 generated by GNU Autoconf 2.65. Invocation command line was
3072
3073 $ $0 $@
3074
3075 _ACEOF
3076 exec 5>>config.log
3077 {
3078 cat <<_ASUNAME
3079 ## --------- ##
3080 ## Platform. ##
3081 ## --------- ##
3082
3083 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3084 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3085 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3086 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3087 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3088
3089 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3090 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3091
3092 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3093 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3094 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3095 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3096 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3097 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3098 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3099
3100 _ASUNAME
3101
3102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3103 for as_dir in $PATH
3104 do
3105 IFS=$as_save_IFS
3106 test -z "$as_dir" && as_dir=.
3107 $as_echo "PATH: $as_dir"
3108 done
3109 IFS=$as_save_IFS
3110
3111 } >&5
3112
3113 cat >&5 <<_ACEOF
3114
3115
3116 ## ----------- ##
3117 ## Core tests. ##
3118 ## ----------- ##
3119
3120 _ACEOF
3121
3122
3123 # Keep a trace of the command line.
3124 # Strip out --no-create and --no-recursion so they do not pile up.
3125 # Strip out --silent because we don't want to record it for future runs.
3126 # Also quote any args containing shell meta-characters.
3127 # Make two passes to allow for proper duplicate-argument suppression.
3128 ac_configure_args=
3129 ac_configure_args0=
3130 ac_configure_args1=
3131 ac_must_keep_next=false
3132 for ac_pass in 1 2
3133 do
3134 for ac_arg
3135 do
3136 case $ac_arg in
3137 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3139 | -silent | --silent | --silen | --sile | --sil)
3140 continue ;;
3141 *\'*)
3142 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3143 esac
3144 case $ac_pass in
3145 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3146 2)
3147 as_fn_append ac_configure_args1 " '$ac_arg'"
3148 if test $ac_must_keep_next = true; then
3149 ac_must_keep_next=false # Got value, back to normal.
3150 else
3151 case $ac_arg in
3152 *=* | --config-cache | -C | -disable-* | --disable-* \
3153 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3154 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3155 | -with-* | --with-* | -without-* | --without-* | --x)
3156 case "$ac_configure_args0 " in
3157 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3158 esac
3159 ;;
3160 -* ) ac_must_keep_next=true ;;
3161 esac
3162 fi
3163 as_fn_append ac_configure_args " '$ac_arg'"
3164 ;;
3165 esac
3166 done
3167 done
3168 { ac_configure_args0=; unset ac_configure_args0;}
3169 { ac_configure_args1=; unset ac_configure_args1;}
3170
3171 # When interrupted or exit'd, cleanup temporary files, and complete
3172 # config.log. We remove comments because anyway the quotes in there
3173 # would cause problems or look ugly.
3174 # WARNING: Use '\'' to represent an apostrophe within the trap.
3175 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3176 trap 'exit_status=$?
3177 # Save into config.log some information that might help in debugging.
3178 {
3179 echo
3180
3181 cat <<\_ASBOX
3182 ## ---------------- ##
3183 ## Cache variables. ##
3184 ## ---------------- ##
3185 _ASBOX
3186 echo
3187 # The following way of writing the cache mishandles newlines in values,
3188 (
3189 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3190 eval ac_val=\$$ac_var
3191 case $ac_val in #(
3192 *${as_nl}*)
3193 case $ac_var in #(
3194 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3195 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3196 esac
3197 case $ac_var in #(
3198 _ | IFS | as_nl) ;; #(
3199 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3200 *) { eval $ac_var=; unset $ac_var;} ;;
3201 esac ;;
3202 esac
3203 done
3204 (set) 2>&1 |
3205 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3206 *${as_nl}ac_space=\ *)
3207 sed -n \
3208 "s/'\''/'\''\\\\'\'''\''/g;
3209 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3210 ;; #(
3211 *)
3212 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3213 ;;
3214 esac |
3215 sort
3216 )
3217 echo
3218
3219 cat <<\_ASBOX
3220 ## ----------------- ##
3221 ## Output variables. ##
3222 ## ----------------- ##
3223 _ASBOX
3224 echo
3225 for ac_var in $ac_subst_vars
3226 do
3227 eval ac_val=\$$ac_var
3228 case $ac_val in
3229 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3230 esac
3231 $as_echo "$ac_var='\''$ac_val'\''"
3232 done | sort
3233 echo
3234
3235 if test -n "$ac_subst_files"; then
3236 cat <<\_ASBOX
3237 ## ------------------- ##
3238 ## File substitutions. ##
3239 ## ------------------- ##
3240 _ASBOX
3241 echo
3242 for ac_var in $ac_subst_files
3243 do
3244 eval ac_val=\$$ac_var
3245 case $ac_val in
3246 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3247 esac
3248 $as_echo "$ac_var='\''$ac_val'\''"
3249 done | sort
3250 echo
3251 fi
3252
3253 if test -s confdefs.h; then
3254 cat <<\_ASBOX
3255 ## ----------- ##
3256 ## confdefs.h. ##
3257 ## ----------- ##
3258 _ASBOX
3259 echo
3260 cat confdefs.h
3261 echo
3262 fi
3263 test "$ac_signal" != 0 &&
3264 $as_echo "$as_me: caught signal $ac_signal"
3265 $as_echo "$as_me: exit $exit_status"
3266 } >&5
3267 rm -f core *.core core.conftest.* &&
3268 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3269 exit $exit_status
3270 ' 0
3271 for ac_signal in 1 2 13 15; do
3272 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3273 done
3274 ac_signal=0
3275
3276 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3277 rm -f -r conftest* confdefs.h
3278
3279 $as_echo "/* confdefs.h */" > confdefs.h
3280
3281 # Predefined preprocessor variables.
3282
3283 cat >>confdefs.h <<_ACEOF
3284 #define PACKAGE_NAME "$PACKAGE_NAME"
3285 _ACEOF
3286
3287 cat >>confdefs.h <<_ACEOF
3288 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3289 _ACEOF
3290
3291 cat >>confdefs.h <<_ACEOF
3292 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3293 _ACEOF
3294
3295 cat >>confdefs.h <<_ACEOF
3296 #define PACKAGE_STRING "$PACKAGE_STRING"
3297 _ACEOF
3298
3299 cat >>confdefs.h <<_ACEOF
3300 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3301 _ACEOF
3302
3303 cat >>confdefs.h <<_ACEOF
3304 #define PACKAGE_URL "$PACKAGE_URL"
3305 _ACEOF
3306
3307
3308 # Let the site file select an alternate cache file if it wants to.
3309 # Prefer an explicitly selected file to automatically selected ones.
3310 ac_site_file1=NONE
3311 ac_site_file2=NONE
3312 if test -n "$CONFIG_SITE"; then
3313 ac_site_file1=$CONFIG_SITE
3314 elif test "x$prefix" != xNONE; then
3315 ac_site_file1=$prefix/share/config.site
3316 ac_site_file2=$prefix/etc/config.site
3317 else
3318 ac_site_file1=$ac_default_prefix/share/config.site
3319 ac_site_file2=$ac_default_prefix/etc/config.site
3320 fi
3321 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3322 do
3323 test "x$ac_site_file" = xNONE && continue
3324 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3325 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3326 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3327 sed 's/^/| /' "$ac_site_file" >&5
3328 . "$ac_site_file"
3329 fi
3330 done
3331
3332 if test -r "$cache_file"; then
3333 # Some versions of bash will fail to source /dev/null (special files
3334 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3335 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3337 $as_echo "$as_me: loading cache $cache_file" >&6;}
3338 case $cache_file in
3339 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3340 *) . "./$cache_file";;
3341 esac
3342 fi
3343 else
3344 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3345 $as_echo "$as_me: creating cache $cache_file" >&6;}
3346 >$cache_file
3347 fi
3348
3349 as_fn_append ac_header_list " linux/version.h"
3350 as_fn_append ac_header_list " sys/systeminfo.h"
3351 as_fn_append ac_header_list " coff.h"
3352 as_fn_append ac_header_list " pty.h"
3353 as_fn_append ac_header_list " sys/resource.h"
3354 as_fn_append ac_header_list " sys/utsname.h"
3355 as_fn_append ac_header_list " pwd.h"
3356 as_fn_append ac_header_list " utmp.h"
3357 as_fn_append ac_header_list " util.h"
3358 as_fn_append ac_header_list " sys/socket.h"
3359 as_fn_append ac_header_list " stdlib.h"
3360 as_fn_append ac_header_list " unistd.h"
3361 as_fn_append ac_header_list " sys/param.h"
3362 as_fn_append ac_header_list " pthread.h"
3363 as_fn_append ac_header_list " malloc/malloc.h"
3364 as_fn_append ac_header_list " maillock.h"
3365 as_fn_append ac_header_list " sys/un.h"
3366 as_fn_append ac_func_list " tzset"
3367 as_fn_append ac_func_list " readlinkat"
3368 as_fn_append ac_header_list " dirent.h"
3369 as_fn_append ac_header_list " execinfo.h"
3370 as_fn_append ac_func_list " faccessat"
3371 as_fn_append ac_func_list " fdopendir"
3372 as_fn_append ac_header_list " stdio_ext.h"
3373 as_fn_append ac_func_list " __fpending"
3374 as_fn_append ac_func_list " fstatat"
3375 as_fn_append ac_func_list " fsync"
3376 gl_getopt_required=GNU
3377 as_fn_append ac_header_list " getopt.h"
3378 as_fn_append ac_func_list " gettimeofday"
3379 as_fn_append ac_func_list " nanotime"
3380 as_fn_append ac_header_list " sys/time.h"
3381 as_fn_append ac_header_list " wchar.h"
3382 as_fn_append ac_header_list " stdint.h"
3383 as_fn_append ac_header_list " inttypes.h"
3384 as_fn_append ac_func_list " lstat"
3385 as_fn_append ac_header_list " sys/select.h"
3386 as_fn_append ac_func_list " pselect"
3387 as_fn_append ac_func_list " pthread_sigmask"
3388 as_fn_append ac_func_list " readlink"
3389 as_fn_append ac_func_list " strtoimax"
3390 as_fn_append ac_func_list " strtoumax"
3391 as_fn_append ac_func_list " symlink"
3392 as_fn_append ac_header_list " sys/stat.h"
3393 as_fn_append ac_func_list " localtime_r"
3394 as_fn_append ac_header_list " utime.h"
3395 as_fn_append ac_func_list " futimes"
3396 as_fn_append ac_func_list " futimesat"
3397 as_fn_append ac_func_list " futimens"
3398 as_fn_append ac_func_list " utimensat"
3399 as_fn_append ac_func_list " lutimes"
3400 # Check that the precious variables saved in the cache have kept the same
3401 # value.
3402 ac_cache_corrupted=false
3403 for ac_var in $ac_precious_vars; do
3404 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3405 eval ac_new_set=\$ac_env_${ac_var}_set
3406 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3407 eval ac_new_val=\$ac_env_${ac_var}_value
3408 case $ac_old_set,$ac_new_set in
3409 set,)
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3411 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3412 ac_cache_corrupted=: ;;
3413 ,set)
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3415 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3416 ac_cache_corrupted=: ;;
3417 ,);;
3418 *)
3419 if test "x$ac_old_val" != "x$ac_new_val"; then
3420 # differences in whitespace do not lead to failure.
3421 ac_old_val_w=`echo x $ac_old_val`
3422 ac_new_val_w=`echo x $ac_new_val`
3423 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3425 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3426 ac_cache_corrupted=:
3427 else
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3429 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3430 eval $ac_var=\$ac_old_val
3431 fi
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3433 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3435 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3436 fi;;
3437 esac
3438 # Pass precious variables to config.status.
3439 if test "$ac_new_set" = set; then
3440 case $ac_new_val in
3441 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3442 *) ac_arg=$ac_var=$ac_new_val ;;
3443 esac
3444 case " $ac_configure_args " in
3445 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3446 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3447 esac
3448 fi
3449 done
3450 if $ac_cache_corrupted; then
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3452 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3454 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3455 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3456 fi
3457 ## -------------------- ##
3458 ## Main body of script. ##
3459 ## -------------------- ##
3460
3461 ac_ext=c
3462 ac_cpp='$CPP $CPPFLAGS'
3463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3466
3467
3468
3469 emacs_config_options="$@"
3470 ## Add some environment variables, if they were passed via the environment
3471 ## rather than on the command-line.
3472 for var in CFLAGS CPPFLAGS LDFLAGS; do
3473 case "$emacs_config_options" in
3474 *$var=*) continue ;;
3475 esac
3476 eval val="\$${var}"
3477 test x"$val" = x && continue
3478 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
3479 done
3480
3481 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3482
3483
3484 ac_aux_dir=
3485 for ac_dir in build-aux "$srcdir"/build-aux; do
3486 for ac_t in install-sh install.sh shtool; do
3487 if test -f "$ac_dir/$ac_t"; then
3488 ac_aux_dir=$ac_dir
3489 ac_install_sh="$ac_aux_dir/$ac_t -c"
3490 break 2
3491 fi
3492 done
3493 done
3494 if test -z "$ac_aux_dir"; then
3495 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3496 fi
3497
3498 # These three variables are undocumented and unsupported,
3499 # and are intended to be withdrawn in a future Autoconf release.
3500 # They can cause serious problems if a builder's source tree is in a directory
3501 # whose full name contains unusual characters.
3502 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3503 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3504 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3505
3506
3507 am__api_version='1.11'
3508
3509 # Find a good install program. We prefer a C program (faster),
3510 # so one script is as good as another. But avoid the broken or
3511 # incompatible versions:
3512 # SysV /etc/install, /usr/sbin/install
3513 # SunOS /usr/etc/install
3514 # IRIX /sbin/install
3515 # AIX /bin/install
3516 # AmigaOS /C/install, which installs bootblocks on floppy discs
3517 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3518 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3519 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3520 # OS/2's system install, which has a completely different semantic
3521 # ./install, which can be erroneously created by make from ./install.sh.
3522 # Reject install programs that cannot install multiple files.
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3524 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3525 if test -z "$INSTALL"; then
3526 if test "${ac_cv_path_install+set}" = set; then :
3527 $as_echo_n "(cached) " >&6
3528 else
3529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3530 for as_dir in $PATH
3531 do
3532 IFS=$as_save_IFS
3533 test -z "$as_dir" && as_dir=.
3534 # Account for people who put trailing slashes in PATH elements.
3535 case $as_dir/ in #((
3536 ./ | .// | /[cC]/* | \
3537 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3538 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3539 /usr/ucb/* ) ;;
3540 *)
3541 # OSF1 and SCO ODT 3.0 have their own names for install.
3542 # Don't use installbsd from OSF since it installs stuff as root
3543 # by default.
3544 for ac_prog in ginstall scoinst install; do
3545 for ac_exec_ext in '' $ac_executable_extensions; do
3546 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3547 if test $ac_prog = install &&
3548 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3549 # AIX install. It has an incompatible calling convention.
3550 :
3551 elif test $ac_prog = install &&
3552 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3553 # program-specific install script used by HP pwplus--don't use.
3554 :
3555 else
3556 rm -rf conftest.one conftest.two conftest.dir
3557 echo one > conftest.one
3558 echo two > conftest.two
3559 mkdir conftest.dir
3560 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3561 test -s conftest.one && test -s conftest.two &&
3562 test -s conftest.dir/conftest.one &&
3563 test -s conftest.dir/conftest.two
3564 then
3565 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3566 break 3
3567 fi
3568 fi
3569 fi
3570 done
3571 done
3572 ;;
3573 esac
3574
3575 done
3576 IFS=$as_save_IFS
3577
3578 rm -rf conftest.one conftest.two conftest.dir
3579
3580 fi
3581 if test "${ac_cv_path_install+set}" = set; then
3582 INSTALL=$ac_cv_path_install
3583 else
3584 # As a last resort, use the slow shell script. Don't cache a
3585 # value for INSTALL within a source directory, because that will
3586 # break other packages using the cache if that directory is
3587 # removed, or if the value is a relative name.
3588 INSTALL=$ac_install_sh
3589 fi
3590 fi
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3592 $as_echo "$INSTALL" >&6; }
3593
3594 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3595 # It thinks the first close brace ends the variable substitution.
3596 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3597
3598 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3599
3600 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3601
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3603 $as_echo_n "checking whether build environment is sane... " >&6; }
3604 # Just in case
3605 sleep 1
3606 echo timestamp > conftest.file
3607 # Reject unsafe characters in $srcdir or the absolute working directory
3608 # name. Accept space and tab only in the latter.
3609 am_lf='
3610 '
3611 case `pwd` in
3612 *[\\\"\#\$\&\'\`$am_lf]*)
3613 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3614 esac
3615 case $srcdir in
3616 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3617 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3618 esac
3619
3620 # Do `set' in a subshell so we don't clobber the current shell's
3621 # arguments. Must try -L first in case configure is actually a
3622 # symlink; some systems play weird games with the mod time of symlinks
3623 # (eg FreeBSD returns the mod time of the symlink's containing
3624 # directory).
3625 if (
3626 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3627 if test "$*" = "X"; then
3628 # -L didn't work.
3629 set X `ls -t "$srcdir/configure" conftest.file`
3630 fi
3631 rm -f conftest.file
3632 if test "$*" != "X $srcdir/configure conftest.file" \
3633 && test "$*" != "X conftest.file $srcdir/configure"; then
3634
3635 # If neither matched, then we have a broken ls. This can happen
3636 # if, for instance, CONFIG_SHELL is bash and it inherits a
3637 # broken ls alias from the environment. This has actually
3638 # happened. Such a system could not be considered "sane".
3639 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3640 alias in your environment" "$LINENO" 5
3641 fi
3642
3643 test "$2" = conftest.file
3644 )
3645 then
3646 # Ok.
3647 :
3648 else
3649 as_fn_error "newly created file is older than distributed files!
3650 Check your system clock" "$LINENO" 5
3651 fi
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3653 $as_echo "yes" >&6; }
3654 test "$program_prefix" != NONE &&
3655 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3656 # Use a double $ so make ignores it.
3657 test "$program_suffix" != NONE &&
3658 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3659 # Double any \ or $.
3660 # By default was `s,x,x', remove it if useless.
3661 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3662 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3663
3664 # expand $ac_aux_dir to an absolute path
3665 am_aux_dir=`cd $ac_aux_dir && pwd`
3666
3667 if test x"${MISSING+set}" != xset; then
3668 case $am_aux_dir in
3669 *\ * | *\ *)
3670 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3671 *)
3672 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3673 esac
3674 fi
3675 # Use eval to expand $SHELL
3676 if eval "$MISSING --run true"; then
3677 am_missing_run="$MISSING --run "
3678 else
3679 am_missing_run=
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3681 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3682 fi
3683
3684 if test x"${install_sh}" != xset; then
3685 case $am_aux_dir in
3686 *\ * | *\ *)
3687 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3688 *)
3689 install_sh="\${SHELL} $am_aux_dir/install-sh"
3690 esac
3691 fi
3692
3693 # Installed binaries are usually stripped using `strip' when the user
3694 # run `make install-strip'. However `strip' might not be the right
3695 # tool to use in cross-compilation environments, therefore Automake
3696 # will honor the `STRIP' environment variable to overrule this program.
3697 if test "$cross_compiling" != no; then
3698 if test -n "$ac_tool_prefix"; then
3699 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3700 set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then :
3704 $as_echo_n "(cached) " >&6
3705 else
3706 if test -n "$STRIP"; then
3707 ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
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 STRIP=$ac_cv_prog_STRIP
3727 if test -n "$STRIP"; then
3728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3729 $as_echo "$STRIP" >&6; }
3730 else
3731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3732 $as_echo "no" >&6; }
3733 fi
3734
3735
3736 fi
3737 if test -z "$ac_cv_prog_STRIP"; then
3738 ac_ct_STRIP=$STRIP
3739 # Extract the first word of "strip", so it can be a program name with args.
3740 set dummy strip; ac_word=$2
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742 $as_echo_n "checking for $ac_word... " >&6; }
3743 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3744 $as_echo_n "(cached) " >&6
3745 else
3746 if test -n "$ac_ct_STRIP"; then
3747 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3748 else
3749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750 for as_dir in $PATH
3751 do
3752 IFS=$as_save_IFS
3753 test -z "$as_dir" && as_dir=.
3754 for ac_exec_ext in '' $ac_executable_extensions; do
3755 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3756 ac_cv_prog_ac_ct_STRIP="strip"
3757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3758 break 2
3759 fi
3760 done
3761 done
3762 IFS=$as_save_IFS
3763
3764 fi
3765 fi
3766 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3767 if test -n "$ac_ct_STRIP"; then
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3769 $as_echo "$ac_ct_STRIP" >&6; }
3770 else
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772 $as_echo "no" >&6; }
3773 fi
3774
3775 if test "x$ac_ct_STRIP" = x; then
3776 STRIP=":"
3777 else
3778 case $cross_compiling:$ac_tool_warned in
3779 yes:)
3780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3781 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3782 ac_tool_warned=yes ;;
3783 esac
3784 STRIP=$ac_ct_STRIP
3785 fi
3786 else
3787 STRIP="$ac_cv_prog_STRIP"
3788 fi
3789
3790 fi
3791 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3792
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3794 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3795 if test -z "$MKDIR_P"; then
3796 if test "${ac_cv_path_mkdir+set}" = set; then :
3797 $as_echo_n "(cached) " >&6
3798 else
3799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3800 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3801 do
3802 IFS=$as_save_IFS
3803 test -z "$as_dir" && as_dir=.
3804 for ac_prog in mkdir gmkdir; do
3805 for ac_exec_ext in '' $ac_executable_extensions; do
3806 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3807 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3808 'mkdir (GNU coreutils) '* | \
3809 'mkdir (coreutils) '* | \
3810 'mkdir (fileutils) '4.1*)
3811 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3812 break 3;;
3813 esac
3814 done
3815 done
3816 done
3817 IFS=$as_save_IFS
3818
3819 fi
3820
3821 test -d ./--version && rmdir ./--version
3822 if test "${ac_cv_path_mkdir+set}" = set; then
3823 MKDIR_P="$ac_cv_path_mkdir -p"
3824 else
3825 # As a last resort, use the slow shell script. Don't cache a
3826 # value for MKDIR_P within a source directory, because that will
3827 # break other packages using the cache if that directory is
3828 # removed, or if the value is a relative name.
3829 MKDIR_P="$ac_install_sh -d"
3830 fi
3831 fi
3832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3833 $as_echo "$MKDIR_P" >&6; }
3834
3835 mkdir_p="$MKDIR_P"
3836 case $mkdir_p in
3837 [\\/$]* | ?:[\\/]*) ;;
3838 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3839 esac
3840
3841 for ac_prog in gawk mawk nawk awk
3842 do
3843 # Extract the first word of "$ac_prog", so it can be a program name with args.
3844 set dummy $ac_prog; ac_word=$2
3845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3846 $as_echo_n "checking for $ac_word... " >&6; }
3847 if test "${ac_cv_prog_AWK+set}" = set; then :
3848 $as_echo_n "(cached) " >&6
3849 else
3850 if test -n "$AWK"; then
3851 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3852 else
3853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854 for as_dir in $PATH
3855 do
3856 IFS=$as_save_IFS
3857 test -z "$as_dir" && as_dir=.
3858 for ac_exec_ext in '' $ac_executable_extensions; do
3859 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3860 ac_cv_prog_AWK="$ac_prog"
3861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3862 break 2
3863 fi
3864 done
3865 done
3866 IFS=$as_save_IFS
3867
3868 fi
3869 fi
3870 AWK=$ac_cv_prog_AWK
3871 if test -n "$AWK"; then
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3873 $as_echo "$AWK" >&6; }
3874 else
3875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3876 $as_echo "no" >&6; }
3877 fi
3878
3879
3880 test -n "$AWK" && break
3881 done
3882
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3884 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3885 set x ${MAKE-make}
3886 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3887 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3888 $as_echo_n "(cached) " >&6
3889 else
3890 cat >conftest.make <<\_ACEOF
3891 SHELL = /bin/sh
3892 all:
3893 @echo '@@@%%%=$(MAKE)=@@@%%%'
3894 _ACEOF
3895 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3896 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3897 *@@@%%%=?*=@@@%%%*)
3898 eval ac_cv_prog_make_${ac_make}_set=yes;;
3899 *)
3900 eval ac_cv_prog_make_${ac_make}_set=no;;
3901 esac
3902 rm -f conftest.make
3903 fi
3904 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3906 $as_echo "yes" >&6; }
3907 SET_MAKE=
3908 else
3909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3910 $as_echo "no" >&6; }
3911 SET_MAKE="MAKE=${MAKE-make}"
3912 fi
3913
3914 rm -rf .tst 2>/dev/null
3915 mkdir .tst 2>/dev/null
3916 if test -d .tst; then
3917 am__leading_dot=.
3918 else
3919 am__leading_dot=_
3920 fi
3921 rmdir .tst 2>/dev/null
3922
3923 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3924 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3925 # is not polluted with repeated "-I."
3926 am__isrc=' -I$(srcdir)'
3927 # test to see if srcdir already configured
3928 if test -f $srcdir/config.status; then
3929 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3930 fi
3931 fi
3932
3933 # test whether we have cygpath
3934 if test -z "$CYGPATH_W"; then
3935 if (cygpath --version) >/dev/null 2>/dev/null; then
3936 CYGPATH_W='cygpath -w'
3937 else
3938 CYGPATH_W=echo
3939 fi
3940 fi
3941
3942
3943 # Define the identity of the package.
3944 PACKAGE='emacs'
3945 VERSION='24.3.50'
3946
3947
3948 cat >>confdefs.h <<_ACEOF
3949 #define PACKAGE "$PACKAGE"
3950 _ACEOF
3951
3952
3953 cat >>confdefs.h <<_ACEOF
3954 #define VERSION "$VERSION"
3955 _ACEOF
3956
3957 # Some tools Automake needs.
3958
3959 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3960
3961
3962 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3963
3964
3965 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3966
3967
3968 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3969
3970
3971 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3972
3973 # We need awk for the "check" target. The system "awk" is bad on
3974 # some platforms.
3975 # Always define AMTAR for backward compatibility.
3976
3977 AMTAR=${AMTAR-"${am_missing_run}tar"}
3978
3979 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3980
3981
3982
3983
3984
3985
3986
3987
3988 lispdir='${datadir}/emacs/${version}/lisp'
3989 leimdir='${datadir}/emacs/${version}/leim'
3990 standardlisppath='${lispdir}:${leimdir}'
3991 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3992 '${datadir}/emacs/site-lisp'
3993 lisppath='${locallisppath}:${standardlisppath}'
3994 etcdir='${datadir}/emacs/${version}/etc'
3995 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3996 docdir='${datadir}/emacs/${version}/etc'
3997 gamedir='${localstatedir}/games/emacs'
3998
3999
4000 # Check whether --with-all was given.
4001 if test "${with_all+set}" = set; then :
4002 withval=$with_all; with_features=$withval
4003 else
4004 with_features=yes
4005 fi
4006
4007
4008
4009
4010
4011 # Check whether --with-pop was given.
4012 if test "${with_pop+set}" = set; then :
4013 withval=$with_pop;
4014 else
4015 with_pop=$with_features
4016 fi
4017
4018 if test "$with_pop" = yes; then
4019 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4020
4021 fi
4022
4023
4024 # Check whether --with-kerberos was given.
4025 if test "${with_kerberos+set}" = set; then :
4026 withval=$with_kerberos;
4027 else
4028 with_kerberos=no
4029 fi
4030
4031 if test "$with_kerberos" != no; then
4032 $as_echo "#define KERBEROS 1" >>confdefs.h
4033
4034 fi
4035
4036
4037 # Check whether --with-kerberos5 was given.
4038 if test "${with_kerberos5+set}" = set; then :
4039 withval=$with_kerberos5;
4040 else
4041 with_kerberos5=no
4042 fi
4043
4044 if test "${with_kerberos5}" != no; then
4045 if test "${with_kerberos}" = no; then
4046 with_kerberos=yes
4047 $as_echo "#define KERBEROS 1" >>confdefs.h
4048
4049 fi
4050
4051 $as_echo "#define KERBEROS5 1" >>confdefs.h
4052
4053 fi
4054
4055
4056 # Check whether --with-hesiod was given.
4057 if test "${with_hesiod+set}" = set; then :
4058 withval=$with_hesiod;
4059 else
4060 with_hesiod=no
4061 fi
4062
4063 if test "$with_hesiod" != no; then
4064
4065 $as_echo "#define HESIOD 1" >>confdefs.h
4066
4067 fi
4068
4069
4070 # Check whether --with-mmdf was given.
4071 if test "${with_mmdf+set}" = set; then :
4072 withval=$with_mmdf;
4073 else
4074 with_mmdf=no
4075 fi
4076
4077 if test "$with_mmdf" != no; then
4078
4079 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4080
4081 fi
4082
4083
4084 # Check whether --with-mail-unlink was given.
4085 if test "${with_mail_unlink+set}" = set; then :
4086 withval=$with_mail_unlink;
4087 else
4088 with_mail_unlink=no
4089 fi
4090
4091 if test "$with_mail_unlink" != no; then
4092
4093 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4094
4095 fi
4096
4097
4098 # Check whether --with-mailhost was given.
4099 if test "${with_mailhost+set}" = set; then :
4100 withval=$with_mailhost;
4101 cat >>confdefs.h <<_ACEOF
4102 #define MAILHOST "$withval"
4103 _ACEOF
4104
4105 fi
4106
4107
4108
4109 # Check whether --with-sound was given.
4110 if test "${with_sound+set}" = set; then :
4111 withval=$with_sound;
4112 else
4113 with_sound=$with_features
4114 fi
4115
4116
4117
4118 # Check whether --with-x-toolkit was given.
4119 if test "${with_x_toolkit+set}" = set; then :
4120 withval=$with_x_toolkit; case "${withval}" in
4121 y | ye | yes ) val=gtk ;;
4122 n | no ) val=no ;;
4123 l | lu | luc | luci | lucid ) val=lucid ;;
4124 a | at | ath | athe | athen | athena ) val=athena ;;
4125 m | mo | mot | moti | motif ) val=motif ;;
4126 g | gt | gtk ) val=gtk ;;
4127 gtk2 ) val=gtk2 ;;
4128 gtk3 ) val=gtk3 ;;
4129 * )
4130 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4131 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4132 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4133 \`athena' and \`lucid' are synonyms." "$LINENO" 5
4134 ;;
4135 esac
4136 with_x_toolkit=$val
4137
4138 fi
4139
4140
4141
4142 # Check whether --with-wide-int was given.
4143 if test "${with_wide_int+set}" = set; then :
4144 withval=$with_wide_int;
4145 else
4146 with_wide_int=no
4147 fi
4148
4149 if test "$with_wide_int" = yes; then
4150
4151 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4152
4153 fi
4154
4155
4156 # Check whether --with-xpm was given.
4157 if test "${with_xpm+set}" = set; then :
4158 withval=$with_xpm;
4159 else
4160 with_xpm=$with_features
4161 fi
4162
4163
4164 # Check whether --with-jpeg was given.
4165 if test "${with_jpeg+set}" = set; then :
4166 withval=$with_jpeg;
4167 else
4168 with_jpeg=$with_features
4169 fi
4170
4171
4172 # Check whether --with-tiff was given.
4173 if test "${with_tiff+set}" = set; then :
4174 withval=$with_tiff;
4175 else
4176 with_tiff=$with_features
4177 fi
4178
4179
4180 # Check whether --with-gif was given.
4181 if test "${with_gif+set}" = set; then :
4182 withval=$with_gif;
4183 else
4184 with_gif=$with_features
4185 fi
4186
4187
4188 # Check whether --with-png was given.
4189 if test "${with_png+set}" = set; then :
4190 withval=$with_png;
4191 else
4192 with_png=$with_features
4193 fi
4194
4195
4196 # Check whether --with-rsvg was given.
4197 if test "${with_rsvg+set}" = set; then :
4198 withval=$with_rsvg;
4199 else
4200 with_rsvg=$with_features
4201 fi
4202
4203
4204 # Check whether --with-xml2 was given.
4205 if test "${with_xml2+set}" = set; then :
4206 withval=$with_xml2;
4207 else
4208 with_xml2=$with_features
4209 fi
4210
4211
4212 # Check whether --with-imagemagick was given.
4213 if test "${with_imagemagick+set}" = set; then :
4214 withval=$with_imagemagick;
4215 else
4216 with_imagemagick=$with_features
4217 fi
4218
4219
4220
4221 # Check whether --with-xft was given.
4222 if test "${with_xft+set}" = set; then :
4223 withval=$with_xft;
4224 else
4225 with_xft=$with_features
4226 fi
4227
4228
4229 # Check whether --with-libotf was given.
4230 if test "${with_libotf+set}" = set; then :
4231 withval=$with_libotf;
4232 else
4233 with_libotf=$with_features
4234 fi
4235
4236
4237 # Check whether --with-m17n-flt was given.
4238 if test "${with_m17n_flt+set}" = set; then :
4239 withval=$with_m17n_flt;
4240 else
4241 with_m17n_flt=$with_features
4242 fi
4243
4244
4245
4246 # Check whether --with-toolkit-scroll-bars was given.
4247 if test "${with_toolkit_scroll_bars+set}" = set; then :
4248 withval=$with_toolkit_scroll_bars;
4249 else
4250 with_toolkit_scroll_bars=$with_features
4251 fi
4252
4253
4254 # Check whether --with-xaw3d was given.
4255 if test "${with_xaw3d+set}" = set; then :
4256 withval=$with_xaw3d;
4257 else
4258 with_xaw3d=$with_features
4259 fi
4260
4261
4262 # Check whether --with-xim was given.
4263 if test "${with_xim+set}" = set; then :
4264 withval=$with_xim;
4265 else
4266 with_xim=$with_features
4267 fi
4268
4269
4270 # Check whether --with-ns was given.
4271 if test "${with_ns+set}" = set; then :
4272 withval=$with_ns;
4273 else
4274 with_ns=no
4275 fi
4276
4277
4278 # Check whether --with-w32 was given.
4279 if test "${with_w32+set}" = set; then :
4280 withval=$with_w32;
4281 else
4282 with_w32=no
4283 fi
4284
4285
4286
4287 # Check whether --with-gpm was given.
4288 if test "${with_gpm+set}" = set; then :
4289 withval=$with_gpm;
4290 else
4291 with_gpm=$with_features
4292 fi
4293
4294
4295 # Check whether --with-dbus was given.
4296 if test "${with_dbus+set}" = set; then :
4297 withval=$with_dbus;
4298 else
4299 with_dbus=$with_features
4300 fi
4301
4302
4303 # Check whether --with-gconf was given.
4304 if test "${with_gconf+set}" = set; then :
4305 withval=$with_gconf;
4306 else
4307 with_gconf=$with_features
4308 fi
4309
4310
4311 # Check whether --with-gsettings was given.
4312 if test "${with_gsettings+set}" = set; then :
4313 withval=$with_gsettings;
4314 else
4315 with_gsettings=$with_features
4316 fi
4317
4318
4319 # Check whether --with-selinux was given.
4320 if test "${with_selinux+set}" = set; then :
4321 withval=$with_selinux;
4322 else
4323 with_selinux=$with_features
4324 fi
4325
4326
4327 # Check whether --with-gnutls was given.
4328 if test "${with_gnutls+set}" = set; then :
4329 withval=$with_gnutls;
4330 else
4331 with_gnutls=$with_features
4332 fi
4333
4334
4335 # Check whether --with-inotify was given.
4336 if test "${with_inotify+set}" = set; then :
4337 withval=$with_inotify;
4338 else
4339 with_inotify=$with_features
4340 fi
4341
4342
4343 ## For the times when you want to build Emacs but don't have
4344 ## a suitable makeinfo, and can live without the manuals.
4345
4346 # Check whether --with-makeinfo was given.
4347 if test "${with_makeinfo+set}" = set; then :
4348 withval=$with_makeinfo;
4349 else
4350 with_makeinfo=$with_features
4351 fi
4352
4353
4354 ## Makefile.in needs the cache file name.
4355
4356
4357 ## This is an option because I do not know if all info/man support
4358 ## compressed files, nor how to test if they do so.
4359
4360 # Check whether --with-compress-info was given.
4361 if test "${with_compress_info+set}" = set; then :
4362 withval=$with_compress_info;
4363 else
4364 with_compress_info=$with_features
4365 fi
4366
4367 if test $with_compress_info = yes; then
4368 GZIP_INFO=yes
4369 else
4370 GZIP_INFO=
4371 fi
4372
4373
4374
4375 # Check whether --with-pkg-config-prog was given.
4376 if test "${with_pkg_config_prog+set}" = set; then :
4377 withval=$with_pkg_config_prog;
4378 fi
4379
4380 if test "X${with_pkg_config_prog}" != X; then
4381 if test "${with_pkg_config_prog}" != yes; then
4382 PKG_CONFIG="${with_pkg_config_prog}"
4383 fi
4384 fi
4385
4386
4387 # Check whether --with-gameuser was given.
4388 if test "${with_gameuser+set}" = set; then :
4389 withval=$with_gameuser;
4390 fi
4391
4392 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4393 && gameuser="${with_gameuser}"
4394 test "X$gameuser" = X && gameuser=games
4395
4396
4397 # Check whether --with-gnustep-conf was given.
4398 if test "${with_gnustep_conf+set}" = set; then :
4399 withval=$with_gnustep_conf;
4400 fi
4401
4402 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4403 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4404 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4405 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4406
4407 # Check whether --enable-ns-self-contained was given.
4408 if test "${enable_ns_self_contained+set}" = set; then :
4409 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4410 else
4411 EN_NS_SELF_CONTAINED=yes
4412 fi
4413
4414
4415 # Check whether --enable-locallisppath was given.
4416 if test "${enable_locallisppath+set}" = set; then :
4417 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4418 locallisppath=
4419 elif test "${enableval}" != "yes"; then
4420 locallisppath=${enableval}
4421 fi
4422 fi
4423
4424
4425 # Check whether --enable-checking was given.
4426 if test "${enable_checking+set}" = set; then :
4427 enableval=$enable_checking; ac_checking_flags="${enableval}"
4428 fi
4429
4430 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4431 for check in $ac_checking_flags
4432 do
4433 case $check in
4434 # these set all the flags to specific states
4435 yes) ac_enable_checking=1 ;;
4436 no) ac_enable_checking= ;
4437 ac_gc_check_stringbytes= ;
4438 ac_gc_check_string_overrun= ;
4439 ac_gc_check_string_free_list= ;
4440 ac_xmalloc_overrun= ;
4441 ac_gc_check_cons_list= ;
4442 ac_glyphs_debug= ;;
4443 all) ac_enable_checking=1 ;
4444 ac_gc_check_stringbytes=1 ;
4445 ac_gc_check_string_overrun=1 ;
4446 ac_gc_check_string_free_list=1 ;
4447 ac_xmalloc_overrun=1 ;
4448 ac_gc_check_cons_list=1 ;
4449 ac_glyphs_debug=1 ;;
4450 # these enable particular checks
4451 stringbytes) ac_gc_check_stringbytes=1 ;;
4452 stringoverrun) ac_gc_check_string_overrun=1 ;;
4453 stringfreelist) ac_gc_check_string_free_list=1 ;;
4454 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4455 conslist) ac_gc_check_cons_list=1 ;;
4456 glyphs) ac_glyphs_debug=1 ;;
4457 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4458 esac
4459 done
4460 IFS="$ac_save_IFS"
4461
4462 if test x$ac_enable_checking != x ; then
4463
4464 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4465
4466 fi
4467 if test x$ac_gc_check_stringbytes != x ; then
4468
4469 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4470
4471 fi
4472 if test x$ac_gc_check_string_overrun != x ; then
4473
4474 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4475
4476 fi
4477 if test x$ac_gc_check_string_free_list != x ; then
4478
4479 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4480
4481 fi
4482 if test x$ac_xmalloc_overrun != x ; then
4483
4484 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4485
4486 fi
4487 if test x$ac_gc_check_cons_list != x ; then
4488
4489 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4490
4491 fi
4492 if test x$ac_glyphs_debug != x ; then
4493
4494 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4495
4496 fi
4497
4498 # Check whether --enable-check-lisp-object-type was given.
4499 if test "${enable_check_lisp_object_type+set}" = set; then :
4500 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4501
4502 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4503
4504 fi
4505 fi
4506
4507
4508
4509 # Check whether --enable-profiling was given.
4510 if test "${enable_profiling+set}" = set; then :
4511 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4512 fi
4513
4514 if test x$ac_enable_profiling != x ; then
4515 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4516 else
4517 PROFILING_CFLAGS=
4518 fi
4519
4520
4521 # Check whether --enable-autodepend was given.
4522 if test "${enable_autodepend+set}" = set; then :
4523 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4524 else
4525 ac_enable_autodepend=yes
4526 fi
4527
4528
4529 # Check whether --enable-gtk-deprecation-warnings was given.
4530 if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4531 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4532 fi
4533
4534
4535 #### Make srcdir absolute, if it isn't already. It's important to
4536 #### avoid running the file name through pwd unnecessarily, since pwd can
4537 #### give you automounter prefixes, which can go away. We do all this
4538 #### so Emacs can find its files when run uninstalled.
4539 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4540 unset CDPATH
4541 case "${srcdir}" in
4542 [\\/]* | ?:[\\/]*) ;;
4543 . )
4544 ## We may be able to use the $PWD environment variable to make this
4545 ## absolute. But sometimes PWD is inaccurate.
4546 ## Note: we used to use $PWD at the end instead of `pwd`,
4547 ## but that tested only for a well-formed and valid PWD,
4548 ## it did not object when PWD was well-formed and valid but just wrong.
4549 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
4550 then
4551 srcdir="$PWD"
4552 else
4553 srcdir=`(cd "$srcdir"; pwd)`
4554 fi
4555 ;;
4556 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
4557 esac
4558
4559 ### Canonicalize the configuration name.
4560
4561 # Make sure we can run config.sub.
4562 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4563 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4564
4565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4566 $as_echo_n "checking build system type... " >&6; }
4567 if test "${ac_cv_build+set}" = set; then :
4568 $as_echo_n "(cached) " >&6
4569 else
4570 ac_build_alias=$build_alias
4571 test "x$ac_build_alias" = x &&
4572 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4573 test "x$ac_build_alias" = x &&
4574 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4575 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4576 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4577
4578 fi
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4580 $as_echo "$ac_cv_build" >&6; }
4581 case $ac_cv_build in
4582 *-*-*) ;;
4583 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4584 esac
4585 build=$ac_cv_build
4586 ac_save_IFS=$IFS; IFS='-'
4587 set x $ac_cv_build
4588 shift
4589 build_cpu=$1
4590 build_vendor=$2
4591 shift; shift
4592 # Remember, the first character of IFS is used to create $*,
4593 # except with old shells:
4594 build_os=$*
4595 IFS=$ac_save_IFS
4596 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4597
4598
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4600 $as_echo_n "checking host system type... " >&6; }
4601 if test "${ac_cv_host+set}" = set; then :
4602 $as_echo_n "(cached) " >&6
4603 else
4604 if test "x$host_alias" = x; then
4605 ac_cv_host=$ac_cv_build
4606 else
4607 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4608 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4609 fi
4610
4611 fi
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4613 $as_echo "$ac_cv_host" >&6; }
4614 case $ac_cv_host in
4615 *-*-*) ;;
4616 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4617 esac
4618 host=$ac_cv_host
4619 ac_save_IFS=$IFS; IFS='-'
4620 set x $ac_cv_host
4621 shift
4622 host_cpu=$1
4623 host_vendor=$2
4624 shift; shift
4625 # Remember, the first character of IFS is used to create $*,
4626 # except with old shells:
4627 host_os=$*
4628 IFS=$ac_save_IFS
4629 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4630
4631
4632 canonical=$host
4633 configuration=${host_alias-${build_alias-$host}}
4634
4635
4636
4637 ### If you add support for a new configuration, add code to this
4638 ### switch statement to recognize your configuration name and select
4639 ### the appropriate operating system file.
4640
4641 ### You would hope that you could choose an s/*.h
4642 ### file based on the operating system portion. However, it turns out
4643 ### that each s/*.h file is pretty manufacturer-specific.
4644 ### So we basically have to have a special case for each
4645 ### configuration name.
4646 ###
4647 ### As far as handling version numbers on operating systems is
4648 ### concerned, make sure things will fail in a fixable way. If
4649 ### /etc/MACHINES doesn't say anything about version numbers, be
4650 ### prepared to handle anything reasonably. If version numbers
4651 ### matter, be sure /etc/MACHINES says something about it.
4652
4653 opsys='' unported=no
4654 case "${canonical}" in
4655
4656 ## GNU/Linux and similar ports
4657 *-*-linux* )
4658 opsys=gnu-linux
4659 ;;
4660
4661 ## FreeBSD ports
4662 *-*-freebsd* )
4663 opsys=freebsd
4664 ;;
4665
4666 ## DragonFly ports
4667 *-*-dragonfly* )
4668 opsys=dragonfly
4669 ;;
4670
4671 ## FreeBSD kernel + glibc based userland
4672 *-*-kfreebsd*gnu* )
4673 opsys=gnu-kfreebsd
4674 ;;
4675
4676 ## NetBSD ports
4677 *-*-netbsd* )
4678 opsys=netbsd
4679 ;;
4680
4681 ## OpenBSD ports
4682 *-*-openbsd* )
4683 opsys=openbsd
4684 ;;
4685
4686 ## Apple Darwin / Mac OS X
4687 *-apple-darwin* )
4688 case "${canonical}" in
4689 i[3456]86-* ) ;;
4690 powerpc-* ) ;;
4691 x86_64-* ) ;;
4692 * ) unported=yes ;;
4693 esac
4694 opsys=darwin
4695 ## Use fink packages if available.
4696 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4697 ## if test -d /sw/include && test -d /sw/lib; then
4698 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4699 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4700 ## fi
4701 ;;
4702
4703 ## Cygwin ports
4704 *-*-cygwin )
4705 opsys=cygwin
4706 ;;
4707
4708 ## HP 9000 series 700 and 800, running HP/UX
4709 hppa*-hp-hpux10.2* )
4710 opsys=hpux10-20
4711 ;;
4712 hppa*-hp-hpux1[1-9]* )
4713 opsys=hpux11
4714 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4715 ;;
4716
4717 ## IBM machines
4718 rs6000-ibm-aix4.[23]* )
4719 opsys=aix4-2
4720 ;;
4721 powerpc-ibm-aix4.[23]* )
4722 opsys=aix4-2
4723 ;;
4724 rs6000-ibm-aix[56]* )
4725 opsys=aix4-2
4726 ;;
4727 powerpc-ibm-aix[56]* )
4728 opsys=aix4-2
4729 ;;
4730
4731 ## Silicon Graphics machines
4732 ## Iris 4D
4733 mips-sgi-irix6.5 )
4734 opsys=irix6-5
4735 # Without defining _LANGUAGE_C, things get masked out in the headers
4736 # so that, for instance, grepping for `free' in stdlib.h fails and
4737 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4738 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4739 ;;
4740
4741 ## Suns
4742 *-sun-solaris* \
4743 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4744 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4745 case "${canonical}" in
4746 i[3456]86-*-* ) ;;
4747 amd64-*-*|x86_64-*-*) ;;
4748 sparc* ) ;;
4749 * ) unported=yes ;;
4750 esac
4751 case "${canonical}" in
4752 *-sunos5.6* | *-solaris2.6* )
4753 opsys=sol2-6
4754 RANLIB="ar -ts"
4755 ;;
4756 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4757 opsys=sol2-6
4758 emacs_check_sunpro_c=yes
4759 ;;
4760 *-sunos5* | *-solaris* )
4761 opsys=sol2-10
4762 emacs_check_sunpro_c=yes
4763 ;;
4764 esac
4765 ## Watch out for a compiler that we know will not work.
4766 case "${canonical}" in
4767 *-solaris* | *-sunos5* )
4768 if [ "x$CC" = x/usr/ucb/cc ]; then
4769 ## /usr/ucb/cc doesn't work;
4770 ## we should find some other compiler that does work.
4771 unset CC
4772 fi
4773 ;;
4774 *) ;;
4775 esac
4776 ;;
4777
4778 ## Intel 386 machines where we don't care about the manufacturer.
4779 i[3456]86-*-* )
4780 case "${canonical}" in
4781 *-darwin* ) opsys=darwin ;;
4782 *-mingw32 )
4783 opsys=mingw32
4784 # MinGW overrides and adds some system headers in nt/inc.
4785 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4786 ;;
4787 *-sysv4.2uw* ) opsys=unixware ;;
4788 *-sysv5uw* ) opsys=unixware ;;
4789 *-sysv5OpenUNIX* ) opsys=unixware ;;
4790 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4791 esac
4792 ;;
4793
4794 * )
4795 unported=yes
4796 ;;
4797 esac
4798
4799 ### If the code above didn't choose an operating system, just choose
4800 ### an operating system based on the configuration name. You really
4801 ### only want to use this when you have no idea what the right
4802 ### operating system is; if you know what operating systems a machine
4803 ### runs, it's cleaner to make it explicit in the case statement
4804 ### above.
4805 if test x"${opsys}" = x; then
4806 case "${canonical}" in
4807 *-gnu* ) opsys=gnu ;;
4808 * )
4809 unported=yes
4810 ;;
4811 esac
4812 fi
4813
4814
4815
4816 if test $unported = yes; then
4817 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4818 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4819 fi
4820
4821
4822 #### Choose a compiler.
4823
4824 ac_ext=c
4825 ac_cpp='$CPP $CPPFLAGS'
4826 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4827 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4828 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4829 if test -n "$ac_tool_prefix"; then
4830 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4831 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833 $as_echo_n "checking for $ac_word... " >&6; }
4834 if test "${ac_cv_prog_CC+set}" = set; then :
4835 $as_echo_n "(cached) " >&6
4836 else
4837 if test -n "$CC"; then
4838 ac_cv_prog_CC="$CC" # Let the user override the test.
4839 else
4840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841 for as_dir in $PATH
4842 do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
4845 for ac_exec_ext in '' $ac_executable_extensions; do
4846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4847 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4849 break 2
4850 fi
4851 done
4852 done
4853 IFS=$as_save_IFS
4854
4855 fi
4856 fi
4857 CC=$ac_cv_prog_CC
4858 if test -n "$CC"; then
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4860 $as_echo "$CC" >&6; }
4861 else
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863 $as_echo "no" >&6; }
4864 fi
4865
4866
4867 fi
4868 if test -z "$ac_cv_prog_CC"; then
4869 ac_ct_CC=$CC
4870 # Extract the first word of "gcc", so it can be a program name with args.
4871 set dummy gcc; ac_word=$2
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4873 $as_echo_n "checking for $ac_word... " >&6; }
4874 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4875 $as_echo_n "(cached) " >&6
4876 else
4877 if test -n "$ac_ct_CC"; then
4878 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4879 else
4880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4881 for as_dir in $PATH
4882 do
4883 IFS=$as_save_IFS
4884 test -z "$as_dir" && as_dir=.
4885 for ac_exec_ext in '' $ac_executable_extensions; do
4886 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4887 ac_cv_prog_ac_ct_CC="gcc"
4888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4889 break 2
4890 fi
4891 done
4892 done
4893 IFS=$as_save_IFS
4894
4895 fi
4896 fi
4897 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4898 if test -n "$ac_ct_CC"; then
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4900 $as_echo "$ac_ct_CC" >&6; }
4901 else
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903 $as_echo "no" >&6; }
4904 fi
4905
4906 if test "x$ac_ct_CC" = x; then
4907 CC=""
4908 else
4909 case $cross_compiling:$ac_tool_warned in
4910 yes:)
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4912 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4913 ac_tool_warned=yes ;;
4914 esac
4915 CC=$ac_ct_CC
4916 fi
4917 else
4918 CC="$ac_cv_prog_CC"
4919 fi
4920
4921 if test -z "$CC"; then
4922 if test -n "$ac_tool_prefix"; then
4923 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4924 set dummy ${ac_tool_prefix}cc; ac_word=$2
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4926 $as_echo_n "checking for $ac_word... " >&6; }
4927 if test "${ac_cv_prog_CC+set}" = set; then :
4928 $as_echo_n "(cached) " >&6
4929 else
4930 if test -n "$CC"; then
4931 ac_cv_prog_CC="$CC" # Let the user override the test.
4932 else
4933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934 for as_dir in $PATH
4935 do
4936 IFS=$as_save_IFS
4937 test -z "$as_dir" && as_dir=.
4938 for ac_exec_ext in '' $ac_executable_extensions; do
4939 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4940 ac_cv_prog_CC="${ac_tool_prefix}cc"
4941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942 break 2
4943 fi
4944 done
4945 done
4946 IFS=$as_save_IFS
4947
4948 fi
4949 fi
4950 CC=$ac_cv_prog_CC
4951 if test -n "$CC"; then
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4953 $as_echo "$CC" >&6; }
4954 else
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956 $as_echo "no" >&6; }
4957 fi
4958
4959
4960 fi
4961 fi
4962 if test -z "$CC"; then
4963 # Extract the first word of "cc", so it can be a program name with args.
4964 set dummy cc; ac_word=$2
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966 $as_echo_n "checking for $ac_word... " >&6; }
4967 if test "${ac_cv_prog_CC+set}" = set; then :
4968 $as_echo_n "(cached) " >&6
4969 else
4970 if test -n "$CC"; then
4971 ac_cv_prog_CC="$CC" # Let the user override the test.
4972 else
4973 ac_prog_rejected=no
4974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975 for as_dir in $PATH
4976 do
4977 IFS=$as_save_IFS
4978 test -z "$as_dir" && as_dir=.
4979 for ac_exec_ext in '' $ac_executable_extensions; do
4980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4981 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4982 ac_prog_rejected=yes
4983 continue
4984 fi
4985 ac_cv_prog_CC="cc"
4986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4987 break 2
4988 fi
4989 done
4990 done
4991 IFS=$as_save_IFS
4992
4993 if test $ac_prog_rejected = yes; then
4994 # We found a bogon in the path, so make sure we never use it.
4995 set dummy $ac_cv_prog_CC
4996 shift
4997 if test $# != 0; then
4998 # We chose a different compiler from the bogus one.
4999 # However, it has the same basename, so the bogon will be chosen
5000 # first if we set CC to just the basename; use the full file name.
5001 shift
5002 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5003 fi
5004 fi
5005 fi
5006 fi
5007 CC=$ac_cv_prog_CC
5008 if test -n "$CC"; then
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5010 $as_echo "$CC" >&6; }
5011 else
5012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013 $as_echo "no" >&6; }
5014 fi
5015
5016
5017 fi
5018 if test -z "$CC"; then
5019 if test -n "$ac_tool_prefix"; then
5020 for ac_prog in cl.exe
5021 do
5022 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5023 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5025 $as_echo_n "checking for $ac_word... " >&6; }
5026 if test "${ac_cv_prog_CC+set}" = set; then :
5027 $as_echo_n "(cached) " >&6
5028 else
5029 if test -n "$CC"; then
5030 ac_cv_prog_CC="$CC" # Let the user override the test.
5031 else
5032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5033 for as_dir in $PATH
5034 do
5035 IFS=$as_save_IFS
5036 test -z "$as_dir" && as_dir=.
5037 for ac_exec_ext in '' $ac_executable_extensions; do
5038 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5039 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5041 break 2
5042 fi
5043 done
5044 done
5045 IFS=$as_save_IFS
5046
5047 fi
5048 fi
5049 CC=$ac_cv_prog_CC
5050 if test -n "$CC"; then
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5052 $as_echo "$CC" >&6; }
5053 else
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5055 $as_echo "no" >&6; }
5056 fi
5057
5058
5059 test -n "$CC" && break
5060 done
5061 fi
5062 if test -z "$CC"; then
5063 ac_ct_CC=$CC
5064 for ac_prog in cl.exe
5065 do
5066 # Extract the first word of "$ac_prog", so it can be a program name with args.
5067 set dummy $ac_prog; ac_word=$2
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069 $as_echo_n "checking for $ac_word... " >&6; }
5070 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5071 $as_echo_n "(cached) " >&6
5072 else
5073 if test -n "$ac_ct_CC"; then
5074 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5075 else
5076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077 for as_dir in $PATH
5078 do
5079 IFS=$as_save_IFS
5080 test -z "$as_dir" && as_dir=.
5081 for ac_exec_ext in '' $ac_executable_extensions; do
5082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5083 ac_cv_prog_ac_ct_CC="$ac_prog"
5084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085 break 2
5086 fi
5087 done
5088 done
5089 IFS=$as_save_IFS
5090
5091 fi
5092 fi
5093 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5094 if test -n "$ac_ct_CC"; then
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5096 $as_echo "$ac_ct_CC" >&6; }
5097 else
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099 $as_echo "no" >&6; }
5100 fi
5101
5102
5103 test -n "$ac_ct_CC" && break
5104 done
5105
5106 if test "x$ac_ct_CC" = x; then
5107 CC=""
5108 else
5109 case $cross_compiling:$ac_tool_warned in
5110 yes:)
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5112 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5113 ac_tool_warned=yes ;;
5114 esac
5115 CC=$ac_ct_CC
5116 fi
5117 fi
5118
5119 fi
5120
5121
5122 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5123 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5124 as_fn_error "no acceptable C compiler found in \$PATH
5125 See \`config.log' for more details." "$LINENO" 5; }
5126
5127 # Provide some information about the compiler.
5128 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5129 set X $ac_compile
5130 ac_compiler=$2
5131 for ac_option in --version -v -V -qversion; do
5132 { { ac_try="$ac_compiler $ac_option >&5"
5133 case "(($ac_try" in
5134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5135 *) ac_try_echo=$ac_try;;
5136 esac
5137 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5138 $as_echo "$ac_try_echo"; } >&5
5139 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5140 ac_status=$?
5141 if test -s conftest.err; then
5142 sed '10a\
5143 ... rest of stderr output deleted ...
5144 10q' conftest.err >conftest.er1
5145 cat conftest.er1 >&5
5146 fi
5147 rm -f conftest.er1 conftest.err
5148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5149 test $ac_status = 0; }
5150 done
5151
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5153 /* end confdefs.h. */
5154
5155 int
5156 main ()
5157 {
5158
5159 ;
5160 return 0;
5161 }
5162 _ACEOF
5163 ac_clean_files_save=$ac_clean_files
5164 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5165 # Try to create an executable without -o first, disregard a.out.
5166 # It will help us diagnose broken compilers, and finding out an intuition
5167 # of exeext.
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5169 $as_echo_n "checking whether the C compiler works... " >&6; }
5170 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5171
5172 # The possible output files:
5173 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5174
5175 ac_rmfiles=
5176 for ac_file in $ac_files
5177 do
5178 case $ac_file in
5179 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5180 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5181 esac
5182 done
5183 rm -f $ac_rmfiles
5184
5185 if { { ac_try="$ac_link_default"
5186 case "(($ac_try" in
5187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5188 *) ac_try_echo=$ac_try;;
5189 esac
5190 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5191 $as_echo "$ac_try_echo"; } >&5
5192 (eval "$ac_link_default") 2>&5
5193 ac_status=$?
5194 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5195 test $ac_status = 0; }; then :
5196 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5197 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5198 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5199 # so that the user can short-circuit this test for compilers unknown to
5200 # Autoconf.
5201 for ac_file in $ac_files ''
5202 do
5203 test -f "$ac_file" || continue
5204 case $ac_file in
5205 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5206 ;;
5207 [ab].out )
5208 # We found the default executable, but exeext='' is most
5209 # certainly right.
5210 break;;
5211 *.* )
5212 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5213 then :; else
5214 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5215 fi
5216 # We set ac_cv_exeext here because the later test for it is not
5217 # safe: cross compilers may not add the suffix if given an `-o'
5218 # argument, so we may need to know it at that point already.
5219 # Even if this section looks crufty: it has the advantage of
5220 # actually working.
5221 break;;
5222 * )
5223 break;;
5224 esac
5225 done
5226 test "$ac_cv_exeext" = no && ac_cv_exeext=
5227
5228 else
5229 ac_file=''
5230 fi
5231 if test -z "$ac_file"; then :
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233 $as_echo "no" >&6; }
5234 $as_echo "$as_me: failed program was:" >&5
5235 sed 's/^/| /' conftest.$ac_ext >&5
5236
5237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5238 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5239 { as_fn_set_status 77
5240 as_fn_error "C compiler cannot create executables
5241 See \`config.log' for more details." "$LINENO" 5; }; }
5242 else
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5244 $as_echo "yes" >&6; }
5245 fi
5246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5247 $as_echo_n "checking for C compiler default output file name... " >&6; }
5248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5249 $as_echo "$ac_file" >&6; }
5250 ac_exeext=$ac_cv_exeext
5251
5252 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5253 ac_clean_files=$ac_clean_files_save
5254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5255 $as_echo_n "checking for suffix of executables... " >&6; }
5256 if { { ac_try="$ac_link"
5257 case "(($ac_try" in
5258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5259 *) ac_try_echo=$ac_try;;
5260 esac
5261 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5262 $as_echo "$ac_try_echo"; } >&5
5263 (eval "$ac_link") 2>&5
5264 ac_status=$?
5265 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5266 test $ac_status = 0; }; then :
5267 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5268 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5269 # work properly (i.e., refer to `conftest.exe'), while it won't with
5270 # `rm'.
5271 for ac_file in conftest.exe conftest conftest.*; do
5272 test -f "$ac_file" || continue
5273 case $ac_file in
5274 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5275 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5276 break;;
5277 * ) break;;
5278 esac
5279 done
5280 else
5281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5282 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5283 as_fn_error "cannot compute suffix of executables: cannot compile and link
5284 See \`config.log' for more details." "$LINENO" 5; }
5285 fi
5286 rm -f conftest conftest$ac_cv_exeext
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5288 $as_echo "$ac_cv_exeext" >&6; }
5289
5290 rm -f conftest.$ac_ext
5291 EXEEXT=$ac_cv_exeext
5292 ac_exeext=$EXEEXT
5293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5294 /* end confdefs.h. */
5295 #include <stdio.h>
5296 int
5297 main ()
5298 {
5299 FILE *f = fopen ("conftest.out", "w");
5300 return ferror (f) || fclose (f) != 0;
5301
5302 ;
5303 return 0;
5304 }
5305 _ACEOF
5306 ac_clean_files="$ac_clean_files conftest.out"
5307 # Check that the compiler produces executables we can run. If not, either
5308 # the compiler is broken, or we cross compile.
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5310 $as_echo_n "checking whether we are cross compiling... " >&6; }
5311 if test "$cross_compiling" != yes; then
5312 { { ac_try="$ac_link"
5313 case "(($ac_try" in
5314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5315 *) ac_try_echo=$ac_try;;
5316 esac
5317 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5318 $as_echo "$ac_try_echo"; } >&5
5319 (eval "$ac_link") 2>&5
5320 ac_status=$?
5321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5322 test $ac_status = 0; }
5323 if { ac_try='./conftest$ac_cv_exeext'
5324 { { case "(($ac_try" in
5325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5326 *) ac_try_echo=$ac_try;;
5327 esac
5328 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5329 $as_echo "$ac_try_echo"; } >&5
5330 (eval "$ac_try") 2>&5
5331 ac_status=$?
5332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5333 test $ac_status = 0; }; }; then
5334 cross_compiling=no
5335 else
5336 if test "$cross_compiling" = maybe; then
5337 cross_compiling=yes
5338 else
5339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5341 as_fn_error "cannot run C compiled programs.
5342 If you meant to cross compile, use \`--host'.
5343 See \`config.log' for more details." "$LINENO" 5; }
5344 fi
5345 fi
5346 fi
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5348 $as_echo "$cross_compiling" >&6; }
5349
5350 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5351 ac_clean_files=$ac_clean_files_save
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5353 $as_echo_n "checking for suffix of object files... " >&6; }
5354 if test "${ac_cv_objext+set}" = set; then :
5355 $as_echo_n "(cached) " >&6
5356 else
5357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5358 /* end confdefs.h. */
5359
5360 int
5361 main ()
5362 {
5363
5364 ;
5365 return 0;
5366 }
5367 _ACEOF
5368 rm -f conftest.o conftest.obj
5369 if { { ac_try="$ac_compile"
5370 case "(($ac_try" in
5371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5372 *) ac_try_echo=$ac_try;;
5373 esac
5374 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5375 $as_echo "$ac_try_echo"; } >&5
5376 (eval "$ac_compile") 2>&5
5377 ac_status=$?
5378 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5379 test $ac_status = 0; }; then :
5380 for ac_file in conftest.o conftest.obj conftest.*; do
5381 test -f "$ac_file" || continue;
5382 case $ac_file in
5383 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5384 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5385 break;;
5386 esac
5387 done
5388 else
5389 $as_echo "$as_me: failed program was:" >&5
5390 sed 's/^/| /' conftest.$ac_ext >&5
5391
5392 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5393 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5394 as_fn_error "cannot compute suffix of object files: cannot compile
5395 See \`config.log' for more details." "$LINENO" 5; }
5396 fi
5397 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5398 fi
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5400 $as_echo "$ac_cv_objext" >&6; }
5401 OBJEXT=$ac_cv_objext
5402 ac_objext=$OBJEXT
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5404 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5405 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5406 $as_echo_n "(cached) " >&6
5407 else
5408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5409 /* end confdefs.h. */
5410
5411 int
5412 main ()
5413 {
5414 #ifndef __GNUC__
5415 choke me
5416 #endif
5417
5418 ;
5419 return 0;
5420 }
5421 _ACEOF
5422 if ac_fn_c_try_compile "$LINENO"; then :
5423 ac_compiler_gnu=yes
5424 else
5425 ac_compiler_gnu=no
5426 fi
5427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5428 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5429
5430 fi
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5432 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5433 if test $ac_compiler_gnu = yes; then
5434 GCC=yes
5435 else
5436 GCC=
5437 fi
5438 ac_test_CFLAGS=${CFLAGS+set}
5439 ac_save_CFLAGS=$CFLAGS
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5441 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5442 if test "${ac_cv_prog_cc_g+set}" = set; then :
5443 $as_echo_n "(cached) " >&6
5444 else
5445 ac_save_c_werror_flag=$ac_c_werror_flag
5446 ac_c_werror_flag=yes
5447 ac_cv_prog_cc_g=no
5448 CFLAGS="-g"
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5450 /* end confdefs.h. */
5451
5452 int
5453 main ()
5454 {
5455
5456 ;
5457 return 0;
5458 }
5459 _ACEOF
5460 if ac_fn_c_try_compile "$LINENO"; then :
5461 ac_cv_prog_cc_g=yes
5462 else
5463 CFLAGS=""
5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5465 /* end confdefs.h. */
5466
5467 int
5468 main ()
5469 {
5470
5471 ;
5472 return 0;
5473 }
5474 _ACEOF
5475 if ac_fn_c_try_compile "$LINENO"; then :
5476
5477 else
5478 ac_c_werror_flag=$ac_save_c_werror_flag
5479 CFLAGS="-g"
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481 /* end confdefs.h. */
5482
5483 int
5484 main ()
5485 {
5486
5487 ;
5488 return 0;
5489 }
5490 _ACEOF
5491 if ac_fn_c_try_compile "$LINENO"; then :
5492 ac_cv_prog_cc_g=yes
5493 fi
5494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495 fi
5496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5497 fi
5498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5499 ac_c_werror_flag=$ac_save_c_werror_flag
5500 fi
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5502 $as_echo "$ac_cv_prog_cc_g" >&6; }
5503 if test "$ac_test_CFLAGS" = set; then
5504 CFLAGS=$ac_save_CFLAGS
5505 elif test $ac_cv_prog_cc_g = yes; then
5506 if test "$GCC" = yes; then
5507 CFLAGS="-g -O2"
5508 else
5509 CFLAGS="-g"
5510 fi
5511 else
5512 if test "$GCC" = yes; then
5513 CFLAGS="-O2"
5514 else
5515 CFLAGS=
5516 fi
5517 fi
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5519 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5520 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5521 $as_echo_n "(cached) " >&6
5522 else
5523 ac_cv_prog_cc_c89=no
5524 ac_save_CC=$CC
5525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5526 /* end confdefs.h. */
5527 #include <stdarg.h>
5528 #include <stdio.h>
5529 #include <sys/types.h>
5530 #include <sys/stat.h>
5531 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5532 struct buf { int x; };
5533 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5534 static char *e (p, i)
5535 char **p;
5536 int i;
5537 {
5538 return p[i];
5539 }
5540 static char *f (char * (*g) (char **, int), char **p, ...)
5541 {
5542 char *s;
5543 va_list v;
5544 va_start (v,p);
5545 s = g (p, va_arg (v,int));
5546 va_end (v);
5547 return s;
5548 }
5549
5550 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5551 function prototypes and stuff, but not '\xHH' hex character constants.
5552 These don't provoke an error unfortunately, instead are silently treated
5553 as 'x'. The following induces an error, until -std is added to get
5554 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5555 array size at least. It's necessary to write '\x00'==0 to get something
5556 that's true only with -std. */
5557 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5558
5559 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5560 inside strings and character constants. */
5561 #define FOO(x) 'x'
5562 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5563
5564 int test (int i, double x);
5565 struct s1 {int (*f) (int a);};
5566 struct s2 {int (*f) (double a);};
5567 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5568 int argc;
5569 char **argv;
5570 int
5571 main ()
5572 {
5573 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5574 ;
5575 return 0;
5576 }
5577 _ACEOF
5578 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5579 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5580 do
5581 CC="$ac_save_CC $ac_arg"
5582 if ac_fn_c_try_compile "$LINENO"; then :
5583 ac_cv_prog_cc_c89=$ac_arg
5584 fi
5585 rm -f core conftest.err conftest.$ac_objext
5586 test "x$ac_cv_prog_cc_c89" != "xno" && break
5587 done
5588 rm -f conftest.$ac_ext
5589 CC=$ac_save_CC
5590
5591 fi
5592 # AC_CACHE_VAL
5593 case "x$ac_cv_prog_cc_c89" in
5594 x)
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5596 $as_echo "none needed" >&6; } ;;
5597 xno)
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5599 $as_echo "unsupported" >&6; } ;;
5600 *)
5601 CC="$CC $ac_cv_prog_cc_c89"
5602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5603 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5604 esac
5605 if test "x$ac_cv_prog_cc_c89" != xno; then :
5606
5607 fi
5608
5609 ac_ext=c
5610 ac_cpp='$CPP $CPPFLAGS'
5611 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5612 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5613 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5614 DEPDIR="${am__leading_dot}deps"
5615
5616 ac_config_commands="$ac_config_commands depfiles"
5617
5618
5619 am_make=${MAKE-make}
5620 cat > confinc << 'END'
5621 am__doit:
5622 @echo this is the am__doit target
5623 .PHONY: am__doit
5624 END
5625 # If we don't find an include directive, just comment out the code.
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5627 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5628 am__include="#"
5629 am__quote=
5630 _am_result=none
5631 # First try GNU make style include.
5632 echo "include confinc" > confmf
5633 # Ignore all kinds of additional output from `make'.
5634 case `$am_make -s -f confmf 2> /dev/null` in #(
5635 *the\ am__doit\ target*)
5636 am__include=include
5637 am__quote=
5638 _am_result=GNU
5639 ;;
5640 esac
5641 # Now try BSD make style include.
5642 if test "$am__include" = "#"; then
5643 echo '.include "confinc"' > confmf
5644 case `$am_make -s -f confmf 2> /dev/null` in #(
5645 *the\ am__doit\ target*)
5646 am__include=.include
5647 am__quote="\""
5648 _am_result=BSD
5649 ;;
5650 esac
5651 fi
5652
5653
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5655 $as_echo "$_am_result" >&6; }
5656 rm -f confinc confmf
5657
5658 # Check whether --enable-dependency-tracking was given.
5659 if test "${enable_dependency_tracking+set}" = set; then :
5660 enableval=$enable_dependency_tracking;
5661 fi
5662
5663 if test "x$enable_dependency_tracking" != xno; then
5664 am_depcomp="$ac_aux_dir/depcomp"
5665 AMDEPBACKSLASH='\'
5666 fi
5667 if test "x$enable_dependency_tracking" != xno; then
5668 AMDEP_TRUE=
5669 AMDEP_FALSE='#'
5670 else
5671 AMDEP_TRUE='#'
5672 AMDEP_FALSE=
5673 fi
5674
5675
5676
5677 depcc="$CC" am_compiler_list=
5678
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5680 $as_echo_n "checking dependency style of $depcc... " >&6; }
5681 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5682 $as_echo_n "(cached) " >&6
5683 else
5684 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5685 # We make a subdir and do the tests there. Otherwise we can end up
5686 # making bogus files that we don't know about and never remove. For
5687 # instance it was reported that on HP-UX the gcc test will end up
5688 # making a dummy file named `D' -- because `-MD' means `put the output
5689 # in D'.
5690 mkdir conftest.dir
5691 # Copy depcomp to subdir because otherwise we won't find it if we're
5692 # using a relative directory.
5693 cp "$am_depcomp" conftest.dir
5694 cd conftest.dir
5695 # We will build objects and dependencies in a subdirectory because
5696 # it helps to detect inapplicable dependency modes. For instance
5697 # both Tru64's cc and ICC support -MD to output dependencies as a
5698 # side effect of compilation, but ICC will put the dependencies in
5699 # the current directory while Tru64 will put them in the object
5700 # directory.
5701 mkdir sub
5702
5703 am_cv_CC_dependencies_compiler_type=none
5704 if test "$am_compiler_list" = ""; then
5705 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5706 fi
5707 am__universal=false
5708 case " $depcc " in #(
5709 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5710 esac
5711
5712 for depmode in $am_compiler_list; do
5713 # Setup a source with many dependencies, because some compilers
5714 # like to wrap large dependency lists on column 80 (with \), and
5715 # we should not choose a depcomp mode which is confused by this.
5716 #
5717 # We need to recreate these files for each test, as the compiler may
5718 # overwrite some of them when testing with obscure command lines.
5719 # This happens at least with the AIX C compiler.
5720 : > sub/conftest.c
5721 for i in 1 2 3 4 5 6; do
5722 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5723 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5724 # Solaris 8's {/usr,}/bin/sh.
5725 touch sub/conftst$i.h
5726 done
5727 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5728
5729 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5730 # mode. It turns out that the SunPro C++ compiler does not properly
5731 # handle `-M -o', and we need to detect this. Also, some Intel
5732 # versions had trouble with output in subdirs
5733 am__obj=sub/conftest.${OBJEXT-o}
5734 am__minus_obj="-o $am__obj"
5735 case $depmode in
5736 gcc)
5737 # This depmode causes a compiler race in universal mode.
5738 test "$am__universal" = false || continue
5739 ;;
5740 nosideeffect)
5741 # after this tag, mechanisms are not by side-effect, so they'll
5742 # only be used when explicitly requested
5743 if test "x$enable_dependency_tracking" = xyes; then
5744 continue
5745 else
5746 break
5747 fi
5748 ;;
5749 msvisualcpp | msvcmsys)
5750 # This compiler won't grok `-c -o', but also, the minuso test has
5751 # not run yet. These depmodes are late enough in the game, and
5752 # so weak that their functioning should not be impacted.
5753 am__obj=conftest.${OBJEXT-o}
5754 am__minus_obj=
5755 ;;
5756 none) break ;;
5757 esac
5758 if depmode=$depmode \
5759 source=sub/conftest.c object=$am__obj \
5760 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5761 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5762 >/dev/null 2>conftest.err &&
5763 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5764 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5765 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5766 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5767 # icc doesn't choke on unknown options, it will just issue warnings
5768 # or remarks (even with -Werror). So we grep stderr for any message
5769 # that says an option was ignored or not supported.
5770 # When given -MP, icc 7.0 and 7.1 complain thusly:
5771 # icc: Command line warning: ignoring option '-M'; no argument required
5772 # The diagnosis changed in icc 8.0:
5773 # icc: Command line remark: option '-MP' not supported
5774 if (grep 'ignoring option' conftest.err ||
5775 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5776 am_cv_CC_dependencies_compiler_type=$depmode
5777 break
5778 fi
5779 fi
5780 done
5781
5782 cd ..
5783 rm -rf conftest.dir
5784 else
5785 am_cv_CC_dependencies_compiler_type=none
5786 fi
5787
5788 fi
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5790 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5791 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5792
5793 if
5794 test "x$enable_dependency_tracking" != xno \
5795 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5796 am__fastdepCC_TRUE=
5797 am__fastdepCC_FALSE='#'
5798 else
5799 am__fastdepCC_TRUE='#'
5800 am__fastdepCC_FALSE=
5801 fi
5802
5803
5804 if test "x$CC" != xcc; then
5805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5806 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5807 else
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5809 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5810 fi
5811 set dummy $CC; ac_cc=`$as_echo "$2" |
5812 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5813 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5814 $as_echo_n "(cached) " >&6
5815 else
5816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5817 /* end confdefs.h. */
5818
5819 int
5820 main ()
5821 {
5822
5823 ;
5824 return 0;
5825 }
5826 _ACEOF
5827 # Make sure it works both with $CC and with simple cc.
5828 # We do the test twice because some compilers refuse to overwrite an
5829 # existing .o file with -o, though they will create one.
5830 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5831 rm -f conftest2.*
5832 if { { case "(($ac_try" in
5833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5834 *) ac_try_echo=$ac_try;;
5835 esac
5836 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5837 $as_echo "$ac_try_echo"; } >&5
5838 (eval "$ac_try") 2>&5
5839 ac_status=$?
5840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5841 test $ac_status = 0; } &&
5842 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845 esac
5846 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5847 $as_echo "$ac_try_echo"; } >&5
5848 (eval "$ac_try") 2>&5
5849 ac_status=$?
5850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5851 test $ac_status = 0; };
5852 then
5853 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5854 if test "x$CC" != xcc; then
5855 # Test first that cc exists at all.
5856 if { ac_try='cc -c conftest.$ac_ext >&5'
5857 { { case "(($ac_try" in
5858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5859 *) ac_try_echo=$ac_try;;
5860 esac
5861 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5862 $as_echo "$ac_try_echo"; } >&5
5863 (eval "$ac_try") 2>&5
5864 ac_status=$?
5865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5866 test $ac_status = 0; }; }; then
5867 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5868 rm -f conftest2.*
5869 if { { case "(($ac_try" in
5870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871 *) ac_try_echo=$ac_try;;
5872 esac
5873 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5874 $as_echo "$ac_try_echo"; } >&5
5875 (eval "$ac_try") 2>&5
5876 ac_status=$?
5877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5878 test $ac_status = 0; } &&
5879 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5881 *) ac_try_echo=$ac_try;;
5882 esac
5883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5884 $as_echo "$ac_try_echo"; } >&5
5885 (eval "$ac_try") 2>&5
5886 ac_status=$?
5887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5888 test $ac_status = 0; };
5889 then
5890 # cc works too.
5891 :
5892 else
5893 # cc exists but doesn't like -o.
5894 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5895 fi
5896 fi
5897 fi
5898 else
5899 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5900 fi
5901 rm -f core conftest*
5902
5903 fi
5904 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5906 $as_echo "yes" >&6; }
5907 else
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5909 $as_echo "no" >&6; }
5910
5911 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5912
5913 fi
5914
5915 # FIXME: we rely on the cache variable name because
5916 # there is no other way.
5917 set dummy $CC
5918 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5919 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5920 if test "$am_t" != yes; then
5921 # Losing compiler, so override with the script.
5922 # FIXME: It is wrong to rewrite CC.
5923 # But if we don't then we get into trouble of one sort or another.
5924 # A longer-term fix would be to have automake use am__CC in this case,
5925 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5926 CC="$am_aux_dir/compile $CC"
5927 fi
5928
5929
5930
5931 if test x$GCC = xyes; then
5932 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5933 else
5934 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5935 fi
5936
5937 if test "x$opsys" = "xmingw32"; then
5938 BUILDING_FOR_WINDOWSNT_TRUE=
5939 BUILDING_FOR_WINDOWSNT_FALSE='#'
5940 else
5941 BUILDING_FOR_WINDOWSNT_TRUE='#'
5942 BUILDING_FOR_WINDOWSNT_FALSE=
5943 fi
5944
5945
5946 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
5947 # as we don't use them.
5948
5949 # Avoid gnulib's threadlib module, as we do threads our own way.
5950
5951
5952 # Initialize gnulib right after choosing the compiler.
5953
5954 ac_ext=c
5955 ac_cpp='$CPP $CPPFLAGS'
5956 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5957 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5958 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5960 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5961 # On Suns, sometimes $CPP names a directory.
5962 if test -n "$CPP" && test -d "$CPP"; then
5963 CPP=
5964 fi
5965 if test -z "$CPP"; then
5966 if test "${ac_cv_prog_CPP+set}" = set; then :
5967 $as_echo_n "(cached) " >&6
5968 else
5969 # Double quotes because CPP needs to be expanded
5970 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5971 do
5972 ac_preproc_ok=false
5973 for ac_c_preproc_warn_flag in '' yes
5974 do
5975 # Use a header file that comes with gcc, so configuring glibc
5976 # with a fresh cross-compiler works.
5977 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5978 # <limits.h> exists even on freestanding compilers.
5979 # On the NeXT, cc -E runs the code through the compiler's parser,
5980 # not just through cpp. "Syntax error" is here to catch this case.
5981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5982 /* end confdefs.h. */
5983 #ifdef __STDC__
5984 # include <limits.h>
5985 #else
5986 # include <assert.h>
5987 #endif
5988 Syntax error
5989 _ACEOF
5990 if ac_fn_c_try_cpp "$LINENO"; then :
5991
5992 else
5993 # Broken: fails on valid input.
5994 continue
5995 fi
5996 rm -f conftest.err conftest.$ac_ext
5997
5998 # OK, works on sane cases. Now check whether nonexistent headers
5999 # can be detected and how.
6000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6001 /* end confdefs.h. */
6002 #include <ac_nonexistent.h>
6003 _ACEOF
6004 if ac_fn_c_try_cpp "$LINENO"; then :
6005 # Broken: success on invalid input.
6006 continue
6007 else
6008 # Passes both tests.
6009 ac_preproc_ok=:
6010 break
6011 fi
6012 rm -f conftest.err conftest.$ac_ext
6013
6014 done
6015 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6016 rm -f conftest.err conftest.$ac_ext
6017 if $ac_preproc_ok; then :
6018 break
6019 fi
6020
6021 done
6022 ac_cv_prog_CPP=$CPP
6023
6024 fi
6025 CPP=$ac_cv_prog_CPP
6026 else
6027 ac_cv_prog_CPP=$CPP
6028 fi
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6030 $as_echo "$CPP" >&6; }
6031 ac_preproc_ok=false
6032 for ac_c_preproc_warn_flag in '' yes
6033 do
6034 # Use a header file that comes with gcc, so configuring glibc
6035 # with a fresh cross-compiler works.
6036 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6037 # <limits.h> exists even on freestanding compilers.
6038 # On the NeXT, cc -E runs the code through the compiler's parser,
6039 # not just through cpp. "Syntax error" is here to catch this case.
6040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6041 /* end confdefs.h. */
6042 #ifdef __STDC__
6043 # include <limits.h>
6044 #else
6045 # include <assert.h>
6046 #endif
6047 Syntax error
6048 _ACEOF
6049 if ac_fn_c_try_cpp "$LINENO"; then :
6050
6051 else
6052 # Broken: fails on valid input.
6053 continue
6054 fi
6055 rm -f conftest.err conftest.$ac_ext
6056
6057 # OK, works on sane cases. Now check whether nonexistent headers
6058 # can be detected and how.
6059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6060 /* end confdefs.h. */
6061 #include <ac_nonexistent.h>
6062 _ACEOF
6063 if ac_fn_c_try_cpp "$LINENO"; then :
6064 # Broken: success on invalid input.
6065 continue
6066 else
6067 # Passes both tests.
6068 ac_preproc_ok=:
6069 break
6070 fi
6071 rm -f conftest.err conftest.$ac_ext
6072
6073 done
6074 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6075 rm -f conftest.err conftest.$ac_ext
6076 if $ac_preproc_ok; then :
6077
6078 else
6079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6080 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6081 as_fn_error "C preprocessor \"$CPP\" fails sanity check
6082 See \`config.log' for more details." "$LINENO" 5; }
6083 fi
6084
6085 ac_ext=c
6086 ac_cpp='$CPP $CPPFLAGS'
6087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6090
6091
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6093 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6094 if test "${ac_cv_path_GREP+set}" = set; then :
6095 $as_echo_n "(cached) " >&6
6096 else
6097 if test -z "$GREP"; then
6098 ac_path_GREP_found=false
6099 # Loop through the user's path and test for each of PROGNAME-LIST
6100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6102 do
6103 IFS=$as_save_IFS
6104 test -z "$as_dir" && as_dir=.
6105 for ac_prog in grep ggrep; do
6106 for ac_exec_ext in '' $ac_executable_extensions; do
6107 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6108 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6109 # Check for GNU ac_path_GREP and select it if it is found.
6110 # Check for GNU $ac_path_GREP
6111 case `"$ac_path_GREP" --version 2>&1` in
6112 *GNU*)
6113 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6114 *)
6115 ac_count=0
6116 $as_echo_n 0123456789 >"conftest.in"
6117 while :
6118 do
6119 cat "conftest.in" "conftest.in" >"conftest.tmp"
6120 mv "conftest.tmp" "conftest.in"
6121 cp "conftest.in" "conftest.nl"
6122 $as_echo 'GREP' >> "conftest.nl"
6123 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6124 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6125 as_fn_arith $ac_count + 1 && ac_count=$as_val
6126 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6127 # Best one so far, save it but keep looking for a better one
6128 ac_cv_path_GREP="$ac_path_GREP"
6129 ac_path_GREP_max=$ac_count
6130 fi
6131 # 10*(2^10) chars as input seems more than enough
6132 test $ac_count -gt 10 && break
6133 done
6134 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6135 esac
6136
6137 $ac_path_GREP_found && break 3
6138 done
6139 done
6140 done
6141 IFS=$as_save_IFS
6142 if test -z "$ac_cv_path_GREP"; then
6143 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6144 fi
6145 else
6146 ac_cv_path_GREP=$GREP
6147 fi
6148
6149 fi
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6151 $as_echo "$ac_cv_path_GREP" >&6; }
6152 GREP="$ac_cv_path_GREP"
6153
6154
6155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6156 $as_echo_n "checking for egrep... " >&6; }
6157 if test "${ac_cv_path_EGREP+set}" = set; then :
6158 $as_echo_n "(cached) " >&6
6159 else
6160 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6161 then ac_cv_path_EGREP="$GREP -E"
6162 else
6163 if test -z "$EGREP"; then
6164 ac_path_EGREP_found=false
6165 # Loop through the user's path and test for each of PROGNAME-LIST
6166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6167 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6168 do
6169 IFS=$as_save_IFS
6170 test -z "$as_dir" && as_dir=.
6171 for ac_prog in egrep; do
6172 for ac_exec_ext in '' $ac_executable_extensions; do
6173 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6174 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6175 # Check for GNU ac_path_EGREP and select it if it is found.
6176 # Check for GNU $ac_path_EGREP
6177 case `"$ac_path_EGREP" --version 2>&1` in
6178 *GNU*)
6179 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6180 *)
6181 ac_count=0
6182 $as_echo_n 0123456789 >"conftest.in"
6183 while :
6184 do
6185 cat "conftest.in" "conftest.in" >"conftest.tmp"
6186 mv "conftest.tmp" "conftest.in"
6187 cp "conftest.in" "conftest.nl"
6188 $as_echo 'EGREP' >> "conftest.nl"
6189 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6190 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6191 as_fn_arith $ac_count + 1 && ac_count=$as_val
6192 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6193 # Best one so far, save it but keep looking for a better one
6194 ac_cv_path_EGREP="$ac_path_EGREP"
6195 ac_path_EGREP_max=$ac_count
6196 fi
6197 # 10*(2^10) chars as input seems more than enough
6198 test $ac_count -gt 10 && break
6199 done
6200 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6201 esac
6202
6203 $ac_path_EGREP_found && break 3
6204 done
6205 done
6206 done
6207 IFS=$as_save_IFS
6208 if test -z "$ac_cv_path_EGREP"; then
6209 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6210 fi
6211 else
6212 ac_cv_path_EGREP=$EGREP
6213 fi
6214
6215 fi
6216 fi
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6218 $as_echo "$ac_cv_path_EGREP" >&6; }
6219 EGREP="$ac_cv_path_EGREP"
6220
6221
6222
6223
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6225 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6226 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6227 $as_echo_n "(cached) " >&6
6228 else
6229
6230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6231 /* end confdefs.h. */
6232
6233 #ifdef __ACK__
6234 Amsterdam
6235 #endif
6236
6237 _ACEOF
6238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6239 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6240 gl_cv_c_amsterdam_compiler=yes
6241 else
6242 gl_cv_c_amsterdam_compiler=no
6243 fi
6244 rm -f conftest*
6245
6246
6247 fi
6248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6249 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6250 if test -z "$AR"; then
6251 if test $gl_cv_c_amsterdam_compiler = yes; then
6252 AR='cc -c.a'
6253 if test -z "$ARFLAGS"; then
6254 ARFLAGS='-o'
6255 fi
6256 else
6257 if test -n "$ac_tool_prefix"; then
6258 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6259 set dummy ${ac_tool_prefix}ar; ac_word=$2
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6261 $as_echo_n "checking for $ac_word... " >&6; }
6262 if test "${ac_cv_prog_AR+set}" = set; then :
6263 $as_echo_n "(cached) " >&6
6264 else
6265 if test -n "$AR"; then
6266 ac_cv_prog_AR="$AR" # Let the user override the test.
6267 else
6268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6269 for as_dir in $PATH
6270 do
6271 IFS=$as_save_IFS
6272 test -z "$as_dir" && as_dir=.
6273 for ac_exec_ext in '' $ac_executable_extensions; do
6274 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6275 ac_cv_prog_AR="${ac_tool_prefix}ar"
6276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6277 break 2
6278 fi
6279 done
6280 done
6281 IFS=$as_save_IFS
6282
6283 fi
6284 fi
6285 AR=$ac_cv_prog_AR
6286 if test -n "$AR"; then
6287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6288 $as_echo "$AR" >&6; }
6289 else
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6291 $as_echo "no" >&6; }
6292 fi
6293
6294
6295 fi
6296 if test -z "$ac_cv_prog_AR"; then
6297 ac_ct_AR=$AR
6298 # Extract the first word of "ar", so it can be a program name with args.
6299 set dummy ar; ac_word=$2
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6301 $as_echo_n "checking for $ac_word... " >&6; }
6302 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6303 $as_echo_n "(cached) " >&6
6304 else
6305 if test -n "$ac_ct_AR"; then
6306 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6307 else
6308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6309 for as_dir in $PATH
6310 do
6311 IFS=$as_save_IFS
6312 test -z "$as_dir" && as_dir=.
6313 for ac_exec_ext in '' $ac_executable_extensions; do
6314 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6315 ac_cv_prog_ac_ct_AR="ar"
6316 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6317 break 2
6318 fi
6319 done
6320 done
6321 IFS=$as_save_IFS
6322
6323 fi
6324 fi
6325 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6326 if test -n "$ac_ct_AR"; then
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6328 $as_echo "$ac_ct_AR" >&6; }
6329 else
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331 $as_echo "no" >&6; }
6332 fi
6333
6334 if test "x$ac_ct_AR" = x; then
6335 AR="ar"
6336 else
6337 case $cross_compiling:$ac_tool_warned in
6338 yes:)
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6340 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6341 ac_tool_warned=yes ;;
6342 esac
6343 AR=$ac_ct_AR
6344 fi
6345 else
6346 AR="$ac_cv_prog_AR"
6347 fi
6348
6349 if test -z "$ARFLAGS"; then
6350 ARFLAGS='cru'
6351 fi
6352 fi
6353 else
6354 if test -z "$ARFLAGS"; then
6355 ARFLAGS='cru'
6356 fi
6357 fi
6358
6359
6360 if test -z "$RANLIB"; then
6361 if test $gl_cv_c_amsterdam_compiler = yes; then
6362 RANLIB=':'
6363 else
6364 if test -n "$ac_tool_prefix"; then
6365 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6366 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6368 $as_echo_n "checking for $ac_word... " >&6; }
6369 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6370 $as_echo_n "(cached) " >&6
6371 else
6372 if test -n "$RANLIB"; then
6373 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6374 else
6375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376 for as_dir in $PATH
6377 do
6378 IFS=$as_save_IFS
6379 test -z "$as_dir" && as_dir=.
6380 for ac_exec_ext in '' $ac_executable_extensions; do
6381 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6382 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6383 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384 break 2
6385 fi
6386 done
6387 done
6388 IFS=$as_save_IFS
6389
6390 fi
6391 fi
6392 RANLIB=$ac_cv_prog_RANLIB
6393 if test -n "$RANLIB"; then
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6395 $as_echo "$RANLIB" >&6; }
6396 else
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398 $as_echo "no" >&6; }
6399 fi
6400
6401
6402 fi
6403 if test -z "$ac_cv_prog_RANLIB"; then
6404 ac_ct_RANLIB=$RANLIB
6405 # Extract the first word of "ranlib", so it can be a program name with args.
6406 set dummy ranlib; ac_word=$2
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6408 $as_echo_n "checking for $ac_word... " >&6; }
6409 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6410 $as_echo_n "(cached) " >&6
6411 else
6412 if test -n "$ac_ct_RANLIB"; then
6413 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6414 else
6415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416 for as_dir in $PATH
6417 do
6418 IFS=$as_save_IFS
6419 test -z "$as_dir" && as_dir=.
6420 for ac_exec_ext in '' $ac_executable_extensions; do
6421 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6422 ac_cv_prog_ac_ct_RANLIB="ranlib"
6423 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424 break 2
6425 fi
6426 done
6427 done
6428 IFS=$as_save_IFS
6429
6430 fi
6431 fi
6432 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6433 if test -n "$ac_ct_RANLIB"; then
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6435 $as_echo "$ac_ct_RANLIB" >&6; }
6436 else
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438 $as_echo "no" >&6; }
6439 fi
6440
6441 if test "x$ac_ct_RANLIB" = x; then
6442 RANLIB=":"
6443 else
6444 case $cross_compiling:$ac_tool_warned in
6445 yes:)
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6447 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6448 ac_tool_warned=yes ;;
6449 esac
6450 RANLIB=$ac_ct_RANLIB
6451 fi
6452 else
6453 RANLIB="$ac_cv_prog_RANLIB"
6454 fi
6455
6456 fi
6457 fi
6458
6459
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6461 $as_echo_n "checking for ANSI C header files... " >&6; }
6462 if test "${ac_cv_header_stdc+set}" = set; then :
6463 $as_echo_n "(cached) " >&6
6464 else
6465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6466 /* end confdefs.h. */
6467 #include <stdlib.h>
6468 #include <stdarg.h>
6469 #include <string.h>
6470 #include <float.h>
6471
6472 int
6473 main ()
6474 {
6475
6476 ;
6477 return 0;
6478 }
6479 _ACEOF
6480 if ac_fn_c_try_compile "$LINENO"; then :
6481 ac_cv_header_stdc=yes
6482 else
6483 ac_cv_header_stdc=no
6484 fi
6485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6486
6487 if test $ac_cv_header_stdc = yes; then
6488 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6490 /* end confdefs.h. */
6491 #include <string.h>
6492
6493 _ACEOF
6494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6495 $EGREP "memchr" >/dev/null 2>&1; then :
6496
6497 else
6498 ac_cv_header_stdc=no
6499 fi
6500 rm -f conftest*
6501
6502 fi
6503
6504 if test $ac_cv_header_stdc = yes; then
6505 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6507 /* end confdefs.h. */
6508 #include <stdlib.h>
6509
6510 _ACEOF
6511 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6512 $EGREP "free" >/dev/null 2>&1; then :
6513
6514 else
6515 ac_cv_header_stdc=no
6516 fi
6517 rm -f conftest*
6518
6519 fi
6520
6521 if test $ac_cv_header_stdc = yes; then
6522 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6523 if test "$cross_compiling" = yes; then :
6524 :
6525 else
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527 /* end confdefs.h. */
6528 #include <ctype.h>
6529 #include <stdlib.h>
6530 #if ((' ' & 0x0FF) == 0x020)
6531 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6532 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6533 #else
6534 # define ISLOWER(c) \
6535 (('a' <= (c) && (c) <= 'i') \
6536 || ('j' <= (c) && (c) <= 'r') \
6537 || ('s' <= (c) && (c) <= 'z'))
6538 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6539 #endif
6540
6541 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6542 int
6543 main ()
6544 {
6545 int i;
6546 for (i = 0; i < 256; i++)
6547 if (XOR (islower (i), ISLOWER (i))
6548 || toupper (i) != TOUPPER (i))
6549 return 2;
6550 return 0;
6551 }
6552 _ACEOF
6553 if ac_fn_c_try_run "$LINENO"; then :
6554
6555 else
6556 ac_cv_header_stdc=no
6557 fi
6558 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6559 conftest.$ac_objext conftest.beam conftest.$ac_ext
6560 fi
6561
6562 fi
6563 fi
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6565 $as_echo "$ac_cv_header_stdc" >&6; }
6566 if test $ac_cv_header_stdc = yes; then
6567
6568 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6569
6570 fi
6571
6572 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6573 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6574 inttypes.h stdint.h unistd.h
6575 do :
6576 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6577 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6578 "
6579 eval as_val=\$$as_ac_Header
6580 if test "x$as_val" = x""yes; then :
6581 cat >>confdefs.h <<_ACEOF
6582 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6583 _ACEOF
6584
6585 fi
6586
6587 done
6588
6589
6590
6591 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6592 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6593 MINIX=yes
6594 else
6595 MINIX=
6596 fi
6597
6598
6599 if test "$MINIX" = yes; then
6600
6601 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6602
6603
6604 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6605
6606
6607 $as_echo "#define _MINIX 1" >>confdefs.h
6608
6609
6610 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6611
6612 fi
6613
6614
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6616 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6617 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6618 $as_echo_n "(cached) " >&6
6619 else
6620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6621 /* end confdefs.h. */
6622
6623 # define __EXTENSIONS__ 1
6624 $ac_includes_default
6625 int
6626 main ()
6627 {
6628
6629 ;
6630 return 0;
6631 }
6632 _ACEOF
6633 if ac_fn_c_try_compile "$LINENO"; then :
6634 ac_cv_safe_to_define___extensions__=yes
6635 else
6636 ac_cv_safe_to_define___extensions__=no
6637 fi
6638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6639 fi
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6641 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6642 test $ac_cv_safe_to_define___extensions__ = yes &&
6643 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6644
6645 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6646
6647 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6648
6649 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6650
6651 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6652
6653 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6654
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6656 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6657 if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6658 $as_echo_n "(cached) " >&6
6659 else
6660 ac_cv_should_define__xopen_source=no
6661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6662 /* end confdefs.h. */
6663
6664 #include <wchar.h>
6665 mbstate_t x;
6666 int
6667 main ()
6668 {
6669
6670 ;
6671 return 0;
6672 }
6673 _ACEOF
6674 if ac_fn_c_try_compile "$LINENO"; then :
6675
6676 else
6677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6678 /* end confdefs.h. */
6679
6680 #define _XOPEN_SOURCE 500
6681 #include <wchar.h>
6682 mbstate_t x;
6683 int
6684 main ()
6685 {
6686
6687 ;
6688 return 0;
6689 }
6690 _ACEOF
6691 if ac_fn_c_try_compile "$LINENO"; then :
6692 ac_cv_should_define__xopen_source=yes
6693 fi
6694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6695 fi
6696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6697 fi
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6699 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6700 test $ac_cv_should_define__xopen_source = yes &&
6701 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6702
6703
6704
6705
6706
6707
6708
6709
6710 # Check whether --enable-largefile was given.
6711 if test "${enable_largefile+set}" = set; then :
6712 enableval=$enable_largefile;
6713 fi
6714
6715 if test "$enable_largefile" != no; then
6716
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6718 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6719 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6720 $as_echo_n "(cached) " >&6
6721 else
6722 ac_cv_sys_largefile_CC=no
6723 if test "$GCC" != yes; then
6724 ac_save_CC=$CC
6725 while :; do
6726 # IRIX 6.2 and later do not support large files by default,
6727 # so use the C compiler's -n32 option if that helps.
6728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729 /* end confdefs.h. */
6730 #include <sys/types.h>
6731 /* Check that off_t can represent 2**63 - 1 correctly.
6732 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6733 since some C++ compilers masquerading as C compilers
6734 incorrectly reject 9223372036854775807. */
6735 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6736 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6737 && LARGE_OFF_T % 2147483647 == 1)
6738 ? 1 : -1];
6739 int
6740 main ()
6741 {
6742
6743 ;
6744 return 0;
6745 }
6746 _ACEOF
6747 if ac_fn_c_try_compile "$LINENO"; then :
6748 break
6749 fi
6750 rm -f core conftest.err conftest.$ac_objext
6751 CC="$CC -n32"
6752 if ac_fn_c_try_compile "$LINENO"; then :
6753 ac_cv_sys_largefile_CC=' -n32'; break
6754 fi
6755 rm -f core conftest.err conftest.$ac_objext
6756 break
6757 done
6758 CC=$ac_save_CC
6759 rm -f conftest.$ac_ext
6760 fi
6761 fi
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6763 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6764 if test "$ac_cv_sys_largefile_CC" != no; then
6765 CC=$CC$ac_cv_sys_largefile_CC
6766 fi
6767
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6769 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6770 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6771 $as_echo_n "(cached) " >&6
6772 else
6773 while :; do
6774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6775 /* end confdefs.h. */
6776 #include <sys/types.h>
6777 /* Check that off_t can represent 2**63 - 1 correctly.
6778 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6779 since some C++ compilers masquerading as C compilers
6780 incorrectly reject 9223372036854775807. */
6781 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6782 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6783 && LARGE_OFF_T % 2147483647 == 1)
6784 ? 1 : -1];
6785 int
6786 main ()
6787 {
6788
6789 ;
6790 return 0;
6791 }
6792 _ACEOF
6793 if ac_fn_c_try_compile "$LINENO"; then :
6794 ac_cv_sys_file_offset_bits=no; break
6795 fi
6796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6798 /* end confdefs.h. */
6799 #define _FILE_OFFSET_BITS 64
6800 #include <sys/types.h>
6801 /* Check that off_t can represent 2**63 - 1 correctly.
6802 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6803 since some C++ compilers masquerading as C compilers
6804 incorrectly reject 9223372036854775807. */
6805 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6806 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6807 && LARGE_OFF_T % 2147483647 == 1)
6808 ? 1 : -1];
6809 int
6810 main ()
6811 {
6812
6813 ;
6814 return 0;
6815 }
6816 _ACEOF
6817 if ac_fn_c_try_compile "$LINENO"; then :
6818 ac_cv_sys_file_offset_bits=64; break
6819 fi
6820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6821 ac_cv_sys_file_offset_bits=unknown
6822 break
6823 done
6824 fi
6825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6826 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6827 case $ac_cv_sys_file_offset_bits in #(
6828 no | unknown) ;;
6829 *)
6830 cat >>confdefs.h <<_ACEOF
6831 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6832 _ACEOF
6833 ;;
6834 esac
6835 rm -rf conftest*
6836 if test $ac_cv_sys_file_offset_bits = unknown; then
6837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6838 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6839 if test "${ac_cv_sys_large_files+set}" = set; then :
6840 $as_echo_n "(cached) " >&6
6841 else
6842 while :; do
6843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6844 /* end confdefs.h. */
6845 #include <sys/types.h>
6846 /* Check that off_t can represent 2**63 - 1 correctly.
6847 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6848 since some C++ compilers masquerading as C compilers
6849 incorrectly reject 9223372036854775807. */
6850 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6851 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6852 && LARGE_OFF_T % 2147483647 == 1)
6853 ? 1 : -1];
6854 int
6855 main ()
6856 {
6857
6858 ;
6859 return 0;
6860 }
6861 _ACEOF
6862 if ac_fn_c_try_compile "$LINENO"; then :
6863 ac_cv_sys_large_files=no; break
6864 fi
6865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6867 /* end confdefs.h. */
6868 #define _LARGE_FILES 1
6869 #include <sys/types.h>
6870 /* Check that off_t can represent 2**63 - 1 correctly.
6871 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6872 since some C++ compilers masquerading as C compilers
6873 incorrectly reject 9223372036854775807. */
6874 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6875 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6876 && LARGE_OFF_T % 2147483647 == 1)
6877 ? 1 : -1];
6878 int
6879 main ()
6880 {
6881
6882 ;
6883 return 0;
6884 }
6885 _ACEOF
6886 if ac_fn_c_try_compile "$LINENO"; then :
6887 ac_cv_sys_large_files=1; break
6888 fi
6889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6890 ac_cv_sys_large_files=unknown
6891 break
6892 done
6893 fi
6894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6895 $as_echo "$ac_cv_sys_large_files" >&6; }
6896 case $ac_cv_sys_large_files in #(
6897 no | unknown) ;;
6898 *)
6899 cat >>confdefs.h <<_ACEOF
6900 #define _LARGE_FILES $ac_cv_sys_large_files
6901 _ACEOF
6902 ;;
6903 esac
6904 rm -rf conftest*
6905 fi
6906
6907
6908 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6909
6910 fi
6911
6912 case $ac_cv_prog_cc_stdc in #(
6913 no) :
6914 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6915 *) :
6916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6917 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6918 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6919 $as_echo_n "(cached) " >&6
6920 else
6921 ac_cv_prog_cc_c99=no
6922 ac_save_CC=$CC
6923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6924 /* end confdefs.h. */
6925 #include <stdarg.h>
6926 #include <stdbool.h>
6927 #include <stdlib.h>
6928 #include <wchar.h>
6929 #include <stdio.h>
6930
6931 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6932 #define debug(...) fprintf (stderr, __VA_ARGS__)
6933 #define showlist(...) puts (#__VA_ARGS__)
6934 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6935 static void
6936 test_varargs_macros (void)
6937 {
6938 int x = 1234;
6939 int y = 5678;
6940 debug ("Flag");
6941 debug ("X = %d\n", x);
6942 showlist (The first, second, and third items.);
6943 report (x>y, "x is %d but y is %d", x, y);
6944 }
6945
6946 // Check long long types.
6947 #define BIG64 18446744073709551615ull
6948 #define BIG32 4294967295ul
6949 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6950 #if !BIG_OK
6951 your preprocessor is broken;
6952 #endif
6953 #if BIG_OK
6954 #else
6955 your preprocessor is broken;
6956 #endif
6957 static long long int bignum = -9223372036854775807LL;
6958 static unsigned long long int ubignum = BIG64;
6959
6960 struct incomplete_array
6961 {
6962 int datasize;
6963 double data[];
6964 };
6965
6966 struct named_init {
6967 int number;
6968 const wchar_t *name;
6969 double average;
6970 };
6971
6972 typedef const char *ccp;
6973
6974 static inline int
6975 test_restrict (ccp restrict text)
6976 {
6977 // See if C++-style comments work.
6978 // Iterate through items via the restricted pointer.
6979 // Also check for declarations in for loops.
6980 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6981 continue;
6982 return 0;
6983 }
6984
6985 // Check varargs and va_copy.
6986 static void
6987 test_varargs (const char *format, ...)
6988 {
6989 va_list args;
6990 va_start (args, format);
6991 va_list args_copy;
6992 va_copy (args_copy, args);
6993
6994 const char *str;
6995 int number;
6996 float fnumber;
6997
6998 while (*format)
6999 {
7000 switch (*format++)
7001 {
7002 case 's': // string
7003 str = va_arg (args_copy, const char *);
7004 break;
7005 case 'd': // int
7006 number = va_arg (args_copy, int);
7007 break;
7008 case 'f': // float
7009 fnumber = va_arg (args_copy, double);
7010 break;
7011 default:
7012 break;
7013 }
7014 }
7015 va_end (args_copy);
7016 va_end (args);
7017 }
7018
7019 int
7020 main ()
7021 {
7022
7023 // Check bool.
7024 _Bool success = false;
7025
7026 // Check restrict.
7027 if (test_restrict ("String literal") == 0)
7028 success = true;
7029 char *restrict newvar = "Another string";
7030
7031 // Check varargs.
7032 test_varargs ("s, d' f .", "string", 65, 34.234);
7033 test_varargs_macros ();
7034
7035 // Check flexible array members.
7036 struct incomplete_array *ia =
7037 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7038 ia->datasize = 10;
7039 for (int i = 0; i < ia->datasize; ++i)
7040 ia->data[i] = i * 1.234;
7041
7042 // Check named initializers.
7043 struct named_init ni = {
7044 .number = 34,
7045 .name = L"Test wide string",
7046 .average = 543.34343,
7047 };
7048
7049 ni.number = 58;
7050
7051 int dynamic_array[ni.number];
7052 dynamic_array[ni.number - 1] = 543;
7053
7054 // work around unused variable warnings
7055 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7056 || dynamic_array[ni.number - 1] != 543);
7057
7058 ;
7059 return 0;
7060 }
7061 _ACEOF
7062 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7063 do
7064 CC="$ac_save_CC $ac_arg"
7065 if ac_fn_c_try_compile "$LINENO"; then :
7066 ac_cv_prog_cc_c99=$ac_arg
7067 fi
7068 rm -f core conftest.err conftest.$ac_objext
7069 test "x$ac_cv_prog_cc_c99" != "xno" && break
7070 done
7071 rm -f conftest.$ac_ext
7072 CC=$ac_save_CC
7073
7074 fi
7075 # AC_CACHE_VAL
7076 case "x$ac_cv_prog_cc_c99" in
7077 x)
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7079 $as_echo "none needed" >&6; } ;;
7080 xno)
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7082 $as_echo "unsupported" >&6; } ;;
7083 *)
7084 CC="$CC $ac_cv_prog_cc_c99"
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7086 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7087 esac
7088 if test "x$ac_cv_prog_cc_c99" != xno; then :
7089 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7090 else
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7092 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7093 if test "${ac_cv_prog_cc_c89+set}" = set; then :
7094 $as_echo_n "(cached) " >&6
7095 else
7096 ac_cv_prog_cc_c89=no
7097 ac_save_CC=$CC
7098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7099 /* end confdefs.h. */
7100 #include <stdarg.h>
7101 #include <stdio.h>
7102 #include <sys/types.h>
7103 #include <sys/stat.h>
7104 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7105 struct buf { int x; };
7106 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7107 static char *e (p, i)
7108 char **p;
7109 int i;
7110 {
7111 return p[i];
7112 }
7113 static char *f (char * (*g) (char **, int), char **p, ...)
7114 {
7115 char *s;
7116 va_list v;
7117 va_start (v,p);
7118 s = g (p, va_arg (v,int));
7119 va_end (v);
7120 return s;
7121 }
7122
7123 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7124 function prototypes and stuff, but not '\xHH' hex character constants.
7125 These don't provoke an error unfortunately, instead are silently treated
7126 as 'x'. The following induces an error, until -std is added to get
7127 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7128 array size at least. It's necessary to write '\x00'==0 to get something
7129 that's true only with -std. */
7130 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7131
7132 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7133 inside strings and character constants. */
7134 #define FOO(x) 'x'
7135 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7136
7137 int test (int i, double x);
7138 struct s1 {int (*f) (int a);};
7139 struct s2 {int (*f) (double a);};
7140 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7141 int argc;
7142 char **argv;
7143 int
7144 main ()
7145 {
7146 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7147 ;
7148 return 0;
7149 }
7150 _ACEOF
7151 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7152 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7153 do
7154 CC="$ac_save_CC $ac_arg"
7155 if ac_fn_c_try_compile "$LINENO"; then :
7156 ac_cv_prog_cc_c89=$ac_arg
7157 fi
7158 rm -f core conftest.err conftest.$ac_objext
7159 test "x$ac_cv_prog_cc_c89" != "xno" && break
7160 done
7161 rm -f conftest.$ac_ext
7162 CC=$ac_save_CC
7163
7164 fi
7165 # AC_CACHE_VAL
7166 case "x$ac_cv_prog_cc_c89" in
7167 x)
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7169 $as_echo "none needed" >&6; } ;;
7170 xno)
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7172 $as_echo "unsupported" >&6; } ;;
7173 *)
7174 CC="$CC $ac_cv_prog_cc_c89"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7176 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7177 esac
7178 if test "x$ac_cv_prog_cc_c89" != xno; then :
7179 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7180 else
7181 ac_cv_prog_cc_stdc=no
7182 fi
7183
7184 fi
7185 ;;
7186 esac
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7188 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
7189 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
7190 $as_echo_n "(cached) " >&6
7191 fi
7192
7193 case $ac_cv_prog_cc_stdc in #(
7194 no) :
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7196 $as_echo "unsupported" >&6; } ;; #(
7197 '') :
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7199 $as_echo "none needed" >&6; } ;; #(
7200 *) :
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7202 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7203 esac
7204
7205
7206
7207 # Code from module alloca-opt:
7208 # Code from module allocator:
7209 # Code from module at-internal:
7210 # Code from module c-ctype:
7211 # Code from module c-strcase:
7212 # Code from module careadlinkat:
7213 # Code from module clock-time:
7214 # Code from module close-stream:
7215 # Code from module crypto/md5:
7216 # Code from module crypto/sha1:
7217 # Code from module crypto/sha256:
7218 # Code from module crypto/sha512:
7219 # Code from module dirent:
7220 # Code from module dosname:
7221 # Code from module dtoastr:
7222 # Code from module dtotimespec:
7223 # Code from module dup2:
7224 # Code from module environ:
7225 # Code from module errno:
7226 # Code from module euidaccess:
7227 # Code from module execinfo:
7228 # Code from module extensions:
7229
7230 # Code from module extern-inline:
7231 # Code from module faccessat:
7232 # Code from module fcntl-h:
7233 # Code from module fdatasync:
7234 # Code from module fdopendir:
7235 # Code from module filemode:
7236 # Code from module fpending:
7237 # Code from module fstatat:
7238 # Code from module fsync:
7239 # Code from module getgroups:
7240 # Code from module getloadavg:
7241 # Code from module getopt-gnu:
7242 # Code from module getopt-posix:
7243 # Code from module gettext-h:
7244 # Code from module gettime:
7245 # Code from module gettimeofday:
7246 # Code from module group-member:
7247 # Code from module ignore-value:
7248 # Code from module include_next:
7249 # Code from module intprops:
7250 # Code from module inttypes-incomplete:
7251 # Code from module largefile:
7252
7253 # Code from module lstat:
7254 # Code from module manywarnings:
7255 # Code from module memrchr:
7256 # Code from module mktime:
7257 # Code from module multiarch:
7258 # Code from module nocrash:
7259 # Code from module openat-h:
7260 # Code from module pathmax:
7261 # Code from module pselect:
7262 # Code from module pthread_sigmask:
7263 # Code from module putenv:
7264 # Code from module qacl:
7265 # Code from module readlink:
7266 # Code from module readlinkat:
7267 # Code from module root-uid:
7268 # Code from module sig2str:
7269 # Code from module signal-h:
7270 # Code from module snippet/_Noreturn:
7271 # Code from module snippet/arg-nonnull:
7272 # Code from module snippet/c++defs:
7273 # Code from module snippet/warn-on-use:
7274 # Code from module socklen:
7275 # Code from module ssize_t:
7276 # Code from module stat:
7277 # Code from module stat-time:
7278 # Code from module stdalign:
7279 # Code from module stdarg:
7280
7281
7282
7283 # Code from module stdbool:
7284 # Code from module stddef:
7285 # Code from module stdint:
7286 # Code from module stdio:
7287 # Code from module stdlib:
7288 # Code from module strftime:
7289 # Code from module string:
7290 # Code from module strtoimax:
7291 # Code from module strtoll:
7292 # Code from module strtoull:
7293 # Code from module strtoumax:
7294 # Code from module symlink:
7295 # Code from module sys_select:
7296 # Code from module sys_stat:
7297 # Code from module sys_time:
7298 # Code from module time:
7299 # Code from module time_r:
7300 # Code from module timer-time:
7301 # Code from module timespec:
7302 # Code from module timespec-add:
7303 # Code from module timespec-sub:
7304 # Code from module u64:
7305 # Code from module unistd:
7306 # Code from module unsetenv:
7307 # Code from module utimens:
7308 # Code from module verify:
7309 # Code from module warnings:
7310 # Code from module xalloc-oversized:
7311
7312
7313 if test "$ac_test_CFLAGS" != set; then
7314 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7315 # if -g3 works and the user does not specify CFLAGS.
7316 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7317 case $CFLAGS in
7318 '-g')
7319 emacs_g3_CFLAGS='-g3';;
7320 '-g -O2')
7321 emacs_g3_CFLAGS='-g3 -O2';;
7322 *)
7323 emacs_g3_CFLAGS='';;
7324 esac
7325 if test -n "$emacs_g3_CFLAGS"; then
7326 emacs_save_CFLAGS=$CFLAGS
7327 CFLAGS=$emacs_g3_CFLAGS
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7329 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7330 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7331 $as_echo_n "(cached) " >&6
7332 else
7333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7334 /* end confdefs.h. */
7335
7336 int
7337 main ()
7338 {
7339
7340 ;
7341 return 0;
7342 }
7343 _ACEOF
7344 if ac_fn_c_try_link "$LINENO"; then :
7345 emacs_cv_prog_cc_g3=yes
7346 else
7347 emacs_cv_prog_cc_g3=no
7348 fi
7349 rm -f core conftest.err conftest.$ac_objext \
7350 conftest$ac_exeext conftest.$ac_ext
7351 fi
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7353 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7354 if test $emacs_cv_prog_cc_g3 != yes; then
7355 CFLAGS=$emacs_save_CFLAGS
7356 fi
7357 if test $opsys = mingw32; then
7358 CFLAGS="$CFLAGS -gdwarf-2"
7359 fi
7360 fi
7361
7362 case $CFLAGS in
7363 *-O*) ;;
7364 *)
7365 # No optimization flag was inferred for this non-GCC compiler.
7366 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7367 emacs_save_CFLAGS=$CFLAGS
7368 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7369 CFLAGS=${CFLAGS}-O
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7371 $as_echo_n "checking whether $CC accepts -O... " >&6; }
7372 if test "${emacs_cv_prog_cc_o+set}" = set; then :
7373 $as_echo_n "(cached) " >&6
7374 else
7375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376 /* end confdefs.h. */
7377
7378 int
7379 main ()
7380 {
7381
7382 ;
7383 return 0;
7384 }
7385 _ACEOF
7386 if ac_fn_c_try_link "$LINENO"; then :
7387 emacs_cv_prog_cc_o=yes
7388 else
7389 emacs_cv_prog_cc_o=no
7390 fi
7391 rm -f core conftest.err conftest.$ac_objext \
7392 conftest$ac_exeext conftest.$ac_ext
7393 fi
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7395 $as_echo "$emacs_cv_prog_cc_o" >&6; }
7396 if test $emacs_cv_prog_cc_o != yes; then
7397 CFLAGS=$emacs_save_CFLAGS
7398 fi ;;
7399 esac
7400 fi
7401
7402 # Check whether --enable-gcc-warnings was given.
7403 if test "${enable_gcc_warnings+set}" = set; then :
7404 enableval=$enable_gcc_warnings; case $enableval in
7405 yes|no) ;;
7406 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7407 esac
7408 gl_gcc_warnings=$enableval
7409 else
7410 gl_gcc_warnings=no
7411
7412 fi
7413
7414
7415 # Check whether --enable-link-time-optimization was given.
7416 if test "${enable_link_time_optimization+set}" = set; then :
7417 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7419 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7420 ac_lto_supported=no
7421 if test x$GCC = xyes; then
7422 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7423 if test x$CPUS != x; then
7424 LTO="-flto=$CPUS"
7425 else
7426 LTO="-flto"
7427 fi
7428 old_CFLAGS=$CFLAGS
7429 CFLAGS="$CFLAGS $LTO"
7430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7431 /* end confdefs.h. */
7432
7433 int
7434 main ()
7435 {
7436
7437 ;
7438 return 0;
7439 }
7440 _ACEOF
7441 if ac_fn_c_try_compile "$LINENO"; then :
7442 ac_lto_supported=yes
7443 else
7444 ac_lto_supported=no
7445 fi
7446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7447 CFLAGS="$old_CFLAGS"
7448 fi
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7450 $as_echo "$ac_lto_supported" >&6; }
7451 if test "$ac_lto_supported" = "yes"; then
7452 CFLAGS="$CFLAGS $LTO"
7453 fi
7454 fi
7455 fi
7456
7457
7458 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7459 # ------------------------------------------------
7460 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7461 # Otherwise, run RUN-IF-NOT-FOUND.
7462
7463
7464 # When compiling with GCC, prefer -isystem to -I when including system
7465 # include files, to avoid generating useless diagnostics for the files.
7466 if test "$gl_gcc_warnings" != yes; then
7467 isystem='-I'
7468 else
7469 isystem='-isystem '
7470
7471 # This, $nw, is the list of warnings we disable.
7472 nw=
7473
7474 case $with_x_toolkit in
7475 lucid | athena | motif)
7476 # Old toolkits mishandle 'const'.
7477 nw="$nw -Wwrite-strings"
7478 ;;
7479 *)
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7481 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7482 if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7483 $as_echo_n "(cached) " >&6
7484 else
7485
7486 gl_save_compiler_FLAGS="$CFLAGS"
7487 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7489 /* end confdefs.h. */
7490
7491 int
7492 main ()
7493 {
7494
7495 ;
7496 return 0;
7497 }
7498 _ACEOF
7499 if ac_fn_c_try_compile "$LINENO"; then :
7500 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7501 else
7502 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7503 fi
7504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7505 CFLAGS="$gl_save_compiler_FLAGS"
7506
7507 fi
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7509 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7510 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7511 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7512 else
7513 gl_unknown_warnings_are_errors=
7514 fi
7515
7516
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7518 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7519 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7520 $as_echo_n "(cached) " >&6
7521 else
7522
7523 gl_save_compiler_FLAGS="$CFLAGS"
7524 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7526 /* end confdefs.h. */
7527
7528 int
7529 main ()
7530 {
7531
7532 ;
7533 return 0;
7534 }
7535 _ACEOF
7536 if ac_fn_c_try_compile "$LINENO"; then :
7537 gl_cv_warn_c__Werror=yes
7538 else
7539 gl_cv_warn_c__Werror=no
7540 fi
7541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7542 CFLAGS="$gl_save_compiler_FLAGS"
7543
7544 fi
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7546 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7547 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7548 as_fn_append WERROR_CFLAGS " -Werror"
7549 fi
7550
7551
7552 ;;
7553 esac
7554
7555
7556 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7557 nw="$nw -Woverlength-strings" # Not a problem these days
7558 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7559 nw="$nw -Wformat-nonliteral" # we do this a lot
7560 nw="$nw -Wvla" # warnings in gettext.h
7561 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7562 nw="$nw -Wswitch-default" # Too many warnings for now
7563 nw="$nw -Winline" # OK to ignore 'inline'
7564 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7565 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7566 # signed overflow has undefined behavior
7567 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7568 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7569
7570 # Emacs doesn't care about shadowing; see
7571 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7572 nw="$nw -Wshadow"
7573
7574 # Emacs's use of alloca inhibits protecting the stack.
7575 nw="$nw -Wstack-protector"
7576
7577 # The following line should be removable at some point.
7578 nw="$nw -Wsuggest-attribute=pure"
7579
7580 # clang is unduly picky about some things.
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7582 $as_echo_n "checking whether the compiler is clang... " >&6; }
7583 if test "${emacs_cv_clang+set}" = set; then :
7584 $as_echo_n "(cached) " >&6
7585 else
7586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7587 /* end confdefs.h. */
7588
7589 #ifndef __clang__
7590 #error "not clang"
7591 #endif
7592
7593 int
7594 main ()
7595 {
7596
7597 ;
7598 return 0;
7599 }
7600 _ACEOF
7601 if ac_fn_c_try_compile "$LINENO"; then :
7602 emacs_cv_clang=yes
7603 else
7604 emacs_cv_clang=no
7605 fi
7606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7607 fi
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7609 $as_echo "$emacs_cv_clang" >&6; }
7610 if test $emacs_cv_clang = yes; then
7611 nw="$nw -Wcast-align"
7612 fi
7613
7614
7615
7616 if test -n "$GCC"; then
7617
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7619 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7620 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7621 $as_echo_n "(cached) " >&6
7622 else
7623
7624 gl_save_CFLAGS="$CFLAGS"
7625 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7627 /* end confdefs.h. */
7628
7629 int
7630 main ()
7631 {
7632
7633 ;
7634 return 0;
7635 }
7636 _ACEOF
7637 if ac_fn_c_try_compile "$LINENO"; then :
7638 gl_cv_cc_nomfi_supported=yes
7639 else
7640 gl_cv_cc_nomfi_supported=no
7641 fi
7642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7643 CFLAGS="$gl_save_CFLAGS"
7644 fi
7645
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7647 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7648
7649 if test "$gl_cv_cc_nomfi_supported" = yes; then
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7651 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7652 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7653 $as_echo_n "(cached) " >&6
7654 else
7655
7656 gl_save_CFLAGS="$CFLAGS"
7657 CFLAGS="$CFLAGS -W -Werror"
7658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7659 /* end confdefs.h. */
7660 void f (void)
7661 {
7662 typedef struct { int a; int b; } s_t;
7663 s_t s1 = { 0, };
7664 }
7665
7666 int
7667 main ()
7668 {
7669
7670 ;
7671 return 0;
7672 }
7673 _ACEOF
7674 if ac_fn_c_try_compile "$LINENO"; then :
7675 gl_cv_cc_nomfi_needed=no
7676 else
7677 gl_cv_cc_nomfi_needed=yes
7678 fi
7679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7680 CFLAGS="$gl_save_CFLAGS"
7681
7682 fi
7683
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7685 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7686 fi
7687
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7689 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7690 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7691 $as_echo_n "(cached) " >&6
7692 else
7693
7694 gl_save_CFLAGS="$CFLAGS"
7695 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7697 /* end confdefs.h. */
7698
7699 int
7700 main ()
7701 {
7702
7703 ;
7704 return 0;
7705 }
7706 _ACEOF
7707 if ac_fn_c_try_compile "$LINENO"; then :
7708 gl_cv_cc_uninitialized_supported=yes
7709 else
7710 gl_cv_cc_uninitialized_supported=no
7711 fi
7712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7713 CFLAGS="$gl_save_CFLAGS"
7714 fi
7715
7716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7717 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7718
7719 fi
7720
7721 # List all gcc warning categories.
7722 gl_manywarn_set=
7723 for gl_manywarn_item in \
7724 -W \
7725 -Wabi \
7726 -Waddress \
7727 -Waggressive-loop-optimizations \
7728 -Wall \
7729 -Warray-bounds \
7730 -Wattributes \
7731 -Wbad-function-cast \
7732 -Wbuiltin-macro-redefined \
7733 -Wcast-align \
7734 -Wchar-subscripts \
7735 -Wclobbered \
7736 -Wcomment \
7737 -Wcomments \
7738 -Wcoverage-mismatch \
7739 -Wcpp \
7740 -Wdeprecated \
7741 -Wdeprecated-declarations \
7742 -Wdisabled-optimization \
7743 -Wdiv-by-zero \
7744 -Wdouble-promotion \
7745 -Wempty-body \
7746 -Wendif-labels \
7747 -Wenum-compare \
7748 -Wextra \
7749 -Wformat-contains-nul \
7750 -Wformat-extra-args \
7751 -Wformat-nonliteral \
7752 -Wformat-security \
7753 -Wformat-y2k \
7754 -Wformat-zero-length \
7755 -Wfree-nonheap-object \
7756 -Wignored-qualifiers \
7757 -Wimplicit \
7758 -Wimplicit-function-declaration \
7759 -Wimplicit-int \
7760 -Winit-self \
7761 -Winline \
7762 -Wint-to-pointer-cast \
7763 -Winvalid-memory-model \
7764 -Winvalid-pch \
7765 -Wjump-misses-init \
7766 -Wlogical-op \
7767 -Wmain \
7768 -Wmaybe-uninitialized \
7769 -Wmissing-braces \
7770 -Wmissing-declarations \
7771 -Wmissing-field-initializers \
7772 -Wmissing-include-dirs \
7773 -Wmissing-parameter-type \
7774 -Wmissing-prototypes \
7775 -Wmudflap \
7776 -Wmultichar \
7777 -Wnarrowing \
7778 -Wnested-externs \
7779 -Wnonnull \
7780 -Wnormalized=nfc \
7781 -Wold-style-declaration \
7782 -Wold-style-definition \
7783 -Woverflow \
7784 -Woverlength-strings \
7785 -Woverride-init \
7786 -Wpacked \
7787 -Wpacked-bitfield-compat \
7788 -Wparentheses \
7789 -Wpointer-arith \
7790 -Wpointer-sign \
7791 -Wpointer-to-int-cast \
7792 -Wpragmas \
7793 -Wreturn-local-addr \
7794 -Wreturn-type \
7795 -Wsequence-point \
7796 -Wshadow \
7797 -Wsizeof-pointer-memaccess \
7798 -Wstack-protector \
7799 -Wstrict-aliasing \
7800 -Wstrict-overflow \
7801 -Wstrict-prototypes \
7802 -Wsuggest-attribute=const \
7803 -Wsuggest-attribute=format \
7804 -Wsuggest-attribute=noreturn \
7805 -Wsuggest-attribute=pure \
7806 -Wswitch \
7807 -Wswitch-default \
7808 -Wsync-nand \
7809 -Wsystem-headers \
7810 -Wtrampolines \
7811 -Wtrigraphs \
7812 -Wtype-limits \
7813 -Wuninitialized \
7814 -Wunknown-pragmas \
7815 -Wunsafe-loop-optimizations \
7816 -Wunused \
7817 -Wunused-but-set-parameter \
7818 -Wunused-but-set-variable \
7819 -Wunused-function \
7820 -Wunused-label \
7821 -Wunused-local-typedefs \
7822 -Wunused-macros \
7823 -Wunused-parameter \
7824 -Wunused-result \
7825 -Wunused-value \
7826 -Wunused-variable \
7827 -Wvarargs \
7828 -Wvariadic-macros \
7829 -Wvector-operation-performance \
7830 -Wvla \
7831 -Wvolatile-register-var \
7832 -Wwrite-strings \
7833 \
7834 ; do
7835 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7836 done
7837
7838 # Disable specific options as needed.
7839 if test "$gl_cv_cc_nomfi_needed" = yes; then
7840 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7841 fi
7842
7843 if test "$gl_cv_cc_uninitialized_supported" = no; then
7844 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7845 fi
7846
7847 ws=$gl_manywarn_set
7848
7849
7850 gl_warn_set=
7851 set x $ws; shift
7852 for gl_warn_item
7853 do
7854 case " $nw " in
7855 *" $gl_warn_item "*)
7856 ;;
7857 *)
7858 gl_warn_set="$gl_warn_set $gl_warn_item"
7859 ;;
7860 esac
7861 done
7862 ws=$gl_warn_set
7863
7864 for w in $ws; do
7865
7866 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7868 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7869 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7870 $as_echo_n "(cached) " >&6
7871 else
7872
7873 gl_save_compiler_FLAGS="$CFLAGS"
7874 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
7875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7876 /* end confdefs.h. */
7877
7878 int
7879 main ()
7880 {
7881
7882 ;
7883 return 0;
7884 }
7885 _ACEOF
7886 if ac_fn_c_try_compile "$LINENO"; then :
7887 eval "$as_gl_Warn=yes"
7888 else
7889 eval "$as_gl_Warn=no"
7890 fi
7891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7892 CFLAGS="$gl_save_compiler_FLAGS"
7893
7894 fi
7895 eval ac_res=\$$as_gl_Warn
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7897 $as_echo "$ac_res" >&6; }
7898 eval as_val=\$$as_gl_Warn
7899 if test "x$as_val" = x""yes; then :
7900 as_fn_append WARN_CFLAGS " $w"
7901 fi
7902
7903
7904 done
7905
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7907 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7908 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7909 $as_echo_n "(cached) " >&6
7910 else
7911
7912 gl_save_compiler_FLAGS="$CFLAGS"
7913 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
7914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7915 /* end confdefs.h. */
7916
7917 int
7918 main ()
7919 {
7920
7921 ;
7922 return 0;
7923 }
7924 _ACEOF
7925 if ac_fn_c_try_compile "$LINENO"; then :
7926 gl_cv_warn_c__Wno_missing_field_initializers=yes
7927 else
7928 gl_cv_warn_c__Wno_missing_field_initializers=no
7929 fi
7930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7931 CFLAGS="$gl_save_compiler_FLAGS"
7932
7933 fi
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7935 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7936 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7937 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7938 fi
7939
7940 # We need this one
7941
7942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7943 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7944 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7945 $as_echo_n "(cached) " >&6
7946 else
7947
7948 gl_save_compiler_FLAGS="$CFLAGS"
7949 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
7950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7951 /* end confdefs.h. */
7952
7953 int
7954 main ()
7955 {
7956
7957 ;
7958 return 0;
7959 }
7960 _ACEOF
7961 if ac_fn_c_try_compile "$LINENO"; then :
7962 gl_cv_warn_c__Wno_sign_compare=yes
7963 else
7964 gl_cv_warn_c__Wno_sign_compare=no
7965 fi
7966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7967 CFLAGS="$gl_save_compiler_FLAGS"
7968
7969 fi
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7971 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7972 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7973 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7974 fi
7975
7976 # Too many warnings for now
7977
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7979 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7980 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7981 $as_echo_n "(cached) " >&6
7982 else
7983
7984 gl_save_compiler_FLAGS="$CFLAGS"
7985 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
7986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7987 /* end confdefs.h. */
7988
7989 int
7990 main ()
7991 {
7992
7993 ;
7994 return 0;
7995 }
7996 _ACEOF
7997 if ac_fn_c_try_compile "$LINENO"; then :
7998 gl_cv_warn_c__Wno_type_limits=yes
7999 else
8000 gl_cv_warn_c__Wno_type_limits=no
8001 fi
8002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8003 CFLAGS="$gl_save_compiler_FLAGS"
8004
8005 fi
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8007 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8008 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8009 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8010 fi
8011
8012 # Too many warnings for now
8013
8014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
8015 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8016 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8017 $as_echo_n "(cached) " >&6
8018 else
8019
8020 gl_save_compiler_FLAGS="$CFLAGS"
8021 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-switch"
8022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8023 /* end confdefs.h. */
8024
8025 int
8026 main ()
8027 {
8028
8029 ;
8030 return 0;
8031 }
8032 _ACEOF
8033 if ac_fn_c_try_compile "$LINENO"; then :
8034 gl_cv_warn_c__Wno_switch=yes
8035 else
8036 gl_cv_warn_c__Wno_switch=no
8037 fi
8038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8039 CFLAGS="$gl_save_compiler_FLAGS"
8040
8041 fi
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8043 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8044 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8045 as_fn_append WARN_CFLAGS " -Wno-switch"
8046 fi
8047
8048 # Too many warnings for now
8049
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
8051 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8052 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8053 $as_echo_n "(cached) " >&6
8054 else
8055
8056 gl_save_compiler_FLAGS="$CFLAGS"
8057 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
8058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8059 /* end confdefs.h. */
8060
8061 int
8062 main ()
8063 {
8064
8065 ;
8066 return 0;
8067 }
8068 _ACEOF
8069 if ac_fn_c_try_compile "$LINENO"; then :
8070 gl_cv_warn_c__Wno_unused_parameter=yes
8071 else
8072 gl_cv_warn_c__Wno_unused_parameter=no
8073 fi
8074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8075 CFLAGS="$gl_save_compiler_FLAGS"
8076
8077 fi
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8079 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8080 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8081 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8082 fi
8083
8084 # Too many warnings for now
8085
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
8087 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8088 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8089 $as_echo_n "(cached) " >&6
8090 else
8091
8092 gl_save_compiler_FLAGS="$CFLAGS"
8093 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
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_compile "$LINENO"; then :
8106 gl_cv_warn_c__Wno_format_nonliteral=yes
8107 else
8108 gl_cv_warn_c__Wno_format_nonliteral=no
8109 fi
8110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8111 CFLAGS="$gl_save_compiler_FLAGS"
8112
8113 fi
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8115 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8116 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8117 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8118 fi
8119
8120
8121
8122 # In spite of excluding -Wlogical-op above, it is enabled, as of
8123 # gcc 4.5.0 20090517.
8124
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
8126 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8127 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8128 $as_echo_n "(cached) " >&6
8129 else
8130
8131 gl_save_compiler_FLAGS="$CFLAGS"
8132 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
8133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8134 /* end confdefs.h. */
8135
8136 int
8137 main ()
8138 {
8139
8140 ;
8141 return 0;
8142 }
8143 _ACEOF
8144 if ac_fn_c_try_compile "$LINENO"; then :
8145 gl_cv_warn_c__Wno_logical_op=yes
8146 else
8147 gl_cv_warn_c__Wno_logical_op=no
8148 fi
8149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8150 CFLAGS="$gl_save_compiler_FLAGS"
8151
8152 fi
8153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8154 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8155 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8156 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8157 fi
8158
8159
8160
8161 # More things that clang is unduly picky about.
8162 if test $emacs_cv_clang = yes; then
8163
8164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8165 $as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8166 if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8167 $as_echo_n "(cached) " >&6
8168 else
8169
8170 gl_save_compiler_FLAGS="$CFLAGS"
8171 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-extra-args"
8172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8173 /* end confdefs.h. */
8174
8175 int
8176 main ()
8177 {
8178
8179 ;
8180 return 0;
8181 }
8182 _ACEOF
8183 if ac_fn_c_try_compile "$LINENO"; then :
8184 gl_cv_warn_c__Wno_format_extra_args=yes
8185 else
8186 gl_cv_warn_c__Wno_format_extra_args=no
8187 fi
8188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8189 CFLAGS="$gl_save_compiler_FLAGS"
8190
8191 fi
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8193 $as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8194 if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8195 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8196 fi
8197
8198
8199
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8201 $as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8202 if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8203 $as_echo_n "(cached) " >&6
8204 else
8205
8206 gl_save_compiler_FLAGS="$CFLAGS"
8207 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-tautological-constant-out-of-range-compare"
8208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8209 /* end confdefs.h. */
8210
8211 int
8212 main ()
8213 {
8214
8215 ;
8216 return 0;
8217 }
8218 _ACEOF
8219 if ac_fn_c_try_compile "$LINENO"; then :
8220 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8221 else
8222 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8223 fi
8224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8225 CFLAGS="$gl_save_compiler_FLAGS"
8226
8227 fi
8228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8229 $as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8230 if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8231 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8232 fi
8233
8234
8235
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8237 $as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8238 if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8239 $as_echo_n "(cached) " >&6
8240 else
8241
8242 gl_save_compiler_FLAGS="$CFLAGS"
8243 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-command-line-argument"
8244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8245 /* end confdefs.h. */
8246
8247 int
8248 main ()
8249 {
8250
8251 ;
8252 return 0;
8253 }
8254 _ACEOF
8255 if ac_fn_c_try_compile "$LINENO"; then :
8256 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8257 else
8258 gl_cv_warn_c__Wno_unused_command_line_argument=no
8259 fi
8260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8261 CFLAGS="$gl_save_compiler_FLAGS"
8262
8263 fi
8264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8265 $as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8266 if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8267 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8268 fi
8269
8270
8271
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8273 $as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8274 if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8275 $as_echo_n "(cached) " >&6
8276 else
8277
8278 gl_save_compiler_FLAGS="$CFLAGS"
8279 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-value"
8280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8281 /* end confdefs.h. */
8282
8283 int
8284 main ()
8285 {
8286
8287 ;
8288 return 0;
8289 }
8290 _ACEOF
8291 if ac_fn_c_try_compile "$LINENO"; then :
8292 gl_cv_warn_c__Wno_unused_value=yes
8293 else
8294 gl_cv_warn_c__Wno_unused_value=no
8295 fi
8296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8297 CFLAGS="$gl_save_compiler_FLAGS"
8298
8299 fi
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8301 $as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8302 if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8303 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8304 fi
8305
8306
8307 fi
8308
8309
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8311 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8312 if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8313 $as_echo_n "(cached) " >&6
8314 else
8315
8316 gl_save_compiler_FLAGS="$CFLAGS"
8317 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
8318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8319 /* end confdefs.h. */
8320
8321 int
8322 main ()
8323 {
8324
8325 ;
8326 return 0;
8327 }
8328 _ACEOF
8329 if ac_fn_c_try_compile "$LINENO"; then :
8330 gl_cv_warn_c__fdiagnostics_show_option=yes
8331 else
8332 gl_cv_warn_c__fdiagnostics_show_option=no
8333 fi
8334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8335 CFLAGS="$gl_save_compiler_FLAGS"
8336
8337 fi
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8339 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8340 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8341 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
8342 fi
8343
8344
8345
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8347 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8348 if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8349 $as_echo_n "(cached) " >&6
8350 else
8351
8352 gl_save_compiler_FLAGS="$CFLAGS"
8353 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
8354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8355 /* end confdefs.h. */
8356
8357 int
8358 main ()
8359 {
8360
8361 ;
8362 return 0;
8363 }
8364 _ACEOF
8365 if ac_fn_c_try_compile "$LINENO"; then :
8366 gl_cv_warn_c__funit_at_a_time=yes
8367 else
8368 gl_cv_warn_c__funit_at_a_time=no
8369 fi
8370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8371 CFLAGS="$gl_save_compiler_FLAGS"
8372
8373 fi
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8375 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8376 if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8377 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8378 fi
8379
8380
8381
8382
8383 $as_echo "#define lint 1" >>confdefs.h
8384
8385
8386
8387 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8388
8389
8390 # We use a slightly smaller set of warning options for lib/.
8391 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8392 nw=
8393 nw="$nw -Wunused-macros"
8394
8395
8396 gl_warn_set=
8397 set x $WARN_CFLAGS; shift
8398 for gl_warn_item
8399 do
8400 case " $nw " in
8401 *" $gl_warn_item "*)
8402 ;;
8403 *)
8404 gl_warn_set="$gl_warn_set $gl_warn_item"
8405 ;;
8406 esac
8407 done
8408 GNULIB_WARN_CFLAGS=$gl_warn_set
8409
8410
8411 fi
8412
8413
8414
8415
8416
8417
8418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8419 $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8420 rm -f conf$$ conf$$.file
8421
8422 LN_S_FILEONLY='cp -p'
8423
8424 if (echo >conf$$.file) 2>/dev/null; then
8425 if ln -s conf$$.file conf$$ 2>/dev/null; then
8426 LN_S_FILEONLY='ln -s'
8427 elif ln conf$$.file conf$$ 2>/dev/null; then
8428 LN_S_FILEONLY=ln
8429 fi
8430 fi
8431
8432 rm -f conf$$ conf$$.file
8433
8434 if test "$LN_S_FILEONLY" = "ln -s"; then
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8436 $as_echo "yes" >&6; }
8437 else
8438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8439 $as_echo "no, using $LN_S_FILEONLY" >&6; }
8440 fi
8441
8442
8443
8444
8445 if test "$opsys" = "mingw32"; then
8446 LN_S="ln"
8447 fi
8448
8449 # Extract the first word of "install-info", so it can be a program name with args.
8450 set dummy install-info; ac_word=$2
8451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8452 $as_echo_n "checking for $ac_word... " >&6; }
8453 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
8454 $as_echo_n "(cached) " >&6
8455 else
8456 case $INSTALL_INFO in
8457 [\\/]* | ?:[\\/]*)
8458 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8459 ;;
8460 *)
8461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8462 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
8463 do
8464 IFS=$as_save_IFS
8465 test -z "$as_dir" && as_dir=.
8466 for ac_exec_ext in '' $ac_executable_extensions; do
8467 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8468 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8469 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8470 break 2
8471 fi
8472 done
8473 done
8474 IFS=$as_save_IFS
8475
8476 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8477 ;;
8478 esac
8479 fi
8480 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8481 if test -n "$INSTALL_INFO"; then
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8483 $as_echo "$INSTALL_INFO" >&6; }
8484 else
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8486 $as_echo "no" >&6; }
8487 fi
8488
8489
8490 # Extract the first word of "gzip", so it can be a program name with args.
8491 set dummy gzip; ac_word=$2
8492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8493 $as_echo_n "checking for $ac_word... " >&6; }
8494 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
8495 $as_echo_n "(cached) " >&6
8496 else
8497 case $GZIP_PROG in
8498 [\\/]* | ?:[\\/]*)
8499 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8500 ;;
8501 *)
8502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8503 for as_dir in $PATH
8504 do
8505 IFS=$as_save_IFS
8506 test -z "$as_dir" && as_dir=.
8507 for ac_exec_ext in '' $ac_executable_extensions; do
8508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8509 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8511 break 2
8512 fi
8513 done
8514 done
8515 IFS=$as_save_IFS
8516
8517 ;;
8518 esac
8519 fi
8520 GZIP_PROG=$ac_cv_path_GZIP_PROG
8521 if test -n "$GZIP_PROG"; then
8522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8523 $as_echo "$GZIP_PROG" >&6; }
8524 else
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8526 $as_echo "no" >&6; }
8527 fi
8528
8529
8530
8531 if test $opsys = gnu-linux; then
8532 # Extract the first word of "paxctl", so it can be a program name with args.
8533 set dummy paxctl; ac_word=$2
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8535 $as_echo_n "checking for $ac_word... " >&6; }
8536 if test "${ac_cv_path_PAXCTL+set}" = set; then :
8537 $as_echo_n "(cached) " >&6
8538 else
8539 case $PAXCTL in
8540 [\\/]* | ?:[\\/]*)
8541 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8542 ;;
8543 *)
8544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8545 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8546 do
8547 IFS=$as_save_IFS
8548 test -z "$as_dir" && as_dir=.
8549 for ac_exec_ext in '' $ac_executable_extensions; do
8550 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8551 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8553 break 2
8554 fi
8555 done
8556 done
8557 IFS=$as_save_IFS
8558
8559 ;;
8560 esac
8561 fi
8562 PAXCTL=$ac_cv_path_PAXCTL
8563 if test -n "$PAXCTL"; then
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8565 $as_echo "$PAXCTL" >&6; }
8566 else
8567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8568 $as_echo "no" >&6; }
8569 fi
8570
8571
8572 if test "X$PAXCTL" != X; then
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8574 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8576 /* end confdefs.h. */
8577
8578 int
8579 main ()
8580 {
8581
8582 ;
8583 return 0;
8584 }
8585 _ACEOF
8586 if ac_fn_c_try_link "$LINENO"; then :
8587 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8588 $as_echo "yes" >&6; }
8589 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590 $as_echo "no" >&6; }; PAXCTL=""; fi
8591 fi
8592 rm -f core conftest.err conftest.$ac_objext \
8593 conftest$ac_exeext conftest.$ac_ext
8594 fi
8595 fi
8596
8597 ## Need makeinfo >= 4.7 (?) to build the manuals.
8598 # Extract the first word of "makeinfo", so it can be a program name with args.
8599 set dummy makeinfo; ac_word=$2
8600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601 $as_echo_n "checking for $ac_word... " >&6; }
8602 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8603 $as_echo_n "(cached) " >&6
8604 else
8605 case $MAKEINFO in
8606 [\\/]* | ?:[\\/]*)
8607 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8608 ;;
8609 *)
8610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611 for as_dir in $PATH
8612 do
8613 IFS=$as_save_IFS
8614 test -z "$as_dir" && as_dir=.
8615 for ac_exec_ext in '' $ac_executable_extensions; do
8616 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8617 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619 break 2
8620 fi
8621 done
8622 done
8623 IFS=$as_save_IFS
8624
8625 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8626 ;;
8627 esac
8628 fi
8629 MAKEINFO=$ac_cv_path_MAKEINFO
8630 if test -n "$MAKEINFO"; then
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8632 $as_echo "$MAKEINFO" >&6; }
8633 else
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8635 $as_echo "no" >&6; }
8636 fi
8637
8638
8639 if test "$MAKEINFO" != "no"; then
8640 case `
8641 $MAKEINFO --version 2> /dev/null |
8642 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8643 ` in
8644 '') MAKEINFO=no;;
8645 esac
8646 fi
8647
8648 ## Makeinfo is unusual. For a released Emacs, the manuals are
8649 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8650 ## therefore in the category of "special tools" not normally required, which
8651 ## configure does not have to check for (eg autoconf itself).
8652 ## In a Bazaar checkout on the other hand, the manuals are not included.
8653 ## So makeinfo is a requirement to build from Bazaar, and configure
8654 ## should test for it as it does for any other build requirement.
8655 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8656 ## with pre-built manuals, from a Bazaar checkout.
8657 HAVE_MAKEINFO=yes
8658
8659 if test "$MAKEINFO" = "no"; then
8660 MAKEINFO=makeinfo
8661 if test "x${with_makeinfo}" = "xno"; then
8662 HAVE_MAKEINFO=no
8663 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
8664 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8665 source tree does not seem to have pre-built manuals in the \`info' directory.
8666 Either install a suitable version of makeinfo, or re-run configure
8667 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8668 fi
8669 fi
8670
8671
8672 INFO_EXT=.info
8673 INFO_OPTS=--no-split
8674
8675
8676
8677
8678 if test x$GCC = xyes; then
8679 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8680 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8681 else
8682 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8683 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8684 fi
8685
8686
8687 late_LDFLAGS=$LDFLAGS
8688 if test x$GCC = xyes; then
8689 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8690 else
8691 LDFLAGS="$LDFLAGS -znocombreloc"
8692 fi
8693
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8695 $as_echo_n "checking for -znocombreloc... " >&6; }
8696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8697 /* end confdefs.h. */
8698
8699 int
8700 main ()
8701 {
8702
8703 ;
8704 return 0;
8705 }
8706 _ACEOF
8707 if ac_fn_c_try_link "$LINENO"; then :
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8709 $as_echo "yes" >&6; }
8710 else
8711 LDFLAGS=$late_LDFLAGS
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8713 $as_echo "no" >&6; }
8714 fi
8715 rm -f core conftest.err conftest.$ac_objext \
8716 conftest$ac_exeext conftest.$ac_ext
8717
8718
8719 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8720 case "$opsys" in
8721 your-opsys-here) CANNOT_DUMP=yes ;;
8722 esac
8723
8724 test "$CANNOT_DUMP" = "yes" && \
8725
8726 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8727
8728
8729
8730
8731
8732 UNEXEC_OBJ=unexelf.o
8733 case "$opsys" in
8734 # MSDOS uses unexcoff.o
8735 aix4-2)
8736 UNEXEC_OBJ=unexaix.o
8737 ;;
8738 cygwin)
8739 UNEXEC_OBJ=unexcw.o
8740 ;;
8741 darwin)
8742 UNEXEC_OBJ=unexmacosx.o
8743 ;;
8744 hpux10-20 | hpux11)
8745 UNEXEC_OBJ=unexhp9k800.o
8746 ;;
8747 mingw32)
8748 UNEXEC_OBJ=unexw32.o
8749 ;;
8750 sol2-10)
8751 # Use the Solaris dldump() function, called from unexsol.c, to dump
8752 # emacs, instead of the generic ELF dump code found in unexelf.c.
8753 # The resulting binary has a complete symbol table, and is better
8754 # for debugging and other observability tools (debuggers, pstack, etc).
8755 #
8756 # If you encounter a problem using dldump(), please consider sending
8757 # a message to the OpenSolaris tools-linking mailing list:
8758 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8759 #
8760 # It is likely that dldump() works with older Solaris too, but this has
8761 # not been tested, so for now this change is for Solaris 10 or newer.
8762 UNEXEC_OBJ=unexsol.o
8763 ;;
8764 esac
8765
8766 LD_SWITCH_SYSTEM=
8767 case "$opsys" in
8768 freebsd|dragonfly)
8769 ## Let `ld' find image libs and similar things in /usr/local/lib.
8770 ## The system compiler, GCC, has apparently been modified to not
8771 ## look there, contrary to what a stock GCC would do.
8772 ### It's not our place to do this. See bug#10313#17.
8773 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8774 :
8775 ;;
8776
8777 gnu-linux)
8778 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8779 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8780 ;;
8781
8782 netbsd)
8783 ### It's not our place to do this. See bug#10313#17.
8784 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8785 :
8786 ;;
8787
8788 openbsd)
8789 ## Han Boetes <han@boetes.org> says this is necessary,
8790 ## otherwise Emacs dumps core on elf systems.
8791 LD_SWITCH_SYSTEM="-Z"
8792 ;;
8793 esac
8794
8795
8796 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8797
8798 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8799 ## which has not been defined yet. When this was handled with cpp,
8800 ## it was expanded to null when configure sourced the s/*.h file.
8801 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8802 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8803 ## (or somesuch), but because it is supposed to go at the _front_
8804 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8805 ## Compare with the gnu-linux case below, which added to the end
8806 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8807 ## LD_SWITCH_SYSTEM_TEMACS.
8808 case "$opsys" in
8809 netbsd|openbsd)
8810 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8811 esac
8812
8813
8814 C_SWITCH_MACHINE=
8815 case $canonical in
8816 alpha*)
8817 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8818 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8819
8820 fi
8821
8822 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8823 ## With ELF, make sure that all common symbols get allocated to in the
8824 ## data section. Otherwise, the dump of temacs may miss variables in
8825 ## the shared library that have been initialized. For example, with
8826 ## GNU libc, __malloc_initialized would normally be resolved to the
8827 ## shared library's .bss section, which is fatal.
8828 if test "x$GCC" = "xyes"; then
8829 C_SWITCH_MACHINE="-fno-common"
8830 else
8831 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
8832 fi
8833 else
8834 UNEXEC_OBJ=unexalpha.o
8835 fi
8836 ;;
8837 esac
8838
8839
8840
8841
8842 C_SWITCH_SYSTEM=
8843 ## Some programs in src produce warnings saying certain subprograms
8844 ## are too complex and need a MAXMEM value greater than 2000 for
8845 ## additional optimization. --nils@exp-math.uni-essen.de
8846 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8847 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8848 test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
8849 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8850 ## It is redundant in glibc2, since we define _GNU_SOURCE.
8851
8852
8853
8854 LIBS_SYSTEM=
8855 case "$opsys" in
8856 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8857 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8858
8859 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
8860
8861 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8862
8863 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
8864
8865 ## Motif needs -lgen.
8866 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8867 esac
8868
8869
8870
8871 ### Make sure subsequent tests use flags consistent with the build flags.
8872
8873 if test x"${OVERRIDE_CPPFLAGS}" != x; then
8874 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8875 else
8876 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8877 fi
8878
8879 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8880
8881 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8882
8883
8884
8885 LIB_MATH=-lm
8886 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
8887
8888 case $opsys in
8889 cygwin )
8890 LIB_MATH=
8891 ;;
8892 darwin )
8893 ## Adding -lm confuses the dynamic linker, so omit it.
8894 LIB_MATH=
8895 ;;
8896 freebsd | dragonfly )
8897 SYSTEM_TYPE=berkeley-unix
8898 ;;
8899 gnu-linux | gnu-kfreebsd )
8900 ;;
8901 hpux10-20 | hpux11 )
8902 ;;
8903 mingw32 )
8904 LIB_MATH=
8905 SYSTEM_TYPE=windows-nt
8906 ;;
8907 netbsd | openbsd )
8908 SYSTEM_TYPE=berkeley-unix
8909 ;;
8910
8911 sol2* | unixware )
8912 SYSTEM_TYPE=usg-unix-v
8913 ;;
8914
8915 esac
8916
8917
8918
8919 cat >>confdefs.h <<_ACEOF
8920 #define SYSTEM_TYPE "$SYSTEM_TYPE"
8921 _ACEOF
8922
8923
8924
8925 pre_PKG_CONFIG_CFLAGS=$CFLAGS
8926 pre_PKG_CONFIG_LIBS=$LIBS
8927
8928 # Extract the first word of "pkg-config", so it can be a program name with args.
8929 set dummy pkg-config; ac_word=$2
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8931 $as_echo_n "checking for $ac_word... " >&6; }
8932 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8933 $as_echo_n "(cached) " >&6
8934 else
8935 case $PKG_CONFIG in
8936 [\\/]* | ?:[\\/]*)
8937 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8938 ;;
8939 *)
8940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8941 for as_dir in $PATH
8942 do
8943 IFS=$as_save_IFS
8944 test -z "$as_dir" && as_dir=.
8945 for ac_exec_ext in '' $ac_executable_extensions; do
8946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8947 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8949 break 2
8950 fi
8951 done
8952 done
8953 IFS=$as_save_IFS
8954
8955 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8956 ;;
8957 esac
8958 fi
8959 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8960 if test -n "$PKG_CONFIG"; then
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8962 $as_echo "$PKG_CONFIG" >&6; }
8963 else
8964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8965 $as_echo "no" >&6; }
8966 fi
8967
8968
8969
8970
8971
8972 if test "${with_sound}" != "no"; then
8973 # Sound support for GNU/Linux, the free BSDs, and MinGW.
8974 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h
8975 do :
8976 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8977 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8978 #ifdef __MINGW32__
8979 #define WIN32_LEAN_AND_MEAN
8980 #include <windows.h>
8981 #endif
8982
8983 "
8984 eval as_val=\$$as_ac_Header
8985 if test "x$as_val" = x""yes; then :
8986 cat >>confdefs.h <<_ACEOF
8987 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8988 _ACEOF
8989 have_sound_header=yes
8990 fi
8991
8992 done
8993
8994 # Emulation library used on NetBSD.
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8996 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8997 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
8998 $as_echo_n "(cached) " >&6
8999 else
9000 ac_check_lib_save_LIBS=$LIBS
9001 LIBS="-lossaudio $LIBS"
9002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9003 /* end confdefs.h. */
9004
9005 /* Override any GCC internal prototype to avoid an error.
9006 Use char because int might match the return type of a GCC
9007 builtin and then its argument prototype would still apply. */
9008 #ifdef __cplusplus
9009 extern "C"
9010 #endif
9011 char _oss_ioctl ();
9012 int
9013 main ()
9014 {
9015 return _oss_ioctl ();
9016 ;
9017 return 0;
9018 }
9019 _ACEOF
9020 if ac_fn_c_try_link "$LINENO"; then :
9021 ac_cv_lib_ossaudio__oss_ioctl=yes
9022 else
9023 ac_cv_lib_ossaudio__oss_ioctl=no
9024 fi
9025 rm -f core conftest.err conftest.$ac_objext \
9026 conftest$ac_exeext conftest.$ac_ext
9027 LIBS=$ac_check_lib_save_LIBS
9028 fi
9029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9030 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9031 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9032 LIBSOUND=-lossaudio
9033 else
9034 LIBSOUND=
9035 fi
9036
9037
9038
9039 ALSA_REQUIRED=1.0.0
9040 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
9041
9042 succeeded=no
9043
9044 if test "$PKG_CONFIG" = "no" ; then
9045 HAVE_ALSA=no
9046 else
9047 PKG_CONFIG_MIN_VERSION=0.9.0
9048 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9050 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
9051
9052 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9053 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9054 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
9055 edit_cflags="
9056 s,///*,/,g
9057 s/^/ /
9058 s/ -I/ $isystem/g
9059 s/^ //
9060 "
9061 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9062 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9064 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9065 succeeded=yes
9066 else
9067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9068 $as_echo "no" >&6; }
9069 ALSA_CFLAGS=""
9070 ALSA_LIBS=""
9071 ## If we have a custom action on failure, don't print errors, but
9072 ## do set a variable so people can do so. Do it in a subshell
9073 ## to capture any diagnostics in invoking pkg-config.
9074 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
9075
9076 fi
9077
9078
9079
9080 else
9081 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9082 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9083 fi
9084 fi
9085
9086 if test $succeeded = yes; then
9087 HAVE_ALSA=yes
9088 else
9089 HAVE_ALSA=no
9090 fi
9091
9092 if test $HAVE_ALSA = yes; then
9093 SAVE_CFLAGS="$CFLAGS"
9094 SAVE_LIBS="$LIBS"
9095 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9096 LIBS="$ALSA_LIBS $LIBS"
9097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9098 /* end confdefs.h. */
9099 #include <asoundlib.h>
9100 int
9101 main ()
9102 {
9103 snd_lib_error_set_handler (0);
9104 ;
9105 return 0;
9106 }
9107 _ACEOF
9108 if ac_fn_c_try_compile "$LINENO"; then :
9109 emacs_alsa_normal=yes
9110 else
9111 emacs_alsa_normal=no
9112 fi
9113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9114 if test "$emacs_alsa_normal" != yes; then
9115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9116 /* end confdefs.h. */
9117 #include <alsa/asoundlib.h>
9118 int
9119 main ()
9120 {
9121 snd_lib_error_set_handler (0);
9122 ;
9123 return 0;
9124 }
9125 _ACEOF
9126 if ac_fn_c_try_compile "$LINENO"; then :
9127 emacs_alsa_subdir=yes
9128 else
9129 emacs_alsa_subdir=no
9130 fi
9131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9132 if test "$emacs_alsa_subdir" != yes; then
9133 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9134 fi
9135 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
9136 fi
9137
9138 CFLAGS="$SAVE_CFLAGS"
9139 LIBS="$SAVE_LIBS"
9140 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9141 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
9142
9143 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
9144
9145 fi
9146
9147 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
9148 case "$opsys" in
9149 gnu-linux|freebsd|netbsd|mingw32)
9150
9151 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
9152
9153 ;;
9154 esac
9155 fi
9156
9157
9158 fi
9159
9160
9161
9162
9163 for ac_header in $ac_header_list
9164 do :
9165 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9166 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9167 "
9168 eval as_val=\$$as_ac_Header
9169 if test "x$as_val" = x""yes; then :
9170 cat >>confdefs.h <<_ACEOF
9171 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9172 _ACEOF
9173
9174 fi
9175
9176 done
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9199 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201 /* end confdefs.h. */
9202 #include <sys/personality.h>
9203 int
9204 main ()
9205 {
9206 personality (PER_LINUX32)
9207 ;
9208 return 0;
9209 }
9210 _ACEOF
9211 if ac_fn_c_try_compile "$LINENO"; then :
9212 emacs_cv_personality_linux32=yes
9213 else
9214 emacs_cv_personality_linux32=no
9215 fi
9216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9218 $as_echo "$emacs_cv_personality_linux32" >&6; }
9219
9220 if test $emacs_cv_personality_linux32 = yes; then
9221
9222 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9223
9224 fi
9225
9226 for ac_header in term.h
9227 do :
9228 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9229 if test "x$ac_cv_header_term_h" = x""yes; then :
9230 cat >>confdefs.h <<_ACEOF
9231 #define HAVE_TERM_H 1
9232 _ACEOF
9233
9234 fi
9235
9236 done
9237
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9239 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9240 if test "${ac_cv_header_time+set}" = set; then :
9241 $as_echo_n "(cached) " >&6
9242 else
9243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9244 /* end confdefs.h. */
9245 #include <sys/types.h>
9246 #include <sys/time.h>
9247 #include <time.h>
9248
9249 int
9250 main ()
9251 {
9252 if ((struct tm *) 0)
9253 return 0;
9254 ;
9255 return 0;
9256 }
9257 _ACEOF
9258 if ac_fn_c_try_compile "$LINENO"; then :
9259 ac_cv_header_time=yes
9260 else
9261 ac_cv_header_time=no
9262 fi
9263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9264 fi
9265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9266 $as_echo "$ac_cv_header_time" >&6; }
9267 if test $ac_cv_header_time = yes; then
9268
9269 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9270
9271 fi
9272
9273 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9274
9275 "
9276 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9277 ac_have_decl=1
9278 else
9279 ac_have_decl=0
9280 fi
9281
9282 cat >>confdefs.h <<_ACEOF
9283 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
9284 _ACEOF
9285
9286 if test $ac_cv_have_decl_sys_siglist != yes; then
9287 # For Tru64, at least:
9288 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9289
9290 "
9291 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9292 ac_have_decl=1
9293 else
9294 ac_have_decl=0
9295 fi
9296
9297 cat >>confdefs.h <<_ACEOF
9298 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9299 _ACEOF
9300
9301 if test $ac_cv_have_decl___sys_siglist = yes; then
9302
9303 $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
9304
9305 fi
9306 fi
9307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9308 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9309 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9310 $as_echo_n "(cached) " >&6
9311 else
9312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9313 /* end confdefs.h. */
9314 #include <sys/types.h>
9315 #include <sys/wait.h>
9316 #ifndef WEXITSTATUS
9317 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9318 #endif
9319 #ifndef WIFEXITED
9320 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9321 #endif
9322
9323 int
9324 main ()
9325 {
9326 int s;
9327 wait (&s);
9328 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9329 ;
9330 return 0;
9331 }
9332 _ACEOF
9333 if ac_fn_c_try_compile "$LINENO"; then :
9334 ac_cv_header_sys_wait_h=yes
9335 else
9336 ac_cv_header_sys_wait_h=no
9337 fi
9338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9339 fi
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9341 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
9342 if test $ac_cv_header_sys_wait_h = yes; then
9343
9344 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9345
9346 fi
9347
9348
9349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
9350 $as_echo_n "checking for speed_t... " >&6; }
9351 if test "${emacs_cv_speed_t+set}" = set; then :
9352 $as_echo_n "(cached) " >&6
9353 else
9354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9355 /* end confdefs.h. */
9356 #include <termios.h>
9357 int
9358 main ()
9359 {
9360 speed_t x = 1;
9361 ;
9362 return 0;
9363 }
9364 _ACEOF
9365 if ac_fn_c_try_compile "$LINENO"; then :
9366 emacs_cv_speed_t=yes
9367 else
9368 emacs_cv_speed_t=no
9369 fi
9370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9371 fi
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9373 $as_echo "$emacs_cv_speed_t" >&6; }
9374 if test $emacs_cv_speed_t = yes; then
9375
9376 $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
9377
9378 fi
9379
9380
9381
9382
9383 for ac_header in net/if.h
9384 do :
9385 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9386 #if HAVE_SYS_SOCKET_H
9387 #include <sys/socket.h>
9388 #endif
9389 "
9390 if test "x$ac_cv_header_net_if_h" = x""yes; then :
9391 cat >>confdefs.h <<_ACEOF
9392 #define HAVE_NET_IF_H 1
9393 _ACEOF
9394
9395 fi
9396
9397 done
9398
9399 for ac_header in ifaddrs.h
9400 do :
9401 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9402 #if HAVE_SYS_SOCKET_H
9403 #include <sys/socket.h>
9404 #endif
9405 "
9406 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9407 cat >>confdefs.h <<_ACEOF
9408 #define HAVE_IFADDRS_H 1
9409 _ACEOF
9410
9411 fi
9412
9413 done
9414
9415 for ac_header in net/if_dl.h
9416 do :
9417 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9418 #if HAVE_SYS_SOCKET_H
9419 #include <sys/socket.h>
9420 #endif
9421 "
9422 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
9423 cat >>confdefs.h <<_ACEOF
9424 #define HAVE_NET_IF_DL_H 1
9425 _ACEOF
9426
9427 fi
9428
9429 done
9430
9431
9432 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9433 #if HAVE_SYS_SOCKET_H
9434 #include <sys/socket.h>
9435 #endif
9436 #if HAVE_NET_IF_H
9437 #include <net/if.h>
9438 #endif
9439 "
9440 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
9441
9442 cat >>confdefs.h <<_ACEOF
9443 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9444 _ACEOF
9445
9446
9447 fi
9448 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9449 #if HAVE_SYS_SOCKET_H
9450 #include <sys/socket.h>
9451 #endif
9452 #if HAVE_NET_IF_H
9453 #include <net/if.h>
9454 #endif
9455 "
9456 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9457
9458 cat >>confdefs.h <<_ACEOF
9459 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9460 _ACEOF
9461
9462
9463 fi
9464 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9465 #if HAVE_SYS_SOCKET_H
9466 #include <sys/socket.h>
9467 #endif
9468 #if HAVE_NET_IF_H
9469 #include <net/if.h>
9470 #endif
9471 "
9472 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9473
9474 cat >>confdefs.h <<_ACEOF
9475 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9476 _ACEOF
9477
9478
9479 fi
9480 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9481 #if HAVE_SYS_SOCKET_H
9482 #include <sys/socket.h>
9483 #endif
9484 #if HAVE_NET_IF_H
9485 #include <net/if.h>
9486 #endif
9487 "
9488 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9489
9490 cat >>confdefs.h <<_ACEOF
9491 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9492 _ACEOF
9493
9494
9495 fi
9496 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9497 #if HAVE_SYS_SOCKET_H
9498 #include <sys/socket.h>
9499 #endif
9500 #if HAVE_NET_IF_H
9501 #include <net/if.h>
9502 #endif
9503 "
9504 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9505
9506 cat >>confdefs.h <<_ACEOF
9507 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9508 _ACEOF
9509
9510
9511 fi
9512 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9513 #if HAVE_SYS_SOCKET_H
9514 #include <sys/socket.h>
9515 #endif
9516 #if HAVE_NET_IF_H
9517 #include <net/if.h>
9518 #endif
9519 "
9520 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9521
9522 cat >>confdefs.h <<_ACEOF
9523 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9524 _ACEOF
9525
9526
9527 fi
9528
9529
9530
9531
9532 DEPFLAGS=
9533 MKDEPDIR=":"
9534 deps_frag=deps.mk
9535 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9537 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9538 HAVE_GNU_MAKE=no
9539 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9540 if test "x$testval" != x; then
9541 HAVE_GNU_MAKE=yes
9542 else
9543 ac_enable_autodepend=no
9544 fi
9545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9546 $as_echo "$HAVE_GNU_MAKE" >&6; }
9547 if test $HAVE_GNU_MAKE = yes; then
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9549 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9550 SAVE_CFLAGS="$CFLAGS"
9551 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9553 /* end confdefs.h. */
9554
9555 int
9556 main ()
9557 {
9558
9559 ;
9560 return 0;
9561 }
9562 _ACEOF
9563 if ac_fn_c_try_compile "$LINENO"; then :
9564
9565 else
9566 ac_enable_autodepend=no
9567 fi
9568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9569 CFLAGS="$SAVE_CFLAGS"
9570 test -f deps.d || ac_enable_autodepend=no
9571 rm -rf deps.d
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9573 $as_echo "$ac_enable_autodepend" >&6; }
9574 fi
9575 if test $ac_enable_autodepend = yes; then
9576 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9577 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9578 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9579 deps_frag=autodeps.mk
9580 fi
9581 fi
9582 deps_frag=$srcdir/src/$deps_frag
9583
9584
9585
9586
9587
9588 lisp_frag=$srcdir/src/lisp.mk
9589
9590
9591
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9593 $as_echo_n "checking for long file names... " >&6; }
9594 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9595 $as_echo_n "(cached) " >&6
9596 else
9597 ac_cv_sys_long_file_names=yes
9598 # Test for long file names in all the places we know might matter:
9599 # . the current directory, where building will happen
9600 # $prefix/lib where we will be installing things
9601 # $exec_prefix/lib likewise
9602 # $TMPDIR if set, where it might want to write temporary files
9603 # /tmp where it might want to write temporary files
9604 # /var/tmp likewise
9605 # /usr/tmp likewise
9606 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9607 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9608 # in the usual case where exec_prefix is '${prefix}'.
9609 case $ac_dir in #(
9610 . | /* | ?:[\\/]*) ;; #(
9611 *) continue;;
9612 esac
9613 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9614 ac_xdir=$ac_dir/cf$$
9615 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9616 ac_tf1=$ac_xdir/conftest9012345
9617 ac_tf2=$ac_xdir/conftest9012346
9618 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9619 ac_cv_sys_long_file_names=no
9620 rm -f -r "$ac_xdir" 2>/dev/null
9621 test $ac_cv_sys_long_file_names = no && break
9622 done
9623 fi
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9625 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9626 if test $ac_cv_sys_long_file_names = yes; then
9627
9628 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9629
9630 fi
9631
9632
9633 #### Choose a window system.
9634
9635 ## We leave window_system equal to none if
9636 ## we end up building without one. Any new window system should
9637 ## set window_system to an appropriate value and add objects to
9638 ## window-system-specific substs.
9639
9640 window_system=none
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9642 $as_echo_n "checking for X... " >&6; }
9643
9644
9645 # Check whether --with-x was given.
9646 if test "${with_x+set}" = set; then :
9647 withval=$with_x;
9648 fi
9649
9650 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9651 if test "x$with_x" = xno; then
9652 # The user explicitly disabled X.
9653 have_x=disabled
9654 else
9655 case $x_includes,$x_libraries in #(
9656 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9657 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9658 $as_echo_n "(cached) " >&6
9659 else
9660 # One or both of the vars are not set, and there is no cached value.
9661 ac_x_includes=no ac_x_libraries=no
9662 rm -f -r conftest.dir
9663 if mkdir conftest.dir; then
9664 cd conftest.dir
9665 cat >Imakefile <<'_ACEOF'
9666 incroot:
9667 @echo incroot='${INCROOT}'
9668 usrlibdir:
9669 @echo usrlibdir='${USRLIBDIR}'
9670 libdir:
9671 @echo libdir='${LIBDIR}'
9672 _ACEOF
9673 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9674 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9675 for ac_var in incroot usrlibdir libdir; do
9676 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9677 done
9678 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9679 for ac_extension in a so sl dylib la dll; do
9680 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9681 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9682 ac_im_usrlibdir=$ac_im_libdir; break
9683 fi
9684 done
9685 # Screen out bogus values from the imake configuration. They are
9686 # bogus both because they are the default anyway, and because
9687 # using them would break gcc on systems where it needs fixed includes.
9688 case $ac_im_incroot in
9689 /usr/include) ac_x_includes= ;;
9690 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9691 esac
9692 case $ac_im_usrlibdir in
9693 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9694 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9695 esac
9696 fi
9697 cd ..
9698 rm -f -r conftest.dir
9699 fi
9700
9701 # Standard set of common directories for X headers.
9702 # Check X11 before X11Rn because it is often a symlink to the current release.
9703 ac_x_header_dirs='
9704 /usr/X11/include
9705 /usr/X11R7/include
9706 /usr/X11R6/include
9707 /usr/X11R5/include
9708 /usr/X11R4/include
9709
9710 /usr/include/X11
9711 /usr/include/X11R7
9712 /usr/include/X11R6
9713 /usr/include/X11R5
9714 /usr/include/X11R4
9715
9716 /usr/local/X11/include
9717 /usr/local/X11R7/include
9718 /usr/local/X11R6/include
9719 /usr/local/X11R5/include
9720 /usr/local/X11R4/include
9721
9722 /usr/local/include/X11
9723 /usr/local/include/X11R7
9724 /usr/local/include/X11R6
9725 /usr/local/include/X11R5
9726 /usr/local/include/X11R4
9727
9728 /usr/X386/include
9729 /usr/x386/include
9730 /usr/XFree86/include/X11
9731
9732 /usr/include
9733 /usr/local/include
9734 /usr/unsupported/include
9735 /usr/athena/include
9736 /usr/local/x11r5/include
9737 /usr/lpp/Xamples/include
9738
9739 /usr/openwin/include
9740 /usr/openwin/share/include'
9741
9742 if test "$ac_x_includes" = no; then
9743 # Guess where to find include files, by looking for Xlib.h.
9744 # First, try using that file with no special directory specified.
9745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9746 /* end confdefs.h. */
9747 #include <X11/Xlib.h>
9748 _ACEOF
9749 if ac_fn_c_try_cpp "$LINENO"; then :
9750 # We can compile using X headers with no special include directory.
9751 ac_x_includes=
9752 else
9753 for ac_dir in $ac_x_header_dirs; do
9754 if test -r "$ac_dir/X11/Xlib.h"; then
9755 ac_x_includes=$ac_dir
9756 break
9757 fi
9758 done
9759 fi
9760 rm -f conftest.err conftest.$ac_ext
9761 fi # $ac_x_includes = no
9762
9763 if test "$ac_x_libraries" = no; then
9764 # Check for the libraries.
9765 # See if we find them without any special options.
9766 # Don't add to $LIBS permanently.
9767 ac_save_LIBS=$LIBS
9768 LIBS="-lX11 $LIBS"
9769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9770 /* end confdefs.h. */
9771 #include <X11/Xlib.h>
9772 int
9773 main ()
9774 {
9775 XrmInitialize ()
9776 ;
9777 return 0;
9778 }
9779 _ACEOF
9780 if ac_fn_c_try_link "$LINENO"; then :
9781 LIBS=$ac_save_LIBS
9782 # We can link X programs with no special library path.
9783 ac_x_libraries=
9784 else
9785 LIBS=$ac_save_LIBS
9786 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9787 do
9788 # Don't even attempt the hair of trying to link an X program!
9789 for ac_extension in a so sl dylib la dll; do
9790 if test -r "$ac_dir/libX11.$ac_extension"; then
9791 ac_x_libraries=$ac_dir
9792 break 2
9793 fi
9794 done
9795 done
9796 fi
9797 rm -f core conftest.err conftest.$ac_objext \
9798 conftest$ac_exeext conftest.$ac_ext
9799 fi # $ac_x_libraries = no
9800
9801 case $ac_x_includes,$ac_x_libraries in #(
9802 no,* | *,no | *\'*)
9803 # Didn't find X, or a directory has "'" in its name.
9804 ac_cv_have_x="have_x=no";; #(
9805 *)
9806 # Record where we found X for the cache.
9807 ac_cv_have_x="have_x=yes\
9808 ac_x_includes='$ac_x_includes'\
9809 ac_x_libraries='$ac_x_libraries'"
9810 esac
9811 fi
9812 ;; #(
9813 *) have_x=yes;;
9814 esac
9815 eval "$ac_cv_have_x"
9816 fi # $with_x != no
9817
9818 if test "$have_x" != yes; then
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9820 $as_echo "$have_x" >&6; }
9821 no_x=yes
9822 else
9823 # If each of the values was on the command line, it overrides each guess.
9824 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9825 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9826 # Update the cache value to reflect the command line values.
9827 ac_cv_have_x="have_x=yes\
9828 ac_x_includes='$x_includes'\
9829 ac_x_libraries='$x_libraries'"
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9831 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9832 fi
9833
9834 if test "$no_x" != yes; then
9835 window_system=x11
9836 fi
9837
9838 LD_SWITCH_X_SITE_RPATH=
9839 if test "${x_libraries}" != NONE; then
9840 if test -n "${x_libraries}"; then
9841 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9842 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9843 fi
9844 x_default_search_path=""
9845 x_search_path=${x_libraries}
9846 if test -z "${x_search_path}"; then
9847 x_search_path=/usr/lib
9848 fi
9849 for x_library in `echo ${x_search_path}: | \
9850 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9851 x_search_path="\
9852 ${x_library}/X11/%L/%T/%N%C%S:\
9853 ${x_library}/X11/%l/%T/%N%C%S:\
9854 ${x_library}/X11/%T/%N%C%S:\
9855 ${x_library}/X11/%L/%T/%N%S:\
9856 ${x_library}/X11/%l/%T/%N%S:\
9857 ${x_library}/X11/%T/%N%S"
9858 if test x"${x_default_search_path}" = x; then
9859 x_default_search_path=${x_search_path}
9860 else
9861 x_default_search_path="${x_search_path}:${x_default_search_path}"
9862 fi
9863 done
9864 fi
9865
9866
9867 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9868 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9869 fi
9870
9871 if test x"${x_includes}" = x; then
9872 bitmapdir=/usr/include/X11/bitmaps
9873 else
9874 # accumulate include directories that have X11 bitmap subdirectories
9875 bmd_acc="dummyval"
9876 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9877 if test -d "${bmd}/X11/bitmaps"; then
9878 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9879 fi
9880 if test -d "${bmd}/bitmaps"; then
9881 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9882 fi
9883 done
9884 if test ${bmd_acc} != "dummyval"; then
9885 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9886 fi
9887 fi
9888
9889 HAVE_NS=no
9890 NS_IMPL_COCOA=no
9891 NS_IMPL_GNUSTEP=no
9892 tmp_CPPFLAGS="$CPPFLAGS"
9893 tmp_CFLAGS="$CFLAGS"
9894 CPPFLAGS="$CPPFLAGS -x objective-c"
9895 CFLAGS="$CFLAGS -x objective-c"
9896 GNU_OBJC_CFLAGS=
9897 LIBS_GNUSTEP=
9898 if test "${with_ns}" != no; then
9899 if test "${opsys}" = darwin; then
9900 NS_IMPL_COCOA=yes
9901 ns_appdir=`pwd`/nextstep/Emacs.app
9902 ns_appbindir=${ns_appdir}/Contents/MacOS
9903 ns_appresdir=${ns_appdir}/Contents/Resources
9904 ns_appsrc=Cocoa/Emacs.base
9905 elif test -f $GNUSTEP_CONFIG_FILE; then
9906 NS_IMPL_GNUSTEP=yes
9907 ns_appdir=`pwd`/nextstep/Emacs.app
9908 ns_appbindir=${ns_appdir}
9909 ns_appresdir=${ns_appdir}/Resources
9910 ns_appsrc=GNUstep/Emacs.base
9911 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9912 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9913 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9914 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9915 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9916 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9917 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9918 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9919 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9920 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9921 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9922 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9924 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9925 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9926 $as_echo_n "(cached) " >&6
9927 else
9928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9929 /* end confdefs.h. */
9930 #include <GNUstepBase/GSConfig.h>
9931 int
9932 main ()
9933 {
9934 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9935 1;
9936 #else
9937 fail;
9938 #endif
9939 ;
9940 return 0;
9941 }
9942 _ACEOF
9943 if ac_fn_c_try_compile "$LINENO"; then :
9944 emacs_cv_objc_exceptions=yes
9945 else
9946 emacs_cv_objc_exceptions=no
9947 fi
9948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9949 fi
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9951 $as_echo "$emacs_cv_objc_exceptions" >&6; }
9952 if test $emacs_cv_objc_exceptions = yes; then
9953
9954 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9955
9956 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9957 fi
9958 fi
9959
9960 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9961
9962 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9963 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9964 HAVE_NS=yes
9965 else
9966 as_fn_error "\`--with-ns' was specified, but the include
9967 files are missing or cannot be compiled." "$LINENO" 5
9968 fi
9969
9970
9971
9972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9973 /* end confdefs.h. */
9974 #include <AppKit/AppKit.h>
9975 int
9976 main ()
9977 {
9978
9979 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9980 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9981 ; /* OK */
9982 #else
9983 #error "OSX 10.4 or newer required"
9984 #endif
9985 #endif
9986
9987 ;
9988 return 0;
9989 }
9990 _ACEOF
9991 if ac_fn_c_try_compile "$LINENO"; then :
9992 ns_osx_have_104=yes
9993 else
9994 ns_osx_have_104=no
9995 fi
9996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9998 /* end confdefs.h. */
9999 #include <Foundation/NSObjCRuntime.h>
10000 int
10001 main ()
10002 {
10003 NSInteger i;
10004 ;
10005 return 0;
10006 }
10007 _ACEOF
10008 if ac_fn_c_try_compile "$LINENO"; then :
10009 ns_have_nsinteger=yes
10010 else
10011 ns_have_nsinteger=no
10012 fi
10013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10014 if test $ns_osx_have_104 = no; then
10015 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10016 fi
10017 if test $ns_have_nsinteger = yes; then
10018
10019 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
10020
10021 fi
10022 fi
10023
10024
10025
10026 INSTALL_ARCH_INDEP_EXTRA=install-etc
10027 ns_self_contained=no
10028 NS_OBJ=
10029 NS_OBJC_OBJ=
10030 if test "${HAVE_NS}" = yes; then
10031 if test "$with_toolkit_scroll_bars" = "no"; then
10032 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10033 fi
10034
10035 window_system=nextstep
10036 # set up packaging dirs
10037 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10038 ns_self_contained=yes
10039 prefix=${ns_appresdir}
10040 exec_prefix=${ns_appbindir}
10041 libexecdir="\${ns_appbindir}/libexec"
10042 archlibdir="\${ns_appbindir}/libexec"
10043 docdir="\${ns_appresdir}/etc"
10044 etcdir="\${ns_appresdir}/etc"
10045 infodir="\${ns_appresdir}/info"
10046 mandir="\${ns_appresdir}/man"
10047 lispdir="\${ns_appresdir}/lisp"
10048 leimdir="\${ns_appresdir}/leim"
10049 INSTALL_ARCH_INDEP_EXTRA=
10050 fi
10051 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
10052 fi
10053 CFLAGS="$tmp_CFLAGS"
10054 CPPFLAGS="$tmp_CPPFLAGS"
10055
10056
10057
10058
10059
10060 HAVE_W32=no
10061 W32_OBJ=
10062 W32_LIBS=
10063 EMACSRES=
10064 CLIENTRES=
10065 CLIENTW=
10066 W32_RES_LINK=
10067 EMACS_MANIFEST=
10068 if test "${with_w32}" != no; then
10069 case "${opsys}" in
10070 cygwin)
10071 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
10072 if test "x$ac_cv_header_windows_h" = x""yes; then :
10073 HAVE_W32=yes
10074 else
10075 as_fn_error "\`--with-w32' was specified, but windows.h
10076 cannot be found." "$LINENO" 5
10077 fi
10078
10079
10080 ;;
10081 mingw32)
10082 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10083 ;;
10084 *)
10085 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10086 ;;
10087 esac
10088 fi
10089
10090 if test "${opsys}" = "mingw32"; then
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10092 $as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10094 /* end confdefs.h. */
10095
10096 #include <windows.h>
10097 #include <usp10.h>
10098 int
10099 main ()
10100 {
10101 void test(PIMAGE_NT_HEADERS pHeader)
10102 {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}
10103 ;
10104 return 0;
10105 }
10106 _ACEOF
10107 if ac_fn_c_try_compile "$LINENO"; then :
10108 emacs_cv_w32api=yes
10109 HAVE_W32=yes
10110 else
10111 emacs_cv_w32api=no
10112 fi
10113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10115 $as_echo "$emacs_cv_w32api" >&6; }
10116 if test "${emacs_cv_w32api}" = "no"; then
10117 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10118 fi
10119 fi
10120
10121 FIRSTFILE_OBJ=
10122 NTDIR=
10123 LIBS_ECLIENT=
10124 LIB_WSOCK32=
10125 NTLIB=
10126 CM_OBJ="cm.o"
10127 XARGS_LIMIT=
10128 if test "${HAVE_W32}" = "yes"; then
10129
10130 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10131
10132 if test -n "$ac_tool_prefix"; then
10133 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10134 set dummy ${ac_tool_prefix}windres; ac_word=$2
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10136 $as_echo_n "checking for $ac_word... " >&6; }
10137 if test "${ac_cv_prog_WINDRES+set}" = set; then :
10138 $as_echo_n "(cached) " >&6
10139 else
10140 if test -n "$WINDRES"; then
10141 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10142 else
10143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10144 for as_dir in $PATH
10145 do
10146 IFS=$as_save_IFS
10147 test -z "$as_dir" && as_dir=.
10148 for ac_exec_ext in '' $ac_executable_extensions; do
10149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10150 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10152 break 2
10153 fi
10154 done
10155 done
10156 IFS=$as_save_IFS
10157
10158 fi
10159 fi
10160 WINDRES=$ac_cv_prog_WINDRES
10161 if test -n "$WINDRES"; then
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10163 $as_echo "$WINDRES" >&6; }
10164 else
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166 $as_echo "no" >&6; }
10167 fi
10168
10169
10170 fi
10171 if test -z "$ac_cv_prog_WINDRES"; then
10172 ac_ct_WINDRES=$WINDRES
10173 # Extract the first word of "windres", so it can be a program name with args.
10174 set dummy windres; ac_word=$2
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10176 $as_echo_n "checking for $ac_word... " >&6; }
10177 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10178 $as_echo_n "(cached) " >&6
10179 else
10180 if test -n "$ac_ct_WINDRES"; then
10181 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10182 else
10183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10184 for as_dir in $PATH
10185 do
10186 IFS=$as_save_IFS
10187 test -z "$as_dir" && as_dir=.
10188 for ac_exec_ext in '' $ac_executable_extensions; do
10189 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10190 ac_cv_prog_ac_ct_WINDRES="windres"
10191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10192 break 2
10193 fi
10194 done
10195 done
10196 IFS=$as_save_IFS
10197
10198 fi
10199 fi
10200 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10201 if test -n "$ac_ct_WINDRES"; then
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10203 $as_echo "$ac_ct_WINDRES" >&6; }
10204 else
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206 $as_echo "no" >&6; }
10207 fi
10208
10209 if test "x$ac_ct_WINDRES" = x; then
10210 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10211 else
10212 case $cross_compiling:$ac_tool_warned in
10213 yes:)
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10215 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10216 ac_tool_warned=yes ;;
10217 esac
10218 WINDRES=$ac_ct_WINDRES
10219 fi
10220 else
10221 WINDRES="$ac_cv_prog_WINDRES"
10222 fi
10223
10224 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10225 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
10226 EMACSRES="emacs.res"
10227 case "$canonical" in
10228 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10229 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10230 esac
10231 if test "${opsys}" = "cygwin"; then
10232 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10233 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10234 # Tell the linker that emacs.res is an object (which we compile from
10235 # the rc file), not a linker script.
10236 W32_RES_LINK="-Wl,emacs.res"
10237 else
10238 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
10239 W32_OBJ="$W32_OBJ w32notify.o"
10240 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10241 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10242 W32_RES_LINK="\$(EMACSRES)"
10243 CLIENTRES="emacsclient.res"
10244 CLIENTW="emacsclientw\$(EXEEXT)"
10245 FIRSTFILE_OBJ=firstfile.o
10246 NTDIR=nt
10247 CM_OBJ=
10248 LIBS_ECLIENT="-lcomctl32"
10249 LIB_WSOCK32="-lwsock32"
10250 NTLIB="ntlib.$ac_objext"
10251 XARGS_LIMIT="-s 10000"
10252 fi
10253 fi
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269 if test "${HAVE_W32}" = "yes"; then
10270 window_system=w32
10271 with_xft=no
10272 fi
10273
10274 ## $window_system is now set to the window system we will
10275 ## ultimately use.
10276
10277 term_header=
10278 HAVE_X_WINDOWS=no
10279 HAVE_X11=no
10280 USE_X_TOOLKIT=none
10281
10282 case "${window_system}" in
10283 x11 )
10284 HAVE_X_WINDOWS=yes
10285 HAVE_X11=yes
10286 term_header=xterm.h
10287 case "${with_x_toolkit}" in
10288 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10289 motif ) USE_X_TOOLKIT=MOTIF ;;
10290 gtk ) with_gtk=yes
10291 term_header=gtkutil.h
10292 USE_X_TOOLKIT=none ;;
10293 gtk2 ) with_gtk2=yes
10294 term_header=gtkutil.h
10295 USE_X_TOOLKIT=none ;;
10296 gtk3 ) with_gtk3=yes
10297 term_header=gtkutil.h
10298 USE_X_TOOLKIT=none ;;
10299 no ) USE_X_TOOLKIT=none ;;
10300 * ) USE_X_TOOLKIT=maybe ;;
10301 esac
10302 ;;
10303 nextstep )
10304 term_header=nsterm.h
10305 ;;
10306 w32 )
10307 term_header=w32term.h
10308 ;;
10309 esac
10310
10311 if test "$window_system" = none && test "X$with_x" != "Xno"; then
10312 # Extract the first word of "X", so it can be a program name with args.
10313 set dummy X; ac_word=$2
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10315 $as_echo_n "checking for $ac_word... " >&6; }
10316 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10317 $as_echo_n "(cached) " >&6
10318 else
10319 if test -n "$HAVE_XSERVER"; then
10320 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10321 else
10322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10323 for as_dir in $PATH
10324 do
10325 IFS=$as_save_IFS
10326 test -z "$as_dir" && as_dir=.
10327 for ac_exec_ext in '' $ac_executable_extensions; do
10328 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10329 ac_cv_prog_HAVE_XSERVER="true"
10330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10331 break 2
10332 fi
10333 done
10334 done
10335 IFS=$as_save_IFS
10336
10337 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10338 fi
10339 fi
10340 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10341 if test -n "$HAVE_XSERVER"; then
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10343 $as_echo "$HAVE_XSERVER" >&6; }
10344 else
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346 $as_echo "no" >&6; }
10347 fi
10348
10349
10350 if test "$HAVE_XSERVER" = true ||
10351 test -n "$DISPLAY" ||
10352 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10353 as_fn_error "You seem to be running X, but no X development libraries
10354 were found. You should install the relevant development files for X
10355 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10356 sure you have development files for image handling, i.e.
10357 tiff, gif, jpeg, png and xpm.
10358 If you are sure you want Emacs compiled without X window support, pass
10359 --without-x
10360 to configure." "$LINENO" 5
10361 fi
10362 fi
10363
10364 ### If we're using X11, we should use the X menu package.
10365 HAVE_MENUS=no
10366 case ${HAVE_X11} in
10367 yes ) HAVE_MENUS=yes ;;
10368 esac
10369
10370 # Does the opsystem file prohibit the use of the GNU malloc?
10371 # Assume not, until told otherwise.
10372 GNU_MALLOC=yes
10373
10374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10375 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10376 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
10377 $as_echo_n "(cached) " >&6
10378 else
10379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10380 /* end confdefs.h. */
10381 #include <malloc.h>
10382 static void hook (void) {}
10383 int
10384 main ()
10385 {
10386 malloc_set_state (malloc_get_state ());
10387 __after_morecore_hook = hook;
10388 __malloc_initialize_hook = hook;
10389 ;
10390 return 0;
10391 }
10392 _ACEOF
10393 if ac_fn_c_try_link "$LINENO"; then :
10394 emacs_cv_var_doug_lea_malloc=yes
10395 else
10396 emacs_cv_var_doug_lea_malloc=no
10397 fi
10398 rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
10400 fi
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10402 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10403 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10404
10405
10406 system_malloc=no
10407 case "$opsys" in
10408 ## darwin ld insists on the use of malloc routines in the System framework.
10409 darwin|sol2-10) system_malloc=yes ;;
10410 esac
10411
10412 if test "${system_malloc}" = "yes"; then
10413
10414 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10415
10416 GNU_MALLOC=no
10417 GNU_MALLOC_reason="
10418 (The GNU allocators don't work with this system configuration.)"
10419 GMALLOC_OBJ=
10420 VMLIMIT_OBJ=
10421 else
10422 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10423 VMLIMIT_OBJ=vm-limit.o
10424
10425 for ac_header in sys/vlimit.h
10426 do :
10427 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10428 if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10429 cat >>confdefs.h <<_ACEOF
10430 #define HAVE_SYS_VLIMIT_H 1
10431 _ACEOF
10432
10433 fi
10434
10435 done
10436
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10438 $as_echo_n "checking for data_start... " >&6; }
10439 if test "${emacs_cv_data_start+set}" = set; then :
10440 $as_echo_n "(cached) " >&6
10441 else
10442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443 /* end confdefs.h. */
10444 extern char data_start[]; char ch;
10445 int
10446 main ()
10447 {
10448 return data_start < &ch;
10449 ;
10450 return 0;
10451 }
10452 _ACEOF
10453 if ac_fn_c_try_link "$LINENO"; then :
10454 emacs_cv_data_start=yes
10455 else
10456 emacs_cv_data_start=no
10457 fi
10458 rm -f core conftest.err conftest.$ac_objext \
10459 conftest$ac_exeext conftest.$ac_ext
10460 fi
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10462 $as_echo "$emacs_cv_data_start" >&6; }
10463 if test $emacs_cv_data_start = yes; then
10464
10465 $as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10466
10467 fi
10468 fi
10469
10470
10471
10472 if test "$doug_lea_malloc" = "yes" ; then
10473 if test "$GNU_MALLOC" = yes ; then
10474 GNU_MALLOC_reason="
10475 (Using Doug Lea's new malloc from the GNU C Library.)"
10476 fi
10477
10478 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10479
10480
10481 ## Use mmap directly for allocating larger buffers.
10482 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10483 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10484 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10485 case "$opsys" in
10486 gnu*) REL_ALLOC=no ;;
10487 esac
10488 fi
10489
10490 if test x"${REL_ALLOC}" = x; then
10491 REL_ALLOC=${GNU_MALLOC}
10492 fi
10493
10494 use_mmap_for_buffers=no
10495 case "$opsys" in
10496 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10497 esac
10498
10499
10500
10501
10502
10503
10504
10505
10506 for ac_func in getpagesize
10507 do :
10508 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10509 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10510 cat >>confdefs.h <<_ACEOF
10511 #define HAVE_GETPAGESIZE 1
10512 _ACEOF
10513
10514 fi
10515 done
10516
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10518 $as_echo_n "checking for working mmap... " >&6; }
10519 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10520 $as_echo_n "(cached) " >&6
10521 else
10522 if test "$cross_compiling" = yes; then :
10523 ac_cv_func_mmap_fixed_mapped=no
10524 else
10525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10526 /* end confdefs.h. */
10527 $ac_includes_default
10528 /* malloc might have been renamed as rpl_malloc. */
10529 #undef malloc
10530
10531 /* Thanks to Mike Haertel and Jim Avera for this test.
10532 Here is a matrix of mmap possibilities:
10533 mmap private not fixed
10534 mmap private fixed at somewhere currently unmapped
10535 mmap private fixed at somewhere already mapped
10536 mmap shared not fixed
10537 mmap shared fixed at somewhere currently unmapped
10538 mmap shared fixed at somewhere already mapped
10539 For private mappings, we should verify that changes cannot be read()
10540 back from the file, nor mmap's back from the file at a different
10541 address. (There have been systems where private was not correctly
10542 implemented like the infamous i386 svr4.0, and systems where the
10543 VM page cache was not coherent with the file system buffer cache
10544 like early versions of FreeBSD and possibly contemporary NetBSD.)
10545 For shared mappings, we should conversely verify that changes get
10546 propagated back to all the places they're supposed to be.
10547
10548 Grep wants private fixed already mapped.
10549 The main things grep needs to know about mmap are:
10550 * does it exist and is it safe to write into the mmap'd area
10551 * how to use it (BSD variants) */
10552
10553 #include <fcntl.h>
10554 #include <sys/mman.h>
10555
10556 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10557 char *malloc ();
10558 #endif
10559
10560 /* This mess was copied from the GNU getpagesize.h. */
10561 #ifndef HAVE_GETPAGESIZE
10562 # ifdef _SC_PAGESIZE
10563 # define getpagesize() sysconf(_SC_PAGESIZE)
10564 # else /* no _SC_PAGESIZE */
10565 # ifdef HAVE_SYS_PARAM_H
10566 # include <sys/param.h>
10567 # ifdef EXEC_PAGESIZE
10568 # define getpagesize() EXEC_PAGESIZE
10569 # else /* no EXEC_PAGESIZE */
10570 # ifdef NBPG
10571 # define getpagesize() NBPG * CLSIZE
10572 # ifndef CLSIZE
10573 # define CLSIZE 1
10574 # endif /* no CLSIZE */
10575 # else /* no NBPG */
10576 # ifdef NBPC
10577 # define getpagesize() NBPC
10578 # else /* no NBPC */
10579 # ifdef PAGESIZE
10580 # define getpagesize() PAGESIZE
10581 # endif /* PAGESIZE */
10582 # endif /* no NBPC */
10583 # endif /* no NBPG */
10584 # endif /* no EXEC_PAGESIZE */
10585 # else /* no HAVE_SYS_PARAM_H */
10586 # define getpagesize() 8192 /* punt totally */
10587 # endif /* no HAVE_SYS_PARAM_H */
10588 # endif /* no _SC_PAGESIZE */
10589
10590 #endif /* no HAVE_GETPAGESIZE */
10591
10592 int
10593 main ()
10594 {
10595 char *data, *data2, *data3;
10596 const char *cdata2;
10597 int i, pagesize;
10598 int fd, fd2;
10599
10600 pagesize = getpagesize ();
10601
10602 /* First, make a file with some known garbage in it. */
10603 data = (char *) malloc (pagesize);
10604 if (!data)
10605 return 1;
10606 for (i = 0; i < pagesize; ++i)
10607 *(data + i) = rand ();
10608 umask (0);
10609 fd = creat ("conftest.mmap", 0600);
10610 if (fd < 0)
10611 return 2;
10612 if (write (fd, data, pagesize) != pagesize)
10613 return 3;
10614 close (fd);
10615
10616 /* Next, check that the tail of a page is zero-filled. File must have
10617 non-zero length, otherwise we risk SIGBUS for entire page. */
10618 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10619 if (fd2 < 0)
10620 return 4;
10621 cdata2 = "";
10622 if (write (fd2, cdata2, 1) != 1)
10623 return 5;
10624 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10625 if (data2 == MAP_FAILED)
10626 return 6;
10627 for (i = 0; i < pagesize; ++i)
10628 if (*(data2 + i))
10629 return 7;
10630 close (fd2);
10631 if (munmap (data2, pagesize))
10632 return 8;
10633
10634 /* Next, try to mmap the file at a fixed address which already has
10635 something else allocated at it. If we can, also make sure that
10636 we see the same garbage. */
10637 fd = open ("conftest.mmap", O_RDWR);
10638 if (fd < 0)
10639 return 9;
10640 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10641 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10642 return 10;
10643 for (i = 0; i < pagesize; ++i)
10644 if (*(data + i) != *(data2 + i))
10645 return 11;
10646
10647 /* Finally, make sure that changes to the mapped area do not
10648 percolate back to the file as seen by read(). (This is a bug on
10649 some variants of i386 svr4.0.) */
10650 for (i = 0; i < pagesize; ++i)
10651 *(data2 + i) = *(data2 + i) + 1;
10652 data3 = (char *) malloc (pagesize);
10653 if (!data3)
10654 return 12;
10655 if (read (fd, data3, pagesize) != pagesize)
10656 return 13;
10657 for (i = 0; i < pagesize; ++i)
10658 if (*(data + i) != *(data3 + i))
10659 return 14;
10660 close (fd);
10661 return 0;
10662 }
10663 _ACEOF
10664 if ac_fn_c_try_run "$LINENO"; then :
10665 ac_cv_func_mmap_fixed_mapped=yes
10666 else
10667 ac_cv_func_mmap_fixed_mapped=no
10668 fi
10669 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10670 conftest.$ac_objext conftest.beam conftest.$ac_ext
10671 fi
10672
10673 fi
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10675 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10676 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10677
10678 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10679
10680 fi
10681 rm -f conftest.mmap conftest.txt
10682
10683 if test $use_mmap_for_buffers = yes; then
10684
10685 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10686
10687 REL_ALLOC=no
10688 fi
10689
10690 LIBS="$LIBS_SYSTEM $LIBS"
10691
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10693 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10694 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10695 $as_echo_n "(cached) " >&6
10696 else
10697 ac_check_lib_save_LIBS=$LIBS
10698 LIBS="-ldnet $LIBS"
10699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10700 /* end confdefs.h. */
10701
10702 /* Override any GCC internal prototype to avoid an error.
10703 Use char because int might match the return type of a GCC
10704 builtin and then its argument prototype would still apply. */
10705 #ifdef __cplusplus
10706 extern "C"
10707 #endif
10708 char dnet_ntoa ();
10709 int
10710 main ()
10711 {
10712 return dnet_ntoa ();
10713 ;
10714 return 0;
10715 }
10716 _ACEOF
10717 if ac_fn_c_try_link "$LINENO"; then :
10718 ac_cv_lib_dnet_dnet_ntoa=yes
10719 else
10720 ac_cv_lib_dnet_dnet_ntoa=no
10721 fi
10722 rm -f core conftest.err conftest.$ac_objext \
10723 conftest$ac_exeext conftest.$ac_ext
10724 LIBS=$ac_check_lib_save_LIBS
10725 fi
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10727 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10728 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10729 cat >>confdefs.h <<_ACEOF
10730 #define HAVE_LIBDNET 1
10731 _ACEOF
10732
10733 LIBS="-ldnet $LIBS"
10734
10735 fi
10736
10737
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10739 $as_echo_n "checking for main in -lXbsd... " >&6; }
10740 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10741 $as_echo_n "(cached) " >&6
10742 else
10743 ac_check_lib_save_LIBS=$LIBS
10744 LIBS="-lXbsd $LIBS"
10745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10746 /* end confdefs.h. */
10747
10748
10749 int
10750 main ()
10751 {
10752 return main ();
10753 ;
10754 return 0;
10755 }
10756 _ACEOF
10757 if ac_fn_c_try_link "$LINENO"; then :
10758 ac_cv_lib_Xbsd_main=yes
10759 else
10760 ac_cv_lib_Xbsd_main=no
10761 fi
10762 rm -f core conftest.err conftest.$ac_objext \
10763 conftest$ac_exeext conftest.$ac_ext
10764 LIBS=$ac_check_lib_save_LIBS
10765 fi
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10767 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10768 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10769 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10770 fi
10771
10772
10773 LIB_PTHREAD=
10774
10775
10776
10777 if test "$ac_cv_header_pthread_h"; then
10778 if test "$GMALLOC_OBJ" = gmalloc.o; then
10779 emacs_pthread_function=pthread_atfork
10780 else
10781 emacs_pthread_function=pthread_self
10782 fi
10783 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10785 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10786 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10787 $as_echo_n "(cached) " >&6
10788 else
10789 ac_check_lib_save_LIBS=$LIBS
10790 LIBS="-lpthread $LIBS"
10791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10792 /* end confdefs.h. */
10793
10794 /* Override any GCC internal prototype to avoid an error.
10795 Use char because int might match the return type of a GCC
10796 builtin and then its argument prototype would still apply. */
10797 #ifdef __cplusplus
10798 extern "C"
10799 #endif
10800 char $emacs_pthread_function ();
10801 int
10802 main ()
10803 {
10804 return $emacs_pthread_function ();
10805 ;
10806 return 0;
10807 }
10808 _ACEOF
10809 if ac_fn_c_try_link "$LINENO"; then :
10810 eval "$as_ac_Lib=yes"
10811 else
10812 eval "$as_ac_Lib=no"
10813 fi
10814 rm -f core conftest.err conftest.$ac_objext \
10815 conftest$ac_exeext conftest.$ac_ext
10816 LIBS=$ac_check_lib_save_LIBS
10817 fi
10818 eval ac_res=\$$as_ac_Lib
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10820 $as_echo "$ac_res" >&6; }
10821 eval as_val=\$$as_ac_Lib
10822 if test "x$as_val" = x""yes; then :
10823 HAVE_PTHREAD=yes
10824 fi
10825
10826 fi
10827 if test "$HAVE_PTHREAD" = yes; then
10828 case "${canonical}" in
10829 *-hpux*) ;;
10830 *) LIB_PTHREAD="-lpthread"
10831 LIBS="$LIB_PTHREAD $LIBS" ;;
10832 esac
10833
10834 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10835
10836 fi
10837
10838
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10840 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10841 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10842 $as_echo_n "(cached) " >&6
10843 else
10844 ac_check_lib_save_LIBS=$LIBS
10845 LIBS="-lpthreads $LIBS"
10846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10847 /* end confdefs.h. */
10848
10849 /* Override any GCC internal prototype to avoid an error.
10850 Use char because int might match the return type of a GCC
10851 builtin and then its argument prototype would still apply. */
10852 #ifdef __cplusplus
10853 extern "C"
10854 #endif
10855 char cma_open ();
10856 int
10857 main ()
10858 {
10859 return cma_open ();
10860 ;
10861 return 0;
10862 }
10863 _ACEOF
10864 if ac_fn_c_try_link "$LINENO"; then :
10865 ac_cv_lib_pthreads_cma_open=yes
10866 else
10867 ac_cv_lib_pthreads_cma_open=no
10868 fi
10869 rm -f core conftest.err conftest.$ac_objext \
10870 conftest$ac_exeext conftest.$ac_ext
10871 LIBS=$ac_check_lib_save_LIBS
10872 fi
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10874 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10875 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10876 cat >>confdefs.h <<_ACEOF
10877 #define HAVE_LIBPTHREADS 1
10878 _ACEOF
10879
10880 LIBS="-lpthreads $LIBS"
10881
10882 fi
10883
10884
10885 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10886 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10887 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10888 ## added to LIBS in configure would never contain the pthreads part,
10889 ## but the value used in Makefiles might. FIXME?
10890 ##
10891 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10892 ## be harmless on older versions of X where it happens to exist.
10893 test "$opsys" = "aix4-2" && \
10894 test $ac_cv_lib_pthreads_cma_open = yes && \
10895 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10896
10897
10898 case ${host_os} in
10899 aix*)
10900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10901 $as_echo_n "checking for -bbigtoc option... " >&6; }
10902 if test "${gdb_cv_bigtoc+set}" = set; then :
10903 $as_echo_n "(cached) " >&6
10904 else
10905
10906 case $GCC in
10907 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10908 *) gdb_cv_bigtoc=-bbigtoc ;;
10909 esac
10910
10911 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h. */
10914
10915 int
10916 main ()
10917 {
10918 int i;
10919 ;
10920 return 0;
10921 }
10922 _ACEOF
10923 if ac_fn_c_try_link "$LINENO"; then :
10924
10925 else
10926 gdb_cv_bigtoc=
10927 fi
10928 rm -f core conftest.err conftest.$ac_objext \
10929 conftest$ac_exeext conftest.$ac_ext
10930
10931 fi
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10933 $as_echo "$gdb_cv_bigtoc" >&6; }
10934 ;;
10935 esac
10936
10937 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10938 # used for the tests that follow. We set them back to REAL_CFLAGS and
10939 # REAL_CPPFLAGS later on.
10940
10941 REAL_CFLAGS="$CFLAGS"
10942 REAL_CPPFLAGS="$CPPFLAGS"
10943
10944 if test "${HAVE_X11}" = "yes"; then
10945 DEFS="$C_SWITCH_X_SITE $DEFS"
10946 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10947 LIBS="-lX11 $LIBS"
10948 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10949 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10950
10951 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10952 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10953 # but it's more convenient here to set LD_RUN_PATH since this
10954 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10955 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10956 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10957 export LD_RUN_PATH
10958 fi
10959
10960 if test "${opsys}" = "gnu-linux"; then
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10962 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10964 /* end confdefs.h. */
10965
10966 int
10967 main ()
10968 {
10969 XOpenDisplay ("foo");
10970 ;
10971 return 0;
10972 }
10973 _ACEOF
10974 if ac_fn_c_try_link "$LINENO"; then :
10975 xgnu_linux_first_failure=no
10976 else
10977 xgnu_linux_first_failure=yes
10978 fi
10979 rm -f core conftest.err conftest.$ac_objext \
10980 conftest$ac_exeext conftest.$ac_ext
10981 if test "${xgnu_linux_first_failure}" = "yes"; then
10982 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10983 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10984 OLD_CPPFLAGS="$CPPFLAGS"
10985 OLD_LIBS="$LIBS"
10986 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10987 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10988 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10989 LIBS="$LIBS -b i486-linuxaout"
10990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10991 /* end confdefs.h. */
10992
10993 int
10994 main ()
10995 {
10996 XOpenDisplay ("foo");
10997 ;
10998 return 0;
10999 }
11000 _ACEOF
11001 if ac_fn_c_try_link "$LINENO"; then :
11002 xgnu_linux_second_failure=no
11003 else
11004 xgnu_linux_second_failure=yes
11005 fi
11006 rm -f core conftest.err conftest.$ac_objext \
11007 conftest$ac_exeext conftest.$ac_ext
11008 if test "${xgnu_linux_second_failure}" = "yes"; then
11009 # If we get the same failure with -b, there is no use adding -b.
11010 # So take it out. This plays safe.
11011 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11012 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11013 CPPFLAGS="$OLD_CPPFLAGS"
11014 LIBS="$OLD_LIBS"
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016 $as_echo "no" >&6; }
11017 else
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11019 $as_echo "yes" >&6; }
11020 fi
11021 else
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023 $as_echo "no" >&6; }
11024 fi
11025 fi
11026
11027 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11028 # header files included from there.
11029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11030 $as_echo_n "checking for Xkb... " >&6; }
11031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11032 /* end confdefs.h. */
11033 #include <X11/Xlib.h>
11034 #include <X11/XKBlib.h>
11035 int
11036 main ()
11037 {
11038 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
11039 ;
11040 return 0;
11041 }
11042 _ACEOF
11043 if ac_fn_c_try_link "$LINENO"; then :
11044 emacs_xkb=yes
11045 else
11046 emacs_xkb=no
11047 fi
11048 rm -f core conftest.err conftest.$ac_objext \
11049 conftest$ac_exeext conftest.$ac_ext
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11051 $as_echo "$emacs_xkb" >&6; }
11052 if test $emacs_xkb = yes; then
11053
11054 $as_echo "#define HAVE_XKB 1" >>confdefs.h
11055
11056 fi
11057
11058 for ac_func in XrmSetDatabase XScreenResourceString \
11059 XScreenNumberOfScreen
11060 do :
11061 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11062 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11063 eval as_val=\$$as_ac_var
11064 if test "x$as_val" = x""yes; then :
11065 cat >>confdefs.h <<_ACEOF
11066 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11067 _ACEOF
11068
11069 fi
11070 done
11071
11072 fi
11073
11074 if test "${window_system}" = "x11"; then
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11076 $as_echo_n "checking X11 version 6... " >&6; }
11077 if test "${emacs_cv_x11_version_6+set}" = set; then :
11078 $as_echo_n "(cached) " >&6
11079 else
11080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081 /* end confdefs.h. */
11082 #include <X11/Xlib.h>
11083 int
11084 main ()
11085 {
11086 #if XlibSpecificationRelease < 6
11087 fail;
11088 #endif
11089
11090 ;
11091 return 0;
11092 }
11093 _ACEOF
11094 if ac_fn_c_try_link "$LINENO"; then :
11095 emacs_cv_x11_version_6=yes
11096 else
11097 emacs_cv_x11_version_6=no
11098 fi
11099 rm -f core conftest.err conftest.$ac_objext \
11100 conftest$ac_exeext conftest.$ac_ext
11101 fi
11102
11103 if test $emacs_cv_x11_version_6 = yes; then
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11105 $as_echo "6 or newer" >&6; }
11106
11107 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
11108
11109
11110 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
11111
11112 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11113 ## XIM support.
11114 case "$opsys" in
11115 sol2-*) : ;;
11116 *)
11117 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
11118
11119 ;;
11120 esac
11121 else
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11123 $as_echo "before 6" >&6; }
11124 fi
11125 fi
11126
11127
11128 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11129 HAVE_RSVG=no
11130 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
11131 if test "${with_rsvg}" != "no"; then
11132 RSVG_REQUIRED=2.11.0
11133 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11134
11135
11136 succeeded=no
11137
11138 if test "$PKG_CONFIG" = "no" ; then
11139 :
11140 else
11141 PKG_CONFIG_MIN_VERSION=0.9.0
11142 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11144 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
11145
11146 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11147 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11148 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
11149 edit_cflags="
11150 s,///*,/,g
11151 s/^/ /
11152 s/ -I/ $isystem/g
11153 s/^ //
11154 "
11155 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11156 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11158 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11159 succeeded=yes
11160 else
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11162 $as_echo "no" >&6; }
11163 RSVG_CFLAGS=""
11164 RSVG_LIBS=""
11165 ## If we have a custom action on failure, don't print errors, but
11166 ## do set a variable so people can do so. Do it in a subshell
11167 ## to capture any diagnostics in invoking pkg-config.
11168 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
11169
11170 fi
11171
11172
11173
11174 else
11175 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11176 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11177 fi
11178 fi
11179
11180 if test $succeeded = yes; then
11181 HAVE_RSVG=yes
11182 else
11183 :
11184 fi
11185
11186
11187
11188
11189 if test $HAVE_RSVG = yes; then
11190
11191 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
11192
11193 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11194 LIBS="$RSVG_LIBS $LIBS"
11195 fi
11196 fi
11197 fi
11198
11199 HAVE_IMAGEMAGICK=no
11200 if test "${HAVE_X11}" = "yes"; then
11201 if test "${with_imagemagick}" != "no"; then
11202 ## 6.2.8 is the earliest version known to work, but earlier versions
11203 ## might work - let us know if you find one.
11204 ## 6.0.7 does not work. See bug#7955.
11205 ## 6.8.2 makes Emacs crash; see Bug#13867.
11206 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
11207
11208 succeeded=no
11209
11210 if test "$PKG_CONFIG" = "no" ; then
11211 :
11212 else
11213 PKG_CONFIG_MIN_VERSION=0.9.0
11214 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11216 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
11217
11218 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11219 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11220 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
11221 edit_cflags="
11222 s,///*,/,g
11223 s/^/ /
11224 s/ -I/ $isystem/g
11225 s/^ //
11226 "
11227 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11228 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11230 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11231 succeeded=yes
11232 else
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11234 $as_echo "no" >&6; }
11235 IMAGEMAGICK_CFLAGS=""
11236 IMAGEMAGICK_LIBS=""
11237 ## If we have a custom action on failure, don't print errors, but
11238 ## do set a variable so people can do so. Do it in a subshell
11239 ## to capture any diagnostics in invoking pkg-config.
11240 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
11241
11242 fi
11243
11244
11245
11246 else
11247 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11248 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11249 fi
11250 fi
11251
11252 if test $succeeded = yes; then
11253 HAVE_IMAGEMAGICK=yes
11254 else
11255 :
11256 fi
11257
11258
11259
11260
11261 if test $HAVE_IMAGEMAGICK = yes; then
11262
11263 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
11264
11265 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11266 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11267 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11268 do :
11269 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11270 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11271 eval as_val=\$$as_ac_var
11272 if test "x$as_val" = x""yes; then :
11273 cat >>confdefs.h <<_ACEOF
11274 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11275 _ACEOF
11276
11277 fi
11278 done
11279
11280 fi
11281 fi
11282 fi
11283
11284
11285 HAVE_GTK=no
11286 GTK_OBJ=
11287 check_gtk2=no
11288 gtk3_pkg_errors=
11289 if test "${opsys}" != "mingw32"; then
11290 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11291 GLIB_REQUIRED=2.28
11292 GTK_REQUIRED=3.0
11293 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11294
11295
11296 succeeded=no
11297
11298 if test "$PKG_CONFIG" = "no" ; then
11299 pkg_check_gtk=no
11300 else
11301 PKG_CONFIG_MIN_VERSION=0.9.0
11302 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11304 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11305
11306 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11307 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11308 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11309 edit_cflags="
11310 s,///*,/,g
11311 s/^/ /
11312 s/ -I/ $isystem/g
11313 s/^ //
11314 "
11315 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11316 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11318 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11319 succeeded=yes
11320 else
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322 $as_echo "no" >&6; }
11323 GTK_CFLAGS=""
11324 GTK_LIBS=""
11325 ## If we have a custom action on failure, don't print errors, but
11326 ## do set a variable so people can do so. Do it in a subshell
11327 ## to capture any diagnostics in invoking pkg-config.
11328 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11329
11330 fi
11331
11332
11333
11334 else
11335 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11336 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11337 fi
11338 fi
11339
11340 if test $succeeded = yes; then
11341 pkg_check_gtk=yes
11342 else
11343 pkg_check_gtk=no
11344 fi
11345
11346 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11347 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11348 fi
11349 if test "$pkg_check_gtk" = "yes"; then
11350
11351 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
11352
11353 GTK_OBJ=emacsgtkfixed.o
11354 term_header=gtkutil.h
11355 USE_GTK_TOOLKIT="GTK3"
11356 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11357 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
11358 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
11359 fi
11360 else
11361 check_gtk2=yes
11362 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11363 fi
11364 fi
11365
11366 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11367 GLIB_REQUIRED=2.10
11368 GTK_REQUIRED=2.10
11369 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11370
11371
11372 succeeded=no
11373
11374 if test "$PKG_CONFIG" = "no" ; then
11375 pkg_check_gtk=no
11376 else
11377 PKG_CONFIG_MIN_VERSION=0.9.0
11378 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11380 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11381
11382 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11383 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11384 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11385 edit_cflags="
11386 s,///*,/,g
11387 s/^/ /
11388 s/ -I/ $isystem/g
11389 s/^ //
11390 "
11391 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11392 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11394 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11395 succeeded=yes
11396 else
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11398 $as_echo "no" >&6; }
11399 GTK_CFLAGS=""
11400 GTK_LIBS=""
11401 ## If we have a custom action on failure, don't print errors, but
11402 ## do set a variable so people can do so. Do it in a subshell
11403 ## to capture any diagnostics in invoking pkg-config.
11404 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11405
11406 fi
11407
11408
11409
11410 else
11411 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11412 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11413 fi
11414 fi
11415
11416 if test $succeeded = yes; then
11417 pkg_check_gtk=yes
11418 else
11419 pkg_check_gtk=no
11420 fi
11421
11422 if test "$pkg_check_gtk" = "no" &&
11423 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11424 then
11425 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11426 fi
11427 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
11428 fi
11429 fi
11430
11431 if test x"$pkg_check_gtk" = xyes; then
11432
11433
11434
11435 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11436 CFLAGS="$CFLAGS $GTK_CFLAGS"
11437 LIBS="$GTK_LIBS $LIBS"
11438 GTK_COMPILES=no
11439 for ac_func in gtk_main
11440 do :
11441 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
11442 if test "x$ac_cv_func_gtk_main" = x""yes; then :
11443 cat >>confdefs.h <<_ACEOF
11444 #define HAVE_GTK_MAIN 1
11445 _ACEOF
11446 GTK_COMPILES=yes
11447 fi
11448 done
11449
11450 if test "${GTK_COMPILES}" != "yes"; then
11451 if test "$USE_X_TOOLKIT" != "maybe"; then
11452 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11453 fi
11454 else
11455 HAVE_GTK=yes
11456
11457 $as_echo "#define USE_GTK 1" >>confdefs.h
11458
11459 GTK_OBJ="gtkutil.o $GTK_OBJ"
11460 USE_X_TOOLKIT=none
11461 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
11462 :
11463 else
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11465 closing open displays. This is no problem if you just use
11466 one display, but if you use more than one and close one of them
11467 Emacs may crash." >&5
11468 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11469 closing open displays. This is no problem if you just use
11470 one display, but if you use more than one and close one of them
11471 Emacs may crash." >&2;}
11472 sleep 3
11473 fi
11474 fi
11475
11476 fi
11477
11478
11479
11480 if test "${HAVE_GTK}" = "yes"; then
11481
11482 if test "$with_toolkit_scroll_bars" != no; then
11483 with_toolkit_scroll_bars=yes
11484 fi
11485
11486 HAVE_GTK_FILE_SELECTION=no
11487 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11488 #include <gtk/gtk.h>
11489 "
11490 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11491 HAVE_GTK_FILE_SELECTION=yes
11492 else
11493 HAVE_GTK_FILE_SELECTION=no
11494 fi
11495
11496 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11497 for ac_func in gtk_file_selection_new
11498 do :
11499 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11500 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11501 cat >>confdefs.h <<_ACEOF
11502 #define HAVE_GTK_FILE_SELECTION_NEW 1
11503 _ACEOF
11504
11505 fi
11506 done
11507
11508 fi
11509
11510 HAVE_GTK_HANDLE_BOX=no
11511 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11512 #include <gtk/gtk.h>
11513 "
11514 if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11515 HAVE_GTK_HANDLE_BOX=yes
11516 else
11517 HAVE_GTK_HANDLE_BOX=no
11518 fi
11519
11520 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11521 for ac_func in gtk_handle_box_new
11522 do :
11523 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11524 if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11525 cat >>confdefs.h <<_ACEOF
11526 #define HAVE_GTK_HANDLE_BOX_NEW 1
11527 _ACEOF
11528
11529 fi
11530 done
11531
11532 fi
11533
11534 HAVE_GTK_TEAROFF_MENU_ITEM=no
11535 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11536 #include <gtk/gtk.h>
11537 "
11538 if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11539 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11540 else
11541 HAVE_GTK_TEAROFF_MENU_ITEM=no
11542 fi
11543
11544 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11545 for ac_func in gtk_tearoff_menu_item_new
11546 do :
11547 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11548 if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11549 cat >>confdefs.h <<_ACEOF
11550 #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11551 _ACEOF
11552
11553 fi
11554 done
11555
11556 fi
11557
11558 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11559 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11560 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11561 gtk_orientable_set_orientation \
11562 gtk_window_set_has_resize_grip
11563 do :
11564 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11565 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11566 eval as_val=\$$as_ac_var
11567 if test "x$as_val" = x""yes; then :
11568 cat >>confdefs.h <<_ACEOF
11569 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11570 _ACEOF
11571
11572 fi
11573 done
11574
11575
11576 term_header=gtkutil.h
11577 fi
11578
11579 HAVE_DBUS=no
11580 DBUS_OBJ=
11581 if test "${with_dbus}" = "yes"; then
11582
11583 succeeded=no
11584
11585 if test "$PKG_CONFIG" = "no" ; then
11586 HAVE_DBUS=no
11587 else
11588 PKG_CONFIG_MIN_VERSION=0.9.0
11589 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11591 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11592
11593 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11594 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11595 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
11596 edit_cflags="
11597 s,///*,/,g
11598 s/^/ /
11599 s/ -I/ $isystem/g
11600 s/^ //
11601 "
11602 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11603 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11605 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11606 succeeded=yes
11607 else
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609 $as_echo "no" >&6; }
11610 DBUS_CFLAGS=""
11611 DBUS_LIBS=""
11612 ## If we have a custom action on failure, don't print errors, but
11613 ## do set a variable so people can do so. Do it in a subshell
11614 ## to capture any diagnostics in invoking pkg-config.
11615 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
11616
11617 fi
11618
11619
11620
11621 else
11622 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11623 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11624 fi
11625 fi
11626
11627 if test $succeeded = yes; then
11628 HAVE_DBUS=yes
11629 else
11630 HAVE_DBUS=no
11631 fi
11632
11633 if test "$HAVE_DBUS" = yes; then
11634 LIBS="$LIBS $DBUS_LIBS"
11635
11636 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11637
11638 for ac_func in dbus_watch_get_unix_fd \
11639 dbus_type_is_valid \
11640 dbus_validate_bus_name \
11641 dbus_validate_path \
11642 dbus_validate_interface \
11643 dbus_validate_member
11644 do :
11645 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11646 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11647 eval as_val=\$$as_ac_var
11648 if test "x$as_val" = x""yes; then :
11649 cat >>confdefs.h <<_ACEOF
11650 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11651 _ACEOF
11652
11653 fi
11654 done
11655
11656 DBUS_OBJ=dbusbind.o
11657 fi
11658 fi
11659
11660
11661 HAVE_GSETTINGS=no
11662 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11663
11664 succeeded=no
11665
11666 if test "$PKG_CONFIG" = "no" ; then
11667 HAVE_GSETTINGS=no
11668 else
11669 PKG_CONFIG_MIN_VERSION=0.9.0
11670 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11672 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11673
11674 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11675 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11676 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
11677 edit_cflags="
11678 s,///*,/,g
11679 s/^/ /
11680 s/ -I/ $isystem/g
11681 s/^ //
11682 "
11683 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11684 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11686 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11687 succeeded=yes
11688 else
11689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690 $as_echo "no" >&6; }
11691 GSETTINGS_CFLAGS=""
11692 GSETTINGS_LIBS=""
11693 ## If we have a custom action on failure, don't print errors, but
11694 ## do set a variable so people can do so. Do it in a subshell
11695 ## to capture any diagnostics in invoking pkg-config.
11696 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
11697
11698 fi
11699
11700
11701
11702 else
11703 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11704 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11705 fi
11706 fi
11707
11708 if test $succeeded = yes; then
11709 HAVE_GSETTINGS=yes
11710 else
11711 HAVE_GSETTINGS=no
11712 fi
11713
11714 if test "$HAVE_GSETTINGS" = "yes"; then
11715
11716 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11717
11718 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11719 SETTINGS_LIBS="$GSETTINGS_LIBS"
11720 fi
11721 fi
11722
11723 HAVE_GCONF=no
11724 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11725
11726 succeeded=no
11727
11728 if test "$PKG_CONFIG" = "no" ; then
11729 HAVE_GCONF=no
11730 else
11731 PKG_CONFIG_MIN_VERSION=0.9.0
11732 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11734 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11735
11736 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11737 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11738 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
11739 edit_cflags="
11740 s,///*,/,g
11741 s/^/ /
11742 s/ -I/ $isystem/g
11743 s/^ //
11744 "
11745 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11746 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11748 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11749 succeeded=yes
11750 else
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11752 $as_echo "no" >&6; }
11753 GCONF_CFLAGS=""
11754 GCONF_LIBS=""
11755 ## If we have a custom action on failure, don't print errors, but
11756 ## do set a variable so people can do so. Do it in a subshell
11757 ## to capture any diagnostics in invoking pkg-config.
11758 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
11759
11760 fi
11761
11762
11763
11764 else
11765 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11766 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11767 fi
11768 fi
11769
11770 if test $succeeded = yes; then
11771 HAVE_GCONF=yes
11772 else
11773 HAVE_GCONF=no
11774 fi
11775
11776 if test "$HAVE_GCONF" = yes; then
11777
11778 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11779
11780 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11781 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11782 fi
11783 fi
11784
11785 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11786
11787 succeeded=no
11788
11789 if test "$PKG_CONFIG" = "no" ; then
11790 HAVE_GOBJECT=no
11791 else
11792 PKG_CONFIG_MIN_VERSION=0.9.0
11793 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11795 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11796
11797 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11798 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11799 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
11800 edit_cflags="
11801 s,///*,/,g
11802 s/^/ /
11803 s/ -I/ $isystem/g
11804 s/^ //
11805 "
11806 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11807 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11809 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11810 succeeded=yes
11811 else
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11813 $as_echo "no" >&6; }
11814 GOBJECT_CFLAGS=""
11815 GOBJECT_LIBS=""
11816 ## If we have a custom action on failure, don't print errors, but
11817 ## do set a variable so people can do so. Do it in a subshell
11818 ## to capture any diagnostics in invoking pkg-config.
11819 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
11820
11821 fi
11822
11823
11824
11825 else
11826 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11827 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11828 fi
11829 fi
11830
11831 if test $succeeded = yes; then
11832 HAVE_GOBJECT=yes
11833 else
11834 HAVE_GOBJECT=no
11835 fi
11836
11837 if test "$HAVE_GOBJECT" = "yes"; then
11838 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11839 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11840 fi
11841 SAVE_CFLAGS="$CFLAGS"
11842 SAVE_LIBS="$LIBS"
11843 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11844 LIBS="$SETTINGS_LIBS $LIBS"
11845 for ac_func in g_type_init
11846 do :
11847 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11848 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11849 cat >>confdefs.h <<_ACEOF
11850 #define HAVE_G_TYPE_INIT 1
11851 _ACEOF
11852
11853 fi
11854 done
11855
11856 CFLAGS="$SAVE_CFLAGS"
11857 LIBS="$SAVE_LIBS"
11858 fi
11859
11860
11861
11862
11863 HAVE_LIBSELINUX=no
11864 LIBSELINUX_LIBS=
11865 if test "${with_selinux}" = "yes"; then
11866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11867 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11868 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11869 $as_echo_n "(cached) " >&6
11870 else
11871 ac_check_lib_save_LIBS=$LIBS
11872 LIBS="-lselinux $LIBS"
11873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11874 /* end confdefs.h. */
11875
11876 /* Override any GCC internal prototype to avoid an error.
11877 Use char because int might match the return type of a GCC
11878 builtin and then its argument prototype would still apply. */
11879 #ifdef __cplusplus
11880 extern "C"
11881 #endif
11882 char lgetfilecon ();
11883 int
11884 main ()
11885 {
11886 return lgetfilecon ();
11887 ;
11888 return 0;
11889 }
11890 _ACEOF
11891 if ac_fn_c_try_link "$LINENO"; then :
11892 ac_cv_lib_selinux_lgetfilecon=yes
11893 else
11894 ac_cv_lib_selinux_lgetfilecon=no
11895 fi
11896 rm -f core conftest.err conftest.$ac_objext \
11897 conftest$ac_exeext conftest.$ac_ext
11898 LIBS=$ac_check_lib_save_LIBS
11899 fi
11900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11901 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11902 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11903 HAVE_LIBSELINUX=yes
11904 else
11905 HAVE_LIBSELINUX=no
11906 fi
11907
11908 if test "$HAVE_LIBSELINUX" = yes; then
11909
11910 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11911
11912 LIBSELINUX_LIBS=-lselinux
11913 fi
11914 fi
11915
11916
11917 HAVE_GNUTLS=no
11918 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11919 if test "${with_gnutls}" = "yes" ; then
11920
11921 succeeded=no
11922
11923 if test "$PKG_CONFIG" = "no" ; then
11924 HAVE_GNUTLS=no
11925 else
11926 PKG_CONFIG_MIN_VERSION=0.9.0
11927 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11929 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11930
11931 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11932 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11933 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
11934 edit_cflags="
11935 s,///*,/,g
11936 s/^/ /
11937 s/ -I/ $isystem/g
11938 s/^ //
11939 "
11940 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11941 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11943 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11944 succeeded=yes
11945 else
11946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947 $as_echo "no" >&6; }
11948 LIBGNUTLS_CFLAGS=""
11949 LIBGNUTLS_LIBS=""
11950 ## If we have a custom action on failure, don't print errors, but
11951 ## do set a variable so people can do so. Do it in a subshell
11952 ## to capture any diagnostics in invoking pkg-config.
11953 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
11954
11955 fi
11956
11957
11958
11959 else
11960 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11961 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11962 fi
11963 fi
11964
11965 if test $succeeded = yes; then
11966 HAVE_GNUTLS=yes
11967 else
11968 HAVE_GNUTLS=no
11969 fi
11970
11971 if test "${HAVE_GNUTLS}" = "yes"; then
11972
11973 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11974
11975 fi
11976
11977 OLD_CFLAGS=$CFLAGS
11978 OLD_LIBS=$LIBS
11979 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11980 LIBS="$LIBGNUTLS_LIBS $LIBS"
11981 for ac_func in gnutls_certificate_set_verify_function
11982 do :
11983 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11984 if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11985 cat >>confdefs.h <<_ACEOF
11986 #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
11987 _ACEOF
11988 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11989 fi
11990 done
11991
11992
11993 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11994
11995 $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
11996
11997 fi
11998
11999 # Windows loads GnuTLS dynamically
12000 if test "${opsys}" = "mingw32"; then
12001 CFLAGS=$OLD_CFLAGS
12002 LIBS=$OLD_LIBS
12003 LIBGNUTLS_LIBS=
12004 fi
12005 fi
12006
12007
12008
12009
12010 if test "${with_inotify}" = "yes"; then
12011 for ac_header in sys/inotify.h
12012 do :
12013 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
12014 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
12015 cat >>confdefs.h <<_ACEOF
12016 #define HAVE_SYS_INOTIFY_H 1
12017 _ACEOF
12018
12019 fi
12020
12021 done
12022
12023 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12024 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
12025 if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12026
12027 fi
12028
12029 fi
12030 fi
12031 if test "$ac_cv_func_inotify_init1" = yes; then
12032
12033 $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12034
12035 fi
12036
12037 HAVE_XAW3D=no
12038 LUCID_LIBW=
12039 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12040 if test "$with_xaw3d" != no; then
12041 if test "${emacs_cv_xaw3d+set}" = set; then :
12042 $as_echo_n "(cached) " >&6
12043 else
12044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045 /* end confdefs.h. */
12046
12047 #include <X11/Intrinsic.h>
12048 #include <X11/Xaw3d/Simple.h>
12049 int
12050 main ()
12051 {
12052
12053 ;
12054 return 0;
12055 }
12056 _ACEOF
12057 if ac_fn_c_try_link "$LINENO"; then :
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12059 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12060 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12061 $as_echo_n "(cached) " >&6
12062 else
12063 ac_check_lib_save_LIBS=$LIBS
12064 LIBS="-lXaw3d $LIBS"
12065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12066 /* end confdefs.h. */
12067
12068 /* Override any GCC internal prototype to avoid an error.
12069 Use char because int might match the return type of a GCC
12070 builtin and then its argument prototype would still apply. */
12071 #ifdef __cplusplus
12072 extern "C"
12073 #endif
12074 char XawScrollbarSetThumb ();
12075 int
12076 main ()
12077 {
12078 return XawScrollbarSetThumb ();
12079 ;
12080 return 0;
12081 }
12082 _ACEOF
12083 if ac_fn_c_try_link "$LINENO"; then :
12084 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
12085 else
12086 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
12087 fi
12088 rm -f core conftest.err conftest.$ac_objext \
12089 conftest$ac_exeext conftest.$ac_ext
12090 LIBS=$ac_check_lib_save_LIBS
12091 fi
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12093 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12094 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12095 emacs_cv_xaw3d=yes
12096 else
12097 emacs_cv_xaw3d=no
12098 fi
12099
12100 else
12101 emacs_cv_xaw3d=no
12102 fi
12103 rm -f core conftest.err conftest.$ac_objext \
12104 conftest$ac_exeext conftest.$ac_ext
12105 fi
12106
12107 else
12108 emacs_cv_xaw3d=no
12109 fi
12110 if test $emacs_cv_xaw3d = yes; then
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12112 $as_echo_n "checking for xaw3d... " >&6; }
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12114 $as_echo "yes; using Lucid toolkit" >&6; }
12115 USE_X_TOOLKIT=LUCID
12116 HAVE_XAW3D=yes
12117 LUCID_LIBW=-lXaw3d
12118
12119 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
12120
12121 else
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12123 $as_echo_n "checking for xaw3d... " >&6; }
12124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125 $as_echo "no" >&6; }
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12127 $as_echo_n "checking for libXaw... " >&6; }
12128 if test "${emacs_cv_xaw+set}" = set; then :
12129 $as_echo_n "(cached) " >&6
12130 else
12131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132 /* end confdefs.h. */
12133
12134 #include <X11/Intrinsic.h>
12135 #include <X11/Xaw/Simple.h>
12136 int
12137 main ()
12138 {
12139
12140 ;
12141 return 0;
12142 }
12143 _ACEOF
12144 if ac_fn_c_try_link "$LINENO"; then :
12145 emacs_cv_xaw=yes
12146 else
12147 emacs_cv_xaw=no
12148 fi
12149 rm -f core conftest.err conftest.$ac_objext \
12150 conftest$ac_exeext conftest.$ac_ext
12151 fi
12152
12153 if test $emacs_cv_xaw = yes; then
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12155 $as_echo "yes; using Lucid toolkit" >&6; }
12156 USE_X_TOOLKIT=LUCID
12157 LUCID_LIBW=-lXaw
12158 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12159 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
12160 else
12161 as_fn_error "No X toolkit could be found.
12162 If you are sure you want Emacs compiled without an X toolkit, pass
12163 --with-x-toolkit=no
12164 to configure. Otherwise, install the development libraries for the toolkit
12165 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
12166 fi
12167 fi
12168 fi
12169
12170 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12171
12172 LIBXTR6=
12173 if test "${USE_X_TOOLKIT}" != "none"; then
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12175 $as_echo_n "checking X11 toolkit version... " >&6; }
12176 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
12177 $as_echo_n "(cached) " >&6
12178 else
12179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12180 /* end confdefs.h. */
12181 #include <X11/Intrinsic.h>
12182 int
12183 main ()
12184 {
12185 #if XtSpecificationRelease < 6
12186 fail;
12187 #endif
12188
12189 ;
12190 return 0;
12191 }
12192 _ACEOF
12193 if ac_fn_c_try_link "$LINENO"; then :
12194 emacs_cv_x11_toolkit_version_6=yes
12195 else
12196 emacs_cv_x11_toolkit_version_6=no
12197 fi
12198 rm -f core conftest.err conftest.$ac_objext \
12199 conftest$ac_exeext conftest.$ac_ext
12200 fi
12201
12202 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12203 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12205 $as_echo "6 or newer" >&6; }
12206
12207 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
12208
12209 LIBXTR6="-lSM -lICE"
12210 case "$opsys" in
12211 ## Use libw.a along with X11R6 Xt.
12212 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12213 esac
12214 else
12215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12216 $as_echo "before 6" >&6; }
12217 fi
12218
12219 OLDLIBS="$LIBS"
12220 if test x$HAVE_X11XTR6 = xyes; then
12221 LIBS="-lXt -lSM -lICE $LIBS"
12222 else
12223 LIBS="-lXt $LIBS"
12224 fi
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12226 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12227 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12228 $as_echo_n "(cached) " >&6
12229 else
12230 ac_check_lib_save_LIBS=$LIBS
12231 LIBS="-lXmu $LIBS"
12232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12233 /* end confdefs.h. */
12234
12235 /* Override any GCC internal prototype to avoid an error.
12236 Use char because int might match the return type of a GCC
12237 builtin and then its argument prototype would still apply. */
12238 #ifdef __cplusplus
12239 extern "C"
12240 #endif
12241 char XmuConvertStandardSelection ();
12242 int
12243 main ()
12244 {
12245 return XmuConvertStandardSelection ();
12246 ;
12247 return 0;
12248 }
12249 _ACEOF
12250 if ac_fn_c_try_link "$LINENO"; then :
12251 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12252 else
12253 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
12254 fi
12255 rm -f core conftest.err conftest.$ac_objext \
12256 conftest$ac_exeext conftest.$ac_ext
12257 LIBS=$ac_check_lib_save_LIBS
12258 fi
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12260 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12261 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12262 cat >>confdefs.h <<_ACEOF
12263 #define HAVE_LIBXMU 1
12264 _ACEOF
12265
12266 LIBS="-lXmu $LIBS"
12267
12268 fi
12269
12270 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12271 fi
12272
12273
12274 LIBXMU=-lXmu
12275 case $opsys in
12276 ## These systems don't supply Xmu.
12277 hpux* | aix4-2 )
12278 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12279 ;;
12280 mingw32 )
12281 LIBXMU=
12282 ;;
12283 esac
12284
12285
12286 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12287 if test "${HAVE_X11}" = "yes"; then
12288 if test "${USE_X_TOOLKIT}" != "none"; then
12289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12290 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12291 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
12292 $as_echo_n "(cached) " >&6
12293 else
12294 ac_check_lib_save_LIBS=$LIBS
12295 LIBS="-lXext $LIBS"
12296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12297 /* end confdefs.h. */
12298
12299 /* Override any GCC internal prototype to avoid an error.
12300 Use char because int might match the return type of a GCC
12301 builtin and then its argument prototype would still apply. */
12302 #ifdef __cplusplus
12303 extern "C"
12304 #endif
12305 char XShapeQueryExtension ();
12306 int
12307 main ()
12308 {
12309 return XShapeQueryExtension ();
12310 ;
12311 return 0;
12312 }
12313 _ACEOF
12314 if ac_fn_c_try_link "$LINENO"; then :
12315 ac_cv_lib_Xext_XShapeQueryExtension=yes
12316 else
12317 ac_cv_lib_Xext_XShapeQueryExtension=no
12318 fi
12319 rm -f core conftest.err conftest.$ac_objext \
12320 conftest$ac_exeext conftest.$ac_ext
12321 LIBS=$ac_check_lib_save_LIBS
12322 fi
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12324 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12325 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12326 cat >>confdefs.h <<_ACEOF
12327 #define HAVE_LIBXEXT 1
12328 _ACEOF
12329
12330 LIBS="-lXext $LIBS"
12331
12332 fi
12333
12334 fi
12335 fi
12336
12337 LIBXP=
12338 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12339 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12340 if test -d /usr/include/openmotif; then
12341 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12342 emacs_cv_openmotif=yes
12343 case "$canonical" in
12344 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12345 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12346 ;;
12347 *)
12348 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12349 esac
12350 else
12351 emacs_cv_openmotif=no
12352 fi
12353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12354 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
12355 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
12356 $as_echo_n "(cached) " >&6
12357 else
12358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h. */
12360 #include <Xm/Xm.h>
12361 int
12362 main ()
12363 {
12364 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12365 int x = 5;
12366 #else
12367 Motif version prior to 2.1.
12368 #endif
12369 ;
12370 return 0;
12371 }
12372 _ACEOF
12373 if ac_fn_c_try_compile "$LINENO"; then :
12374 emacs_cv_motif_version_2_1=yes
12375 else
12376 emacs_cv_motif_version_2_1=no
12377 fi
12378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12379 fi
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12381 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
12382 if test $emacs_cv_motif_version_2_1 = yes; then
12383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12384 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12385 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12386 $as_echo_n "(cached) " >&6
12387 else
12388 ac_check_lib_save_LIBS=$LIBS
12389 LIBS="-lXp $LIBS"
12390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12391 /* end confdefs.h. */
12392
12393 /* Override any GCC internal prototype to avoid an error.
12394 Use char because int might match the return type of a GCC
12395 builtin and then its argument prototype would still apply. */
12396 #ifdef __cplusplus
12397 extern "C"
12398 #endif
12399 char XpCreateContext ();
12400 int
12401 main ()
12402 {
12403 return XpCreateContext ();
12404 ;
12405 return 0;
12406 }
12407 _ACEOF
12408 if ac_fn_c_try_link "$LINENO"; then :
12409 ac_cv_lib_Xp_XpCreateContext=yes
12410 else
12411 ac_cv_lib_Xp_XpCreateContext=no
12412 fi
12413 rm -f core conftest.err conftest.$ac_objext \
12414 conftest$ac_exeext conftest.$ac_ext
12415 LIBS=$ac_check_lib_save_LIBS
12416 fi
12417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12418 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12419 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12420 LIBXP=-lXp
12421 fi
12422
12423 if test x$emacs_cv_openmotif = xyes; then
12424 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12425 fi
12426 else
12427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12428 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
12429 if test "${emacs_cv_lesstif+set}" = set; then :
12430 $as_echo_n "(cached) " >&6
12431 else
12432 # We put this in CFLAGS temporarily to precede other -I options
12433 # that might be in CFLAGS temporarily.
12434 # We put this in CPPFLAGS where it precedes the other -I options.
12435 OLD_CPPFLAGS=$CPPFLAGS
12436 OLD_CFLAGS=$CFLAGS
12437 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12438 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440 /* end confdefs.h. */
12441 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12442 int
12443 main ()
12444 {
12445 int x = 5;
12446 ;
12447 return 0;
12448 }
12449 _ACEOF
12450 if ac_fn_c_try_compile "$LINENO"; then :
12451 emacs_cv_lesstif=yes
12452 else
12453 emacs_cv_lesstif=no
12454 fi
12455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12456 fi
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12458 $as_echo "$emacs_cv_lesstif" >&6; }
12459 if test $emacs_cv_lesstif = yes; then
12460 # Make sure this -I option remains in CPPFLAGS after it is set
12461 # back to REAL_CPPFLAGS.
12462 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12463 # have those other -I options anyway. Ultimately, having this
12464 # directory ultimately in CPPFLAGS will be enough.
12465 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12466 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12467 else
12468 CFLAGS=$OLD_CFLAGS
12469 CPPFLAGS=$OLD_CPPFLAGS
12470 fi
12471 fi
12472 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12473 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12474
12475 else
12476 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12477 fi
12478
12479
12480 fi
12481
12482
12483 USE_TOOLKIT_SCROLL_BARS=no
12484 if test "${with_toolkit_scroll_bars}" != "no"; then
12485 if test "${USE_X_TOOLKIT}" != "none"; then
12486 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12487 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12488
12489 HAVE_XAW3D=no
12490 USE_TOOLKIT_SCROLL_BARS=yes
12491 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12492 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12493
12494 USE_TOOLKIT_SCROLL_BARS=yes
12495 fi
12496 elif test "${HAVE_GTK}" = "yes"; then
12497 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12498
12499 USE_TOOLKIT_SCROLL_BARS=yes
12500 elif test "${HAVE_NS}" = "yes"; then
12501 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12502
12503 USE_TOOLKIT_SCROLL_BARS=yes
12504 elif test "${HAVE_W32}" = "yes"; then
12505 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12506
12507 USE_TOOLKIT_SCROLL_BARS=yes
12508 fi
12509 fi
12510
12511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512 /* end confdefs.h. */
12513
12514 #include <X11/Xlib.h>
12515 #include <X11/Xresource.h>
12516 int
12517 main ()
12518 {
12519 XIMProc callback;
12520 ;
12521 return 0;
12522 }
12523 _ACEOF
12524 if ac_fn_c_try_compile "$LINENO"; then :
12525 HAVE_XIM=yes
12526
12527 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12528
12529 else
12530 HAVE_XIM=no
12531 fi
12532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12533
12534
12535 if test "${with_xim}" != "no"; then
12536
12537 $as_echo "#define USE_XIM 1" >>confdefs.h
12538
12539 fi
12540
12541
12542 if test "${HAVE_XIM}" != "no"; then
12543 late_CFLAGS=$CFLAGS
12544 if test "$GCC" = yes; then
12545 CFLAGS="$CFLAGS --pedantic-errors"
12546 fi
12547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548 /* end confdefs.h. */
12549
12550 #include <X11/Xlib.h>
12551 #include <X11/Xresource.h>
12552 int
12553 main ()
12554 {
12555 Display *display;
12556 XrmDatabase db;
12557 char *res_name;
12558 char *res_class;
12559 XIMProc callback;
12560 XPointer *client_data;
12561 #ifndef __GNUC__
12562 /* If we're not using GCC, it's probably not XFree86, and this is
12563 probably right, but we can't use something like --pedantic-errors. */
12564 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12565 char*, XIMProc, XPointer*);
12566 #endif
12567 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12568 client_data);
12569 ;
12570 return 0;
12571 }
12572 _ACEOF
12573 if ac_fn_c_try_compile "$LINENO"; then :
12574 emacs_cv_arg6_star=yes
12575 fi
12576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12577 if test "$emacs_cv_arg6_star" = yes; then
12578 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12579
12580 else
12581 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
12582
12583 fi
12584 CFLAGS=$late_CFLAGS
12585 fi
12586
12587 ### Start of font-backend (under any platform) section.
12588 # (nothing here yet -- this is a placeholder)
12589 ### End of font-backend (under any platform) section.
12590
12591 ### Start of font-backend (under X11) section.
12592 if test "${HAVE_X11}" = "yes"; then
12593
12594 succeeded=no
12595
12596 if test "$PKG_CONFIG" = "no" ; then
12597 HAVE_FC=no
12598 else
12599 PKG_CONFIG_MIN_VERSION=0.9.0
12600 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12602 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12603
12604 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12605 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12606 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
12607 edit_cflags="
12608 s,///*,/,g
12609 s/^/ /
12610 s/ -I/ $isystem/g
12611 s/^ //
12612 "
12613 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12614 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12616 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12617 succeeded=yes
12618 else
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12620 $as_echo "no" >&6; }
12621 FONTCONFIG_CFLAGS=""
12622 FONTCONFIG_LIBS=""
12623 ## If we have a custom action on failure, don't print errors, but
12624 ## do set a variable so people can do so. Do it in a subshell
12625 ## to capture any diagnostics in invoking pkg-config.
12626 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
12627
12628 fi
12629
12630
12631
12632 else
12633 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12634 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12635 fi
12636 fi
12637
12638 if test $succeeded = yes; then
12639 HAVE_FC=yes
12640 else
12641 HAVE_FC=no
12642 fi
12643
12644
12645 ## Use -lXft if available, unless `--with-xft=no'.
12646 HAVE_XFT=maybe
12647 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12648 with_xft="no";
12649 fi
12650 if test "x${with_xft}" != "xno"; then
12651
12652
12653 succeeded=no
12654
12655 if test "$PKG_CONFIG" = "no" ; then
12656 HAVE_XFT=no
12657 else
12658 PKG_CONFIG_MIN_VERSION=0.9.0
12659 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12661 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12662
12663 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12664 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12665 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
12666 edit_cflags="
12667 s,///*,/,g
12668 s/^/ /
12669 s/ -I/ $isystem/g
12670 s/^ //
12671 "
12672 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12673 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12675 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12676 succeeded=yes
12677 else
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679 $as_echo "no" >&6; }
12680 XFT_CFLAGS=""
12681 XFT_LIBS=""
12682 ## If we have a custom action on failure, don't print errors, but
12683 ## do set a variable so people can do so. Do it in a subshell
12684 ## to capture any diagnostics in invoking pkg-config.
12685 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
12686
12687 fi
12688
12689
12690
12691 else
12692 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12693 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12694 fi
12695 fi
12696
12697 if test $succeeded = yes; then
12698 :
12699 else
12700 HAVE_XFT=no
12701 fi
12702
12703 ## Because xftfont.c uses XRenderQueryExtension, we also
12704 ## need to link to -lXrender.
12705 HAVE_XRENDER=no
12706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12707 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12708 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12709 $as_echo_n "(cached) " >&6
12710 else
12711 ac_check_lib_save_LIBS=$LIBS
12712 LIBS="-lXrender $LIBS"
12713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12714 /* end confdefs.h. */
12715
12716 /* Override any GCC internal prototype to avoid an error.
12717 Use char because int might match the return type of a GCC
12718 builtin and then its argument prototype would still apply. */
12719 #ifdef __cplusplus
12720 extern "C"
12721 #endif
12722 char XRenderQueryExtension ();
12723 int
12724 main ()
12725 {
12726 return XRenderQueryExtension ();
12727 ;
12728 return 0;
12729 }
12730 _ACEOF
12731 if ac_fn_c_try_link "$LINENO"; then :
12732 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12733 else
12734 ac_cv_lib_Xrender_XRenderQueryExtension=no
12735 fi
12736 rm -f core conftest.err conftest.$ac_objext \
12737 conftest$ac_exeext conftest.$ac_ext
12738 LIBS=$ac_check_lib_save_LIBS
12739 fi
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12741 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12742 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12743 HAVE_XRENDER=yes
12744 fi
12745
12746 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12747 OLD_CPPFLAGS="$CPPFLAGS"
12748 OLD_CFLAGS="$CFLAGS"
12749 OLD_LIBS="$LIBS"
12750 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12751 CFLAGS="$CFLAGS $XFT_CFLAGS"
12752 XFT_LIBS="-lXrender $XFT_LIBS"
12753 LIBS="$XFT_LIBS $LIBS"
12754 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12755 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12757 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12758 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12759 $as_echo_n "(cached) " >&6
12760 else
12761 ac_check_lib_save_LIBS=$LIBS
12762 LIBS="-lXft $XFT_LIBS $LIBS"
12763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12764 /* end confdefs.h. */
12765
12766 /* Override any GCC internal prototype to avoid an error.
12767 Use char because int might match the return type of a GCC
12768 builtin and then its argument prototype would still apply. */
12769 #ifdef __cplusplus
12770 extern "C"
12771 #endif
12772 char XftFontOpen ();
12773 int
12774 main ()
12775 {
12776 return XftFontOpen ();
12777 ;
12778 return 0;
12779 }
12780 _ACEOF
12781 if ac_fn_c_try_link "$LINENO"; then :
12782 ac_cv_lib_Xft_XftFontOpen=yes
12783 else
12784 ac_cv_lib_Xft_XftFontOpen=no
12785 fi
12786 rm -f core conftest.err conftest.$ac_objext \
12787 conftest$ac_exeext conftest.$ac_ext
12788 LIBS=$ac_check_lib_save_LIBS
12789 fi
12790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12791 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12792 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12793 HAVE_XFT=yes
12794 fi
12795
12796 fi
12797
12798
12799
12800 if test "${HAVE_XFT}" = "yes"; then
12801
12802 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12803
12804
12805 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12806 else
12807 CPPFLAGS="$OLD_CPPFLAGS"
12808 CFLAGS="$OLD_CFLAGS"
12809 LIBS="$OLD_LIBS"
12810 fi # "${HAVE_XFT}" = "yes"
12811 fi # "$HAVE_XFT" != no
12812 fi # "x${with_xft}" != "xno"
12813
12814 ## We used to allow building with FreeType and without Xft.
12815 ## However, the ftx font backend driver is not in good shape.
12816 if test "$HAVE_XFT" != "yes"; then
12817 HAVE_XFT=no
12818 HAVE_FREETYPE=no
12819 else
12820
12821 succeeded=no
12822
12823 if test "$PKG_CONFIG" = "no" ; then
12824 HAVE_FREETYPE=no
12825 else
12826 PKG_CONFIG_MIN_VERSION=0.9.0
12827 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12829 $as_echo_n "checking for freetype2... " >&6; }
12830
12831 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12832 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12833 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
12834 edit_cflags="
12835 s,///*,/,g
12836 s/^/ /
12837 s/ -I/ $isystem/g
12838 s/^ //
12839 "
12840 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12841 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12843 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12844 succeeded=yes
12845 else
12846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12847 $as_echo "no" >&6; }
12848 FREETYPE_CFLAGS=""
12849 FREETYPE_LIBS=""
12850 ## If we have a custom action on failure, don't print errors, but
12851 ## do set a variable so people can do so. Do it in a subshell
12852 ## to capture any diagnostics in invoking pkg-config.
12853 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
12854
12855 fi
12856
12857
12858
12859 else
12860 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12861 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12862 fi
12863 fi
12864
12865 if test $succeeded = yes; then
12866 HAVE_FREETYPE=yes
12867 else
12868 HAVE_FREETYPE=no
12869 fi
12870
12871
12872 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12873 fi
12874
12875 HAVE_LIBOTF=no
12876 if test "${HAVE_FREETYPE}" = "yes"; then
12877
12878 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12879
12880 if test "${with_libotf}" != "no"; then
12881
12882 succeeded=no
12883
12884 if test "$PKG_CONFIG" = "no" ; then
12885 HAVE_LIBOTF=no
12886 else
12887 PKG_CONFIG_MIN_VERSION=0.9.0
12888 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12890 $as_echo_n "checking for libotf... " >&6; }
12891
12892 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12893 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12894 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
12895 edit_cflags="
12896 s,///*,/,g
12897 s/^/ /
12898 s/ -I/ $isystem/g
12899 s/^ //
12900 "
12901 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12902 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12904 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12905 succeeded=yes
12906 else
12907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12908 $as_echo "no" >&6; }
12909 LIBOTF_CFLAGS=""
12910 LIBOTF_LIBS=""
12911 ## If we have a custom action on failure, don't print errors, but
12912 ## do set a variable so people can do so. Do it in a subshell
12913 ## to capture any diagnostics in invoking pkg-config.
12914 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
12915
12916 fi
12917
12918
12919
12920 else
12921 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12922 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12923 fi
12924 fi
12925
12926 if test $succeeded = yes; then
12927 HAVE_LIBOTF=yes
12928 else
12929 HAVE_LIBOTF=no
12930 fi
12931
12932 if test "$HAVE_LIBOTF" = "yes"; then
12933
12934 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
12935
12936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12937 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12938 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
12939 $as_echo_n "(cached) " >&6
12940 else
12941 ac_check_lib_save_LIBS=$LIBS
12942 LIBS="-lotf $LIBS"
12943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12944 /* end confdefs.h. */
12945
12946 /* Override any GCC internal prototype to avoid an error.
12947 Use char because int might match the return type of a GCC
12948 builtin and then its argument prototype would still apply. */
12949 #ifdef __cplusplus
12950 extern "C"
12951 #endif
12952 char OTF_get_variation_glyphs ();
12953 int
12954 main ()
12955 {
12956 return OTF_get_variation_glyphs ();
12957 ;
12958 return 0;
12959 }
12960 _ACEOF
12961 if ac_fn_c_try_link "$LINENO"; then :
12962 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
12963 else
12964 ac_cv_lib_otf_OTF_get_variation_glyphs=no
12965 fi
12966 rm -f core conftest.err conftest.$ac_objext \
12967 conftest$ac_exeext conftest.$ac_ext
12968 LIBS=$ac_check_lib_save_LIBS
12969 fi
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12971 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12972 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12973 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12974 else
12975 HAVE_OTF_GET_VARIATION_GLYPHS=no
12976 fi
12977
12978 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12979
12980 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12981
12982 fi
12983 fi
12984 fi
12985 fi
12986
12987 HAVE_M17N_FLT=no
12988 if test "${HAVE_LIBOTF}" = yes; then
12989 if test "${with_m17n_flt}" != "no"; then
12990
12991 succeeded=no
12992
12993 if test "$PKG_CONFIG" = "no" ; then
12994 HAVE_M17N_FLT=no
12995 else
12996 PKG_CONFIG_MIN_VERSION=0.9.0
12997 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12999 $as_echo_n "checking for m17n-flt... " >&6; }
13000
13001 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13002 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13003 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
13004 edit_cflags="
13005 s,///*,/,g
13006 s/^/ /
13007 s/ -I/ $isystem/g
13008 s/^ //
13009 "
13010 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13011 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13013 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13014 succeeded=yes
13015 else
13016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13017 $as_echo "no" >&6; }
13018 M17N_FLT_CFLAGS=""
13019 M17N_FLT_LIBS=""
13020 ## If we have a custom action on failure, don't print errors, but
13021 ## do set a variable so people can do so. Do it in a subshell
13022 ## to capture any diagnostics in invoking pkg-config.
13023 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
13024
13025 fi
13026
13027
13028
13029 else
13030 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13031 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13032 fi
13033 fi
13034
13035 if test $succeeded = yes; then
13036 HAVE_M17N_FLT=yes
13037 else
13038 HAVE_M17N_FLT=no
13039 fi
13040
13041 if test "$HAVE_M17N_FLT" = "yes"; then
13042
13043 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13044
13045 fi
13046 fi
13047 fi
13048 else
13049 HAVE_XFT=no
13050 HAVE_FREETYPE=no
13051 HAVE_LIBOTF=no
13052 HAVE_M17N_FLT=no
13053 fi
13054
13055 ### End of font-backend (under X11) section.
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066 ### Use -lXpm if available, unless `--with-xpm=no'.
13067 ### mingw32 doesn't use -lXpm, since it loads the library dynamically.
13068 HAVE_XPM=no
13069 LIBXPM=
13070 if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
13071 if test "${with_xpm}" != "no"; then
13072 SAVE_CPPFLAGS="$CPPFLAGS"
13073 SAVE_LDFLAGS="$LDFLAGS"
13074 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13075 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13076 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13077 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13079 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13080 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13081 $as_echo_n "(cached) " >&6
13082 else
13083 ac_check_lib_save_LIBS=$LIBS
13084 LIBS="-lXpm $LIBS"
13085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13086 /* end confdefs.h. */
13087
13088 /* Override any GCC internal prototype to avoid an error.
13089 Use char because int might match the return type of a GCC
13090 builtin and then its argument prototype would still apply. */
13091 #ifdef __cplusplus
13092 extern "C"
13093 #endif
13094 char XpmReadFileToImage ();
13095 int
13096 main ()
13097 {
13098 return XpmReadFileToImage ();
13099 ;
13100 return 0;
13101 }
13102 _ACEOF
13103 if ac_fn_c_try_link "$LINENO"; then :
13104 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13105 else
13106 ac_cv_lib_Xpm_XpmReadFileToImage=no
13107 fi
13108 rm -f core conftest.err conftest.$ac_objext \
13109 conftest$ac_exeext conftest.$ac_ext
13110 LIBS=$ac_check_lib_save_LIBS
13111 fi
13112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13113 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13114 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13115 HAVE_XPM=yes
13116 fi
13117
13118 fi
13119
13120
13121 if test "${HAVE_XPM}" = "yes"; then
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13123 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125 /* end confdefs.h. */
13126 #include "X11/xpm.h"
13127 #ifndef XpmReturnAllocPixels
13128 no_return_alloc_pixels
13129 #endif
13130
13131 _ACEOF
13132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13133 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13134 HAVE_XPM=no
13135 else
13136 HAVE_XPM=yes
13137 fi
13138 rm -f conftest*
13139
13140
13141 if test "${HAVE_XPM}" = "yes"; then
13142 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13144 $as_echo "yes" >&6; }
13145 else
13146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13147 $as_echo "no" >&6; }
13148 CPPFLAGS="$SAVE_CPPFLAGS"
13149 LDFLAGS="$SAVE_LDFLAGS"
13150 fi
13151 fi
13152 fi
13153
13154 if test "${HAVE_XPM}" = "yes"; then
13155
13156 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13157
13158 LIBXPM=-lXpm
13159 fi
13160 fi
13161
13162 if test "${HAVE_X11}" = "yes"; then
13163 if test "${with_xpm}" != "no"; then
13164 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13165 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13167 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13168 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
13169 $as_echo_n "(cached) " >&6
13170 else
13171 ac_check_lib_save_LIBS=$LIBS
13172 LIBS="-lXpm -lX11 $LIBS"
13173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13174 /* end confdefs.h. */
13175
13176 /* Override any GCC internal prototype to avoid an error.
13177 Use char because int might match the return type of a GCC
13178 builtin and then its argument prototype would still apply. */
13179 #ifdef __cplusplus
13180 extern "C"
13181 #endif
13182 char XpmReadFileToPixmap ();
13183 int
13184 main ()
13185 {
13186 return XpmReadFileToPixmap ();
13187 ;
13188 return 0;
13189 }
13190 _ACEOF
13191 if ac_fn_c_try_link "$LINENO"; then :
13192 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
13193 else
13194 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
13195 fi
13196 rm -f core conftest.err conftest.$ac_objext \
13197 conftest$ac_exeext conftest.$ac_ext
13198 LIBS=$ac_check_lib_save_LIBS
13199 fi
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13201 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13202 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13203 HAVE_XPM=yes
13204 fi
13205
13206 fi
13207
13208
13209 if test "${HAVE_XPM}" = "yes"; then
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13211 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213 /* end confdefs.h. */
13214 #include "X11/xpm.h"
13215 #ifndef XpmReturnAllocPixels
13216 no_return_alloc_pixels
13217 #endif
13218
13219 _ACEOF
13220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13221 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13222 HAVE_XPM=no
13223 else
13224 HAVE_XPM=yes
13225 fi
13226 rm -f conftest*
13227
13228
13229 if test "${HAVE_XPM}" = "yes"; then
13230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13231 $as_echo "yes" >&6; }
13232 else
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13234 $as_echo "no" >&6; }
13235 fi
13236 fi
13237 fi
13238
13239 if test "${HAVE_XPM}" = "yes"; then
13240
13241 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13242
13243 LIBXPM=-lXpm
13244 fi
13245 fi
13246
13247 ### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13248 ### slightly different requirements wrt image libraries (it doesn't
13249 ### use -lXpm because it loads the xpm shared library dynamically at
13250 ### run time).
13251 if test "${opsys}" = "mingw32"; then
13252 if test "${with_xpm}" != "no"; then
13253 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13254 #define FOR_MSW 1
13255 "
13256 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13257 HAVE_XPM=yes
13258 else
13259 HAVE_XPM=no
13260 fi
13261
13262
13263 fi
13264
13265 if test "${HAVE_XPM}" = "yes"; then
13266
13267 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13268
13269 fi
13270 fi
13271
13272
13273
13274 ### Use -ljpeg if available, unless `--with-jpeg=no'.
13275 ### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
13276 HAVE_JPEG=no
13277 LIBJPEG=
13278 if test "${opsys}" = "mingw32"; then
13279 if test "${with_jpeg}" != "no"; then
13280 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13281 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13282 HAVE_JPEG=yes
13283 else
13284 HAVE_JPEG=no
13285 fi
13286
13287
13288 fi
13289 if test "${HAVE_JPEG}" = "yes"; then
13290 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13291
13292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293 /* end confdefs.h. */
13294 #include <jpeglib.h>
13295 version=JPEG_LIB_VERSION
13296
13297 _ACEOF
13298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13299 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13300 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13301
13302 else
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13304 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13305 HAVE_JPEG=no
13306 fi
13307 rm -f conftest*
13308
13309 fi
13310 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13311 if test "${with_jpeg}" != "no"; then
13312 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13313 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13315 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13316 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
13317 $as_echo_n "(cached) " >&6
13318 else
13319 ac_check_lib_save_LIBS=$LIBS
13320 LIBS="-ljpeg $LIBS"
13321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13322 /* end confdefs.h. */
13323
13324 /* Override any GCC internal prototype to avoid an error.
13325 Use char because int might match the return type of a GCC
13326 builtin and then its argument prototype would still apply. */
13327 #ifdef __cplusplus
13328 extern "C"
13329 #endif
13330 char jpeg_destroy_compress ();
13331 int
13332 main ()
13333 {
13334 return jpeg_destroy_compress ();
13335 ;
13336 return 0;
13337 }
13338 _ACEOF
13339 if ac_fn_c_try_link "$LINENO"; then :
13340 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
13341 else
13342 ac_cv_lib_jpeg_jpeg_destroy_compress=no
13343 fi
13344 rm -f core conftest.err conftest.$ac_objext \
13345 conftest$ac_exeext conftest.$ac_ext
13346 LIBS=$ac_check_lib_save_LIBS
13347 fi
13348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13349 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13350 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13351 HAVE_JPEG=yes
13352 fi
13353
13354 fi
13355
13356
13357 fi
13358
13359 if test "${HAVE_JPEG}" = "yes"; then
13360 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13361
13362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13363 /* end confdefs.h. */
13364 #include <jpeglib.h>
13365 version=JPEG_LIB_VERSION
13366
13367 _ACEOF
13368 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13369 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13370 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13371
13372 else
13373 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13374 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13375 HAVE_JPEG=no
13376 fi
13377 rm -f conftest*
13378
13379 fi
13380 if test "${HAVE_JPEG}" = "yes"; then
13381 LIBJPEG=-ljpeg
13382 fi
13383 fi
13384
13385
13386 ### Use -lpng if available, unless `--with-png=no'.
13387 ### mingw32 doesn't use -lpng, since it loads the library dynamically.
13388 HAVE_PNG=no
13389 LIBPNG=
13390 if test "${opsys}" = "mingw32"; then
13391 if test "${with_png}" != "no"; then
13392 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13393 if test "x$ac_cv_header_png_h" = x""yes; then :
13394 HAVE_PNG=yes
13395 else
13396 HAVE_PNG=no
13397 fi
13398
13399
13400 fi
13401 if test "${HAVE_PNG}" = "yes"; then
13402
13403 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13404
13405
13406 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13407 # include <libpng/png.h>
13408 #else
13409 # include <png.h>
13410 #endif
13411
13412 "
13413 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13414
13415 else
13416
13417 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13418
13419 fi
13420
13421 fi
13422 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13423 if test "${with_png}" != "no"; then
13424 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13425 # in /usr/include/libpng.
13426 for ac_header in png.h libpng/png.h
13427 do :
13428 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13429 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13430 eval as_val=\$$as_ac_Header
13431 if test "x$as_val" = x""yes; then :
13432 cat >>confdefs.h <<_ACEOF
13433 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13434 _ACEOF
13435 break
13436 fi
13437
13438 done
13439
13440 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13442 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13443 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13444 $as_echo_n "(cached) " >&6
13445 else
13446 ac_check_lib_save_LIBS=$LIBS
13447 LIBS="-lpng -lz -lm $LIBS"
13448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13449 /* end confdefs.h. */
13450
13451 /* Override any GCC internal prototype to avoid an error.
13452 Use char because int might match the return type of a GCC
13453 builtin and then its argument prototype would still apply. */
13454 #ifdef __cplusplus
13455 extern "C"
13456 #endif
13457 char png_get_channels ();
13458 int
13459 main ()
13460 {
13461 return png_get_channels ();
13462 ;
13463 return 0;
13464 }
13465 _ACEOF
13466 if ac_fn_c_try_link "$LINENO"; then :
13467 ac_cv_lib_png_png_get_channels=yes
13468 else
13469 ac_cv_lib_png_png_get_channels=no
13470 fi
13471 rm -f core conftest.err conftest.$ac_objext \
13472 conftest$ac_exeext conftest.$ac_ext
13473 LIBS=$ac_check_lib_save_LIBS
13474 fi
13475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13476 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13477 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13478 HAVE_PNG=yes
13479 fi
13480
13481 fi
13482 fi
13483
13484 if test "${HAVE_PNG}" = "yes"; then
13485
13486 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13487
13488 LIBPNG="-lpng -lz -lm"
13489
13490 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13491 # include <libpng/png.h>
13492 #else
13493 # include <png.h>
13494 #endif
13495
13496 "
13497 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13498
13499 else
13500
13501 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13502
13503 fi
13504
13505 fi
13506 fi
13507
13508
13509 ### Use -ltiff if available, unless `--with-tiff=no'.
13510 ### mingw32 doesn't use -ltiff, since it loads the library dynamically.
13511 HAVE_TIFF=no
13512 LIBTIFF=
13513 if test "${opsys}" = "mingw32"; then
13514 if test "${with_tiff}" != "no"; then
13515 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13516 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13517 HAVE_TIFF=yes
13518 else
13519 HAVE_TIFF=no
13520 fi
13521
13522
13523 fi
13524 if test "${HAVE_TIFF}" = "yes"; then
13525
13526 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13527
13528 fi
13529 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13530 if test "${with_tiff}" != "no"; then
13531 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13532 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13533 tifflibs="-lz -lm"
13534 # At least one tiff package requires the jpeg library.
13535 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13537 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13538 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
13539 $as_echo_n "(cached) " >&6
13540 else
13541 ac_check_lib_save_LIBS=$LIBS
13542 LIBS="-ltiff $tifflibs $LIBS"
13543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13544 /* end confdefs.h. */
13545
13546 /* Override any GCC internal prototype to avoid an error.
13547 Use char because int might match the return type of a GCC
13548 builtin and then its argument prototype would still apply. */
13549 #ifdef __cplusplus
13550 extern "C"
13551 #endif
13552 char TIFFGetVersion ();
13553 int
13554 main ()
13555 {
13556 return TIFFGetVersion ();
13557 ;
13558 return 0;
13559 }
13560 _ACEOF
13561 if ac_fn_c_try_link "$LINENO"; then :
13562 ac_cv_lib_tiff_TIFFGetVersion=yes
13563 else
13564 ac_cv_lib_tiff_TIFFGetVersion=no
13565 fi
13566 rm -f core conftest.err conftest.$ac_objext \
13567 conftest$ac_exeext conftest.$ac_ext
13568 LIBS=$ac_check_lib_save_LIBS
13569 fi
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13571 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13572 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13573 HAVE_TIFF=yes
13574 fi
13575
13576 fi
13577
13578
13579 fi
13580
13581 if test "${HAVE_TIFF}" = "yes"; then
13582
13583 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13584
13585 LIBTIFF=-ltiff
13586 fi
13587 fi
13588
13589
13590 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
13591 ### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
13592 HAVE_GIF=no
13593 LIBGIF=
13594 if test "${opsys}" = "mingw32"; then
13595 if test "${with_gif}" != "no"; then
13596 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13597 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13598 HAVE_GIF=yes
13599 else
13600 HAVE_GIF=no
13601 fi
13602
13603
13604 fi
13605 if test "${HAVE_GIF}" = "yes"; then
13606
13607 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13608
13609 fi
13610 elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13611 || test "${HAVE_W32}" = "yes"; then
13612 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13613 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13614 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13615 # Earlier versions can crash Emacs.
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13617 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13618 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
13619 $as_echo_n "(cached) " >&6
13620 else
13621 ac_check_lib_save_LIBS=$LIBS
13622 LIBS="-lgif $LIBS"
13623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13624 /* end confdefs.h. */
13625
13626 /* Override any GCC internal prototype to avoid an error.
13627 Use char because int might match the return type of a GCC
13628 builtin and then its argument prototype would still apply. */
13629 #ifdef __cplusplus
13630 extern "C"
13631 #endif
13632 char EGifPutExtensionLast ();
13633 int
13634 main ()
13635 {
13636 return EGifPutExtensionLast ();
13637 ;
13638 return 0;
13639 }
13640 _ACEOF
13641 if ac_fn_c_try_link "$LINENO"; then :
13642 ac_cv_lib_gif_EGifPutExtensionLast=yes
13643 else
13644 ac_cv_lib_gif_EGifPutExtensionLast=no
13645 fi
13646 rm -f core conftest.err conftest.$ac_objext \
13647 conftest$ac_exeext conftest.$ac_ext
13648 LIBS=$ac_check_lib_save_LIBS
13649 fi
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13651 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13652 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13653 HAVE_GIF=yes
13654 else
13655 HAVE_GIF=maybe
13656 fi
13657
13658 fi
13659
13660
13661
13662 if test "$HAVE_GIF" = yes; then
13663 LIBGIF=-lgif
13664 elif test "$HAVE_GIF" = maybe; then
13665 # If gif_lib.h but no libgif, try libungif.
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13667 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13668 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
13669 $as_echo_n "(cached) " >&6
13670 else
13671 ac_check_lib_save_LIBS=$LIBS
13672 LIBS="-lungif $LIBS"
13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674 /* end confdefs.h. */
13675
13676 /* Override any GCC internal prototype to avoid an error.
13677 Use char because int might match the return type of a GCC
13678 builtin and then its argument prototype would still apply. */
13679 #ifdef __cplusplus
13680 extern "C"
13681 #endif
13682 char EGifPutExtensionLast ();
13683 int
13684 main ()
13685 {
13686 return EGifPutExtensionLast ();
13687 ;
13688 return 0;
13689 }
13690 _ACEOF
13691 if ac_fn_c_try_link "$LINENO"; then :
13692 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13693 else
13694 ac_cv_lib_ungif_EGifPutExtensionLast=no
13695 fi
13696 rm -f core conftest.err conftest.$ac_objext \
13697 conftest$ac_exeext conftest.$ac_ext
13698 LIBS=$ac_check_lib_save_LIBS
13699 fi
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13701 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13702 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13703 HAVE_GIF=yes
13704 else
13705 HAVE_GIF=no
13706 fi
13707
13708 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13709 fi
13710
13711 if test "${HAVE_GIF}" = "yes"; then
13712
13713 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13714
13715 fi
13716 fi
13717
13718
13719 if test "${HAVE_X11}" = "yes"; then
13720 MISSING=""
13721 WITH_NO=""
13722 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13723 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13724 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13725 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13726 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13727 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13728 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13729 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13730 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13731 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13732
13733 if test "X${MISSING}" != X; then
13734 as_fn_error "The following required libraries were not found:
13735 $MISSING
13736 Maybe some development libraries/packages are missing?
13737 If you don't want to link with them give
13738 $WITH_NO
13739 as options to configure" "$LINENO" 5
13740 fi
13741 fi
13742
13743 ### Use -lgpm if available, unless `--with-gpm=no'.
13744 HAVE_GPM=no
13745 LIBGPM=
13746 if test "${with_gpm}" != "no"; then
13747 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13748 if test "x$ac_cv_header_gpm_h" = x""yes; then :
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13750 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13751 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
13752 $as_echo_n "(cached) " >&6
13753 else
13754 ac_check_lib_save_LIBS=$LIBS
13755 LIBS="-lgpm $LIBS"
13756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13757 /* end confdefs.h. */
13758
13759 /* Override any GCC internal prototype to avoid an error.
13760 Use char because int might match the return type of a GCC
13761 builtin and then its argument prototype would still apply. */
13762 #ifdef __cplusplus
13763 extern "C"
13764 #endif
13765 char Gpm_Open ();
13766 int
13767 main ()
13768 {
13769 return Gpm_Open ();
13770 ;
13771 return 0;
13772 }
13773 _ACEOF
13774 if ac_fn_c_try_link "$LINENO"; then :
13775 ac_cv_lib_gpm_Gpm_Open=yes
13776 else
13777 ac_cv_lib_gpm_Gpm_Open=no
13778 fi
13779 rm -f core conftest.err conftest.$ac_objext \
13780 conftest$ac_exeext conftest.$ac_ext
13781 LIBS=$ac_check_lib_save_LIBS
13782 fi
13783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13784 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13785 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13786 HAVE_GPM=yes
13787 fi
13788
13789 fi
13790
13791
13792
13793 if test "${HAVE_GPM}" = "yes"; then
13794
13795 $as_echo "#define HAVE_GPM 1" >>confdefs.h
13796
13797 LIBGPM=-lgpm
13798 fi
13799 fi
13800
13801
13802
13803
13804
13805
13806 GNUSTEP_CFLAGS=
13807 ### Use NeXTstep API to implement GUI.
13808 if test "${HAVE_NS}" = "yes"; then
13809
13810 $as_echo "#define HAVE_NS 1" >>confdefs.h
13811
13812 if test "${NS_IMPL_COCOA}" = "yes"; then
13813
13814 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
13815
13816 fi
13817 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
13818
13819 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13820
13821 # See also .m.o rule in Makefile.in */
13822 # FIXME: are all these flags really needed? Document here why. */
13823 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13824 ## Extra CFLAGS applied to src/*.m files.
13825 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"
13826 fi
13827 # We also have mouse menus.
13828 HAVE_MENUS=yes
13829 OTHER_FILES=ns-app
13830 fi
13831
13832 if test "${HAVE_W32}" = "yes"; then
13833 HAVE_MENUS=yes
13834 fi
13835
13836 ### Use session management (-lSM -lICE) if available
13837 HAVE_X_SM=no
13838 LIBXSM=
13839 if test "${HAVE_X11}" = "yes"; then
13840 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13841 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13843 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13844 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
13845 $as_echo_n "(cached) " >&6
13846 else
13847 ac_check_lib_save_LIBS=$LIBS
13848 LIBS="-lSM -lICE $LIBS"
13849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13850 /* end confdefs.h. */
13851
13852 /* Override any GCC internal prototype to avoid an error.
13853 Use char because int might match the return type of a GCC
13854 builtin and then its argument prototype would still apply. */
13855 #ifdef __cplusplus
13856 extern "C"
13857 #endif
13858 char SmcOpenConnection ();
13859 int
13860 main ()
13861 {
13862 return SmcOpenConnection ();
13863 ;
13864 return 0;
13865 }
13866 _ACEOF
13867 if ac_fn_c_try_link "$LINENO"; then :
13868 ac_cv_lib_SM_SmcOpenConnection=yes
13869 else
13870 ac_cv_lib_SM_SmcOpenConnection=no
13871 fi
13872 rm -f core conftest.err conftest.$ac_objext \
13873 conftest$ac_exeext conftest.$ac_ext
13874 LIBS=$ac_check_lib_save_LIBS
13875 fi
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13877 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13878 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13879 HAVE_X_SM=yes
13880 fi
13881
13882 fi
13883
13884
13885
13886 if test "${HAVE_X_SM}" = "yes"; then
13887
13888 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
13889
13890 LIBXSM="-lSM -lICE"
13891 case "$LIBS" in
13892 *-lSM*) ;;
13893 *) LIBS="$LIBXSM $LIBS" ;;
13894 esac
13895 fi
13896 fi
13897
13898
13899 ### Use XRandr (-lXrandr) if available
13900 HAVE_XRANDR=no
13901 if test "${HAVE_X11}" = "yes"; then
13902 XRANDR_REQUIRED=1.2.2
13903 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
13904
13905 succeeded=no
13906
13907 if test "$PKG_CONFIG" = "no" ; then
13908 HAVE_XRANDR=no
13909 else
13910 PKG_CONFIG_MIN_VERSION=0.9.0
13911 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
13913 $as_echo_n "checking for $XRANDR_MODULES... " >&6; }
13914
13915 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
13916 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
13917 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
13918 edit_cflags="
13919 s,///*,/,g
13920 s/^/ /
13921 s/ -I/ $isystem/g
13922 s/^ //
13923 "
13924 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
13925 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
13927 $as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
13928 succeeded=yes
13929 else
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13931 $as_echo "no" >&6; }
13932 XRANDR_CFLAGS=""
13933 XRANDR_LIBS=""
13934 ## If we have a custom action on failure, don't print errors, but
13935 ## do set a variable so people can do so. Do it in a subshell
13936 ## to capture any diagnostics in invoking pkg-config.
13937 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
13938
13939 fi
13940
13941
13942
13943 else
13944 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13945 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13946 fi
13947 fi
13948
13949 if test $succeeded = yes; then
13950 HAVE_XRANDR=yes
13951 else
13952 HAVE_XRANDR=no
13953 fi
13954
13955 if test $HAVE_XRANDR = no; then
13956 # Test old way in case pkg-config doesn't have it (older machines).
13957 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
13958 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
13959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRQueryExtension in -lXrandr" >&5
13960 $as_echo_n "checking for XRRQueryExtension in -lXrandr... " >&6; }
13961 if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then :
13962 $as_echo_n "(cached) " >&6
13963 else
13964 ac_check_lib_save_LIBS=$LIBS
13965 LIBS="-lXrandr $LIBS"
13966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13967 /* end confdefs.h. */
13968
13969 /* Override any GCC internal prototype to avoid an error.
13970 Use char because int might match the return type of a GCC
13971 builtin and then its argument prototype would still apply. */
13972 #ifdef __cplusplus
13973 extern "C"
13974 #endif
13975 char XRRQueryExtension ();
13976 int
13977 main ()
13978 {
13979 return XRRQueryExtension ();
13980 ;
13981 return 0;
13982 }
13983 _ACEOF
13984 if ac_fn_c_try_link "$LINENO"; then :
13985 ac_cv_lib_Xrandr_XRRQueryExtension=yes
13986 else
13987 ac_cv_lib_Xrandr_XRRQueryExtension=no
13988 fi
13989 rm -f core conftest.err conftest.$ac_objext \
13990 conftest$ac_exeext conftest.$ac_ext
13991 LIBS=$ac_check_lib_save_LIBS
13992 fi
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5
13994 $as_echo "$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; }
13995 if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then :
13996 HAVE_XRANDR=yes
13997 fi
13998
13999 fi
14000
14001
14002 if test $HAVE_XRANDR = yes; then
14003 XRANDR_LIBS=-lXrandr
14004
14005 fi
14006 fi
14007 if test $HAVE_XRANDR = yes; then
14008 SAVE_CFLAGS="$CFLAGS"
14009 SAVE_LIBS="$LIBS"
14010 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14011 LIBS="$XRANDR_LIBS $LIBS"
14012 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14013 do :
14014 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14015 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14016 eval as_val=\$$as_ac_var
14017 if test "x$as_val" = x""yes; then :
14018 cat >>confdefs.h <<_ACEOF
14019 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14020 _ACEOF
14021
14022 fi
14023 done
14024
14025 CFLAGS="$SAVE_CFLAGS"
14026 LIBS="$SAVE_LIBS"
14027
14028
14029 $as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14030
14031 fi
14032 fi
14033
14034 ### Use Xinerama (-lXinerama) if available
14035 HAVE_XINERAMA=no
14036 if test "${HAVE_X11}" = "yes"; then
14037 XINERAMA_REQUIRED=1.0.2
14038 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14039
14040 succeeded=no
14041
14042 if test "$PKG_CONFIG" = "no" ; then
14043 HAVE_XINERAMA=no
14044 else
14045 PKG_CONFIG_MIN_VERSION=0.9.0
14046 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14048 $as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14049
14050 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14051 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14052 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14053 edit_cflags="
14054 s,///*,/,g
14055 s/^/ /
14056 s/ -I/ $isystem/g
14057 s/^ //
14058 "
14059 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14060 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14062 $as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14063 succeeded=yes
14064 else
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14066 $as_echo "no" >&6; }
14067 XINERAMA_CFLAGS=""
14068 XINERAMA_LIBS=""
14069 ## If we have a custom action on failure, don't print errors, but
14070 ## do set a variable so people can do so. Do it in a subshell
14071 ## to capture any diagnostics in invoking pkg-config.
14072 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14073
14074 fi
14075
14076
14077
14078 else
14079 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14080 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14081 fi
14082 fi
14083
14084 if test $succeeded = yes; then
14085 HAVE_XINERAMA=yes
14086 else
14087 HAVE_XINERAMA=no
14088 fi
14089
14090 if test $HAVE_XINERAMA = no; then
14091 # Test old way in case pkg-config doesn't have it (older machines).
14092 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14093 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14095 $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14096 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14097 $as_echo_n "(cached) " >&6
14098 else
14099 ac_check_lib_save_LIBS=$LIBS
14100 LIBS="-lXinerama $LIBS"
14101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14102 /* end confdefs.h. */
14103
14104 /* Override any GCC internal prototype to avoid an error.
14105 Use char because int might match the return type of a GCC
14106 builtin and then its argument prototype would still apply. */
14107 #ifdef __cplusplus
14108 extern "C"
14109 #endif
14110 char XineramaQueryExtension ();
14111 int
14112 main ()
14113 {
14114 return XineramaQueryExtension ();
14115 ;
14116 return 0;
14117 }
14118 _ACEOF
14119 if ac_fn_c_try_link "$LINENO"; then :
14120 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14121 else
14122 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14123 fi
14124 rm -f core conftest.err conftest.$ac_objext \
14125 conftest$ac_exeext conftest.$ac_ext
14126 LIBS=$ac_check_lib_save_LIBS
14127 fi
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14129 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14130 if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14131 HAVE_XINERAMA=yes
14132 fi
14133
14134 fi
14135
14136
14137 if test $HAVE_XINERAMA = yes; then
14138 XINERAMA_LIBS=-lXinerama
14139
14140 fi
14141 fi
14142 if test $HAVE_XINERAMA = yes; then
14143
14144 $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14145
14146 fi
14147 fi
14148
14149
14150 ### Use libxml (-lxml2) if available
14151 ### mingw32 doesn't use -lxml2, since it loads the library dynamically.
14152 HAVE_LIBXML2=no
14153 if test "${with_xml2}" != "no"; then
14154 ### I'm not sure what the version number should be, so I just guessed.
14155
14156 succeeded=no
14157
14158 if test "$PKG_CONFIG" = "no" ; then
14159 HAVE_LIBXML2=no
14160 else
14161 PKG_CONFIG_MIN_VERSION=0.9.0
14162 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14164 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
14165
14166 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14167 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14168 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
14169 edit_cflags="
14170 s,///*,/,g
14171 s/^/ /
14172 s/ -I/ $isystem/g
14173 s/^ //
14174 "
14175 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14176 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14178 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14179 succeeded=yes
14180 else
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14182 $as_echo "no" >&6; }
14183 LIBXML2_CFLAGS=""
14184 LIBXML2_LIBS=""
14185 ## If we have a custom action on failure, don't print errors, but
14186 ## do set a variable so people can do so. Do it in a subshell
14187 ## to capture any diagnostics in invoking pkg-config.
14188 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
14189
14190 fi
14191
14192
14193
14194 else
14195 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14196 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14197 fi
14198 fi
14199
14200 if test $succeeded = yes; then
14201 HAVE_LIBXML2=yes
14202 else
14203 HAVE_LIBXML2=no
14204 fi
14205
14206 if test "${HAVE_LIBXML2}" = "yes"; then
14207 if test "${opsys}" != "mingw32"; then
14208 LIBS="$LIBXML2_LIBS $LIBS"
14209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
14210 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14211 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
14212 $as_echo_n "(cached) " >&6
14213 else
14214 ac_check_lib_save_LIBS=$LIBS
14215 LIBS="-lxml2 $LIBS"
14216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217 /* end confdefs.h. */
14218
14219 /* Override any GCC internal prototype to avoid an error.
14220 Use char because int might match the return type of a GCC
14221 builtin and then its argument prototype would still apply. */
14222 #ifdef __cplusplus
14223 extern "C"
14224 #endif
14225 char htmlReadMemory ();
14226 int
14227 main ()
14228 {
14229 return htmlReadMemory ();
14230 ;
14231 return 0;
14232 }
14233 _ACEOF
14234 if ac_fn_c_try_link "$LINENO"; then :
14235 ac_cv_lib_xml2_htmlReadMemory=yes
14236 else
14237 ac_cv_lib_xml2_htmlReadMemory=no
14238 fi
14239 rm -f core conftest.err conftest.$ac_objext \
14240 conftest$ac_exeext conftest.$ac_ext
14241 LIBS=$ac_check_lib_save_LIBS
14242 fi
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14244 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14245 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14246 HAVE_LIBXML2=yes
14247 else
14248 HAVE_LIBXML2=no
14249 fi
14250
14251 else
14252 LIBXML2_LIBS=""
14253 fi
14254 if test "${HAVE_LIBXML2}" = "yes"; then
14255
14256 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
14257
14258 else
14259 LIBXML2_LIBS=""
14260 LIBXML2_CFLAGS=""
14261 fi
14262 fi
14263 fi
14264
14265
14266
14267 # If netdb.h doesn't declare h_errno, we must declare it by hand.
14268 # On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14269 if test "${opsys}" = "mingw32"; then
14270 emacs_cv_netdb_declares_h_errno=yes
14271 fi
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14273 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
14274 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14275 $as_echo_n "(cached) " >&6
14276 else
14277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14278 /* end confdefs.h. */
14279 #include <netdb.h>
14280 int
14281 main ()
14282 {
14283 return h_errno;
14284 ;
14285 return 0;
14286 }
14287 _ACEOF
14288 if ac_fn_c_try_link "$LINENO"; then :
14289 emacs_cv_netdb_declares_h_errno=yes
14290 else
14291 emacs_cv_netdb_declares_h_errno=no
14292 fi
14293 rm -f core conftest.err conftest.$ac_objext \
14294 conftest$ac_exeext conftest.$ac_ext
14295 fi
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14297 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14298 if test $emacs_cv_netdb_declares_h_errno = yes; then
14299
14300 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
14301
14302 fi
14303
14304 # sqrt and other floating-point functions such as fmod and frexp
14305 # are found in -lm on most systems, but mingw32 doesn't use -lm.
14306 if test "${opsys}" != "mingw32"; then
14307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
14308 $as_echo_n "checking for sqrt in -lm... " >&6; }
14309 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14310 $as_echo_n "(cached) " >&6
14311 else
14312 ac_check_lib_save_LIBS=$LIBS
14313 LIBS="-lm $LIBS"
14314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14315 /* end confdefs.h. */
14316
14317 /* Override any GCC internal prototype to avoid an error.
14318 Use char because int might match the return type of a GCC
14319 builtin and then its argument prototype would still apply. */
14320 #ifdef __cplusplus
14321 extern "C"
14322 #endif
14323 char sqrt ();
14324 int
14325 main ()
14326 {
14327 return sqrt ();
14328 ;
14329 return 0;
14330 }
14331 _ACEOF
14332 if ac_fn_c_try_link "$LINENO"; then :
14333 ac_cv_lib_m_sqrt=yes
14334 else
14335 ac_cv_lib_m_sqrt=no
14336 fi
14337 rm -f core conftest.err conftest.$ac_objext \
14338 conftest$ac_exeext conftest.$ac_ext
14339 LIBS=$ac_check_lib_save_LIBS
14340 fi
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14342 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
14343 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14344 cat >>confdefs.h <<_ACEOF
14345 #define HAVE_LIBM 1
14346 _ACEOF
14347
14348 LIBS="-lm $LIBS"
14349
14350 fi
14351
14352 fi
14353
14354 # Check for mail-locking functions in a "mail" library. Probably this should
14355 # have the same check as for liblockfile below.
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14357 $as_echo_n "checking for maillock in -lmail... " >&6; }
14358 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
14359 $as_echo_n "(cached) " >&6
14360 else
14361 ac_check_lib_save_LIBS=$LIBS
14362 LIBS="-lmail $LIBS"
14363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364 /* end confdefs.h. */
14365
14366 /* Override any GCC internal prototype to avoid an error.
14367 Use char because int might match the return type of a GCC
14368 builtin and then its argument prototype would still apply. */
14369 #ifdef __cplusplus
14370 extern "C"
14371 #endif
14372 char maillock ();
14373 int
14374 main ()
14375 {
14376 return maillock ();
14377 ;
14378 return 0;
14379 }
14380 _ACEOF
14381 if ac_fn_c_try_link "$LINENO"; then :
14382 ac_cv_lib_mail_maillock=yes
14383 else
14384 ac_cv_lib_mail_maillock=no
14385 fi
14386 rm -f core conftest.err conftest.$ac_objext \
14387 conftest$ac_exeext conftest.$ac_ext
14388 LIBS=$ac_check_lib_save_LIBS
14389 fi
14390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14391 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
14392 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14393 have_mail=yes
14394 else
14395 have_mail=no
14396 fi
14397
14398 if test $have_mail = yes; then
14399 LIBS_MAIL=-lmail
14400 LIBS="$LIBS_MAIL $LIBS"
14401
14402 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
14403
14404 else
14405 LIBS_MAIL=
14406 fi
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14408 $as_echo_n "checking for maillock in -llockfile... " >&6; }
14409 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
14410 $as_echo_n "(cached) " >&6
14411 else
14412 ac_check_lib_save_LIBS=$LIBS
14413 LIBS="-llockfile $LIBS"
14414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415 /* end confdefs.h. */
14416
14417 /* Override any GCC internal prototype to avoid an error.
14418 Use char because int might match the return type of a GCC
14419 builtin and then its argument prototype would still apply. */
14420 #ifdef __cplusplus
14421 extern "C"
14422 #endif
14423 char maillock ();
14424 int
14425 main ()
14426 {
14427 return maillock ();
14428 ;
14429 return 0;
14430 }
14431 _ACEOF
14432 if ac_fn_c_try_link "$LINENO"; then :
14433 ac_cv_lib_lockfile_maillock=yes
14434 else
14435 ac_cv_lib_lockfile_maillock=no
14436 fi
14437 rm -f core conftest.err conftest.$ac_objext \
14438 conftest$ac_exeext conftest.$ac_ext
14439 LIBS=$ac_check_lib_save_LIBS
14440 fi
14441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14442 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14443 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14444 have_lockfile=yes
14445 else
14446 have_lockfile=no
14447 fi
14448
14449 if test $have_lockfile = yes; then
14450 LIBS_MAIL=-llockfile
14451 LIBS="$LIBS_MAIL $LIBS"
14452
14453 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
14454
14455 else
14456 # If we have the shared liblockfile, assume we must use it for mail
14457 # locking (e.g. Debian). If we couldn't link against liblockfile
14458 # (no liblockfile.a installed), ensure that we don't need to.
14459 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14460 set dummy liblockfile.so; ac_word=$2
14461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14462 $as_echo_n "checking for $ac_word... " >&6; }
14463 if test "${ac_cv_prog_liblockfile+set}" = set; then :
14464 $as_echo_n "(cached) " >&6
14465 else
14466 if test -n "$liblockfile"; then
14467 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14468 else
14469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14470 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14471 for as_dir in $as_dummy
14472 do
14473 IFS=$as_save_IFS
14474 test -z "$as_dir" && as_dir=.
14475 for ac_exec_ext in '' $ac_executable_extensions; do
14476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14477 ac_cv_prog_liblockfile="yes"
14478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14479 break 2
14480 fi
14481 done
14482 done
14483 IFS=$as_save_IFS
14484
14485 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14486 fi
14487 fi
14488 liblockfile=$ac_cv_prog_liblockfile
14489 if test -n "$liblockfile"; then
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14491 $as_echo "$liblockfile" >&6; }
14492 else
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14494 $as_echo "no" >&6; }
14495 fi
14496
14497
14498 if test $ac_cv_prog_liblockfile = yes; then
14499 as_fn_error "Shared liblockfile found but can't link against it.
14500 This probably means that movemail could lose mail.
14501 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14502 fi
14503 fi
14504
14505
14506
14507
14508
14509 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14510 ## interlock access to the mail spool. The alternative is a lock file named
14511 ## /usr/spool/mail/$USER.lock.
14512 mail_lock=no
14513 case "$opsys" in
14514 aix4-2) mail_lock="lockf" ;;
14515
14516 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
14517
14518 ## On GNU/Linux systems, both methods are used by various mail programs.
14519 ## I assume most people are using newer mailers that have heard of flock.
14520 ## Change this if you need to.
14521 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14522 ## configure gets the right answers, and that means *NOT* using flock.
14523 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14524 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14525 ## Debian maintainer hasn't provided a clean fix for Emacs.
14526 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14527 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14528 ## correct logic. -- fx
14529 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14530 ## liblockfile is a Free Software replacement for libmail, used on
14531 ## Debian systems and elsewhere. -rfr.
14532 gnu-*)
14533 mail_lock="flock"
14534 if test $have_mail = yes || test $have_lockfile = yes; then
14535 test $ac_cv_header_maillock_h = yes && mail_lock=no
14536 fi
14537 ;;
14538
14539 mingw32)
14540 mail_lock="none-needed" ;;
14541 esac
14542
14543 BLESSMAIL_TARGET=
14544 case "$mail_lock" in
14545 flock)
14546 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14547 ;;
14548
14549 lockf)
14550 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14551 ;;
14552
14553 none-needed) ;;
14554
14555 *) BLESSMAIL_TARGET="need-blessmail" ;;
14556 esac
14557
14558
14559
14560 for ac_func in gethostname \
14561 getrusage get_current_dir_name \
14562 lrand48 \
14563 select getpagesize setlocale \
14564 utimes getrlimit setrlimit shutdown getaddrinfo \
14565 strsignal setitimer \
14566 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
14567 gai_strerror mkstemp getline getdelim sync \
14568 difftime posix_memalign \
14569 getpwent endpwent getgrent endgrent \
14570 touchlock \
14571 cfmakeraw cfsetspeed copysign __executable_start
14572 do :
14573 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14574 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14575 eval as_val=\$$as_ac_var
14576 if test "x$as_val" = x""yes; then :
14577 cat >>confdefs.h <<_ACEOF
14578 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14579 _ACEOF
14580
14581 fi
14582 done
14583
14584
14585 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
14586 ## has a broken `rint' in some library versions including math library
14587 ## version number A.09.05.
14588 ## You can fix the math library by installing patch number PHSS_4630.
14589 ## But we can fix it more reliably for Emacs by just not using rint.
14590 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
14591 case $opsys in
14592 hpux*) : ;;
14593 *) for ac_func in random rint
14594 do :
14595 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14596 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14597 eval as_val=\$$as_ac_var
14598 if test "x$as_val" = x""yes; then :
14599 cat >>confdefs.h <<_ACEOF
14600 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14601 _ACEOF
14602
14603 fi
14604 done
14605 ;;
14606 esac
14607
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14609 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
14610 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
14611 $as_echo_n "(cached) " >&6
14612 else
14613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14614 /* end confdefs.h. */
14615
14616 int
14617 main ()
14618 {
14619 __builtin_unwind_init ();
14620 ;
14621 return 0;
14622 }
14623 _ACEOF
14624 if ac_fn_c_try_link "$LINENO"; then :
14625 emacs_cv_func___builtin_unwind_init=yes
14626 else
14627 emacs_cv_func___builtin_unwind_init=no
14628 fi
14629 rm -f core conftest.err conftest.$ac_objext \
14630 conftest$ac_exeext conftest.$ac_ext
14631 fi
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14633 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14634 if test $emacs_cv_func___builtin_unwind_init = yes; then
14635
14636 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
14637
14638 fi
14639
14640
14641
14642
14643
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14645 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14646 if test "${ac_cv_sys_largefile_source+set}" = set; then :
14647 $as_echo_n "(cached) " >&6
14648 else
14649 while :; do
14650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14651 /* end confdefs.h. */
14652 #include <sys/types.h> /* for off_t */
14653 #include <stdio.h>
14654 int
14655 main ()
14656 {
14657 int (*fp) (FILE *, off_t, int) = fseeko;
14658 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14659 ;
14660 return 0;
14661 }
14662 _ACEOF
14663 if ac_fn_c_try_link "$LINENO"; then :
14664 ac_cv_sys_largefile_source=no; break
14665 fi
14666 rm -f core conftest.err conftest.$ac_objext \
14667 conftest$ac_exeext conftest.$ac_ext
14668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14669 /* end confdefs.h. */
14670 #define _LARGEFILE_SOURCE 1
14671 #include <sys/types.h> /* for off_t */
14672 #include <stdio.h>
14673 int
14674 main ()
14675 {
14676 int (*fp) (FILE *, off_t, int) = fseeko;
14677 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14678 ;
14679 return 0;
14680 }
14681 _ACEOF
14682 if ac_fn_c_try_link "$LINENO"; then :
14683 ac_cv_sys_largefile_source=1; break
14684 fi
14685 rm -f core conftest.err conftest.$ac_objext \
14686 conftest$ac_exeext conftest.$ac_ext
14687 ac_cv_sys_largefile_source=unknown
14688 break
14689 done
14690 fi
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14692 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14693 case $ac_cv_sys_largefile_source in #(
14694 no | unknown) ;;
14695 *)
14696 cat >>confdefs.h <<_ACEOF
14697 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14698 _ACEOF
14699 ;;
14700 esac
14701 rm -rf conftest*
14702
14703 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14704 # in glibc 2.1.3, but that breaks too many other things.
14705 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14706 if test $ac_cv_sys_largefile_source != unknown; then
14707
14708 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14709
14710 fi
14711
14712
14713 # UNIX98 PTYs.
14714 for ac_func in grantpt
14715 do :
14716 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14717 if test "x$ac_cv_func_grantpt" = x""yes; then :
14718 cat >>confdefs.h <<_ACEOF
14719 #define HAVE_GRANTPT 1
14720 _ACEOF
14721
14722 fi
14723 done
14724
14725
14726 # PTY-related GNU extensions.
14727 for ac_func in getpt posix_openpt
14728 do :
14729 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14730 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14731 eval as_val=\$$as_ac_var
14732 if test "x$as_val" = x""yes; then :
14733 cat >>confdefs.h <<_ACEOF
14734 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14735 _ACEOF
14736
14737 fi
14738 done
14739
14740
14741 # Check this now, so that we will NOT find the above functions in ncurses.
14742 # That is because we have not set up to link ncurses in lib-src.
14743 # It's better to believe a function is not available
14744 # than to expect to find it in ncurses.
14745 # Also we need tputs and friends to be able to build at all.
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
14747 $as_echo_n "checking for library containing tputs... " >&6; }
14748 # Run a test program that contains a call to tputs, a call that is
14749 # never executed. This tests whether a pre-'main' dynamic linker
14750 # works with the library. It's too much trouble to actually call
14751 # tputs in the test program, due to portability hassles. When
14752 # cross-compiling, assume the test program will run if it links.
14753
14754 if test "${opsys}" = "mingw32"; then
14755 msg='none required'
14756 else
14757 # Maybe curses should be tried earlier?
14758 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14759 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14760 OLIBS=$LIBS
14761 if test -z "$tputs_library"; then
14762 LIBS_TERMCAP=
14763 msg='none required'
14764 else
14765 LIBS_TERMCAP=-l$tputs_library
14766 msg=$LIBS_TERMCAP
14767 LIBS="$LIBS_TERMCAP $LIBS"
14768 fi
14769 if test "$cross_compiling" = yes; then :
14770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771 /* end confdefs.h. */
14772
14773 extern void tputs (const char *, int, int (*)(int));
14774 int main (int argc, char **argv)
14775 {
14776 if (argc == 10000)
14777 tputs (argv[0], 0, 0);
14778 return 0;
14779 }
14780
14781 _ACEOF
14782 if ac_fn_c_try_link "$LINENO"; then :
14783
14784 else
14785 msg=no
14786 fi
14787 rm -f core conftest.err conftest.$ac_objext \
14788 conftest$ac_exeext conftest.$ac_ext
14789 else
14790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791 /* end confdefs.h. */
14792
14793 extern void tputs (const char *, int, int (*)(int));
14794 int main (int argc, char **argv)
14795 {
14796 if (argc == 10000)
14797 tputs (argv[0], 0, 0);
14798 return 0;
14799 }
14800
14801 _ACEOF
14802 if ac_fn_c_try_run "$LINENO"; then :
14803
14804 else
14805 msg=no
14806 fi
14807 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14808 conftest.$ac_objext conftest.beam conftest.$ac_ext
14809 fi
14810
14811 LIBS=$OLIBS
14812 if test "X$msg" != Xno; then
14813 break
14814 fi
14815 done
14816 fi
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14818 $as_echo "$msg" >&6; }
14819 if test "X$msg" = Xno; then
14820 as_fn_error "The required function \`tputs' was not found in any library.
14821 The following libraries were tried (in order):
14822 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14823 Please try installing whichever of these libraries is most appropriate
14824 for your system, together with its header files.
14825 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
14826 fi
14827
14828 ## Use termcap instead of terminfo?
14829 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14830 TERMINFO=yes
14831 ## FIXME? In the cases below where we unconditionally set
14832 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14833 ## if that was found above to have tputs.
14834 ## Should we use the gnu* logic everywhere?
14835 case "$opsys" in
14836 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14837 ## The ncurses library has been moved out of the System framework in
14838 ## Mac OS X 10.2. So if configure detects it, set the command-line
14839 ## option to use it.
14840 darwin) LIBS_TERMCAP="-lncurses" ;;
14841
14842 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14843
14844 freebsd)
14845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14846 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14847 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
14848 $as_echo_n "(cached) " >&6
14849 else
14850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14851 /* end confdefs.h. */
14852 #include <osreldate.h>
14853 int
14854 main ()
14855 {
14856 #if __FreeBSD_version < 400000
14857 fail;
14858 #endif
14859
14860 ;
14861 return 0;
14862 }
14863 _ACEOF
14864 if ac_fn_c_try_link "$LINENO"; then :
14865 emacs_cv_freebsd_terminfo=yes
14866 else
14867 emacs_cv_freebsd_terminfo=no
14868 fi
14869 rm -f core conftest.err conftest.$ac_objext \
14870 conftest$ac_exeext conftest.$ac_ext
14871 fi
14872
14873
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14875 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14876
14877 if test $emacs_cv_freebsd_terminfo = yes; then
14878 LIBS_TERMCAP="-lncurses"
14879 else
14880 TERMINFO=no
14881 LIBS_TERMCAP="-ltermcap"
14882 fi
14883 ;;
14884
14885 mingw32)
14886 TERMINFO=no
14887 LIBS_TERMCAP=
14888 ;;
14889
14890 netbsd)
14891 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14892 TERMINFO=no
14893 LIBS_TERMCAP="-ltermcap"
14894 fi
14895 ;;
14896
14897 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
14898
14899 ## hpux: Make sure we get select from libc rather than from libcurses
14900 ## because libcurses on HPUX 10.10 has a broken version of select.
14901 ## We used to use -lc -lcurses, but this may be cleaner.
14902 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
14903 # set that way, now it uses the default). Isn't this a contradiction?
14904 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14905
14906 esac
14907
14908 TERMCAP_OBJ=tparam.o
14909 if test $TERMINFO = yes; then
14910
14911 $as_echo "#define TERMINFO 1" >>confdefs.h
14912
14913 TERMCAP_OBJ=terminfo.o
14914 fi
14915
14916
14917
14918
14919 # Do we have res_init, for detecting changes in /etc/resolv.conf?
14920 # On Darwin, res_init appears not to be useful: see bug#562 and
14921 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
14922 resolv=no
14923
14924 if test $opsys != darwin; then
14925
14926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14927 /* end confdefs.h. */
14928 #include <netinet/in.h>
14929 #include <arpa/nameser.h>
14930 #include <resolv.h>
14931 int
14932 main ()
14933 {
14934 return res_init();
14935 ;
14936 return 0;
14937 }
14938 _ACEOF
14939 if ac_fn_c_try_link "$LINENO"; then :
14940 have_res_init=yes
14941 else
14942 have_res_init=no
14943 fi
14944 rm -f core conftest.err conftest.$ac_objext \
14945 conftest$ac_exeext conftest.$ac_ext
14946 if test "$have_res_init" = no; then
14947 OLIBS="$LIBS"
14948 LIBS="$LIBS -lresolv"
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14950 $as_echo_n "checking for res_init with -lresolv... " >&6; }
14951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14952 /* end confdefs.h. */
14953 #include <netinet/in.h>
14954 #include <arpa/nameser.h>
14955 #include <resolv.h>
14956 int
14957 main ()
14958 {
14959 return res_init();
14960 ;
14961 return 0;
14962 }
14963 _ACEOF
14964 if ac_fn_c_try_link "$LINENO"; then :
14965 have_res_init=yes
14966 else
14967 have_res_init=no
14968 fi
14969 rm -f core conftest.err conftest.$ac_objext \
14970 conftest$ac_exeext conftest.$ac_ext
14971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14972 $as_echo "$have_res_init" >&6; }
14973 if test "$have_res_init" = yes ; then
14974 resolv=yes
14975 fi
14976 LIBS="$OLIBS"
14977 fi
14978
14979 if test "$have_res_init" = yes; then
14980
14981 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
14982
14983 fi
14984 fi
14985 # Do we need the Hesiod library to provide the support routines?
14986 LIBHESIOD=
14987 if test "$with_hesiod" != no ; then
14988 # Don't set $LIBS here -- see comments above. FIXME which comments?
14989 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14990 if test "x$ac_cv_func_res_send" = x""yes; then :
14991
14992 else
14993 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14994 if test "x$ac_cv_func___res_send" = x""yes; then :
14995
14996 else
14997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14998 $as_echo_n "checking for res_send in -lresolv... " >&6; }
14999 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
15000 $as_echo_n "(cached) " >&6
15001 else
15002 ac_check_lib_save_LIBS=$LIBS
15003 LIBS="-lresolv $LIBS"
15004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005 /* end confdefs.h. */
15006
15007 /* Override any GCC internal prototype to avoid an error.
15008 Use char because int might match the return type of a GCC
15009 builtin and then its argument prototype would still apply. */
15010 #ifdef __cplusplus
15011 extern "C"
15012 #endif
15013 char res_send ();
15014 int
15015 main ()
15016 {
15017 return res_send ();
15018 ;
15019 return 0;
15020 }
15021 _ACEOF
15022 if ac_fn_c_try_link "$LINENO"; then :
15023 ac_cv_lib_resolv_res_send=yes
15024 else
15025 ac_cv_lib_resolv_res_send=no
15026 fi
15027 rm -f core conftest.err conftest.$ac_objext \
15028 conftest$ac_exeext conftest.$ac_ext
15029 LIBS=$ac_check_lib_save_LIBS
15030 fi
15031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15032 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15033 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15034 resolv=yes
15035 else
15036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15037 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
15038 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
15039 $as_echo_n "(cached) " >&6
15040 else
15041 ac_check_lib_save_LIBS=$LIBS
15042 LIBS="-lresolv $LIBS"
15043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15044 /* end confdefs.h. */
15045
15046 /* Override any GCC internal prototype to avoid an error.
15047 Use char because int might match the return type of a GCC
15048 builtin and then its argument prototype would still apply. */
15049 #ifdef __cplusplus
15050 extern "C"
15051 #endif
15052 char __res_send ();
15053 int
15054 main ()
15055 {
15056 return __res_send ();
15057 ;
15058 return 0;
15059 }
15060 _ACEOF
15061 if ac_fn_c_try_link "$LINENO"; then :
15062 ac_cv_lib_resolv___res_send=yes
15063 else
15064 ac_cv_lib_resolv___res_send=no
15065 fi
15066 rm -f core conftest.err conftest.$ac_objext \
15067 conftest$ac_exeext conftest.$ac_ext
15068 LIBS=$ac_check_lib_save_LIBS
15069 fi
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15071 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15072 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15073 resolv=yes
15074 fi
15075
15076 fi
15077
15078 fi
15079
15080 fi
15081
15082 if test "$resolv" = yes ; then
15083 RESOLVLIB=-lresolv
15084 else
15085 RESOLVLIB=
15086 fi
15087 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15088 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15089
15090 else
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15092 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15093 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15094 $as_echo_n "(cached) " >&6
15095 else
15096 ac_check_lib_save_LIBS=$LIBS
15097 LIBS="-lhesiod $RESOLVLIB $LIBS"
15098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15099 /* end confdefs.h. */
15100
15101 /* Override any GCC internal prototype to avoid an error.
15102 Use char because int might match the return type of a GCC
15103 builtin and then its argument prototype would still apply. */
15104 #ifdef __cplusplus
15105 extern "C"
15106 #endif
15107 char hes_getmailhost ();
15108 int
15109 main ()
15110 {
15111 return hes_getmailhost ();
15112 ;
15113 return 0;
15114 }
15115 _ACEOF
15116 if ac_fn_c_try_link "$LINENO"; then :
15117 ac_cv_lib_hesiod_hes_getmailhost=yes
15118 else
15119 ac_cv_lib_hesiod_hes_getmailhost=no
15120 fi
15121 rm -f core conftest.err conftest.$ac_objext \
15122 conftest$ac_exeext conftest.$ac_ext
15123 LIBS=$ac_check_lib_save_LIBS
15124 fi
15125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15126 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15127 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15128 hesiod=yes
15129 else
15130 :
15131 fi
15132
15133 fi
15134
15135
15136 if test x"$hesiod" = xyes; then
15137
15138 $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
15139
15140 LIBHESIOD=-lhesiod
15141 fi
15142 fi
15143
15144
15145 # Do we need libresolv (due to res_init or Hesiod)?
15146 if test "$resolv" = yes && test $opsys != darwin; then
15147
15148 $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
15149
15150 LIBRESOLV=-lresolv
15151 else
15152 LIBRESOLV=
15153 fi
15154
15155
15156 # These tell us which Kerberos-related libraries to use.
15157 COM_ERRLIB=
15158 CRYPTOLIB=
15159 KRB5LIB=
15160 DESLIB=
15161 KRB4LIB=
15162
15163 if test "${with_kerberos}" != no; then
15164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15165 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
15166 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15167 $as_echo_n "(cached) " >&6
15168 else
15169 ac_check_lib_save_LIBS=$LIBS
15170 LIBS="-lcom_err $LIBS"
15171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15172 /* end confdefs.h. */
15173
15174 /* Override any GCC internal prototype to avoid an error.
15175 Use char because int might match the return type of a GCC
15176 builtin and then its argument prototype would still apply. */
15177 #ifdef __cplusplus
15178 extern "C"
15179 #endif
15180 char com_err ();
15181 int
15182 main ()
15183 {
15184 return com_err ();
15185 ;
15186 return 0;
15187 }
15188 _ACEOF
15189 if ac_fn_c_try_link "$LINENO"; then :
15190 ac_cv_lib_com_err_com_err=yes
15191 else
15192 ac_cv_lib_com_err_com_err=no
15193 fi
15194 rm -f core conftest.err conftest.$ac_objext \
15195 conftest$ac_exeext conftest.$ac_ext
15196 LIBS=$ac_check_lib_save_LIBS
15197 fi
15198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15199 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15200 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15201 have_com_err=yes
15202 else
15203 have_com_err=no
15204 fi
15205
15206 if test $have_com_err = yes; then
15207 COM_ERRLIB=-lcom_err
15208 LIBS="$COM_ERRLIB $LIBS"
15209
15210 $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
15211
15212 fi
15213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15214 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15215 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15216 $as_echo_n "(cached) " >&6
15217 else
15218 ac_check_lib_save_LIBS=$LIBS
15219 LIBS="-lcrypto $LIBS"
15220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15221 /* end confdefs.h. */
15222
15223 /* Override any GCC internal prototype to avoid an error.
15224 Use char because int might match the return type of a GCC
15225 builtin and then its argument prototype would still apply. */
15226 #ifdef __cplusplus
15227 extern "C"
15228 #endif
15229 char mit_des_cbc_encrypt ();
15230 int
15231 main ()
15232 {
15233 return mit_des_cbc_encrypt ();
15234 ;
15235 return 0;
15236 }
15237 _ACEOF
15238 if ac_fn_c_try_link "$LINENO"; then :
15239 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15240 else
15241 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15242 fi
15243 rm -f core conftest.err conftest.$ac_objext \
15244 conftest$ac_exeext conftest.$ac_ext
15245 LIBS=$ac_check_lib_save_LIBS
15246 fi
15247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15248 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15249 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15250 have_crypto=yes
15251 else
15252 have_crypto=no
15253 fi
15254
15255 if test $have_crypto = yes; then
15256 CRYPTOLIB=-lcrypto
15257 LIBS="$CRYPTOLIB $LIBS"
15258
15259 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
15260
15261 fi
15262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15263 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15264 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15265 $as_echo_n "(cached) " >&6
15266 else
15267 ac_check_lib_save_LIBS=$LIBS
15268 LIBS="-lk5crypto $LIBS"
15269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15270 /* end confdefs.h. */
15271
15272 /* Override any GCC internal prototype to avoid an error.
15273 Use char because int might match the return type of a GCC
15274 builtin and then its argument prototype would still apply. */
15275 #ifdef __cplusplus
15276 extern "C"
15277 #endif
15278 char mit_des_cbc_encrypt ();
15279 int
15280 main ()
15281 {
15282 return mit_des_cbc_encrypt ();
15283 ;
15284 return 0;
15285 }
15286 _ACEOF
15287 if ac_fn_c_try_link "$LINENO"; then :
15288 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15289 else
15290 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15291 fi
15292 rm -f core conftest.err conftest.$ac_objext \
15293 conftest$ac_exeext conftest.$ac_ext
15294 LIBS=$ac_check_lib_save_LIBS
15295 fi
15296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15297 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15298 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15299 have_k5crypto=yes
15300 else
15301 have_k5crypto=no
15302 fi
15303
15304 if test $have_k5crypto = yes; then
15305 CRYPTOLIB=-lk5crypto
15306 LIBS="$CRYPTOLIB $LIBS"
15307
15308 $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
15309
15310 fi
15311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15312 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15313 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15314 $as_echo_n "(cached) " >&6
15315 else
15316 ac_check_lib_save_LIBS=$LIBS
15317 LIBS="-lkrb5 $LIBS"
15318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15319 /* end confdefs.h. */
15320
15321 /* Override any GCC internal prototype to avoid an error.
15322 Use char because int might match the return type of a GCC
15323 builtin and then its argument prototype would still apply. */
15324 #ifdef __cplusplus
15325 extern "C"
15326 #endif
15327 char krb5_init_context ();
15328 int
15329 main ()
15330 {
15331 return krb5_init_context ();
15332 ;
15333 return 0;
15334 }
15335 _ACEOF
15336 if ac_fn_c_try_link "$LINENO"; then :
15337 ac_cv_lib_krb5_krb5_init_context=yes
15338 else
15339 ac_cv_lib_krb5_krb5_init_context=no
15340 fi
15341 rm -f core conftest.err conftest.$ac_objext \
15342 conftest$ac_exeext conftest.$ac_ext
15343 LIBS=$ac_check_lib_save_LIBS
15344 fi
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15346 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15347 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15348 have_krb5=yes
15349 else
15350 have_krb5=no
15351 fi
15352
15353 if test $have_krb5=yes; then
15354 KRB5LIB=-lkrb5
15355 LIBS="$KRB5LIB $LIBS"
15356
15357 $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
15358
15359 fi
15360 if test "${with_kerberos5}" = no; then
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15362 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15363 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
15364 $as_echo_n "(cached) " >&6
15365 else
15366 ac_check_lib_save_LIBS=$LIBS
15367 LIBS="-ldes425 $LIBS"
15368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h. */
15370
15371 /* Override any GCC internal prototype to avoid an error.
15372 Use char because int might match the return type of a GCC
15373 builtin and then its argument prototype would still apply. */
15374 #ifdef __cplusplus
15375 extern "C"
15376 #endif
15377 char des_cbc_encrypt ();
15378 int
15379 main ()
15380 {
15381 return des_cbc_encrypt ();
15382 ;
15383 return 0;
15384 }
15385 _ACEOF
15386 if ac_fn_c_try_link "$LINENO"; then :
15387 ac_cv_lib_des425_des_cbc_encrypt=yes
15388 else
15389 ac_cv_lib_des425_des_cbc_encrypt=no
15390 fi
15391 rm -f core conftest.err conftest.$ac_objext \
15392 conftest$ac_exeext conftest.$ac_ext
15393 LIBS=$ac_check_lib_save_LIBS
15394 fi
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15396 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15397 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15398 have_des425=yes
15399 else
15400 have_des425=no
15401 fi
15402
15403 if test $have_des425 = yes; then
15404 DESLIB=-ldes425
15405 LIBS="$DESLIB $LIBS"
15406
15407 $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
15408
15409 else
15410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15411 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15412 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15413 $as_echo_n "(cached) " >&6
15414 else
15415 ac_check_lib_save_LIBS=$LIBS
15416 LIBS="-ldes $LIBS"
15417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15418 /* end confdefs.h. */
15419
15420 /* Override any GCC internal prototype to avoid an error.
15421 Use char because int might match the return type of a GCC
15422 builtin and then its argument prototype would still apply. */
15423 #ifdef __cplusplus
15424 extern "C"
15425 #endif
15426 char des_cbc_encrypt ();
15427 int
15428 main ()
15429 {
15430 return des_cbc_encrypt ();
15431 ;
15432 return 0;
15433 }
15434 _ACEOF
15435 if ac_fn_c_try_link "$LINENO"; then :
15436 ac_cv_lib_des_des_cbc_encrypt=yes
15437 else
15438 ac_cv_lib_des_des_cbc_encrypt=no
15439 fi
15440 rm -f core conftest.err conftest.$ac_objext \
15441 conftest$ac_exeext conftest.$ac_ext
15442 LIBS=$ac_check_lib_save_LIBS
15443 fi
15444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15445 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15446 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15447 have_des=yes
15448 else
15449 have_des=no
15450 fi
15451
15452 if test $have_des = yes; then
15453 DESLIB=-ldes
15454 LIBS="$DESLIB $LIBS"
15455
15456 $as_echo "#define HAVE_LIBDES 1" >>confdefs.h
15457
15458 fi
15459 fi
15460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15461 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15462 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
15463 $as_echo_n "(cached) " >&6
15464 else
15465 ac_check_lib_save_LIBS=$LIBS
15466 LIBS="-lkrb4 $LIBS"
15467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15468 /* end confdefs.h. */
15469
15470 /* Override any GCC internal prototype to avoid an error.
15471 Use char because int might match the return type of a GCC
15472 builtin and then its argument prototype would still apply. */
15473 #ifdef __cplusplus
15474 extern "C"
15475 #endif
15476 char krb_get_cred ();
15477 int
15478 main ()
15479 {
15480 return krb_get_cred ();
15481 ;
15482 return 0;
15483 }
15484 _ACEOF
15485 if ac_fn_c_try_link "$LINENO"; then :
15486 ac_cv_lib_krb4_krb_get_cred=yes
15487 else
15488 ac_cv_lib_krb4_krb_get_cred=no
15489 fi
15490 rm -f core conftest.err conftest.$ac_objext \
15491 conftest$ac_exeext conftest.$ac_ext
15492 LIBS=$ac_check_lib_save_LIBS
15493 fi
15494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15495 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15496 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15497 have_krb4=yes
15498 else
15499 have_krb4=no
15500 fi
15501
15502 if test $have_krb4 = yes; then
15503 KRB4LIB=-lkrb4
15504 LIBS="$KRB4LIB $LIBS"
15505
15506 $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
15507
15508 else
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15510 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15511 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15512 $as_echo_n "(cached) " >&6
15513 else
15514 ac_check_lib_save_LIBS=$LIBS
15515 LIBS="-lkrb $LIBS"
15516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15517 /* end confdefs.h. */
15518
15519 /* Override any GCC internal prototype to avoid an error.
15520 Use char because int might match the return type of a GCC
15521 builtin and then its argument prototype would still apply. */
15522 #ifdef __cplusplus
15523 extern "C"
15524 #endif
15525 char krb_get_cred ();
15526 int
15527 main ()
15528 {
15529 return krb_get_cred ();
15530 ;
15531 return 0;
15532 }
15533 _ACEOF
15534 if ac_fn_c_try_link "$LINENO"; then :
15535 ac_cv_lib_krb_krb_get_cred=yes
15536 else
15537 ac_cv_lib_krb_krb_get_cred=no
15538 fi
15539 rm -f core conftest.err conftest.$ac_objext \
15540 conftest$ac_exeext conftest.$ac_ext
15541 LIBS=$ac_check_lib_save_LIBS
15542 fi
15543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15544 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15545 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15546 have_krb=yes
15547 else
15548 have_krb=no
15549 fi
15550
15551 if test $have_krb = yes; then
15552 KRB4LIB=-lkrb
15553 LIBS="$KRB4LIB $LIBS"
15554
15555 $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
15556
15557 fi
15558 fi
15559 fi
15560
15561 if test "${with_kerberos5}" != no; then
15562 for ac_header in krb5.h
15563 do :
15564 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15565 if test "x$ac_cv_header_krb5_h" = x""yes; then :
15566 cat >>confdefs.h <<_ACEOF
15567 #define HAVE_KRB5_H 1
15568 _ACEOF
15569 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15570 "
15571 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15572
15573 cat >>confdefs.h <<_ACEOF
15574 #define HAVE_KRB5_ERROR_TEXT 1
15575 _ACEOF
15576
15577
15578 fi
15579 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15580 "
15581 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
15582
15583 cat >>confdefs.h <<_ACEOF
15584 #define HAVE_KRB5_ERROR_E_TEXT 1
15585 _ACEOF
15586
15587
15588 fi
15589
15590 fi
15591
15592 done
15593
15594 else
15595 for ac_header in des.h
15596 do :
15597 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
15598 if test "x$ac_cv_header_des_h" = x""yes; then :
15599 cat >>confdefs.h <<_ACEOF
15600 #define HAVE_DES_H 1
15601 _ACEOF
15602
15603 else
15604 for ac_header in kerberosIV/des.h
15605 do :
15606 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
15607 if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
15608 cat >>confdefs.h <<_ACEOF
15609 #define HAVE_KERBEROSIV_DES_H 1
15610 _ACEOF
15611
15612 else
15613 for ac_header in kerberos/des.h
15614 do :
15615 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
15616 if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
15617 cat >>confdefs.h <<_ACEOF
15618 #define HAVE_KERBEROS_DES_H 1
15619 _ACEOF
15620
15621 fi
15622
15623 done
15624
15625 fi
15626
15627 done
15628
15629 fi
15630
15631 done
15632
15633 for ac_header in krb.h
15634 do :
15635 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15636 if test "x$ac_cv_header_krb_h" = x""yes; then :
15637 cat >>confdefs.h <<_ACEOF
15638 #define HAVE_KRB_H 1
15639 _ACEOF
15640
15641 else
15642 for ac_header in kerberosIV/krb.h
15643 do :
15644 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15645 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15646 cat >>confdefs.h <<_ACEOF
15647 #define HAVE_KERBEROSIV_KRB_H 1
15648 _ACEOF
15649
15650 else
15651 for ac_header in kerberos/krb.h
15652 do :
15653 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15654 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15655 cat >>confdefs.h <<_ACEOF
15656 #define HAVE_KERBEROS_KRB_H 1
15657 _ACEOF
15658
15659 fi
15660
15661 done
15662
15663 fi
15664
15665 done
15666
15667 fi
15668
15669 done
15670
15671 fi
15672 for ac_header in com_err.h
15673 do :
15674 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15675 if test "x$ac_cv_header_com_err_h" = x""yes; then :
15676 cat >>confdefs.h <<_ACEOF
15677 #define HAVE_COM_ERR_H 1
15678 _ACEOF
15679
15680 fi
15681
15682 done
15683
15684 fi
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695 for ac_func in $ac_func_list
15696 do :
15697 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15698 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15699 eval as_val=\$$as_ac_var
15700 if test "x$as_val" = x""yes; then :
15701 cat >>confdefs.h <<_ACEOF
15702 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15703 _ACEOF
15704
15705 fi
15706 done
15707
15708
15709
15710
15711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15712 $as_echo_n "checking whether localtime caches TZ... " >&6; }
15713 if test "${emacs_cv_localtime_cache+set}" = set; then :
15714 $as_echo_n "(cached) " >&6
15715 else
15716 if test x$ac_cv_func_tzset = xyes; then
15717 if test "$cross_compiling" = yes; then :
15718 # If we have tzset, assume the worst when cross-compiling.
15719 emacs_cv_localtime_cache=yes
15720 else
15721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15722 /* end confdefs.h. */
15723 #include <time.h>
15724 char TZ_GMT0[] = "TZ=GMT0";
15725 char TZ_PST8[] = "TZ=PST8";
15726 main()
15727 {
15728 time_t now = time ((time_t *) 0);
15729 int hour_GMT0, hour_unset;
15730 if (putenv (TZ_GMT0) != 0)
15731 exit (1);
15732 hour_GMT0 = localtime (&now)->tm_hour;
15733 unsetenv("TZ");
15734 hour_unset = localtime (&now)->tm_hour;
15735 if (putenv (TZ_PST8) != 0)
15736 exit (1);
15737 if (localtime (&now)->tm_hour == hour_GMT0)
15738 exit (1);
15739 unsetenv("TZ");
15740 if (localtime (&now)->tm_hour != hour_unset)
15741 exit (1);
15742 exit (0);
15743 }
15744 _ACEOF
15745 if ac_fn_c_try_run "$LINENO"; then :
15746 emacs_cv_localtime_cache=no
15747 else
15748 emacs_cv_localtime_cache=yes
15749 fi
15750 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15751 conftest.$ac_objext conftest.beam conftest.$ac_ext
15752 fi
15753
15754 else
15755 # If we lack tzset, report that localtime does not cache TZ,
15756 # since we can't invalidate the cache if we don't have tzset.
15757 emacs_cv_localtime_cache=no
15758 fi
15759 fi
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15761 $as_echo "$emacs_cv_localtime_cache" >&6; }
15762 if test $emacs_cv_localtime_cache = yes; then
15763
15764 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
15765
15766 fi
15767
15768 ok_so_far=yes
15769 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15770 if test "x$ac_cv_func_socket" = x""yes; then :
15771
15772 else
15773 ok_so_far=no
15774 fi
15775
15776 if test $ok_so_far = yes; then
15777 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15778 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
15779
15780 else
15781 ok_so_far=no
15782 fi
15783
15784
15785 fi
15786 if test $ok_so_far = yes; then
15787 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15788 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
15789
15790 else
15791 ok_so_far=no
15792 fi
15793
15794
15795 fi
15796 if test $ok_so_far = yes; then
15797
15798 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
15799
15800 fi
15801
15802 if test -f /usr/lpp/X11/bin/smt.exp; then
15803
15804 $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
15805
15806 fi
15807
15808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15809 $as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15810 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15812 $as_echo "yes" >&6; }
15813
15814 $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
15815
15816 else
15817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15818 $as_echo "no" >&6; }
15819 fi
15820
15821 case $canonical in
15822 *-solaris2.4 | *-solaris2.4.*)
15823 : ${ac_cv_func_vfork_works=no};;
15824 esac
15825
15826 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15827 if test "x$ac_cv_type_pid_t" = x""yes; then :
15828
15829 else
15830
15831 cat >>confdefs.h <<_ACEOF
15832 #define pid_t int
15833 _ACEOF
15834
15835 fi
15836
15837 for ac_header in vfork.h
15838 do :
15839 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15840 if test "x$ac_cv_header_vfork_h" = x""yes; then :
15841 cat >>confdefs.h <<_ACEOF
15842 #define HAVE_VFORK_H 1
15843 _ACEOF
15844
15845 fi
15846
15847 done
15848
15849 for ac_func in fork vfork
15850 do :
15851 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15852 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15853 eval as_val=\$$as_ac_var
15854 if test "x$as_val" = x""yes; then :
15855 cat >>confdefs.h <<_ACEOF
15856 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15857 _ACEOF
15858
15859 fi
15860 done
15861
15862 if test "x$ac_cv_func_fork" = xyes; then
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15864 $as_echo_n "checking for working fork... " >&6; }
15865 if test "${ac_cv_func_fork_works+set}" = set; then :
15866 $as_echo_n "(cached) " >&6
15867 else
15868 if test "$cross_compiling" = yes; then :
15869 ac_cv_func_fork_works=cross
15870 else
15871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15872 /* end confdefs.h. */
15873 $ac_includes_default
15874 int
15875 main ()
15876 {
15877
15878 /* By Ruediger Kuhlmann. */
15879 return fork () < 0;
15880
15881 ;
15882 return 0;
15883 }
15884 _ACEOF
15885 if ac_fn_c_try_run "$LINENO"; then :
15886 ac_cv_func_fork_works=yes
15887 else
15888 ac_cv_func_fork_works=no
15889 fi
15890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15891 conftest.$ac_objext conftest.beam conftest.$ac_ext
15892 fi
15893
15894 fi
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15896 $as_echo "$ac_cv_func_fork_works" >&6; }
15897
15898 else
15899 ac_cv_func_fork_works=$ac_cv_func_fork
15900 fi
15901 if test "x$ac_cv_func_fork_works" = xcross; then
15902 case $host in
15903 *-*-amigaos* | *-*-msdosdjgpp*)
15904 # Override, as these systems have only a dummy fork() stub
15905 ac_cv_func_fork_works=no
15906 ;;
15907 *)
15908 ac_cv_func_fork_works=yes
15909 ;;
15910 esac
15911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15912 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15913 fi
15914 ac_cv_func_vfork_works=$ac_cv_func_vfork
15915 if test "x$ac_cv_func_vfork" = xyes; then
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15917 $as_echo_n "checking for working vfork... " >&6; }
15918 if test "${ac_cv_func_vfork_works+set}" = set; then :
15919 $as_echo_n "(cached) " >&6
15920 else
15921 if test "$cross_compiling" = yes; then :
15922 ac_cv_func_vfork_works=cross
15923 else
15924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15925 /* end confdefs.h. */
15926 /* Thanks to Paul Eggert for this test. */
15927 $ac_includes_default
15928 #include <sys/wait.h>
15929 #ifdef HAVE_VFORK_H
15930 # include <vfork.h>
15931 #endif
15932 /* On some sparc systems, changes by the child to local and incoming
15933 argument registers are propagated back to the parent. The compiler
15934 is told about this with #include <vfork.h>, but some compilers
15935 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15936 static variable whose address is put into a register that is
15937 clobbered by the vfork. */
15938 static void
15939 #ifdef __cplusplus
15940 sparc_address_test (int arg)
15941 # else
15942 sparc_address_test (arg) int arg;
15943 #endif
15944 {
15945 static pid_t child;
15946 if (!child) {
15947 child = vfork ();
15948 if (child < 0) {
15949 perror ("vfork");
15950 _exit(2);
15951 }
15952 if (!child) {
15953 arg = getpid();
15954 write(-1, "", 0);
15955 _exit (arg);
15956 }
15957 }
15958 }
15959
15960 int
15961 main ()
15962 {
15963 pid_t parent = getpid ();
15964 pid_t child;
15965
15966 sparc_address_test (0);
15967
15968 child = vfork ();
15969
15970 if (child == 0) {
15971 /* Here is another test for sparc vfork register problems. This
15972 test uses lots of local variables, at least as many local
15973 variables as main has allocated so far including compiler
15974 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15975 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15976 reuse the register of parent for one of the local variables,
15977 since it will think that parent can't possibly be used any more
15978 in this routine. Assigning to the local variable will thus
15979 munge parent in the parent process. */
15980 pid_t
15981 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15982 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15983 /* Convince the compiler that p..p7 are live; otherwise, it might
15984 use the same hardware register for all 8 local variables. */
15985 if (p != p1 || p != p2 || p != p3 || p != p4
15986 || p != p5 || p != p6 || p != p7)
15987 _exit(1);
15988
15989 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15990 from child file descriptors. If the child closes a descriptor
15991 before it execs or exits, this munges the parent's descriptor
15992 as well. Test for this by closing stdout in the child. */
15993 _exit(close(fileno(stdout)) != 0);
15994 } else {
15995 int status;
15996 struct stat st;
15997
15998 while (wait(&status) != child)
15999 ;
16000 return (
16001 /* Was there some problem with vforking? */
16002 child < 0
16003
16004 /* Did the child fail? (This shouldn't happen.) */
16005 || status
16006
16007 /* Did the vfork/compiler bug occur? */
16008 || parent != getpid()
16009
16010 /* Did the file descriptor bug occur? */
16011 || fstat(fileno(stdout), &st) != 0
16012 );
16013 }
16014 }
16015 _ACEOF
16016 if ac_fn_c_try_run "$LINENO"; then :
16017 ac_cv_func_vfork_works=yes
16018 else
16019 ac_cv_func_vfork_works=no
16020 fi
16021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16022 conftest.$ac_objext conftest.beam conftest.$ac_ext
16023 fi
16024
16025 fi
16026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16027 $as_echo "$ac_cv_func_vfork_works" >&6; }
16028
16029 fi;
16030 if test "x$ac_cv_func_fork_works" = xcross; then
16031 ac_cv_func_vfork_works=$ac_cv_func_vfork
16032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16033 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16034 fi
16035
16036 if test "x$ac_cv_func_vfork_works" = xyes; then
16037
16038 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
16039
16040 else
16041
16042 $as_echo "#define vfork fork" >>confdefs.h
16043
16044 fi
16045 if test "x$ac_cv_func_fork_works" = xyes; then
16046
16047 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
16048
16049 fi
16050
16051
16052 for ac_func in snprintf
16053 do :
16054 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16055 if test "x$ac_cv_func_snprintf" = x""yes; then :
16056 cat >>confdefs.h <<_ACEOF
16057 #define HAVE_SNPRINTF 1
16058 _ACEOF
16059
16060 fi
16061 done
16062
16063
16064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16065 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16066 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16067 $as_echo_n "(cached) " >&6
16068 else
16069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16070 /* end confdefs.h. */
16071 #include <langinfo.h>
16072 int
16073 main ()
16074 {
16075 char* cs = nl_langinfo(CODESET);
16076 ;
16077 return 0;
16078 }
16079 _ACEOF
16080 if ac_fn_c_try_link "$LINENO"; then :
16081 emacs_cv_langinfo_codeset=yes
16082 else
16083 emacs_cv_langinfo_codeset=no
16084 fi
16085 rm -f core conftest.err conftest.$ac_objext \
16086 conftest$ac_exeext conftest.$ac_ext
16087
16088 fi
16089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16090 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
16091 if test $emacs_cv_langinfo_codeset = yes; then
16092
16093 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16094
16095 fi
16096
16097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16098 $as_echo_n "checking for mbstate_t... " >&6; }
16099 if test "${ac_cv_type_mbstate_t+set}" = set; then :
16100 $as_echo_n "(cached) " >&6
16101 else
16102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16103 /* end confdefs.h. */
16104 $ac_includes_default
16105 # include <wchar.h>
16106 int
16107 main ()
16108 {
16109 mbstate_t x; return sizeof x;
16110 ;
16111 return 0;
16112 }
16113 _ACEOF
16114 if ac_fn_c_try_compile "$LINENO"; then :
16115 ac_cv_type_mbstate_t=yes
16116 else
16117 ac_cv_type_mbstate_t=no
16118 fi
16119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16120 fi
16121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16122 $as_echo "$ac_cv_type_mbstate_t" >&6; }
16123 if test $ac_cv_type_mbstate_t = yes; then
16124
16125 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
16126
16127 else
16128
16129 $as_echo "#define mbstate_t int" >>confdefs.h
16130
16131 fi
16132
16133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16134 $as_echo_n "checking for C restricted array declarations... " >&6; }
16135 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16136 $as_echo_n "(cached) " >&6
16137 else
16138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16139 /* end confdefs.h. */
16140 void fred (int x[__restrict]);
16141 int
16142 main ()
16143 {
16144
16145 ;
16146 return 0;
16147 }
16148 _ACEOF
16149 if ac_fn_c_try_compile "$LINENO"; then :
16150 emacs_cv_c_restrict_arr=yes
16151 else
16152 emacs_cv_c_restrict_arr=no
16153 fi
16154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16155 fi
16156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16157 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
16158 if test "$emacs_cv_c_restrict_arr" = yes; then
16159
16160 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
16161
16162 fi
16163
16164
16165 if test "${opsys}" != "mingw32"; then
16166
16167 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16168
16169 fi
16170
16171
16172 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
16173
16174
16175 ## Note: PTYs are broken on darwin <6. Use at your own risk.
16176 if test "${opsys}" != "mingw32"; then
16177
16178 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
16179
16180 fi
16181
16182
16183 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
16184
16185
16186
16187
16188
16189 if test "${opsys}" = "mingw32"; then
16190 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16191
16192 else
16193 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16194
16195 fi
16196
16197
16198 if test "${opsys}" = "mingw32"; then
16199 $as_echo "#define SEPCHAR ';'" >>confdefs.h
16200
16201 else
16202 $as_echo "#define SEPCHAR ':'" >>confdefs.h
16203
16204 fi
16205
16206
16207 $as_echo "#define subprocesses 1" >>confdefs.h
16208
16209
16210
16211 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16212
16213
16214
16215
16216 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16217
16218
16219
16220 if test "${opsys}" = "mingw32"; then
16221 $as_echo "#define DEVICE_SEP ':'" >>confdefs.h
16222
16223
16224 $as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == DEVICE_SEP)" >>confdefs.h
16225
16226
16227
16228 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16229
16230
16231
16232 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16233
16234 else
16235
16236 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16237
16238
16239
16240 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16241
16242
16243
16244 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16245
16246 fi
16247
16248
16249
16250 case $opsys in
16251 aix4-2)
16252 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16253 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16254
16255 fi
16256 ;;
16257
16258 hpux*)
16259 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16260
16261 ;;
16262 esac
16263
16264
16265 case $opsys in
16266 irix6-5 | sol2* | unixware )
16267
16268 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
16269
16270 ;;
16271 esac
16272
16273 emacs_broken_SIGIO=no
16274
16275 case $opsys in
16276 hpux* | irix6-5 | openbsd | sol2* | unixware )
16277 emacs_broken_SIGIO=yes
16278 ;;
16279
16280 aix4-2)
16281
16282 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
16283
16284 ;;
16285
16286 freebsd)
16287
16288 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
16289
16290 ;;
16291 esac
16292
16293 case $opsys in
16294 gnu-* | sol2-10 )
16295
16296 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
16297
16298 ;;
16299 esac
16300
16301 case $opsys in
16302 darwin | dragonfly | freebsd | netbsd | openbsd )
16303
16304 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
16305
16306 ;;
16307 esac
16308
16309 case $opsys in
16310 netbsd | openbsd) sound_device="/dev/audio" ;;
16311 *) sound_device="/dev/dsp" ;;
16312 esac
16313
16314
16315 cat >>confdefs.h <<_ACEOF
16316 #define DEFAULT_SOUND_DEVICE "$sound_device"
16317 _ACEOF
16318
16319
16320
16321 case $opsys in
16322 darwin | gnu-linux | gnu-kfreebsd )
16323
16324 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
16325
16326 ;;
16327 esac
16328
16329
16330 case $opsys in
16331 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
16332
16333 $as_echo "#define NARROWPROTO 1" >>confdefs.h
16334
16335 ;;
16336 esac
16337
16338
16339
16340
16341
16342
16343
16344
16345 case $opsys in
16346 aix4-2 )
16347 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
16348
16349 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
16350
16351 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
16352
16353 ;;
16354
16355 cygwin )
16356 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16357
16358 $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
16359
16360 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16361
16362 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16363
16364 ;;
16365
16366 darwin )
16367 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16368
16369 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16370
16371 $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
16372
16373 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16374
16375 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16376
16377 ;;
16378
16379 gnu | openbsd )
16380 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16381
16382 ;;
16383
16384 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
16385 if test "x$ac_cv_func_grantpt" = xyes; then
16386
16387 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
16388
16389 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16390
16391 $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
16392
16393 if test "x$ac_cv_func_posix_openpt" = xyes; then
16394 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
16395
16396 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16397
16398 elif test "x$ac_cv_func_getpt" = xyes; then
16399 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
16400
16401 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16402
16403 else
16404 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16405
16406 fi
16407 else
16408 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16409
16410 fi
16411 ;;
16412
16413 hpux*)
16414 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16415
16416 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
16417
16418 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
16419
16420 ;;
16421
16422 irix6-5 )
16423 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
16424
16425 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
16426
16427 $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
16428
16429 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16430
16431 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16432
16433 ;;
16434
16435 sol2* )
16436 $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
16437
16438 ;;
16439
16440 unixware )
16441 $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
16442
16443 ;;
16444 esac
16445
16446
16447 case $opsys in
16448 sol2* | unixware )
16449 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16450
16451 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16452
16453
16454 $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
16455
16456 ;;
16457 esac
16458
16459
16460
16461
16462 case $opsys in
16463 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
16464 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16465
16466 ;;
16467
16468 gnu-linux | gnu-kfreebsd )
16469
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16471 $as_echo_n "checking for signals via characters... " >&6; }
16472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473 /* end confdefs.h. */
16474
16475 #include <linux/version.h>
16476 #if LINUX_VERSION_CODE < 0x20400
16477 # error "Linux version too old"
16478 #endif
16479
16480 int
16481 main ()
16482 {
16483
16484 ;
16485 return 0;
16486 }
16487 _ACEOF
16488 if ac_fn_c_try_cpp "$LINENO"; then :
16489 emacs_signals_via_chars=yes
16490 else
16491 emacs_signals_via_chars=no
16492 fi
16493 rm -f conftest.err conftest.$ac_ext
16494
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16496 $as_echo "$emacs_signals_via_chars" >&6; }
16497 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16498
16499 ;;
16500 esac
16501
16502
16503
16504
16505 case $opsys in
16506 aix*)
16507 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
16508
16509 ;;
16510 hpux*)
16511 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
16512
16513 ;;
16514 irix6-5)
16515 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
16516
16517 ;;
16518 esac
16519
16520
16521
16522
16523 case $opsys in
16524 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16525 ;;
16526
16527 gnu | dragonfly | freebsd | netbsd | openbsd )
16528
16529 $as_echo "#define TABDLY OXTABS" >>confdefs.h
16530
16531 $as_echo "#define TAB3 OXTABS" >>confdefs.h
16532
16533 ;;
16534
16535 gnu-linux | gnu-kfreebsd )
16536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16537 /* end confdefs.h. */
16538
16539 #ifndef __ia64__
16540 # error "not ia64"
16541 #endif
16542
16543 int
16544 main ()
16545 {
16546
16547 ;
16548 return 0;
16549 }
16550 _ACEOF
16551 if ac_fn_c_try_cpp "$LINENO"; then :
16552
16553 $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
16554
16555 fi
16556 rm -f conftest.err conftest.$ac_ext
16557 ;;
16558
16559 hpux*)
16560
16561 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
16562
16563 ;;
16564 esac
16565
16566
16567
16568
16569
16570 case $opsys in
16571 gnu-linux | gnu-kfreebsd )
16572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573 /* end confdefs.h. */
16574
16575 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16576 || defined __alpha__ || defined __mips__ || defined __s390__ \
16577 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16578 || defined __ia64__ || defined __sh__
16579 /* ok */
16580 #else
16581 # error "setjmp not known to work on this arch"
16582 #endif
16583
16584 int
16585 main ()
16586 {
16587
16588 ;
16589 return 0;
16590 }
16591 _ACEOF
16592 if ac_fn_c_try_cpp "$LINENO"; then :
16593 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16594
16595 fi
16596 rm -f conftest.err conftest.$ac_ext
16597 ;;
16598 esac
16599
16600
16601 if test x$GCC = xyes; then
16602 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16603
16604 else
16605 case $opsys in
16606 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
16607 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16608
16609 ;;
16610 esac
16611 fi
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
16613 $as_echo_n "checking for _setjmp... " >&6; }
16614 if test "${emacs_cv_func__setjmp+set}" = set; then :
16615 $as_echo_n "(cached) " >&6
16616 else
16617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16618 /* end confdefs.h. */
16619 #include <setjmp.h>
16620 #ifdef __MINGW32__
16621 # define _longjmp longjmp
16622 #endif
16623
16624 int
16625 main ()
16626 {
16627 jmp_buf j;
16628 if (! _setjmp (j))
16629 _longjmp (j, 1);
16630 ;
16631 return 0;
16632 }
16633 _ACEOF
16634 if ac_fn_c_try_link "$LINENO"; then :
16635 emacs_cv_func__setjmp=yes
16636 else
16637 emacs_cv_func__setjmp=no
16638 fi
16639 rm -f core conftest.err conftest.$ac_objext \
16640 conftest$ac_exeext conftest.$ac_ext
16641 fi
16642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
16643 $as_echo "$emacs_cv_func__setjmp" >&6; }
16644 if test $emacs_cv_func__setjmp = yes; then
16645
16646 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
16647
16648 else
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
16650 $as_echo_n "checking for sigsetjmp... " >&6; }
16651 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
16652 $as_echo_n "(cached) " >&6
16653 else
16654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16655 /* end confdefs.h. */
16656 #include <setjmp.h>
16657
16658 int
16659 main ()
16660 {
16661 sigjmp_buf j;
16662 if (! sigsetjmp (j, 1))
16663 siglongjmp (j, 1);
16664 ;
16665 return 0;
16666 }
16667 _ACEOF
16668 if ac_fn_c_try_link "$LINENO"; then :
16669 emacs_cv_func_sigsetjmp=yes
16670 else
16671 emacs_cv_func_sigsetjmp=no
16672 fi
16673 rm -f core conftest.err conftest.$ac_objext \
16674 conftest$ac_exeext conftest.$ac_ext
16675 fi
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
16677 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
16678 if test $emacs_cv_func_sigsetjmp = yes; then
16679
16680 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
16681
16682 fi
16683 fi
16684
16685 case $opsys in
16686 sol2* | unixware )
16687
16688 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
16689
16690 ;;
16691 esac
16692
16693
16694 case $opsys in
16695 hpux* | sol2* )
16696
16697 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
16698
16699 ;;
16700 esac
16701
16702
16703
16704
16705
16706
16707
16708
16709 case $opsys in
16710 aix4-2)
16711 $as_echo "#define USG /**/" >>confdefs.h
16712
16713 $as_echo "#define USG5 /**/" >>confdefs.h
16714
16715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16716 /* end confdefs.h. */
16717
16718 #ifndef _AIX
16719 # error "_AIX not defined"
16720 #endif
16721
16722 int
16723 main ()
16724 {
16725
16726 ;
16727 return 0;
16728 }
16729 _ACEOF
16730 if ac_fn_c_try_cpp "$LINENO"; then :
16731
16732 else
16733
16734 $as_echo "#define _AIX /**/" >>confdefs.h
16735
16736 fi
16737 rm -f conftest.err conftest.$ac_ext
16738 ;;
16739
16740 cygwin)
16741
16742 $as_echo "#define CYGWIN 1" >>confdefs.h
16743
16744 ;;
16745
16746 darwin)
16747
16748 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
16749
16750 ;;
16751
16752 gnu-linux | gnu-kfreebsd )
16753 $as_echo "#define USG /**/" >>confdefs.h
16754
16755
16756 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
16757
16758 ;;
16759
16760 hpux*)
16761 $as_echo "#define USG /**/" >>confdefs.h
16762
16763 $as_echo "#define USG5 /**/" >>confdefs.h
16764
16765
16766 $as_echo "#define HPUX /**/" >>confdefs.h
16767
16768 ;;
16769
16770 irix6-5)
16771 $as_echo "#define USG /**/" >>confdefs.h
16772
16773 $as_echo "#define USG5 /**/" >>confdefs.h
16774
16775 $as_echo "#define USG5_4 /**/" >>confdefs.h
16776
16777
16778 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
16779
16780 ;;
16781
16782 mingw32)
16783 $as_echo "#define DOS_NT /**/" >>confdefs.h
16784
16785
16786 $as_echo "#define WINDOWSNT 1" >>confdefs.h
16787
16788 if test "x$ac_enable_checking" != "x" ; then
16789
16790 $as_echo "#define EMACSDEBUG 1" >>confdefs.h
16791
16792 fi
16793 ;;
16794
16795 sol2*)
16796 $as_echo "#define USG /**/" >>confdefs.h
16797
16798 $as_echo "#define USG5 /**/" >>confdefs.h
16799
16800 $as_echo "#define USG5_4 /**/" >>confdefs.h
16801
16802
16803 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
16804
16805 ;;
16806
16807 unixware)
16808 $as_echo "#define USG /**/" >>confdefs.h
16809
16810 $as_echo "#define USG5 /**/" >>confdefs.h
16811
16812 $as_echo "#define USG5_4 /**/" >>confdefs.h
16813
16814 ;;
16815 esac
16816
16817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16818 $as_echo_n "checking for usable FIONREAD... " >&6; }
16819 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16820 $as_echo_n "(cached) " >&6
16821 else
16822 case $opsys in
16823 aix4-2)
16824 emacs_cv_usable_FIONREAD=no
16825 ;;
16826
16827 mingw32)
16828 emacs_cv_usable_FIONREAD=yes
16829 ;;
16830
16831 *)
16832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16833 /* end confdefs.h. */
16834 #include <sys/types.h>
16835 #include <sys/ioctl.h>
16836 #ifdef USG5_4
16837 # include <sys/filio.h>
16838 #endif
16839
16840 int
16841 main ()
16842 {
16843 int foo = ioctl (0, FIONREAD, &foo);
16844 ;
16845 return 0;
16846 }
16847 _ACEOF
16848 if ac_fn_c_try_compile "$LINENO"; then :
16849 emacs_cv_usable_FIONREAD=yes
16850 else
16851 emacs_cv_usable_FIONREAD=no
16852 fi
16853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16854 ;;
16855 esac
16856 fi
16857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16858 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16859 if test $emacs_cv_usable_FIONREAD = yes; then
16860
16861 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16862
16863
16864 if test $emacs_broken_SIGIO = no; then
16865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16866 $as_echo_n "checking for usable SIGIO... " >&6; }
16867 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16868 $as_echo_n "(cached) " >&6
16869 else
16870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16871 /* end confdefs.h. */
16872 #include <fcntl.h>
16873 #include <signal.h>
16874
16875 int
16876 main ()
16877 {
16878 int foo = SIGIO | F_SETFL | FASYNC;
16879 ;
16880 return 0;
16881 }
16882 _ACEOF
16883 if ac_fn_c_try_compile "$LINENO"; then :
16884 emacs_cv_usable_SIGIO=yes
16885 else
16886 emacs_cv_usable_SIGIO=no
16887 fi
16888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16889 fi
16890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16891 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
16892 if test $emacs_cv_usable_SIGIO = yes; then
16893
16894 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16895
16896 fi
16897 fi
16898 fi
16899
16900
16901 case $opsys in
16902 cygwin)
16903
16904 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
16905
16906 ;;
16907
16908 hpux11)
16909
16910 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
16911
16912 ;;
16913
16914 irix6-5)
16915
16916 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
16917
16918 ;;
16919
16920 sol2-10)
16921
16922 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
16923
16924 ;;
16925 esac
16926
16927 # Set up the CFLAGS for real compilation, so we can substitute it.
16928 CFLAGS="$REAL_CFLAGS"
16929 CPPFLAGS="$REAL_CPPFLAGS"
16930
16931 ## Hack to detect a buggy GCC version.
16932 if test "x$GCC" = xyes \
16933 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16934 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16935 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16936 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16937 fi
16938
16939 version=$PACKAGE_VERSION
16940
16941 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
16942
16943 cat >>confdefs.h <<_ACEOF
16944 #define COPYRIGHT "$copyright"
16945 _ACEOF
16946
16947
16948
16949 ### Specify what sort of things we'll be editing into Makefile and config.h.
16950 ### Use configuration here uncanonicalized to avoid exceeding size limits.
16951
16952
16953 ## Unused?
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16977 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16978 ## end of LIBX_BASE, but nothing ever set it.
16979
16980
16981
16982
16983 ## Used in lwlib/Makefile.in.
16984
16985
16986
16987
16988
16989
16990
16991
16992 if test -n "${term_header}"; then
16993
16994 cat >>confdefs.h <<_ACEOF
16995 #define TERM_HEADER "${term_header}"
16996 _ACEOF
16997
16998 fi
16999
17000
17001 cat >>confdefs.h <<_ACEOF
17002 #define EMACS_CONFIGURATION "${canonical}"
17003 _ACEOF
17004
17005 emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
17006
17007 cat >>confdefs.h <<_ACEOF
17008 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
17009 _ACEOF
17010
17011
17012
17013 case $opsys in
17014 mingw32)
17015 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17016
17017 ;;
17018 esac
17019
17020 XMENU_OBJ=
17021 XOBJ=
17022 FONT_OBJ=
17023 if test "${HAVE_X_WINDOWS}" = "yes" ; then
17024
17025 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
17026
17027 XMENU_OBJ=xmenu.o
17028 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
17029 FONT_OBJ=xfont.o
17030 if test "$HAVE_XFT" = "yes"; then
17031 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17032 elif test "$HAVE_FREETYPE" = "yes"; then
17033 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17034 fi
17035
17036 fi
17037
17038
17039
17040
17041 WIDGET_OBJ=
17042 MOTIF_LIBW=
17043 if test "${USE_X_TOOLKIT}" != "none" ; then
17044 WIDGET_OBJ=widget.o
17045
17046 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17047
17048 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17049
17050 $as_echo "#define USE_LUCID 1" >>confdefs.h
17051
17052 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
17053
17054 $as_echo "#define USE_MOTIF 1" >>confdefs.h
17055
17056 MOTIF_LIBW=-lXm
17057 case "$opsys" in
17058 gnu-linux)
17059 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17060 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17061 ;;
17062
17063 unixware)
17064 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17065 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17066 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17067 ;;
17068
17069 aix4-2)
17070 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17071 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17072 ;;
17073 esac
17074 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17075 fi
17076 fi
17077
17078
17079 TOOLKIT_LIBW=
17080 case "$USE_X_TOOLKIT" in
17081 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17082 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17083 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17084 esac
17085
17086
17087 if test "${opsys}" != "mingw32"; then
17088 if test "$USE_X_TOOLKIT" = "none"; then
17089 LIBXT_OTHER="\$(LIBXSM)"
17090 OLDXMENU_TARGET="really-oldXMenu"
17091 else
17092 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17093 OLDXMENU_TARGET="really-lwlib"
17094 fi
17095 fi
17096
17097
17098 ## The X Menu stuff is present in the X10 distribution, but missing
17099 ## from X11. If we have X10, just use the installed library;
17100 ## otherwise, use our own copy.
17101 if test "${HAVE_X11}" = "yes" ; then
17102
17103 $as_echo "#define HAVE_X11 1" >>confdefs.h
17104
17105
17106 if test "$USE_X_TOOLKIT" = "none"; then
17107 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17108 else
17109 OLDXMENU="\${lwlibdir}/liblw.a"
17110 fi
17111 LIBXMENU="\$(OLDXMENU)"
17112 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17113 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
17114 else
17115 ## For a syntactically valid Makefile; not actually used for anything.
17116 ## See comments in src/Makefile.in.
17117 OLDXMENU=nothing
17118 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17119 if test "${HAVE_X_WINDOWS}" = "yes"; then
17120 LIBXMENU="-lXMenu"
17121 else
17122 LIBXMENU=
17123 fi
17124 LIBX_OTHER=
17125 OLDXMENU_DEPS=
17126 fi
17127
17128 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17129 OLDXMENU_TARGET=
17130 OLDXMENU=nothing
17131 LIBXMENU=
17132 OLDXMENU_DEPS=
17133 fi
17134
17135
17136
17137
17138
17139
17140
17141 if test "${HAVE_MENUS}" = "yes" ; then
17142
17143 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
17144
17145 fi
17146
17147 if test "${GNU_MALLOC}" = "yes" ; then
17148
17149 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
17150
17151 fi
17152
17153 RALLOC_OBJ=
17154 if test "${REL_ALLOC}" = "yes" ; then
17155
17156 $as_echo "#define REL_ALLOC 1" >>confdefs.h
17157
17158
17159 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17160 fi
17161
17162
17163 if test "$opsys" = "cygwin"; then
17164 CYGWIN_OBJ="sheap.o cygw32.o"
17165 ## Cygwin differs because of its unexec().
17166 PRE_ALLOC_OBJ=
17167 POST_ALLOC_OBJ=lastfile.o
17168 elif test "$opsys" = "mingw32"; then
17169 CYGWIN_OBJ=
17170 PRE_ALLOC_OBJ=
17171 POST_ALLOC_OBJ=lastfile.o
17172 else
17173 CYGWIN_OBJ=
17174 PRE_ALLOC_OBJ=lastfile.o
17175 POST_ALLOC_OBJ=
17176 fi
17177
17178
17179
17180
17181 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17182 # it temporarily reverts them to their pre-pkg-config values,
17183 # because gnulib needs to work with both src (which uses the
17184 # pkg-config stuff) and lib-src (which does not). For example, gnulib
17185 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17186 # and it therefore needs to run in an environment where LIBS does not
17187 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17188 # for some package unrelated to lib-src.
17189 SAVE_CFLAGS=$CFLAGS
17190 SAVE_LIBS=$LIBS
17191 CFLAGS=$pre_PKG_CONFIG_CFLAGS
17192 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204 LIBC_FATAL_STDERR_=1
17205 export LIBC_FATAL_STDERR_
17206
17207 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17208 # for constant arguments. Useless!
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17210 $as_echo_n "checking for working alloca.h... " >&6; }
17211 if test "${ac_cv_working_alloca_h+set}" = set; then :
17212 $as_echo_n "(cached) " >&6
17213 else
17214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17215 /* end confdefs.h. */
17216 #include <alloca.h>
17217 int
17218 main ()
17219 {
17220 char *p = (char *) alloca (2 * sizeof (int));
17221 if (p) return 0;
17222 ;
17223 return 0;
17224 }
17225 _ACEOF
17226 if ac_fn_c_try_link "$LINENO"; then :
17227 ac_cv_working_alloca_h=yes
17228 else
17229 ac_cv_working_alloca_h=no
17230 fi
17231 rm -f core conftest.err conftest.$ac_objext \
17232 conftest$ac_exeext conftest.$ac_ext
17233 fi
17234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17235 $as_echo "$ac_cv_working_alloca_h" >&6; }
17236 if test $ac_cv_working_alloca_h = yes; then
17237
17238 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
17239
17240 fi
17241
17242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17243 $as_echo_n "checking for alloca... " >&6; }
17244 if test "${ac_cv_func_alloca_works+set}" = set; then :
17245 $as_echo_n "(cached) " >&6
17246 else
17247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17248 /* end confdefs.h. */
17249 #ifdef __GNUC__
17250 # define alloca __builtin_alloca
17251 #else
17252 # ifdef _MSC_VER
17253 # include <malloc.h>
17254 # define alloca _alloca
17255 # else
17256 # ifdef HAVE_ALLOCA_H
17257 # include <alloca.h>
17258 # else
17259 # ifdef _AIX
17260 #pragma alloca
17261 # else
17262 # ifndef alloca /* predefined by HP cc +Olibcalls */
17263 char *alloca ();
17264 # endif
17265 # endif
17266 # endif
17267 # endif
17268 #endif
17269
17270 int
17271 main ()
17272 {
17273 char *p = (char *) alloca (1);
17274 if (p) return 0;
17275 ;
17276 return 0;
17277 }
17278 _ACEOF
17279 if ac_fn_c_try_link "$LINENO"; then :
17280 ac_cv_func_alloca_works=yes
17281 else
17282 ac_cv_func_alloca_works=no
17283 fi
17284 rm -f core conftest.err conftest.$ac_objext \
17285 conftest$ac_exeext conftest.$ac_ext
17286 fi
17287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17288 $as_echo "$ac_cv_func_alloca_works" >&6; }
17289
17290 if test $ac_cv_func_alloca_works = yes; then
17291
17292 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17293
17294 else
17295 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17296 # that cause trouble. Some versions do not even contain alloca or
17297 # contain a buggy version. If you still want to use their alloca,
17298 # use ar to extract alloca.o from them instead of compiling alloca.c.
17299
17300
17301
17302
17303
17304 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
17305
17306 $as_echo "#define C_ALLOCA 1" >>confdefs.h
17307
17308
17309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17310 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17311 if test "${ac_cv_os_cray+set}" = set; then :
17312 $as_echo_n "(cached) " >&6
17313 else
17314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17315 /* end confdefs.h. */
17316 #if defined CRAY && ! defined CRAY2
17317 webecray
17318 #else
17319 wenotbecray
17320 #endif
17321
17322 _ACEOF
17323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17324 $EGREP "webecray" >/dev/null 2>&1; then :
17325 ac_cv_os_cray=yes
17326 else
17327 ac_cv_os_cray=no
17328 fi
17329 rm -f conftest*
17330
17331 fi
17332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17333 $as_echo "$ac_cv_os_cray" >&6; }
17334 if test $ac_cv_os_cray = yes; then
17335 for ac_func in _getb67 GETB67 getb67; do
17336 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17337 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17338 eval as_val=\$$as_ac_var
17339 if test "x$as_val" = x""yes; then :
17340
17341 cat >>confdefs.h <<_ACEOF
17342 #define CRAY_STACKSEG_END $ac_func
17343 _ACEOF
17344
17345 break
17346 fi
17347
17348 done
17349 fi
17350
17351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17352 $as_echo_n "checking stack direction for C alloca... " >&6; }
17353 if test "${ac_cv_c_stack_direction+set}" = set; then :
17354 $as_echo_n "(cached) " >&6
17355 else
17356 if test "$cross_compiling" = yes; then :
17357 ac_cv_c_stack_direction=0
17358 else
17359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17360 /* end confdefs.h. */
17361 $ac_includes_default
17362 int
17363 find_stack_direction (int *addr, int depth)
17364 {
17365 int dir, dummy = 0;
17366 if (! addr)
17367 addr = &dummy;
17368 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17369 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17370 return dir + dummy;
17371 }
17372
17373 int
17374 main (int argc, char **argv)
17375 {
17376 return find_stack_direction (0, argc + !argv + 20) < 0;
17377 }
17378 _ACEOF
17379 if ac_fn_c_try_run "$LINENO"; then :
17380 ac_cv_c_stack_direction=1
17381 else
17382 ac_cv_c_stack_direction=-1
17383 fi
17384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17385 conftest.$ac_objext conftest.beam conftest.$ac_ext
17386 fi
17387
17388 fi
17389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17390 $as_echo "$ac_cv_c_stack_direction" >&6; }
17391 cat >>confdefs.h <<_ACEOF
17392 #define STACK_DIRECTION $ac_cv_c_stack_direction
17393 _ACEOF
17394
17395
17396 fi
17397
17398
17399
17400
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17402 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17403 if test "${ac_cv_c_bigendian+set}" = set; then :
17404 $as_echo_n "(cached) " >&6
17405 else
17406 ac_cv_c_bigendian=unknown
17407 # See if we're dealing with a universal compiler.
17408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17409 /* end confdefs.h. */
17410 #ifndef __APPLE_CC__
17411 not a universal capable compiler
17412 #endif
17413 typedef int dummy;
17414
17415 _ACEOF
17416 if ac_fn_c_try_compile "$LINENO"; then :
17417
17418 # Check for potential -arch flags. It is not universal unless
17419 # there are at least two -arch flags with different values.
17420 ac_arch=
17421 ac_prev=
17422 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17423 if test -n "$ac_prev"; then
17424 case $ac_word in
17425 i?86 | x86_64 | ppc | ppc64)
17426 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17427 ac_arch=$ac_word
17428 else
17429 ac_cv_c_bigendian=universal
17430 break
17431 fi
17432 ;;
17433 esac
17434 ac_prev=
17435 elif test "x$ac_word" = "x-arch"; then
17436 ac_prev=arch
17437 fi
17438 done
17439 fi
17440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17441 if test $ac_cv_c_bigendian = unknown; then
17442 # See if sys/param.h defines the BYTE_ORDER macro.
17443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17444 /* end confdefs.h. */
17445 #include <sys/types.h>
17446 #include <sys/param.h>
17447
17448 int
17449 main ()
17450 {
17451 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17452 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17453 && LITTLE_ENDIAN)
17454 bogus endian macros
17455 #endif
17456
17457 ;
17458 return 0;
17459 }
17460 _ACEOF
17461 if ac_fn_c_try_compile "$LINENO"; then :
17462 # It does; now see whether it defined to BIG_ENDIAN or not.
17463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17464 /* end confdefs.h. */
17465 #include <sys/types.h>
17466 #include <sys/param.h>
17467
17468 int
17469 main ()
17470 {
17471 #if BYTE_ORDER != BIG_ENDIAN
17472 not big endian
17473 #endif
17474
17475 ;
17476 return 0;
17477 }
17478 _ACEOF
17479 if ac_fn_c_try_compile "$LINENO"; then :
17480 ac_cv_c_bigendian=yes
17481 else
17482 ac_cv_c_bigendian=no
17483 fi
17484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17485 fi
17486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17487 fi
17488 if test $ac_cv_c_bigendian = unknown; then
17489 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17491 /* end confdefs.h. */
17492 #include <limits.h>
17493
17494 int
17495 main ()
17496 {
17497 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17498 bogus endian macros
17499 #endif
17500
17501 ;
17502 return 0;
17503 }
17504 _ACEOF
17505 if ac_fn_c_try_compile "$LINENO"; then :
17506 # It does; now see whether it defined to _BIG_ENDIAN or not.
17507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17508 /* end confdefs.h. */
17509 #include <limits.h>
17510
17511 int
17512 main ()
17513 {
17514 #ifndef _BIG_ENDIAN
17515 not big endian
17516 #endif
17517
17518 ;
17519 return 0;
17520 }
17521 _ACEOF
17522 if ac_fn_c_try_compile "$LINENO"; then :
17523 ac_cv_c_bigendian=yes
17524 else
17525 ac_cv_c_bigendian=no
17526 fi
17527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17528 fi
17529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17530 fi
17531 if test $ac_cv_c_bigendian = unknown; then
17532 # Compile a test program.
17533 if test "$cross_compiling" = yes; then :
17534 # Try to guess by grepping values from an object file.
17535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17536 /* end confdefs.h. */
17537 short int ascii_mm[] =
17538 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17539 short int ascii_ii[] =
17540 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17541 int use_ascii (int i) {
17542 return ascii_mm[i] + ascii_ii[i];
17543 }
17544 short int ebcdic_ii[] =
17545 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17546 short int ebcdic_mm[] =
17547 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17548 int use_ebcdic (int i) {
17549 return ebcdic_mm[i] + ebcdic_ii[i];
17550 }
17551 extern int foo;
17552
17553 int
17554 main ()
17555 {
17556 return use_ascii (foo) == use_ebcdic (foo);
17557 ;
17558 return 0;
17559 }
17560 _ACEOF
17561 if ac_fn_c_try_compile "$LINENO"; then :
17562 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17563 ac_cv_c_bigendian=yes
17564 fi
17565 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17566 if test "$ac_cv_c_bigendian" = unknown; then
17567 ac_cv_c_bigendian=no
17568 else
17569 # finding both strings is unlikely to happen, but who knows?
17570 ac_cv_c_bigendian=unknown
17571 fi
17572 fi
17573 fi
17574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17575 else
17576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17577 /* end confdefs.h. */
17578 $ac_includes_default
17579 int
17580 main ()
17581 {
17582
17583 /* Are we little or big endian? From Harbison&Steele. */
17584 union
17585 {
17586 long int l;
17587 char c[sizeof (long int)];
17588 } u;
17589 u.l = 1;
17590 return u.c[sizeof (long int) - 1] == 1;
17591
17592 ;
17593 return 0;
17594 }
17595 _ACEOF
17596 if ac_fn_c_try_run "$LINENO"; then :
17597 ac_cv_c_bigendian=no
17598 else
17599 ac_cv_c_bigendian=yes
17600 fi
17601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17602 conftest.$ac_objext conftest.beam conftest.$ac_ext
17603 fi
17604
17605 fi
17606 fi
17607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17608 $as_echo "$ac_cv_c_bigendian" >&6; }
17609 case $ac_cv_c_bigendian in #(
17610 yes)
17611 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17612 ;; #(
17613 no)
17614 ;; #(
17615 universal)
17616
17617 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
17618
17619 ;; #(
17620 *)
17621 as_fn_error "unknown endianness
17622 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17623 esac
17624
17625
17626
17627 GNULIB_CHDIR=0;
17628 GNULIB_CHOWN=0;
17629 GNULIB_CLOSE=0;
17630 GNULIB_DUP=0;
17631 GNULIB_DUP2=0;
17632 GNULIB_DUP3=0;
17633 GNULIB_ENVIRON=0;
17634 GNULIB_EUIDACCESS=0;
17635 GNULIB_FACCESSAT=0;
17636 GNULIB_FCHDIR=0;
17637 GNULIB_FCHOWNAT=0;
17638 GNULIB_FDATASYNC=0;
17639 GNULIB_FSYNC=0;
17640 GNULIB_FTRUNCATE=0;
17641 GNULIB_GETCWD=0;
17642 GNULIB_GETDOMAINNAME=0;
17643 GNULIB_GETDTABLESIZE=0;
17644 GNULIB_GETGROUPS=0;
17645 GNULIB_GETHOSTNAME=0;
17646 GNULIB_GETLOGIN=0;
17647 GNULIB_GETLOGIN_R=0;
17648 GNULIB_GETPAGESIZE=0;
17649 GNULIB_GETUSERSHELL=0;
17650 GNULIB_GROUP_MEMBER=0;
17651 GNULIB_ISATTY=0;
17652 GNULIB_LCHOWN=0;
17653 GNULIB_LINK=0;
17654 GNULIB_LINKAT=0;
17655 GNULIB_LSEEK=0;
17656 GNULIB_PIPE=0;
17657 GNULIB_PIPE2=0;
17658 GNULIB_PREAD=0;
17659 GNULIB_PWRITE=0;
17660 GNULIB_READ=0;
17661 GNULIB_READLINK=0;
17662 GNULIB_READLINKAT=0;
17663 GNULIB_RMDIR=0;
17664 GNULIB_SETHOSTNAME=0;
17665 GNULIB_SLEEP=0;
17666 GNULIB_SYMLINK=0;
17667 GNULIB_SYMLINKAT=0;
17668 GNULIB_TTYNAME_R=0;
17669 GNULIB_UNISTD_H_NONBLOCKING=0;
17670 GNULIB_UNISTD_H_SIGPIPE=0;
17671 GNULIB_UNLINK=0;
17672 GNULIB_UNLINKAT=0;
17673 GNULIB_USLEEP=0;
17674 GNULIB_WRITE=0;
17675 HAVE_CHOWN=1;
17676 HAVE_DUP2=1;
17677 HAVE_DUP3=1;
17678 HAVE_EUIDACCESS=1;
17679 HAVE_FACCESSAT=1;
17680 HAVE_FCHDIR=1;
17681 HAVE_FCHOWNAT=1;
17682 HAVE_FDATASYNC=1;
17683 HAVE_FSYNC=1;
17684 HAVE_FTRUNCATE=1;
17685 HAVE_GETDTABLESIZE=1;
17686 HAVE_GETGROUPS=1;
17687 HAVE_GETHOSTNAME=1;
17688 HAVE_GETLOGIN=1;
17689 HAVE_GETPAGESIZE=1;
17690 HAVE_GROUP_MEMBER=1;
17691 HAVE_LCHOWN=1;
17692 HAVE_LINK=1;
17693 HAVE_LINKAT=1;
17694 HAVE_PIPE=1;
17695 HAVE_PIPE2=1;
17696 HAVE_PREAD=1;
17697 HAVE_PWRITE=1;
17698 HAVE_READLINK=1;
17699 HAVE_READLINKAT=1;
17700 HAVE_SETHOSTNAME=1;
17701 HAVE_SLEEP=1;
17702 HAVE_SYMLINK=1;
17703 HAVE_SYMLINKAT=1;
17704 HAVE_UNLINKAT=1;
17705 HAVE_USLEEP=1;
17706 HAVE_DECL_ENVIRON=1;
17707 HAVE_DECL_FCHDIR=1;
17708 HAVE_DECL_FDATASYNC=1;
17709 HAVE_DECL_GETDOMAINNAME=1;
17710 HAVE_DECL_GETLOGIN_R=1;
17711 HAVE_DECL_GETPAGESIZE=1;
17712 HAVE_DECL_GETUSERSHELL=1;
17713 HAVE_DECL_SETHOSTNAME=1;
17714 HAVE_DECL_TTYNAME_R=1;
17715 HAVE_OS_H=0;
17716 HAVE_SYS_PARAM_H=0;
17717 REPLACE_CHOWN=0;
17718 REPLACE_CLOSE=0;
17719 REPLACE_DUP=0;
17720 REPLACE_DUP2=0;
17721 REPLACE_FCHOWNAT=0;
17722 REPLACE_FTRUNCATE=0;
17723 REPLACE_GETCWD=0;
17724 REPLACE_GETDOMAINNAME=0;
17725 REPLACE_GETLOGIN_R=0;
17726 REPLACE_GETGROUPS=0;
17727 REPLACE_GETPAGESIZE=0;
17728 REPLACE_ISATTY=0;
17729 REPLACE_LCHOWN=0;
17730 REPLACE_LINK=0;
17731 REPLACE_LINKAT=0;
17732 REPLACE_LSEEK=0;
17733 REPLACE_PREAD=0;
17734 REPLACE_PWRITE=0;
17735 REPLACE_READ=0;
17736 REPLACE_READLINK=0;
17737 REPLACE_RMDIR=0;
17738 REPLACE_SLEEP=0;
17739 REPLACE_SYMLINK=0;
17740 REPLACE_TTYNAME_R=0;
17741 REPLACE_UNLINK=0;
17742 REPLACE_UNLINKAT=0;
17743 REPLACE_USLEEP=0;
17744 REPLACE_WRITE=0;
17745 UNISTD_H_HAVE_WINSOCK2_H=0;
17746 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
17747
17748
17749
17750 GNULIB_OPENDIR=0;
17751 GNULIB_READDIR=0;
17752 GNULIB_REWINDDIR=0;
17753 GNULIB_CLOSEDIR=0;
17754 GNULIB_DIRFD=0;
17755 GNULIB_FDOPENDIR=0;
17756 GNULIB_SCANDIR=0;
17757 GNULIB_ALPHASORT=0;
17758 HAVE_OPENDIR=1;
17759 HAVE_READDIR=1;
17760 HAVE_REWINDDIR=1;
17761 HAVE_CLOSEDIR=1;
17762 HAVE_DECL_DIRFD=1;
17763 HAVE_DECL_FDOPENDIR=1;
17764 HAVE_FDOPENDIR=1;
17765 HAVE_SCANDIR=1;
17766 HAVE_ALPHASORT=1;
17767 REPLACE_OPENDIR=0;
17768 REPLACE_CLOSEDIR=0;
17769 REPLACE_DIRFD=0;
17770 REPLACE_FDOPENDIR=0;
17771
17772
17773
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17775 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17776 if test "${gl_cv_have_include_next+set}" = set; then :
17777 $as_echo_n "(cached) " >&6
17778 else
17779 rm -rf conftestd1a conftestd1b conftestd2
17780 mkdir conftestd1a conftestd1b conftestd2
17781 cat <<EOF > conftestd1a/conftest.h
17782 #define DEFINED_IN_CONFTESTD1
17783 #include_next <conftest.h>
17784 #ifdef DEFINED_IN_CONFTESTD2
17785 int foo;
17786 #else
17787 #error "include_next doesn't work"
17788 #endif
17789 EOF
17790 cat <<EOF > conftestd1b/conftest.h
17791 #define DEFINED_IN_CONFTESTD1
17792 #include <stdio.h>
17793 #include_next <conftest.h>
17794 #ifdef DEFINED_IN_CONFTESTD2
17795 int foo;
17796 #else
17797 #error "include_next doesn't work"
17798 #endif
17799 EOF
17800 cat <<EOF > conftestd2/conftest.h
17801 #ifndef DEFINED_IN_CONFTESTD1
17802 #error "include_next test doesn't work"
17803 #endif
17804 #define DEFINED_IN_CONFTESTD2
17805 EOF
17806 gl_save_CPPFLAGS="$CPPFLAGS"
17807 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17809 /* end confdefs.h. */
17810 #include <conftest.h>
17811 _ACEOF
17812 if ac_fn_c_try_compile "$LINENO"; then :
17813 gl_cv_have_include_next=yes
17814 else
17815 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17817 /* end confdefs.h. */
17818 #include <conftest.h>
17819 _ACEOF
17820 if ac_fn_c_try_compile "$LINENO"; then :
17821 gl_cv_have_include_next=buggy
17822 else
17823 gl_cv_have_include_next=no
17824 fi
17825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17826
17827 fi
17828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17829 CPPFLAGS="$gl_save_CPPFLAGS"
17830 rm -rf conftestd1a conftestd1b conftestd2
17831
17832 fi
17833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17834 $as_echo "$gl_cv_have_include_next" >&6; }
17835 PRAGMA_SYSTEM_HEADER=
17836 if test $gl_cv_have_include_next = yes; then
17837 INCLUDE_NEXT=include_next
17838 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17839 if test -n "$GCC"; then
17840 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17841 fi
17842 else
17843 if test $gl_cv_have_include_next = buggy; then
17844 INCLUDE_NEXT=include
17845 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17846 else
17847 INCLUDE_NEXT=include
17848 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17849 fi
17850 fi
17851
17852
17853
17854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17855 $as_echo_n "checking whether system header files limit the line length... " >&6; }
17856 if test "${gl_cv_pragma_columns+set}" = set; then :
17857 $as_echo_n "(cached) " >&6
17858 else
17859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17860 /* end confdefs.h. */
17861
17862 #ifdef __TANDEM
17863 choke me
17864 #endif
17865
17866 _ACEOF
17867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17868 $EGREP "choke me" >/dev/null 2>&1; then :
17869 gl_cv_pragma_columns=yes
17870 else
17871 gl_cv_pragma_columns=no
17872 fi
17873 rm -f conftest*
17874
17875
17876 fi
17877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17878 $as_echo "$gl_cv_pragma_columns" >&6; }
17879 if test $gl_cv_pragma_columns = yes; then
17880 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17881 else
17882 PRAGMA_COLUMNS=
17883 fi
17884
17885
17886
17887
17888
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17890 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
17891 if test "${gl_cv_func_c99_strtold+set}" = set; then :
17892 $as_echo_n "(cached) " >&6
17893 else
17894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17895 /* end confdefs.h. */
17896 /* On HP-UX before 11.23, strtold returns a struct instead of
17897 long double. Reject implementations like that, by requiring
17898 compatibility with the C99 prototype. */
17899 #include <stdlib.h>
17900 static long double (*p) (char const *, char **) = strtold;
17901 static long double
17902 test (char const *nptr, char **endptr)
17903 {
17904 long double r;
17905 r = strtold (nptr, endptr);
17906 return r;
17907 }
17908 int
17909 main ()
17910 {
17911 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
17912 ;
17913 return 0;
17914 }
17915 _ACEOF
17916 if ac_fn_c_try_link "$LINENO"; then :
17917 gl_cv_func_c99_strtold=yes
17918 else
17919 gl_cv_func_c99_strtold=no
17920 fi
17921 rm -f core conftest.err conftest.$ac_objext \
17922 conftest$ac_exeext conftest.$ac_ext
17923 fi
17924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
17925 $as_echo "$gl_cv_func_c99_strtold" >&6; }
17926 if test $gl_cv_func_c99_strtold = yes; then
17927
17928 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
17929
17930 fi
17931
17932
17933
17934
17935
17936
17937
17938
17939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17940 $as_echo_n "checking if environ is properly declared... " >&6; }
17941 if test "${gt_cv_var_environ_declaration+set}" = set; then :
17942 $as_echo_n "(cached) " >&6
17943 else
17944
17945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17946 /* end confdefs.h. */
17947 #if HAVE_UNISTD_H
17948 #include <unistd.h>
17949 #endif
17950 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
17951 #include <stdlib.h>
17952
17953 extern struct { int foo; } environ;
17954 int
17955 main ()
17956 {
17957 environ.foo = 1;
17958 ;
17959 return 0;
17960 }
17961 _ACEOF
17962 if ac_fn_c_try_compile "$LINENO"; then :
17963 gt_cv_var_environ_declaration=no
17964 else
17965 gt_cv_var_environ_declaration=yes
17966 fi
17967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17968 fi
17969
17970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
17971 $as_echo "$gt_cv_var_environ_declaration" >&6; }
17972 if test $gt_cv_var_environ_declaration = yes; then
17973
17974 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
17975
17976 fi
17977
17978
17979 if test $gt_cv_var_environ_declaration != yes; then
17980 HAVE_DECL_ENVIRON=0
17981 fi
17982
17983
17984
17985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
17986 $as_echo_n "checking for complete errno.h... " >&6; }
17987 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
17988 $as_echo_n "(cached) " >&6
17989 else
17990
17991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17992 /* end confdefs.h. */
17993
17994 #include <errno.h>
17995 #if !defined ETXTBSY
17996 booboo
17997 #endif
17998 #if !defined ENOMSG
17999 booboo
18000 #endif
18001 #if !defined EIDRM
18002 booboo
18003 #endif
18004 #if !defined ENOLINK
18005 booboo
18006 #endif
18007 #if !defined EPROTO
18008 booboo
18009 #endif
18010 #if !defined EMULTIHOP
18011 booboo
18012 #endif
18013 #if !defined EBADMSG
18014 booboo
18015 #endif
18016 #if !defined EOVERFLOW
18017 booboo
18018 #endif
18019 #if !defined ENOTSUP
18020 booboo
18021 #endif
18022 #if !defined ENETRESET
18023 booboo
18024 #endif
18025 #if !defined ECONNABORTED
18026 booboo
18027 #endif
18028 #if !defined ESTALE
18029 booboo
18030 #endif
18031 #if !defined EDQUOT
18032 booboo
18033 #endif
18034 #if !defined ECANCELED
18035 booboo
18036 #endif
18037 #if !defined EOWNERDEAD
18038 booboo
18039 #endif
18040 #if !defined ENOTRECOVERABLE
18041 booboo
18042 #endif
18043 #if !defined EILSEQ
18044 booboo
18045 #endif
18046
18047 _ACEOF
18048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18049 $EGREP "booboo" >/dev/null 2>&1; then :
18050 gl_cv_header_errno_h_complete=no
18051 else
18052 gl_cv_header_errno_h_complete=yes
18053 fi
18054 rm -f conftest*
18055
18056
18057 fi
18058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18059 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
18060 if test $gl_cv_header_errno_h_complete = yes; then
18061 ERRNO_H=''
18062 else
18063
18064
18065
18066
18067
18068
18069
18070
18071 if test $gl_cv_have_include_next = yes; then
18072 gl_cv_next_errno_h='<'errno.h'>'
18073 else
18074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18075 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
18076 if test "${gl_cv_next_errno_h+set}" = set; then :
18077 $as_echo_n "(cached) " >&6
18078 else
18079
18080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18081 /* end confdefs.h. */
18082 #include <errno.h>
18083
18084 _ACEOF
18085 case "$host_os" in
18086 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18087 *) gl_absname_cpp="$ac_cpp" ;;
18088 esac
18089
18090 case "$host_os" in
18091 mingw*)
18092 gl_dirsep_regex='[/\\]'
18093 ;;
18094 *)
18095 gl_dirsep_regex='\/'
18096 ;;
18097 esac
18098 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18099
18100 gl_header_literal_regex=`echo 'errno.h' \
18101 | sed -e "$gl_make_literal_regex_sed"`
18102 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18103 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18104 s|^/[^/]|//&|
18105 p
18106 q
18107 }'
18108 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18109 sed -n "$gl_absolute_header_sed"`'"'
18110
18111
18112 fi
18113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18114 $as_echo "$gl_cv_next_errno_h" >&6; }
18115 fi
18116 NEXT_ERRNO_H=$gl_cv_next_errno_h
18117
18118 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18119 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18120 gl_next_as_first_directive='<'errno.h'>'
18121 else
18122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18123 gl_next_as_first_directive=$gl_cv_next_errno_h
18124 fi
18125 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
18126
18127
18128
18129
18130 ERRNO_H='errno.h'
18131 fi
18132
18133 if test -n "$ERRNO_H"; then
18134 GL_GENERATE_ERRNO_H_TRUE=
18135 GL_GENERATE_ERRNO_H_FALSE='#'
18136 else
18137 GL_GENERATE_ERRNO_H_TRUE='#'
18138 GL_GENERATE_ERRNO_H_FALSE=
18139 fi
18140
18141
18142 if test -n "$ERRNO_H"; then
18143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18144 $as_echo_n "checking for EMULTIHOP value... " >&6; }
18145 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18146 $as_echo_n "(cached) " >&6
18147 else
18148
18149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18150 /* end confdefs.h. */
18151
18152 #include <errno.h>
18153 #ifdef EMULTIHOP
18154 yes
18155 #endif
18156
18157 _ACEOF
18158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18159 $EGREP "yes" >/dev/null 2>&1; then :
18160 gl_cv_header_errno_h_EMULTIHOP=yes
18161 else
18162 gl_cv_header_errno_h_EMULTIHOP=no
18163 fi
18164 rm -f conftest*
18165
18166 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18168 /* end confdefs.h. */
18169
18170 #define _XOPEN_SOURCE_EXTENDED 1
18171 #include <errno.h>
18172 #ifdef EMULTIHOP
18173 yes
18174 #endif
18175
18176 _ACEOF
18177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18178 $EGREP "yes" >/dev/null 2>&1; then :
18179 gl_cv_header_errno_h_EMULTIHOP=hidden
18180 fi
18181 rm -f conftest*
18182
18183 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18184 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18185 #define _XOPEN_SOURCE_EXTENDED 1
18186 #include <errno.h>
18187 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18188 #include <stdio.h>
18189 #include <stdlib.h>
18190 "; then :
18191
18192 fi
18193
18194 fi
18195 fi
18196
18197 fi
18198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18199 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18200 case $gl_cv_header_errno_h_EMULTIHOP in
18201 yes | no)
18202 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18203 ;;
18204 *)
18205 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18206 ;;
18207 esac
18208
18209
18210 fi
18211
18212
18213 if test -n "$ERRNO_H"; then
18214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18215 $as_echo_n "checking for ENOLINK value... " >&6; }
18216 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
18217 $as_echo_n "(cached) " >&6
18218 else
18219
18220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18221 /* end confdefs.h. */
18222
18223 #include <errno.h>
18224 #ifdef ENOLINK
18225 yes
18226 #endif
18227
18228 _ACEOF
18229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18230 $EGREP "yes" >/dev/null 2>&1; then :
18231 gl_cv_header_errno_h_ENOLINK=yes
18232 else
18233 gl_cv_header_errno_h_ENOLINK=no
18234 fi
18235 rm -f conftest*
18236
18237 if test $gl_cv_header_errno_h_ENOLINK = no; then
18238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18239 /* end confdefs.h. */
18240
18241 #define _XOPEN_SOURCE_EXTENDED 1
18242 #include <errno.h>
18243 #ifdef ENOLINK
18244 yes
18245 #endif
18246
18247 _ACEOF
18248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18249 $EGREP "yes" >/dev/null 2>&1; then :
18250 gl_cv_header_errno_h_ENOLINK=hidden
18251 fi
18252 rm -f conftest*
18253
18254 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18255 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18256 #define _XOPEN_SOURCE_EXTENDED 1
18257 #include <errno.h>
18258 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18259 #include <stdio.h>
18260 #include <stdlib.h>
18261 "; then :
18262
18263 fi
18264
18265 fi
18266 fi
18267
18268 fi
18269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18270 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18271 case $gl_cv_header_errno_h_ENOLINK in
18272 yes | no)
18273 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18274 ;;
18275 *)
18276 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18277 ;;
18278 esac
18279
18280
18281 fi
18282
18283
18284 if test -n "$ERRNO_H"; then
18285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18286 $as_echo_n "checking for EOVERFLOW value... " >&6; }
18287 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18288 $as_echo_n "(cached) " >&6
18289 else
18290
18291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18292 /* end confdefs.h. */
18293
18294 #include <errno.h>
18295 #ifdef EOVERFLOW
18296 yes
18297 #endif
18298
18299 _ACEOF
18300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18301 $EGREP "yes" >/dev/null 2>&1; then :
18302 gl_cv_header_errno_h_EOVERFLOW=yes
18303 else
18304 gl_cv_header_errno_h_EOVERFLOW=no
18305 fi
18306 rm -f conftest*
18307
18308 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18310 /* end confdefs.h. */
18311
18312 #define _XOPEN_SOURCE_EXTENDED 1
18313 #include <errno.h>
18314 #ifdef EOVERFLOW
18315 yes
18316 #endif
18317
18318 _ACEOF
18319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18320 $EGREP "yes" >/dev/null 2>&1; then :
18321 gl_cv_header_errno_h_EOVERFLOW=hidden
18322 fi
18323 rm -f conftest*
18324
18325 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18326 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18327 #define _XOPEN_SOURCE_EXTENDED 1
18328 #include <errno.h>
18329 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18330 #include <stdio.h>
18331 #include <stdlib.h>
18332 "; then :
18333
18334 fi
18335
18336 fi
18337 fi
18338
18339 fi
18340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18341 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18342 case $gl_cv_header_errno_h_EOVERFLOW in
18343 yes | no)
18344 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18345 ;;
18346 *)
18347 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18348 ;;
18349 esac
18350
18351
18352 fi
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363 GNULIB_FCNTL=0;
18364 GNULIB_NONBLOCKING=0;
18365 GNULIB_OPEN=0;
18366 GNULIB_OPENAT=0;
18367 HAVE_FCNTL=1;
18368 HAVE_OPENAT=1;
18369 REPLACE_FCNTL=0;
18370 REPLACE_OPEN=0;
18371 REPLACE_OPENAT=0;
18372
18373
18374 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18375 if test "x$ac_cv_type_mode_t" = x""yes; then :
18376
18377 else
18378
18379 cat >>confdefs.h <<_ACEOF
18380 #define mode_t int
18381 _ACEOF
18382
18383 fi
18384
18385 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18386 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18387 ac_have_decl=1
18388 else
18389 ac_have_decl=0
18390 fi
18391
18392 cat >>confdefs.h <<_ACEOF
18393 #define HAVE_DECL_FDATASYNC $ac_have_decl
18394 _ACEOF
18395
18396
18397
18398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18399 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18400 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18401 $as_echo_n "(cached) " >&6
18402 else
18403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18404 /* end confdefs.h. */
18405
18406 #include <sys/types.h>
18407 #include <sys/stat.h>
18408 int
18409 main ()
18410 {
18411 struct stat s; s.st_dm_mode;
18412 ;
18413 return 0;
18414 }
18415 _ACEOF
18416 if ac_fn_c_try_compile "$LINENO"; then :
18417 ac_cv_struct_st_dm_mode=yes
18418 else
18419 ac_cv_struct_st_dm_mode=no
18420 fi
18421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18422 fi
18423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18424 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18425
18426 if test $ac_cv_struct_st_dm_mode = yes; then
18427
18428 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18429
18430 fi
18431
18432
18433 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18434 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18435 ac_have_decl=1
18436 else
18437 ac_have_decl=0
18438 fi
18439
18440 cat >>confdefs.h <<_ACEOF
18441 #define HAVE_DECL_STRMODE $ac_have_decl
18442 _ACEOF
18443
18444
18445
18446
18447
18448
18449 GNULIB_FCHMODAT=0;
18450 GNULIB_FSTAT=0;
18451 GNULIB_FSTATAT=0;
18452 GNULIB_FUTIMENS=0;
18453 GNULIB_LCHMOD=0;
18454 GNULIB_LSTAT=0;
18455 GNULIB_MKDIRAT=0;
18456 GNULIB_MKFIFO=0;
18457 GNULIB_MKFIFOAT=0;
18458 GNULIB_MKNOD=0;
18459 GNULIB_MKNODAT=0;
18460 GNULIB_STAT=0;
18461 GNULIB_UTIMENSAT=0;
18462 HAVE_FCHMODAT=1;
18463 HAVE_FSTATAT=1;
18464 HAVE_FUTIMENS=1;
18465 HAVE_LCHMOD=1;
18466 HAVE_LSTAT=1;
18467 HAVE_MKDIRAT=1;
18468 HAVE_MKFIFO=1;
18469 HAVE_MKFIFOAT=1;
18470 HAVE_MKNOD=1;
18471 HAVE_MKNODAT=1;
18472 HAVE_UTIMENSAT=1;
18473 REPLACE_FSTAT=0;
18474 REPLACE_FSTATAT=0;
18475 REPLACE_FUTIMENS=0;
18476 REPLACE_LSTAT=0;
18477 REPLACE_MKDIR=0;
18478 REPLACE_MKFIFO=0;
18479 REPLACE_MKNOD=0;
18480 REPLACE_STAT=0;
18481 REPLACE_UTIMENSAT=0;
18482
18483
18484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18485 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18486 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18487 $as_echo_n "(cached) " >&6
18488 else
18489 rm -f conftest.sym conftest.file
18490 echo >conftest.file
18491 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18492 if test "$cross_compiling" = yes; then :
18493 case "$host_os" in
18494 # Guess yes on glibc systems.
18495 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18496 # If we don't know, assume the worst.
18497 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18498 esac
18499
18500 else
18501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18502 /* end confdefs.h. */
18503 $ac_includes_default
18504 int
18505 main ()
18506 {
18507 struct stat sbuf;
18508 /* Linux will dereference the symlink and fail, as required by
18509 POSIX. That is better in the sense that it means we will not
18510 have to compile and use the lstat wrapper. */
18511 return lstat ("conftest.sym/", &sbuf) == 0;
18512
18513 ;
18514 return 0;
18515 }
18516 _ACEOF
18517 if ac_fn_c_try_run "$LINENO"; then :
18518 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18519 else
18520 gl_cv_func_lstat_dereferences_slashed_symlink=no
18521 fi
18522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18523 conftest.$ac_objext conftest.beam conftest.$ac_ext
18524 fi
18525
18526 else
18527 # If the 'ln -s' command failed, then we probably don't even
18528 # have an lstat function.
18529 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18530 fi
18531 rm -f conftest.sym conftest.file
18532
18533 fi
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18535 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18536 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18537 *yes)
18538
18539 cat >>confdefs.h <<_ACEOF
18540 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18541 _ACEOF
18542
18543 ;;
18544 esac
18545
18546
18547
18548
18549
18550
18551 GNULIB__EXIT=0;
18552 GNULIB_ATOLL=0;
18553 GNULIB_CALLOC_POSIX=0;
18554 GNULIB_CANONICALIZE_FILE_NAME=0;
18555 GNULIB_GETLOADAVG=0;
18556 GNULIB_GETSUBOPT=0;
18557 GNULIB_GRANTPT=0;
18558 GNULIB_MALLOC_POSIX=0;
18559 GNULIB_MBTOWC=0;
18560 GNULIB_MKDTEMP=0;
18561 GNULIB_MKOSTEMP=0;
18562 GNULIB_MKOSTEMPS=0;
18563 GNULIB_MKSTEMP=0;
18564 GNULIB_MKSTEMPS=0;
18565 GNULIB_POSIX_OPENPT=0;
18566 GNULIB_PTSNAME=0;
18567 GNULIB_PTSNAME_R=0;
18568 GNULIB_PUTENV=0;
18569 GNULIB_RANDOM=0;
18570 GNULIB_RANDOM_R=0;
18571 GNULIB_REALLOC_POSIX=0;
18572 GNULIB_REALPATH=0;
18573 GNULIB_RPMATCH=0;
18574 GNULIB_SECURE_GETENV=0;
18575 GNULIB_SETENV=0;
18576 GNULIB_STRTOD=0;
18577 GNULIB_STRTOLL=0;
18578 GNULIB_STRTOULL=0;
18579 GNULIB_SYSTEM_POSIX=0;
18580 GNULIB_UNLOCKPT=0;
18581 GNULIB_UNSETENV=0;
18582 GNULIB_WCTOMB=0;
18583 HAVE__EXIT=1;
18584 HAVE_ATOLL=1;
18585 HAVE_CANONICALIZE_FILE_NAME=1;
18586 HAVE_DECL_GETLOADAVG=1;
18587 HAVE_GETSUBOPT=1;
18588 HAVE_GRANTPT=1;
18589 HAVE_MKDTEMP=1;
18590 HAVE_MKOSTEMP=1;
18591 HAVE_MKOSTEMPS=1;
18592 HAVE_MKSTEMP=1;
18593 HAVE_MKSTEMPS=1;
18594 HAVE_POSIX_OPENPT=1;
18595 HAVE_PTSNAME=1;
18596 HAVE_PTSNAME_R=1;
18597 HAVE_RANDOM=1;
18598 HAVE_RANDOM_H=1;
18599 HAVE_RANDOM_R=1;
18600 HAVE_REALPATH=1;
18601 HAVE_RPMATCH=1;
18602 HAVE_SECURE_GETENV=1;
18603 HAVE_SETENV=1;
18604 HAVE_DECL_SETENV=1;
18605 HAVE_STRTOD=1;
18606 HAVE_STRTOLL=1;
18607 HAVE_STRTOULL=1;
18608 HAVE_STRUCT_RANDOM_DATA=1;
18609 HAVE_SYS_LOADAVG_H=0;
18610 HAVE_UNLOCKPT=1;
18611 HAVE_DECL_UNSETENV=1;
18612 REPLACE_CALLOC=0;
18613 REPLACE_CANONICALIZE_FILE_NAME=0;
18614 REPLACE_MALLOC=0;
18615 REPLACE_MBTOWC=0;
18616 REPLACE_MKSTEMP=0;
18617 REPLACE_PTSNAME=0;
18618 REPLACE_PTSNAME_R=0;
18619 REPLACE_PUTENV=0;
18620 REPLACE_RANDOM_R=0;
18621 REPLACE_REALLOC=0;
18622 REPLACE_REALPATH=0;
18623 REPLACE_SETENV=0;
18624 REPLACE_STRTOD=0;
18625 REPLACE_UNSETENV=0;
18626 REPLACE_WCTOMB=0;
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643 if test $gl_cv_have_include_next = yes; then
18644 gl_cv_next_getopt_h='<'getopt.h'>'
18645 else
18646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18647 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
18648 if test "${gl_cv_next_getopt_h+set}" = set; then :
18649 $as_echo_n "(cached) " >&6
18650 else
18651
18652 if test $ac_cv_header_getopt_h = yes; then
18653
18654
18655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18656 /* end confdefs.h. */
18657 #include <getopt.h>
18658
18659 _ACEOF
18660 case "$host_os" in
18661 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18662 *) gl_absname_cpp="$ac_cpp" ;;
18663 esac
18664
18665 case "$host_os" in
18666 mingw*)
18667 gl_dirsep_regex='[/\\]'
18668 ;;
18669 *)
18670 gl_dirsep_regex='\/'
18671 ;;
18672 esac
18673 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18674
18675 gl_header_literal_regex=`echo 'getopt.h' \
18676 | sed -e "$gl_make_literal_regex_sed"`
18677 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18678 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18679 s|^/[^/]|//&|
18680 p
18681 q
18682 }'
18683 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18684 sed -n "$gl_absolute_header_sed"`'"'
18685 else
18686 gl_cv_next_getopt_h='<'getopt.h'>'
18687 fi
18688
18689
18690 fi
18691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18692 $as_echo "$gl_cv_next_getopt_h" >&6; }
18693 fi
18694 NEXT_GETOPT_H=$gl_cv_next_getopt_h
18695
18696 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18697 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18698 gl_next_as_first_directive='<'getopt.h'>'
18699 else
18700 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18701 gl_next_as_first_directive=$gl_cv_next_getopt_h
18702 fi
18703 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
18704
18705
18706
18707
18708 if test $ac_cv_header_getopt_h = yes; then
18709 HAVE_GETOPT_H=1
18710 else
18711 HAVE_GETOPT_H=0
18712 fi
18713
18714
18715 gl_replace_getopt=
18716
18717 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18718 for ac_header in getopt.h
18719 do :
18720 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18721 if test "x$ac_cv_header_getopt_h" = x""yes; then :
18722 cat >>confdefs.h <<_ACEOF
18723 #define HAVE_GETOPT_H 1
18724 _ACEOF
18725
18726 else
18727 gl_replace_getopt=yes
18728 fi
18729
18730 done
18731
18732 fi
18733
18734 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18735 for ac_func in getopt_long_only
18736 do :
18737 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18738 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
18739 cat >>confdefs.h <<_ACEOF
18740 #define HAVE_GETOPT_LONG_ONLY 1
18741 _ACEOF
18742
18743 else
18744 gl_replace_getopt=yes
18745 fi
18746 done
18747
18748 fi
18749
18750 if test -z "$gl_replace_getopt"; then
18751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18752 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
18753 if test "${gl_cv_func_getopt_posix+set}" = set; then :
18754 $as_echo_n "(cached) " >&6
18755 else
18756
18757 if test $cross_compiling = no; then
18758 if test "$cross_compiling" = yes; then :
18759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18760 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18761 as_fn_error "cannot run test program while cross compiling
18762 See \`config.log' for more details." "$LINENO" 5; }
18763 else
18764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18765 /* end confdefs.h. */
18766
18767 #include <unistd.h>
18768 #include <stdlib.h>
18769 #include <string.h>
18770
18771 int
18772 main ()
18773 {
18774 static char program[] = "program";
18775 static char a[] = "-a";
18776 static char foo[] = "foo";
18777 static char bar[] = "bar";
18778 char *argv[] = { program, a, foo, bar, NULL };
18779 int c;
18780
18781 c = getopt (4, argv, "ab");
18782 if (!(c == 'a'))
18783 return 1;
18784 c = getopt (4, argv, "ab");
18785 if (!(c == -1))
18786 return 2;
18787 if (!(optind == 2))
18788 return 3;
18789 return 0;
18790 }
18791
18792 _ACEOF
18793 if ac_fn_c_try_run "$LINENO"; then :
18794 gl_cv_func_getopt_posix=maybe
18795 else
18796 gl_cv_func_getopt_posix=no
18797 fi
18798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18799 conftest.$ac_objext conftest.beam conftest.$ac_ext
18800 fi
18801
18802 if test $gl_cv_func_getopt_posix = maybe; then
18803 if test "$cross_compiling" = yes; then :
18804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18805 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18806 as_fn_error "cannot run test program while cross compiling
18807 See \`config.log' for more details." "$LINENO" 5; }
18808 else
18809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18810 /* end confdefs.h. */
18811
18812 #include <unistd.h>
18813 #include <stdlib.h>
18814 #include <string.h>
18815
18816 int
18817 main ()
18818 {
18819 static char program[] = "program";
18820 static char donald[] = "donald";
18821 static char p[] = "-p";
18822 static char billy[] = "billy";
18823 static char duck[] = "duck";
18824 static char a[] = "-a";
18825 static char bar[] = "bar";
18826 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
18827 int c;
18828
18829 c = getopt (7, argv, "+abp:q:");
18830 if (!(c == -1))
18831 return 4;
18832 if (!(strcmp (argv[0], "program") == 0))
18833 return 5;
18834 if (!(strcmp (argv[1], "donald") == 0))
18835 return 6;
18836 if (!(strcmp (argv[2], "-p") == 0))
18837 return 7;
18838 if (!(strcmp (argv[3], "billy") == 0))
18839 return 8;
18840 if (!(strcmp (argv[4], "duck") == 0))
18841 return 9;
18842 if (!(strcmp (argv[5], "-a") == 0))
18843 return 10;
18844 if (!(strcmp (argv[6], "bar") == 0))
18845 return 11;
18846 if (!(optind == 1))
18847 return 12;
18848 return 0;
18849 }
18850
18851 _ACEOF
18852 if ac_fn_c_try_run "$LINENO"; then :
18853 gl_cv_func_getopt_posix=maybe
18854 else
18855 gl_cv_func_getopt_posix=no
18856 fi
18857 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18858 conftest.$ac_objext conftest.beam conftest.$ac_ext
18859 fi
18860
18861 fi
18862 if test $gl_cv_func_getopt_posix = maybe; then
18863 if test "$cross_compiling" = yes; then :
18864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18865 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18866 as_fn_error "cannot run test program while cross compiling
18867 See \`config.log' for more details." "$LINENO" 5; }
18868 else
18869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18870 /* end confdefs.h. */
18871
18872 #include <unistd.h>
18873 #include <stdlib.h>
18874 #include <string.h>
18875
18876 int
18877 main ()
18878 {
18879 static char program[] = "program";
18880 static char ab[] = "-ab";
18881 char *argv[3] = { program, ab, NULL };
18882 if (getopt (2, argv, "ab:") != 'a')
18883 return 13;
18884 if (getopt (2, argv, "ab:") != '?')
18885 return 14;
18886 if (optopt != 'b')
18887 return 15;
18888 if (optind != 2)
18889 return 16;
18890 return 0;
18891 }
18892
18893 _ACEOF
18894 if ac_fn_c_try_run "$LINENO"; then :
18895 gl_cv_func_getopt_posix=yes
18896 else
18897 gl_cv_func_getopt_posix=no
18898 fi
18899 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18900 conftest.$ac_objext conftest.beam conftest.$ac_ext
18901 fi
18902
18903 fi
18904 else
18905 case "$host_os" in
18906 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
18907 *) gl_cv_func_getopt_posix="guessing yes";;
18908 esac
18909 fi
18910
18911 fi
18912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
18913 $as_echo "$gl_cv_func_getopt_posix" >&6; }
18914 case "$gl_cv_func_getopt_posix" in
18915 *no) gl_replace_getopt=yes ;;
18916 esac
18917 fi
18918
18919 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
18921 $as_echo_n "checking for working GNU getopt function... " >&6; }
18922 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
18923 $as_echo_n "(cached) " >&6
18924 else
18925 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
18926 # optstring is necessary for programs like m4 that have POSIX-mandated
18927 # semantics for supporting options interspersed with files.
18928 # Also, since getopt_long is a GNU extension, we require optind=0.
18929 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
18930 # so take care to revert to the correct (non-)export state.
18931 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
18932 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
18933 xx) gl_had_POSIXLY_CORRECT=exported ;;
18934 x) gl_had_POSIXLY_CORRECT=yes ;;
18935 *) gl_had_POSIXLY_CORRECT= ;;
18936 esac
18937 POSIXLY_CORRECT=1
18938 export POSIXLY_CORRECT
18939 if test "$cross_compiling" = yes; then :
18940 gl_cv_func_getopt_gnu="guessing no"
18941
18942 else
18943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18944 /* end confdefs.h. */
18945 #include <getopt.h>
18946 #include <stddef.h>
18947 #include <string.h>
18948
18949 #include <stdlib.h>
18950 #if defined __MACH__ && defined __APPLE__
18951 /* Avoid a crash on Mac OS X. */
18952 #include <mach/mach.h>
18953 #include <mach/mach_error.h>
18954 #include <mach/thread_status.h>
18955 #include <mach/exception.h>
18956 #include <mach/task.h>
18957 #include <pthread.h>
18958 /* The exception port on which our thread listens. */
18959 static mach_port_t our_exception_port;
18960 /* The main function of the thread listening for exceptions of type
18961 EXC_BAD_ACCESS. */
18962 static void *
18963 mach_exception_thread (void *arg)
18964 {
18965 /* Buffer for a message to be received. */
18966 struct {
18967 mach_msg_header_t head;
18968 mach_msg_body_t msgh_body;
18969 char data[1024];
18970 } msg;
18971 mach_msg_return_t retval;
18972 /* Wait for a message on the exception port. */
18973 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
18974 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
18975 if (retval != MACH_MSG_SUCCESS)
18976 abort ();
18977 exit (1);
18978 }
18979 static void
18980 nocrash_init (void)
18981 {
18982 mach_port_t self = mach_task_self ();
18983 /* Allocate a port on which the thread shall listen for exceptions. */
18984 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
18985 == KERN_SUCCESS) {
18986 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
18987 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
18988 MACH_MSG_TYPE_MAKE_SEND)
18989 == KERN_SUCCESS) {
18990 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
18991 for us. */
18992 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
18993 /* Create the thread listening on the exception port. */
18994 pthread_attr_t attr;
18995 pthread_t thread;
18996 if (pthread_attr_init (&attr) == 0
18997 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
18998 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
18999 pthread_attr_destroy (&attr);
19000 /* Replace the exception port info for these exceptions with our own.
19001 Note that we replace the exception port for the entire task, not only
19002 for a particular thread. This has the effect that when our exception
19003 port gets the message, the thread specific exception port has already
19004 been asked, and we don't need to bother about it.
19005 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19006 task_set_exception_ports (self, mask, our_exception_port,
19007 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19008 }
19009 }
19010 }
19011 }
19012 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19013 /* Avoid a crash on native Windows. */
19014 #define WIN32_LEAN_AND_MEAN
19015 #include <windows.h>
19016 #include <winerror.h>
19017 static LONG WINAPI
19018 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19019 {
19020 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19021 {
19022 case EXCEPTION_ACCESS_VIOLATION:
19023 case EXCEPTION_IN_PAGE_ERROR:
19024 case EXCEPTION_STACK_OVERFLOW:
19025 case EXCEPTION_GUARD_PAGE:
19026 case EXCEPTION_PRIV_INSTRUCTION:
19027 case EXCEPTION_ILLEGAL_INSTRUCTION:
19028 case EXCEPTION_DATATYPE_MISALIGNMENT:
19029 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19030 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19031 exit (1);
19032 }
19033 return EXCEPTION_CONTINUE_SEARCH;
19034 }
19035 static void
19036 nocrash_init (void)
19037 {
19038 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19039 }
19040 #else
19041 /* Avoid a crash on POSIX systems. */
19042 #include <signal.h>
19043 /* A POSIX signal handler. */
19044 static void
19045 exception_handler (int sig)
19046 {
19047 exit (1);
19048 }
19049 static void
19050 nocrash_init (void)
19051 {
19052 #ifdef SIGSEGV
19053 signal (SIGSEGV, exception_handler);
19054 #endif
19055 #ifdef SIGBUS
19056 signal (SIGBUS, exception_handler);
19057 #endif
19058 }
19059 #endif
19060
19061
19062 int
19063 main ()
19064 {
19065
19066 int result = 0;
19067
19068 nocrash_init();
19069
19070 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19071 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19072 OSF/1 5.1, Solaris 10. */
19073 {
19074 static char conftest[] = "conftest";
19075 static char plus[] = "-+";
19076 char *argv[3] = { conftest, plus, NULL };
19077 opterr = 0;
19078 if (getopt (2, argv, "+a") != '?')
19079 result |= 1;
19080 }
19081 /* This code succeeds on glibc 2.8, mingw,
19082 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19083 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19084 {
19085 static char program[] = "program";
19086 static char p[] = "-p";
19087 static char foo[] = "foo";
19088 static char bar[] = "bar";
19089 char *argv[] = { program, p, foo, bar, NULL };
19090
19091 optind = 1;
19092 if (getopt (4, argv, "p::") != 'p')
19093 result |= 2;
19094 else if (optarg != NULL)
19095 result |= 4;
19096 else if (getopt (4, argv, "p::") != -1)
19097 result |= 6;
19098 else if (optind != 2)
19099 result |= 8;
19100 }
19101 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19102 {
19103 static char program[] = "program";
19104 static char foo[] = "foo";
19105 static char p[] = "-p";
19106 char *argv[] = { program, foo, p, NULL };
19107 optind = 0;
19108 if (getopt (3, argv, "-p") != 1)
19109 result |= 16;
19110 else if (getopt (3, argv, "-p") != 'p')
19111 result |= 16;
19112 }
19113 /* This code fails on glibc 2.11. */
19114 {
19115 static char program[] = "program";
19116 static char b[] = "-b";
19117 static char a[] = "-a";
19118 char *argv[] = { program, b, a, NULL };
19119 optind = opterr = 0;
19120 if (getopt (3, argv, "+:a:b") != 'b')
19121 result |= 32;
19122 else if (getopt (3, argv, "+:a:b") != ':')
19123 result |= 32;
19124 }
19125 /* This code dumps core on glibc 2.14. */
19126 {
19127 static char program[] = "program";
19128 static char w[] = "-W";
19129 static char dummy[] = "dummy";
19130 char *argv[] = { program, w, dummy, NULL };
19131 optind = opterr = 1;
19132 if (getopt (3, argv, "W;") != 'W')
19133 result |= 64;
19134 }
19135 return result;
19136
19137 ;
19138 return 0;
19139 }
19140 _ACEOF
19141 if ac_fn_c_try_run "$LINENO"; then :
19142 gl_cv_func_getopt_gnu=yes
19143 else
19144 gl_cv_func_getopt_gnu=no
19145 fi
19146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19147 conftest.$ac_objext conftest.beam conftest.$ac_ext
19148 fi
19149
19150 case $gl_had_POSIXLY_CORRECT in
19151 exported) ;;
19152 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19153 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19154 esac
19155
19156 fi
19157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19158 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
19159 if test "$gl_cv_func_getopt_gnu" != yes; then
19160 gl_replace_getopt=yes
19161 else
19162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19163 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
19164 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
19165 $as_echo_n "(cached) " >&6
19166 else
19167 if test "$cross_compiling" = yes; then :
19168 case "$host_os" in
19169 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19170 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19171 esac
19172
19173 else
19174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19175 /* end confdefs.h. */
19176 #include <getopt.h>
19177 #include <stddef.h>
19178 #include <string.h>
19179
19180 int
19181 main ()
19182 {
19183 static const struct option long_options[] =
19184 {
19185 { "xtremely-",no_argument, NULL, 1003 },
19186 { "xtra", no_argument, NULL, 1001 },
19187 { "xtreme", no_argument, NULL, 1002 },
19188 { "xtremely", no_argument, NULL, 1003 },
19189 { NULL, 0, NULL, 0 }
19190 };
19191 /* This code fails on OpenBSD 5.0. */
19192 {
19193 static char program[] = "program";
19194 static char xtremel[] = "--xtremel";
19195 char *argv[] = { program, xtremel, NULL };
19196 int option_index;
19197 optind = 1; opterr = 0;
19198 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19199 return 1;
19200 }
19201 return 0;
19202
19203 ;
19204 return 0;
19205 }
19206 _ACEOF
19207 if ac_fn_c_try_run "$LINENO"; then :
19208 gl_cv_func_getopt_long_gnu=yes
19209 else
19210 gl_cv_func_getopt_long_gnu=no
19211 fi
19212 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19213 conftest.$ac_objext conftest.beam conftest.$ac_ext
19214 fi
19215
19216
19217 fi
19218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19219 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19220 case "$gl_cv_func_getopt_long_gnu" in
19221 *yes) ;;
19222 *) gl_replace_getopt=yes ;;
19223 esac
19224 fi
19225 fi
19226
19227
19228
19229
19230
19231
19232 REPLACE_GETOPT=0
19233 if test -n "$gl_replace_getopt"; then
19234 REPLACE_GETOPT=1
19235 fi
19236
19237 if test $REPLACE_GETOPT = 1; then
19238
19239 GETOPT_H=getopt.h
19240
19241 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
19242
19243
19244
19245 fi
19246
19247 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19248 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19249 ac_have_decl=1
19250 else
19251 ac_have_decl=0
19252 fi
19253
19254 cat >>confdefs.h <<_ACEOF
19255 #define HAVE_DECL_GETENV $ac_have_decl
19256 _ACEOF
19257
19258 :
19259
19260
19261
19262
19263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19264 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19265 if test "${ac_cv_c_restrict+set}" = set; then :
19266 $as_echo_n "(cached) " >&6
19267 else
19268 ac_cv_c_restrict=no
19269 # The order here caters to the fact that C++ does not require restrict.
19270 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19272 /* end confdefs.h. */
19273 typedef int * int_ptr;
19274 int foo (int_ptr $ac_kw ip) {
19275 return ip[0];
19276 }
19277 int
19278 main ()
19279 {
19280 int s[1];
19281 int * $ac_kw t = s;
19282 t[0] = 0;
19283 return foo(t)
19284 ;
19285 return 0;
19286 }
19287 _ACEOF
19288 if ac_fn_c_try_compile "$LINENO"; then :
19289 ac_cv_c_restrict=$ac_kw
19290 fi
19291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19292 test "$ac_cv_c_restrict" != no && break
19293 done
19294
19295 fi
19296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19297 $as_echo "$ac_cv_c_restrict" >&6; }
19298
19299 case $ac_cv_c_restrict in
19300 restrict) ;;
19301 no) $as_echo "#define restrict /**/" >>confdefs.h
19302 ;;
19303 *) cat >>confdefs.h <<_ACEOF
19304 #define restrict $ac_cv_c_restrict
19305 _ACEOF
19306 ;;
19307 esac
19308
19309
19310 GNULIB_GETTIMEOFDAY=0;
19311 HAVE_GETTIMEOFDAY=1;
19312 HAVE_STRUCT_TIMEVAL=1;
19313 HAVE_SYS_TIME_H=1;
19314 REPLACE_GETTIMEOFDAY=0;
19315 REPLACE_STRUCT_TIMEVAL=0;
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332 if test $gl_cv_have_include_next = yes; then
19333 gl_cv_next_sys_time_h='<'sys/time.h'>'
19334 else
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19336 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19337 if test "${gl_cv_next_sys_time_h+set}" = set; then :
19338 $as_echo_n "(cached) " >&6
19339 else
19340
19341 if test $ac_cv_header_sys_time_h = yes; then
19342
19343
19344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19345 /* end confdefs.h. */
19346 #include <sys/time.h>
19347
19348 _ACEOF
19349 case "$host_os" in
19350 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19351 *) gl_absname_cpp="$ac_cpp" ;;
19352 esac
19353
19354 case "$host_os" in
19355 mingw*)
19356 gl_dirsep_regex='[/\\]'
19357 ;;
19358 *)
19359 gl_dirsep_regex='\/'
19360 ;;
19361 esac
19362 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19363
19364 gl_header_literal_regex=`echo 'sys/time.h' \
19365 | sed -e "$gl_make_literal_regex_sed"`
19366 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19367 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19368 s|^/[^/]|//&|
19369 p
19370 q
19371 }'
19372 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19373 sed -n "$gl_absolute_header_sed"`'"'
19374 else
19375 gl_cv_next_sys_time_h='<'sys/time.h'>'
19376 fi
19377
19378
19379 fi
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19381 $as_echo "$gl_cv_next_sys_time_h" >&6; }
19382 fi
19383 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
19384
19385 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19386 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19387 gl_next_as_first_directive='<'sys/time.h'>'
19388 else
19389 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19390 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19391 fi
19392 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
19393
19394
19395
19396
19397
19398 if test $ac_cv_header_sys_time_h != yes; then
19399 HAVE_SYS_TIME_H=0
19400 fi
19401
19402
19403
19404
19405
19406 if test $ac_cv_header_sys_socket_h != yes; then
19407 for ac_header in winsock2.h
19408 do :
19409 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19410 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19411 cat >>confdefs.h <<_ACEOF
19412 #define HAVE_WINSOCK2_H 1
19413 _ACEOF
19414
19415 fi
19416
19417 done
19418
19419 fi
19420 if test "$ac_cv_header_winsock2_h" = yes; then
19421 HAVE_WINSOCK2_H=1
19422 UNISTD_H_HAVE_WINSOCK2_H=1
19423 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19424 else
19425 HAVE_WINSOCK2_H=0
19426 fi
19427
19428
19429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19430 $as_echo_n "checking for struct timeval... " >&6; }
19431 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19432 $as_echo_n "(cached) " >&6
19433 else
19434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19435 /* end confdefs.h. */
19436 #if HAVE_SYS_TIME_H
19437 #include <sys/time.h>
19438 #endif
19439 #include <time.h>
19440 #if HAVE_WINSOCK2_H
19441 # include <winsock2.h>
19442 #endif
19443
19444 int
19445 main ()
19446 {
19447 static struct timeval x; x.tv_sec = x.tv_usec;
19448 ;
19449 return 0;
19450 }
19451 _ACEOF
19452 if ac_fn_c_try_compile "$LINENO"; then :
19453 gl_cv_sys_struct_timeval=yes
19454 else
19455 gl_cv_sys_struct_timeval=no
19456 fi
19457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19458
19459 fi
19460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19461 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
19462 if test $gl_cv_sys_struct_timeval != yes; then
19463 HAVE_STRUCT_TIMEVAL=0
19464 else
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19466 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19467 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19468 $as_echo_n "(cached) " >&6
19469 else
19470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19471 /* end confdefs.h. */
19472 #if HAVE_SYS_TIME_H
19473 #include <sys/time.h>
19474 #endif
19475 #include <time.h>
19476 #if HAVE_WINSOCK2_H
19477 # include <winsock2.h>
19478 #endif
19479
19480 int
19481 main ()
19482 {
19483 static struct timeval x;
19484 typedef int verify_tv_sec_type[
19485 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
19486 ];
19487
19488 ;
19489 return 0;
19490 }
19491 _ACEOF
19492 if ac_fn_c_try_compile "$LINENO"; then :
19493 gl_cv_sys_struct_timeval_tv_sec=yes
19494 else
19495 gl_cv_sys_struct_timeval_tv_sec=no
19496 fi
19497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19498
19499 fi
19500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
19501 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
19502 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
19503 REPLACE_STRUCT_TIMEVAL=1
19504 fi
19505 fi
19506
19507
19508
19509
19510
19511
19512
19513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19514 $as_echo_n "checking for unsigned long long int... " >&6; }
19515 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
19516 $as_echo_n "(cached) " >&6
19517 else
19518 ac_cv_type_unsigned_long_long_int=yes
19519 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19521 /* end confdefs.h. */
19522
19523 /* For now, do not test the preprocessor; as of 2007 there are too many
19524 implementations with broken preprocessors. Perhaps this can
19525 be revisited in 2012. In the meantime, code should not expect
19526 #if to work with literals wider than 32 bits. */
19527 /* Test literals. */
19528 long long int ll = 9223372036854775807ll;
19529 long long int nll = -9223372036854775807LL;
19530 unsigned long long int ull = 18446744073709551615ULL;
19531 /* Test constant expressions. */
19532 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19533 ? 1 : -1)];
19534 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19535 ? 1 : -1)];
19536 int i = 63;
19537 int
19538 main ()
19539 {
19540 /* Test availability of runtime routines for shift and division. */
19541 long long int llmax = 9223372036854775807ll;
19542 unsigned long long int ullmax = 18446744073709551615ull;
19543 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19544 | (llmax / ll) | (llmax % ll)
19545 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19546 | (ullmax / ull) | (ullmax % ull));
19547 ;
19548 return 0;
19549 }
19550
19551 _ACEOF
19552 if ac_fn_c_try_link "$LINENO"; then :
19553
19554 else
19555 ac_cv_type_unsigned_long_long_int=no
19556 fi
19557 rm -f core conftest.err conftest.$ac_objext \
19558 conftest$ac_exeext conftest.$ac_ext
19559 fi
19560 fi
19561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19562 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19563 if test $ac_cv_type_unsigned_long_long_int = yes; then
19564
19565 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19566
19567 fi
19568
19569
19570
19571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19572 $as_echo_n "checking for long long int... " >&6; }
19573 if test "${ac_cv_type_long_long_int+set}" = set; then :
19574 $as_echo_n "(cached) " >&6
19575 else
19576 ac_cv_type_long_long_int=yes
19577 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19578 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19579 if test $ac_cv_type_long_long_int = yes; then
19580 if test "$cross_compiling" = yes; then :
19581 :
19582 else
19583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19584 /* end confdefs.h. */
19585 #include <limits.h>
19586 #ifndef LLONG_MAX
19587 # define HALF \
19588 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19589 # define LLONG_MAX (HALF - 1 + HALF)
19590 #endif
19591 int
19592 main ()
19593 {
19594 long long int n = 1;
19595 int i;
19596 for (i = 0; ; i++)
19597 {
19598 long long int m = n << i;
19599 if (m >> i != n)
19600 return 1;
19601 if (LLONG_MAX / 2 < m)
19602 break;
19603 }
19604 return 0;
19605 ;
19606 return 0;
19607 }
19608 _ACEOF
19609 if ac_fn_c_try_run "$LINENO"; then :
19610
19611 else
19612 ac_cv_type_long_long_int=no
19613 fi
19614 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19615 conftest.$ac_objext conftest.beam conftest.$ac_ext
19616 fi
19617
19618 fi
19619 fi
19620 fi
19621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19622 $as_echo "$ac_cv_type_long_long_int" >&6; }
19623 if test $ac_cv_type_long_long_int = yes; then
19624
19625 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
19626
19627 fi
19628
19629
19630
19631
19632
19633
19634 gl_cv_c_multiarch=no
19635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19636 /* end confdefs.h. */
19637 #ifndef __APPLE_CC__
19638 not a universal capable compiler
19639 #endif
19640 typedef int dummy;
19641
19642 _ACEOF
19643 if ac_fn_c_try_compile "$LINENO"; then :
19644
19645 arch=
19646 prev=
19647 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19648 if test -n "$prev"; then
19649 case $word in
19650 i?86 | x86_64 | ppc | ppc64)
19651 if test -z "$arch" || test "$arch" = "$word"; then
19652 arch="$word"
19653 else
19654 gl_cv_c_multiarch=yes
19655 fi
19656 ;;
19657 esac
19658 prev=
19659 else
19660 if test "x$word" = "x-arch"; then
19661 prev=arch
19662 fi
19663 fi
19664 done
19665
19666 fi
19667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19668 if test $gl_cv_c_multiarch = yes; then
19669 APPLE_UNIVERSAL_BUILD=1
19670 else
19671 APPLE_UNIVERSAL_BUILD=0
19672 fi
19673
19674
19675
19676
19677
19678 if test $ac_cv_type_long_long_int = yes; then
19679 HAVE_LONG_LONG_INT=1
19680 else
19681 HAVE_LONG_LONG_INT=0
19682 fi
19683
19684
19685 if test $ac_cv_type_unsigned_long_long_int = yes; then
19686 HAVE_UNSIGNED_LONG_LONG_INT=1
19687 else
19688 HAVE_UNSIGNED_LONG_LONG_INT=0
19689 fi
19690
19691
19692
19693 if test $ac_cv_header_wchar_h = yes; then
19694 HAVE_WCHAR_H=1
19695 else
19696 HAVE_WCHAR_H=0
19697 fi
19698
19699
19700 if test $ac_cv_header_inttypes_h = yes; then
19701 HAVE_INTTYPES_H=1
19702 else
19703 HAVE_INTTYPES_H=0
19704 fi
19705
19706
19707 if test $ac_cv_header_sys_types_h = yes; then
19708 HAVE_SYS_TYPES_H=1
19709 else
19710 HAVE_SYS_TYPES_H=0
19711 fi
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723 if test $gl_cv_have_include_next = yes; then
19724 gl_cv_next_stdint_h='<'stdint.h'>'
19725 else
19726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19727 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19728 if test "${gl_cv_next_stdint_h+set}" = set; then :
19729 $as_echo_n "(cached) " >&6
19730 else
19731
19732 if test $ac_cv_header_stdint_h = yes; then
19733
19734
19735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19736 /* end confdefs.h. */
19737 #include <stdint.h>
19738
19739 _ACEOF
19740 case "$host_os" in
19741 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19742 *) gl_absname_cpp="$ac_cpp" ;;
19743 esac
19744
19745 case "$host_os" in
19746 mingw*)
19747 gl_dirsep_regex='[/\\]'
19748 ;;
19749 *)
19750 gl_dirsep_regex='\/'
19751 ;;
19752 esac
19753 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19754
19755 gl_header_literal_regex=`echo 'stdint.h' \
19756 | sed -e "$gl_make_literal_regex_sed"`
19757 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19758 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19759 s|^/[^/]|//&|
19760 p
19761 q
19762 }'
19763 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19764 sed -n "$gl_absolute_header_sed"`'"'
19765 else
19766 gl_cv_next_stdint_h='<'stdint.h'>'
19767 fi
19768
19769
19770 fi
19771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19772 $as_echo "$gl_cv_next_stdint_h" >&6; }
19773 fi
19774 NEXT_STDINT_H=$gl_cv_next_stdint_h
19775
19776 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19777 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19778 gl_next_as_first_directive='<'stdint.h'>'
19779 else
19780 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19781 gl_next_as_first_directive=$gl_cv_next_stdint_h
19782 fi
19783 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
19784
19785
19786
19787
19788 if test $ac_cv_header_stdint_h = yes; then
19789 HAVE_STDINT_H=1
19790 else
19791 HAVE_STDINT_H=0
19792 fi
19793
19794
19795 if test $ac_cv_header_stdint_h = yes; then
19796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19797 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
19798 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
19799 $as_echo_n "(cached) " >&6
19800 else
19801 gl_cv_header_working_stdint_h=no
19802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19803 /* end confdefs.h. */
19804
19805
19806 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19807 #include <stdint.h>
19808 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
19809 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
19810 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
19811 #endif
19812
19813
19814 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19815 included before <wchar.h>. */
19816 #include <stddef.h>
19817 #include <signal.h>
19818 #if HAVE_WCHAR_H
19819 # include <stdio.h>
19820 # include <time.h>
19821 # include <wchar.h>
19822 #endif
19823
19824
19825 #ifdef INT8_MAX
19826 int8_t a1 = INT8_MAX;
19827 int8_t a1min = INT8_MIN;
19828 #endif
19829 #ifdef INT16_MAX
19830 int16_t a2 = INT16_MAX;
19831 int16_t a2min = INT16_MIN;
19832 #endif
19833 #ifdef INT32_MAX
19834 int32_t a3 = INT32_MAX;
19835 int32_t a3min = INT32_MIN;
19836 #endif
19837 #ifdef INT64_MAX
19838 int64_t a4 = INT64_MAX;
19839 int64_t a4min = INT64_MIN;
19840 #endif
19841 #ifdef UINT8_MAX
19842 uint8_t b1 = UINT8_MAX;
19843 #else
19844 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
19845 #endif
19846 #ifdef UINT16_MAX
19847 uint16_t b2 = UINT16_MAX;
19848 #endif
19849 #ifdef UINT32_MAX
19850 uint32_t b3 = UINT32_MAX;
19851 #endif
19852 #ifdef UINT64_MAX
19853 uint64_t b4 = UINT64_MAX;
19854 #endif
19855 int_least8_t c1 = INT8_C (0x7f);
19856 int_least8_t c1max = INT_LEAST8_MAX;
19857 int_least8_t c1min = INT_LEAST8_MIN;
19858 int_least16_t c2 = INT16_C (0x7fff);
19859 int_least16_t c2max = INT_LEAST16_MAX;
19860 int_least16_t c2min = INT_LEAST16_MIN;
19861 int_least32_t c3 = INT32_C (0x7fffffff);
19862 int_least32_t c3max = INT_LEAST32_MAX;
19863 int_least32_t c3min = INT_LEAST32_MIN;
19864 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
19865 int_least64_t c4max = INT_LEAST64_MAX;
19866 int_least64_t c4min = INT_LEAST64_MIN;
19867 uint_least8_t d1 = UINT8_C (0xff);
19868 uint_least8_t d1max = UINT_LEAST8_MAX;
19869 uint_least16_t d2 = UINT16_C (0xffff);
19870 uint_least16_t d2max = UINT_LEAST16_MAX;
19871 uint_least32_t d3 = UINT32_C (0xffffffff);
19872 uint_least32_t d3max = UINT_LEAST32_MAX;
19873 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
19874 uint_least64_t d4max = UINT_LEAST64_MAX;
19875 int_fast8_t e1 = INT_FAST8_MAX;
19876 int_fast8_t e1min = INT_FAST8_MIN;
19877 int_fast16_t e2 = INT_FAST16_MAX;
19878 int_fast16_t e2min = INT_FAST16_MIN;
19879 int_fast32_t e3 = INT_FAST32_MAX;
19880 int_fast32_t e3min = INT_FAST32_MIN;
19881 int_fast64_t e4 = INT_FAST64_MAX;
19882 int_fast64_t e4min = INT_FAST64_MIN;
19883 uint_fast8_t f1 = UINT_FAST8_MAX;
19884 uint_fast16_t f2 = UINT_FAST16_MAX;
19885 uint_fast32_t f3 = UINT_FAST32_MAX;
19886 uint_fast64_t f4 = UINT_FAST64_MAX;
19887 #ifdef INTPTR_MAX
19888 intptr_t g = INTPTR_MAX;
19889 intptr_t gmin = INTPTR_MIN;
19890 #endif
19891 #ifdef UINTPTR_MAX
19892 uintptr_t h = UINTPTR_MAX;
19893 #endif
19894 intmax_t i = INTMAX_MAX;
19895 uintmax_t j = UINTMAX_MAX;
19896
19897 #include <limits.h> /* for CHAR_BIT */
19898 #define TYPE_MINIMUM(t) \
19899 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
19900 #define TYPE_MAXIMUM(t) \
19901 ((t) ((t) 0 < (t) -1 \
19902 ? (t) -1 \
19903 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
19904 struct s {
19905 int check_PTRDIFF:
19906 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
19907 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
19908 ? 1 : -1;
19909 /* Detect bug in FreeBSD 6.0 / ia64. */
19910 int check_SIG_ATOMIC:
19911 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
19912 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
19913 ? 1 : -1;
19914 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
19915 int check_WCHAR:
19916 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
19917 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
19918 ? 1 : -1;
19919 /* Detect bug in mingw. */
19920 int check_WINT:
19921 WINT_MIN == TYPE_MINIMUM (wint_t)
19922 && WINT_MAX == TYPE_MAXIMUM (wint_t)
19923 ? 1 : -1;
19924
19925 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
19926 int check_UINT8_C:
19927 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
19928 int check_UINT16_C:
19929 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
19930
19931 /* Detect bugs in OpenBSD 3.9 stdint.h. */
19932 #ifdef UINT8_MAX
19933 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
19934 #endif
19935 #ifdef UINT16_MAX
19936 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
19937 #endif
19938 #ifdef UINT32_MAX
19939 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
19940 #endif
19941 #ifdef UINT64_MAX
19942 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
19943 #endif
19944 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
19945 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
19946 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
19947 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
19948 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
19949 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
19950 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
19951 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
19952 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
19953 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
19954 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
19955 };
19956
19957 int
19958 main ()
19959 {
19960
19961 ;
19962 return 0;
19963 }
19964 _ACEOF
19965 if ac_fn_c_try_compile "$LINENO"; then :
19966 if test "$cross_compiling" = yes; then :
19967 gl_cv_header_working_stdint_h=yes
19968
19969 else
19970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19971 /* end confdefs.h. */
19972
19973
19974 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19975 #include <stdint.h>
19976
19977
19978 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19979 included before <wchar.h>. */
19980 #include <stddef.h>
19981 #include <signal.h>
19982 #if HAVE_WCHAR_H
19983 # include <stdio.h>
19984 # include <time.h>
19985 # include <wchar.h>
19986 #endif
19987
19988
19989 #include <stdio.h>
19990 #include <string.h>
19991 #define MVAL(macro) MVAL1(macro)
19992 #define MVAL1(expression) #expression
19993 static const char *macro_values[] =
19994 {
19995 #ifdef INT8_MAX
19996 MVAL (INT8_MAX),
19997 #endif
19998 #ifdef INT16_MAX
19999 MVAL (INT16_MAX),
20000 #endif
20001 #ifdef INT32_MAX
20002 MVAL (INT32_MAX),
20003 #endif
20004 #ifdef INT64_MAX
20005 MVAL (INT64_MAX),
20006 #endif
20007 #ifdef UINT8_MAX
20008 MVAL (UINT8_MAX),
20009 #endif
20010 #ifdef UINT16_MAX
20011 MVAL (UINT16_MAX),
20012 #endif
20013 #ifdef UINT32_MAX
20014 MVAL (UINT32_MAX),
20015 #endif
20016 #ifdef UINT64_MAX
20017 MVAL (UINT64_MAX),
20018 #endif
20019 NULL
20020 };
20021
20022 int
20023 main ()
20024 {
20025
20026 const char **mv;
20027 for (mv = macro_values; *mv != NULL; mv++)
20028 {
20029 const char *value = *mv;
20030 /* Test whether it looks like a cast expression. */
20031 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20032 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20033 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20034 || strncmp (value, "((int)"/*)*/, 6) == 0
20035 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20036 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20037 return mv - macro_values + 1;
20038 }
20039 return 0;
20040
20041 ;
20042 return 0;
20043 }
20044 _ACEOF
20045 if ac_fn_c_try_run "$LINENO"; then :
20046 gl_cv_header_working_stdint_h=yes
20047 fi
20048 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20049 conftest.$ac_objext conftest.beam conftest.$ac_ext
20050 fi
20051
20052
20053 fi
20054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20055
20056 fi
20057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20058 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
20059 fi
20060 if test "$gl_cv_header_working_stdint_h" = yes; then
20061 STDINT_H=
20062 else
20063 for ac_header in sys/inttypes.h sys/bitypes.h
20064 do :
20065 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20066 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20067 eval as_val=\$$as_ac_Header
20068 if test "x$as_val" = x""yes; then :
20069 cat >>confdefs.h <<_ACEOF
20070 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20071 _ACEOF
20072
20073 fi
20074
20075 done
20076
20077 if test $ac_cv_header_sys_inttypes_h = yes; then
20078 HAVE_SYS_INTTYPES_H=1
20079 else
20080 HAVE_SYS_INTTYPES_H=0
20081 fi
20082
20083 if test $ac_cv_header_sys_bitypes_h = yes; then
20084 HAVE_SYS_BITYPES_H=1
20085 else
20086 HAVE_SYS_BITYPES_H=0
20087 fi
20088
20089
20090
20091
20092 if test $APPLE_UNIVERSAL_BUILD = 0; then
20093
20094
20095 for gltype in ptrdiff_t size_t ; do
20096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20097 $as_echo_n "checking for bit size of $gltype... " >&6; }
20098 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20099 $as_echo_n "(cached) " >&6
20100 else
20101 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20102 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20103 included before <wchar.h>. */
20104 #include <stddef.h>
20105 #include <signal.h>
20106 #if HAVE_WCHAR_H
20107 # include <stdio.h>
20108 # include <time.h>
20109 # include <wchar.h>
20110 #endif
20111
20112 #include <limits.h>"; then :
20113
20114 else
20115 result=unknown
20116 fi
20117
20118 eval gl_cv_bitsizeof_${gltype}=\$result
20119
20120 fi
20121 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20123 $as_echo "$ac_res" >&6; }
20124 eval result=\$gl_cv_bitsizeof_${gltype}
20125 if test $result = unknown; then
20126 result=0
20127 fi
20128 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20129 cat >>confdefs.h <<_ACEOF
20130 #define BITSIZEOF_${GLTYPE} $result
20131 _ACEOF
20132
20133 eval BITSIZEOF_${GLTYPE}=\$result
20134 done
20135
20136
20137 fi
20138
20139
20140 for gltype in sig_atomic_t wchar_t wint_t ; do
20141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20142 $as_echo_n "checking for bit size of $gltype... " >&6; }
20143 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20144 $as_echo_n "(cached) " >&6
20145 else
20146 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20147 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20148 included before <wchar.h>. */
20149 #include <stddef.h>
20150 #include <signal.h>
20151 #if HAVE_WCHAR_H
20152 # include <stdio.h>
20153 # include <time.h>
20154 # include <wchar.h>
20155 #endif
20156
20157 #include <limits.h>"; then :
20158
20159 else
20160 result=unknown
20161 fi
20162
20163 eval gl_cv_bitsizeof_${gltype}=\$result
20164
20165 fi
20166 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20168 $as_echo "$ac_res" >&6; }
20169 eval result=\$gl_cv_bitsizeof_${gltype}
20170 if test $result = unknown; then
20171 result=0
20172 fi
20173 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20174 cat >>confdefs.h <<_ACEOF
20175 #define BITSIZEOF_${GLTYPE} $result
20176 _ACEOF
20177
20178 eval BITSIZEOF_${GLTYPE}=\$result
20179 done
20180
20181
20182
20183
20184 for gltype in sig_atomic_t wchar_t wint_t ; do
20185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20186 $as_echo_n "checking whether $gltype is signed... " >&6; }
20187 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
20188 $as_echo_n "(cached) " >&6
20189 else
20190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20191 /* end confdefs.h. */
20192
20193 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20194 included before <wchar.h>. */
20195 #include <stddef.h>
20196 #include <signal.h>
20197 #if HAVE_WCHAR_H
20198 # include <stdio.h>
20199 # include <time.h>
20200 # include <wchar.h>
20201 #endif
20202
20203 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20204 int
20205 main ()
20206 {
20207
20208 ;
20209 return 0;
20210 }
20211 _ACEOF
20212 if ac_fn_c_try_compile "$LINENO"; then :
20213 result=yes
20214 else
20215 result=no
20216 fi
20217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20218 eval gl_cv_type_${gltype}_signed=\$result
20219
20220 fi
20221 eval ac_res=\$gl_cv_type_${gltype}_signed
20222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20223 $as_echo "$ac_res" >&6; }
20224 eval result=\$gl_cv_type_${gltype}_signed
20225 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20226 if test "$result" = yes; then
20227 cat >>confdefs.h <<_ACEOF
20228 #define HAVE_SIGNED_${GLTYPE} 1
20229 _ACEOF
20230
20231 eval HAVE_SIGNED_${GLTYPE}=1
20232 else
20233 eval HAVE_SIGNED_${GLTYPE}=0
20234 fi
20235 done
20236
20237
20238 gl_cv_type_ptrdiff_t_signed=yes
20239 gl_cv_type_size_t_signed=no
20240 if test $APPLE_UNIVERSAL_BUILD = 0; then
20241
20242
20243 for gltype in ptrdiff_t size_t ; do
20244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20245 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20246 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20247 $as_echo_n "(cached) " >&6
20248 else
20249 eval gl_cv_type_${gltype}_suffix=no
20250 eval result=\$gl_cv_type_${gltype}_signed
20251 if test "$result" = yes; then
20252 glsufu=
20253 else
20254 glsufu=u
20255 fi
20256 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20257 case $glsuf in
20258 '') gltype1='int';;
20259 l) gltype1='long int';;
20260 ll) gltype1='long long int';;
20261 i64) gltype1='__int64';;
20262 u) gltype1='unsigned int';;
20263 ul) gltype1='unsigned long int';;
20264 ull) gltype1='unsigned long long int';;
20265 ui64)gltype1='unsigned __int64';;
20266 esac
20267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20268 /* end confdefs.h. */
20269
20270 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20271 included before <wchar.h>. */
20272 #include <stddef.h>
20273 #include <signal.h>
20274 #if HAVE_WCHAR_H
20275 # include <stdio.h>
20276 # include <time.h>
20277 # include <wchar.h>
20278 #endif
20279
20280 extern $gltype foo;
20281 extern $gltype1 foo;
20282 int
20283 main ()
20284 {
20285
20286 ;
20287 return 0;
20288 }
20289 _ACEOF
20290 if ac_fn_c_try_compile "$LINENO"; then :
20291 eval gl_cv_type_${gltype}_suffix=\$glsuf
20292 fi
20293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20294 eval result=\$gl_cv_type_${gltype}_suffix
20295 test "$result" != no && break
20296 done
20297 fi
20298 eval ac_res=\$gl_cv_type_${gltype}_suffix
20299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20300 $as_echo "$ac_res" >&6; }
20301 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20302 eval result=\$gl_cv_type_${gltype}_suffix
20303 test "$result" = no && result=
20304 eval ${GLTYPE}_SUFFIX=\$result
20305 cat >>confdefs.h <<_ACEOF
20306 #define ${GLTYPE}_SUFFIX $result
20307 _ACEOF
20308
20309 done
20310
20311
20312 fi
20313
20314
20315 for gltype in sig_atomic_t wchar_t wint_t ; do
20316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20317 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20318 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20319 $as_echo_n "(cached) " >&6
20320 else
20321 eval gl_cv_type_${gltype}_suffix=no
20322 eval result=\$gl_cv_type_${gltype}_signed
20323 if test "$result" = yes; then
20324 glsufu=
20325 else
20326 glsufu=u
20327 fi
20328 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20329 case $glsuf in
20330 '') gltype1='int';;
20331 l) gltype1='long int';;
20332 ll) gltype1='long long int';;
20333 i64) gltype1='__int64';;
20334 u) gltype1='unsigned int';;
20335 ul) gltype1='unsigned long int';;
20336 ull) gltype1='unsigned long long int';;
20337 ui64)gltype1='unsigned __int64';;
20338 esac
20339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20340 /* end confdefs.h. */
20341
20342 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20343 included before <wchar.h>. */
20344 #include <stddef.h>
20345 #include <signal.h>
20346 #if HAVE_WCHAR_H
20347 # include <stdio.h>
20348 # include <time.h>
20349 # include <wchar.h>
20350 #endif
20351
20352 extern $gltype foo;
20353 extern $gltype1 foo;
20354 int
20355 main ()
20356 {
20357
20358 ;
20359 return 0;
20360 }
20361 _ACEOF
20362 if ac_fn_c_try_compile "$LINENO"; then :
20363 eval gl_cv_type_${gltype}_suffix=\$glsuf
20364 fi
20365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20366 eval result=\$gl_cv_type_${gltype}_suffix
20367 test "$result" != no && break
20368 done
20369 fi
20370 eval ac_res=\$gl_cv_type_${gltype}_suffix
20371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20372 $as_echo "$ac_res" >&6; }
20373 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20374 eval result=\$gl_cv_type_${gltype}_suffix
20375 test "$result" = no && result=
20376 eval ${GLTYPE}_SUFFIX=\$result
20377 cat >>confdefs.h <<_ACEOF
20378 #define ${GLTYPE}_SUFFIX $result
20379 _ACEOF
20380
20381 done
20382
20383
20384
20385 if test $BITSIZEOF_WINT_T -lt 32; then
20386 BITSIZEOF_WINT_T=32
20387 fi
20388
20389 STDINT_H=stdint.h
20390 fi
20391
20392 if test -n "$STDINT_H"; then
20393 GL_GENERATE_STDINT_H_TRUE=
20394 GL_GENERATE_STDINT_H_FALSE='#'
20395 else
20396 GL_GENERATE_STDINT_H_TRUE='#'
20397 GL_GENERATE_STDINT_H_FALSE=
20398 fi
20399
20400
20401
20402
20403
20404 GNULIB_IMAXABS=0;
20405 GNULIB_IMAXDIV=0;
20406 GNULIB_STRTOIMAX=0;
20407 GNULIB_STRTOUMAX=0;
20408 HAVE_DECL_IMAXABS=1;
20409 HAVE_DECL_IMAXDIV=1;
20410 HAVE_DECL_STRTOIMAX=1;
20411 HAVE_DECL_STRTOUMAX=1;
20412 REPLACE_STRTOIMAX=0;
20413 INT32_MAX_LT_INTMAX_MAX=1;
20414 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20415 PRI_MACROS_BROKEN=0;
20416 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20417 UINT32_MAX_LT_UINTMAX_MAX=1;
20418 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434 if test $gl_cv_have_include_next = yes; then
20435 gl_cv_next_inttypes_h='<'inttypes.h'>'
20436 else
20437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20438 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20439 if test "${gl_cv_next_inttypes_h+set}" = set; then :
20440 $as_echo_n "(cached) " >&6
20441 else
20442
20443 if test $ac_cv_header_inttypes_h = yes; then
20444
20445
20446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20447 /* end confdefs.h. */
20448 #include <inttypes.h>
20449
20450 _ACEOF
20451 case "$host_os" in
20452 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20453 *) gl_absname_cpp="$ac_cpp" ;;
20454 esac
20455
20456 case "$host_os" in
20457 mingw*)
20458 gl_dirsep_regex='[/\\]'
20459 ;;
20460 *)
20461 gl_dirsep_regex='\/'
20462 ;;
20463 esac
20464 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20465
20466 gl_header_literal_regex=`echo 'inttypes.h' \
20467 | sed -e "$gl_make_literal_regex_sed"`
20468 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20469 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20470 s|^/[^/]|//&|
20471 p
20472 q
20473 }'
20474 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20475 sed -n "$gl_absolute_header_sed"`'"'
20476 else
20477 gl_cv_next_inttypes_h='<'inttypes.h'>'
20478 fi
20479
20480
20481 fi
20482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20483 $as_echo "$gl_cv_next_inttypes_h" >&6; }
20484 fi
20485 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
20486
20487 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20488 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20489 gl_next_as_first_directive='<'inttypes.h'>'
20490 else
20491 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20492 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20493 fi
20494 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506 case "$host_os" in
20507 mingw*)
20508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20509 $as_echo_n "checking for 64-bit off_t... " >&6; }
20510 if test "${gl_cv_type_off_t_64+set}" = set; then :
20511 $as_echo_n "(cached) " >&6
20512 else
20513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20514 /* end confdefs.h. */
20515 #include <sys/types.h>
20516 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20517
20518 int
20519 main ()
20520 {
20521
20522 ;
20523 return 0;
20524 }
20525 _ACEOF
20526 if ac_fn_c_try_compile "$LINENO"; then :
20527 gl_cv_type_off_t_64=yes
20528 else
20529 gl_cv_type_off_t_64=no
20530 fi
20531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20532
20533 fi
20534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20535 $as_echo "$gl_cv_type_off_t_64" >&6; }
20536 if test $gl_cv_type_off_t_64 = no; then
20537 WINDOWS_64_BIT_OFF_T=1
20538 else
20539 WINDOWS_64_BIT_OFF_T=0
20540 fi
20541 WINDOWS_64_BIT_ST_SIZE=1
20542 ;;
20543 *)
20544 WINDOWS_64_BIT_OFF_T=0
20545 WINDOWS_64_BIT_ST_SIZE=0
20546 ;;
20547 esac
20548
20549
20550
20551
20552 GNULIB_FFSL=0;
20553 GNULIB_FFSLL=0;
20554 GNULIB_MEMCHR=0;
20555 GNULIB_MEMMEM=0;
20556 GNULIB_MEMPCPY=0;
20557 GNULIB_MEMRCHR=0;
20558 GNULIB_RAWMEMCHR=0;
20559 GNULIB_STPCPY=0;
20560 GNULIB_STPNCPY=0;
20561 GNULIB_STRCHRNUL=0;
20562 GNULIB_STRDUP=0;
20563 GNULIB_STRNCAT=0;
20564 GNULIB_STRNDUP=0;
20565 GNULIB_STRNLEN=0;
20566 GNULIB_STRPBRK=0;
20567 GNULIB_STRSEP=0;
20568 GNULIB_STRSTR=0;
20569 GNULIB_STRCASESTR=0;
20570 GNULIB_STRTOK_R=0;
20571 GNULIB_MBSLEN=0;
20572 GNULIB_MBSNLEN=0;
20573 GNULIB_MBSCHR=0;
20574 GNULIB_MBSRCHR=0;
20575 GNULIB_MBSSTR=0;
20576 GNULIB_MBSCASECMP=0;
20577 GNULIB_MBSNCASECMP=0;
20578 GNULIB_MBSPCASECMP=0;
20579 GNULIB_MBSCASESTR=0;
20580 GNULIB_MBSCSPN=0;
20581 GNULIB_MBSPBRK=0;
20582 GNULIB_MBSSPN=0;
20583 GNULIB_MBSSEP=0;
20584 GNULIB_MBSTOK_R=0;
20585 GNULIB_STRERROR=0;
20586 GNULIB_STRERROR_R=0;
20587 GNULIB_STRSIGNAL=0;
20588 GNULIB_STRVERSCMP=0;
20589 HAVE_MBSLEN=0;
20590 HAVE_FFSL=1;
20591 HAVE_FFSLL=1;
20592 HAVE_MEMCHR=1;
20593 HAVE_DECL_MEMMEM=1;
20594 HAVE_MEMPCPY=1;
20595 HAVE_DECL_MEMRCHR=1;
20596 HAVE_RAWMEMCHR=1;
20597 HAVE_STPCPY=1;
20598 HAVE_STPNCPY=1;
20599 HAVE_STRCHRNUL=1;
20600 HAVE_DECL_STRDUP=1;
20601 HAVE_DECL_STRNDUP=1;
20602 HAVE_DECL_STRNLEN=1;
20603 HAVE_STRPBRK=1;
20604 HAVE_STRSEP=1;
20605 HAVE_STRCASESTR=1;
20606 HAVE_DECL_STRTOK_R=1;
20607 HAVE_DECL_STRERROR_R=1;
20608 HAVE_DECL_STRSIGNAL=1;
20609 HAVE_STRVERSCMP=1;
20610 REPLACE_MEMCHR=0;
20611 REPLACE_MEMMEM=0;
20612 REPLACE_STPNCPY=0;
20613 REPLACE_STRDUP=0;
20614 REPLACE_STRSTR=0;
20615 REPLACE_STRCASESTR=0;
20616 REPLACE_STRCHRNUL=0;
20617 REPLACE_STRERROR=0;
20618 REPLACE_STRERROR_R=0;
20619 REPLACE_STRNCAT=0;
20620 REPLACE_STRNDUP=0;
20621 REPLACE_STRNLEN=0;
20622 REPLACE_STRSIGNAL=0;
20623 REPLACE_STRTOK_R=0;
20624 UNDEFINE_STRTOK_R=0;
20625
20626 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
20627 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
20628 ac_have_decl=1
20629 else
20630 ac_have_decl=0
20631 fi
20632
20633 cat >>confdefs.h <<_ACEOF
20634 #define HAVE_DECL_MEMRCHR $ac_have_decl
20635 _ACEOF
20636
20637
20638 GNULIB_MKTIME=0;
20639 GNULIB_NANOSLEEP=0;
20640 GNULIB_STRPTIME=0;
20641 GNULIB_TIMEGM=0;
20642 GNULIB_TIME_R=0;
20643 HAVE_DECL_LOCALTIME_R=1;
20644 HAVE_NANOSLEEP=1;
20645 HAVE_STRPTIME=1;
20646 HAVE_TIMEGM=1;
20647 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20648 REPLACE_MKTIME=GNULIB_PORTCHECK;
20649 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20650 REPLACE_TIMEGM=GNULIB_PORTCHECK;
20651
20652 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
20653 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
20654 ac_have_decl=1
20655 else
20656 ac_have_decl=0
20657 fi
20658
20659 cat >>confdefs.h <<_ACEOF
20660 #define HAVE_DECL_ALARM $ac_have_decl
20661 _ACEOF
20662
20663
20664 GNULIB_PSELECT=0;
20665 GNULIB_SELECT=0;
20666 HAVE_PSELECT=1;
20667 REPLACE_PSELECT=0;
20668 REPLACE_SELECT=0;
20669
20670
20671
20672
20673
20674
20675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20676 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
20677 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
20678 $as_echo_n "(cached) " >&6
20679 else
20680
20681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20682 /* end confdefs.h. */
20683 #include <sys/select.h>
20684 int
20685 main ()
20686 {
20687 struct timeval b;
20688 ;
20689 return 0;
20690 }
20691 _ACEOF
20692 if ac_fn_c_try_compile "$LINENO"; then :
20693 gl_cv_header_sys_select_h_selfcontained=yes
20694 else
20695 gl_cv_header_sys_select_h_selfcontained=no
20696 fi
20697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20698 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20700 /* end confdefs.h. */
20701 #include <sys/select.h>
20702 int
20703 main ()
20704 {
20705 int memset; int bzero;
20706 ;
20707 return 0;
20708 }
20709
20710 _ACEOF
20711 if ac_fn_c_try_compile "$LINENO"; then :
20712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20713 /* end confdefs.h. */
20714 #include <sys/select.h>
20715 int
20716 main ()
20717 {
20718
20719 #undef memset
20720 #define memset nonexistent_memset
20721 extern
20722 #ifdef __cplusplus
20723 "C"
20724 #endif
20725 void *memset (void *, int, unsigned long);
20726 #undef bzero
20727 #define bzero nonexistent_bzero
20728 extern
20729 #ifdef __cplusplus
20730 "C"
20731 #endif
20732 void bzero (void *, unsigned long);
20733 fd_set fds;
20734 FD_ZERO (&fds);
20735
20736 ;
20737 return 0;
20738 }
20739
20740 _ACEOF
20741 if ac_fn_c_try_link "$LINENO"; then :
20742
20743 else
20744 gl_cv_header_sys_select_h_selfcontained=no
20745 fi
20746 rm -f core conftest.err conftest.$ac_objext \
20747 conftest$ac_exeext conftest.$ac_ext
20748
20749 fi
20750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20751 fi
20752
20753 fi
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20755 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765 if test $gl_cv_have_include_next = yes; then
20766 gl_cv_next_sys_select_h='<'sys/select.h'>'
20767 else
20768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20769 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
20770 if test "${gl_cv_next_sys_select_h+set}" = set; then :
20771 $as_echo_n "(cached) " >&6
20772 else
20773
20774 if test $ac_cv_header_sys_select_h = yes; then
20775
20776
20777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20778 /* end confdefs.h. */
20779 #include <sys/select.h>
20780
20781 _ACEOF
20782 case "$host_os" in
20783 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20784 *) gl_absname_cpp="$ac_cpp" ;;
20785 esac
20786
20787 case "$host_os" in
20788 mingw*)
20789 gl_dirsep_regex='[/\\]'
20790 ;;
20791 *)
20792 gl_dirsep_regex='\/'
20793 ;;
20794 esac
20795 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20796
20797 gl_header_literal_regex=`echo 'sys/select.h' \
20798 | sed -e "$gl_make_literal_regex_sed"`
20799 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20800 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20801 s|^/[^/]|//&|
20802 p
20803 q
20804 }'
20805 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20806 sed -n "$gl_absolute_header_sed"`'"'
20807 else
20808 gl_cv_next_sys_select_h='<'sys/select.h'>'
20809 fi
20810
20811
20812 fi
20813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
20814 $as_echo "$gl_cv_next_sys_select_h" >&6; }
20815 fi
20816 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
20817
20818 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20819 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20820 gl_next_as_first_directive='<'sys/select.h'>'
20821 else
20822 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20823 gl_next_as_first_directive=$gl_cv_next_sys_select_h
20824 fi
20825 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
20826
20827
20828
20829
20830 if test $ac_cv_header_sys_select_h = yes; then
20831 HAVE_SYS_SELECT_H=1
20832 else
20833 HAVE_SYS_SELECT_H=0
20834 fi
20835
20836
20837
20838
20839
20840 if test $ac_cv_header_sys_socket_h != yes; then
20841 for ac_header in winsock2.h
20842 do :
20843 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20844 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
20845 cat >>confdefs.h <<_ACEOF
20846 #define HAVE_WINSOCK2_H 1
20847 _ACEOF
20848
20849 fi
20850
20851 done
20852
20853 fi
20854 if test "$ac_cv_header_winsock2_h" = yes; then
20855 HAVE_WINSOCK2_H=1
20856 UNISTD_H_HAVE_WINSOCK2_H=1
20857 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20858 else
20859 HAVE_WINSOCK2_H=0
20860 fi
20861
20862
20863
20864
20865
20866
20867
20868
20869 GNULIB_PTHREAD_SIGMASK=0;
20870 GNULIB_RAISE=0;
20871 GNULIB_SIGNAL_H_SIGPIPE=0;
20872 GNULIB_SIGPROCMASK=0;
20873 GNULIB_SIGACTION=0;
20874 HAVE_POSIX_SIGNALBLOCKING=1;
20875 HAVE_PTHREAD_SIGMASK=1;
20876 HAVE_RAISE=1;
20877 HAVE_SIGSET_T=1;
20878 HAVE_SIGINFO_T=1;
20879 HAVE_SIGACTION=1;
20880 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20881
20882 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20883
20884 HAVE_SIGHANDLER_T=1;
20885 REPLACE_PTHREAD_SIGMASK=0;
20886 REPLACE_RAISE=0;
20887
20888
20889
20890
20891
20892
20893
20894 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20895 #include <signal.h>
20896 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20897 #include <sys/types.h>
20898
20899 "
20900 if test "x$ac_cv_type_sigset_t" = x""yes; then :
20901
20902 cat >>confdefs.h <<_ACEOF
20903 #define HAVE_SIGSET_T 1
20904 _ACEOF
20905
20906 gl_cv_type_sigset_t=yes
20907 else
20908 gl_cv_type_sigset_t=no
20909 fi
20910
20911 if test $gl_cv_type_sigset_t != yes; then
20912 HAVE_SIGSET_T=0
20913 fi
20914
20915
20916
20917 if test $ac_cv_header_sys_socket_h = no; then
20918 for ac_header in ws2tcpip.h
20919 do :
20920 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
20921 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
20922 cat >>confdefs.h <<_ACEOF
20923 #define HAVE_WS2TCPIP_H 1
20924 _ACEOF
20925
20926 fi
20927
20928 done
20929
20930 fi
20931
20932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20933 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
20934 if test "${ac_cv_header_stdbool_h+set}" = set; then :
20935 $as_echo_n "(cached) " >&6
20936 else
20937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20938 /* end confdefs.h. */
20939
20940 #include <stdbool.h>
20941 #ifndef bool
20942 "error: bool is not defined"
20943 #endif
20944 #ifndef false
20945 "error: false is not defined"
20946 #endif
20947 #if false
20948 "error: false is not 0"
20949 #endif
20950 #ifndef true
20951 "error: true is not defined"
20952 #endif
20953 #if true != 1
20954 "error: true is not 1"
20955 #endif
20956 #ifndef __bool_true_false_are_defined
20957 "error: __bool_true_false_are_defined is not defined"
20958 #endif
20959
20960 struct s { _Bool s: 1; _Bool t; } s;
20961
20962 char a[true == 1 ? 1 : -1];
20963 char b[false == 0 ? 1 : -1];
20964 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20965 char d[(bool) 0.5 == true ? 1 : -1];
20966 /* See body of main program for 'e'. */
20967 char f[(_Bool) 0.0 == false ? 1 : -1];
20968 char g[true];
20969 char h[sizeof (_Bool)];
20970 char i[sizeof s.t];
20971 enum { j = false, k = true, l = false * true, m = true * 256 };
20972 /* The following fails for
20973 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20974 _Bool n[m];
20975 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20976 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20977 /* Catch a bug in an HP-UX C compiler. See
20978 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20979 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
20980 */
20981 _Bool q = true;
20982 _Bool *pq = &q;
20983
20984 int
20985 main ()
20986 {
20987
20988 bool e = &s;
20989 *pq |= q;
20990 *pq |= ! q;
20991 /* Refer to every declared value, to avoid compiler optimizations. */
20992 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20993 + !m + !n + !o + !p + !q + !pq);
20994
20995 ;
20996 return 0;
20997 }
20998 _ACEOF
20999 if ac_fn_c_try_compile "$LINENO"; then :
21000 ac_cv_header_stdbool_h=yes
21001 else
21002 ac_cv_header_stdbool_h=no
21003 fi
21004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21005 fi
21006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21007 $as_echo "$ac_cv_header_stdbool_h" >&6; }
21008 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21009 if test "x$ac_cv_type__Bool" = x""yes; then :
21010
21011 cat >>confdefs.h <<_ACEOF
21012 #define HAVE__BOOL 1
21013 _ACEOF
21014
21015
21016 fi
21017
21018
21019
21020 REPLACE_NULL=0;
21021 HAVE_WCHAR_T=1;
21022
21023
21024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21025 $as_echo_n "checking for wchar_t... " >&6; }
21026 if test "${gt_cv_c_wchar_t+set}" = set; then :
21027 $as_echo_n "(cached) " >&6
21028 else
21029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21030 /* end confdefs.h. */
21031 #include <stddef.h>
21032 wchar_t foo = (wchar_t)'\0';
21033 int
21034 main ()
21035 {
21036
21037 ;
21038 return 0;
21039 }
21040 _ACEOF
21041 if ac_fn_c_try_compile "$LINENO"; then :
21042 gt_cv_c_wchar_t=yes
21043 else
21044 gt_cv_c_wchar_t=no
21045 fi
21046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21047 fi
21048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21049 $as_echo "$gt_cv_c_wchar_t" >&6; }
21050 if test $gt_cv_c_wchar_t = yes; then
21051
21052 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21053
21054 fi
21055
21056
21057 GNULIB_DPRINTF=0;
21058 GNULIB_FCLOSE=0;
21059 GNULIB_FDOPEN=0;
21060 GNULIB_FFLUSH=0;
21061 GNULIB_FGETC=0;
21062 GNULIB_FGETS=0;
21063 GNULIB_FOPEN=0;
21064 GNULIB_FPRINTF=0;
21065 GNULIB_FPRINTF_POSIX=0;
21066 GNULIB_FPURGE=0;
21067 GNULIB_FPUTC=0;
21068 GNULIB_FPUTS=0;
21069 GNULIB_FREAD=0;
21070 GNULIB_FREOPEN=0;
21071 GNULIB_FSCANF=0;
21072 GNULIB_FSEEK=0;
21073 GNULIB_FSEEKO=0;
21074 GNULIB_FTELL=0;
21075 GNULIB_FTELLO=0;
21076 GNULIB_FWRITE=0;
21077 GNULIB_GETC=0;
21078 GNULIB_GETCHAR=0;
21079 GNULIB_GETDELIM=0;
21080 GNULIB_GETLINE=0;
21081 GNULIB_OBSTACK_PRINTF=0;
21082 GNULIB_OBSTACK_PRINTF_POSIX=0;
21083 GNULIB_PCLOSE=0;
21084 GNULIB_PERROR=0;
21085 GNULIB_POPEN=0;
21086 GNULIB_PRINTF=0;
21087 GNULIB_PRINTF_POSIX=0;
21088 GNULIB_PUTC=0;
21089 GNULIB_PUTCHAR=0;
21090 GNULIB_PUTS=0;
21091 GNULIB_REMOVE=0;
21092 GNULIB_RENAME=0;
21093 GNULIB_RENAMEAT=0;
21094 GNULIB_SCANF=0;
21095 GNULIB_SNPRINTF=0;
21096 GNULIB_SPRINTF_POSIX=0;
21097 GNULIB_STDIO_H_NONBLOCKING=0;
21098 GNULIB_STDIO_H_SIGPIPE=0;
21099 GNULIB_TMPFILE=0;
21100 GNULIB_VASPRINTF=0;
21101 GNULIB_VFSCANF=0;
21102 GNULIB_VSCANF=0;
21103 GNULIB_VDPRINTF=0;
21104 GNULIB_VFPRINTF=0;
21105 GNULIB_VFPRINTF_POSIX=0;
21106 GNULIB_VPRINTF=0;
21107 GNULIB_VPRINTF_POSIX=0;
21108 GNULIB_VSNPRINTF=0;
21109 GNULIB_VSPRINTF_POSIX=0;
21110 HAVE_DECL_FPURGE=1;
21111 HAVE_DECL_FSEEKO=1;
21112 HAVE_DECL_FTELLO=1;
21113 HAVE_DECL_GETDELIM=1;
21114 HAVE_DECL_GETLINE=1;
21115 HAVE_DECL_OBSTACK_PRINTF=1;
21116 HAVE_DECL_SNPRINTF=1;
21117 HAVE_DECL_VSNPRINTF=1;
21118 HAVE_DPRINTF=1;
21119 HAVE_FSEEKO=1;
21120 HAVE_FTELLO=1;
21121 HAVE_PCLOSE=1;
21122 HAVE_POPEN=1;
21123 HAVE_RENAMEAT=1;
21124 HAVE_VASPRINTF=1;
21125 HAVE_VDPRINTF=1;
21126 REPLACE_DPRINTF=0;
21127 REPLACE_FCLOSE=0;
21128 REPLACE_FDOPEN=0;
21129 REPLACE_FFLUSH=0;
21130 REPLACE_FOPEN=0;
21131 REPLACE_FPRINTF=0;
21132 REPLACE_FPURGE=0;
21133 REPLACE_FREOPEN=0;
21134 REPLACE_FSEEK=0;
21135 REPLACE_FSEEKO=0;
21136 REPLACE_FTELL=0;
21137 REPLACE_FTELLO=0;
21138 REPLACE_GETDELIM=0;
21139 REPLACE_GETLINE=0;
21140 REPLACE_OBSTACK_PRINTF=0;
21141 REPLACE_PERROR=0;
21142 REPLACE_POPEN=0;
21143 REPLACE_PRINTF=0;
21144 REPLACE_REMOVE=0;
21145 REPLACE_RENAME=0;
21146 REPLACE_RENAMEAT=0;
21147 REPLACE_SNPRINTF=0;
21148 REPLACE_SPRINTF=0;
21149 REPLACE_STDIO_READ_FUNCS=0;
21150 REPLACE_STDIO_WRITE_FUNCS=0;
21151 REPLACE_TMPFILE=0;
21152 REPLACE_VASPRINTF=0;
21153 REPLACE_VDPRINTF=0;
21154 REPLACE_VFPRINTF=0;
21155 REPLACE_VPRINTF=0;
21156 REPLACE_VSNPRINTF=0;
21157 REPLACE_VSPRINTF=0;
21158
21159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21160 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21161 if test "${ac_cv_struct_tm+set}" = set; then :
21162 $as_echo_n "(cached) " >&6
21163 else
21164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21165 /* end confdefs.h. */
21166 #include <sys/types.h>
21167 #include <time.h>
21168
21169 int
21170 main ()
21171 {
21172 struct tm tm;
21173 int *p = &tm.tm_sec;
21174 return !p;
21175 ;
21176 return 0;
21177 }
21178 _ACEOF
21179 if ac_fn_c_try_compile "$LINENO"; then :
21180 ac_cv_struct_tm=time.h
21181 else
21182 ac_cv_struct_tm=sys/time.h
21183 fi
21184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21185 fi
21186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21187 $as_echo "$ac_cv_struct_tm" >&6; }
21188 if test $ac_cv_struct_tm = sys/time.h; then
21189
21190 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
21191
21192 fi
21193
21194 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21195 #include <$ac_cv_struct_tm>
21196
21197 "
21198 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
21199
21200 cat >>confdefs.h <<_ACEOF
21201 #define HAVE_STRUCT_TM_TM_ZONE 1
21202 _ACEOF
21203
21204
21205 fi
21206
21207 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21208
21209 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
21210
21211 else
21212 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21213 "
21214 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21215 ac_have_decl=1
21216 else
21217 ac_have_decl=0
21218 fi
21219
21220 cat >>confdefs.h <<_ACEOF
21221 #define HAVE_DECL_TZNAME $ac_have_decl
21222 _ACEOF
21223
21224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21225 $as_echo_n "checking for tzname... " >&6; }
21226 if test "${ac_cv_var_tzname+set}" = set; then :
21227 $as_echo_n "(cached) " >&6
21228 else
21229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21230 /* end confdefs.h. */
21231 #include <time.h>
21232 #if !HAVE_DECL_TZNAME
21233 extern char *tzname[];
21234 #endif
21235
21236 int
21237 main ()
21238 {
21239 return tzname[0][0];
21240 ;
21241 return 0;
21242 }
21243 _ACEOF
21244 if ac_fn_c_try_link "$LINENO"; then :
21245 ac_cv_var_tzname=yes
21246 else
21247 ac_cv_var_tzname=no
21248 fi
21249 rm -f core conftest.err conftest.$ac_objext \
21250 conftest$ac_exeext conftest.$ac_ext
21251 fi
21252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21253 $as_echo "$ac_cv_var_tzname" >&6; }
21254 if test $ac_cv_var_tzname = yes; then
21255
21256 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
21257
21258 fi
21259 fi
21260
21261
21262 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21263 "
21264 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21265
21266 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
21267
21268 fi
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282 if test $gl_cv_have_include_next = yes; then
21283 gl_cv_next_string_h='<'string.h'>'
21284 else
21285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21286 $as_echo_n "checking absolute name of <string.h>... " >&6; }
21287 if test "${gl_cv_next_string_h+set}" = set; then :
21288 $as_echo_n "(cached) " >&6
21289 else
21290
21291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21292 /* end confdefs.h. */
21293 #include <string.h>
21294
21295 _ACEOF
21296 case "$host_os" in
21297 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21298 *) gl_absname_cpp="$ac_cpp" ;;
21299 esac
21300
21301 case "$host_os" in
21302 mingw*)
21303 gl_dirsep_regex='[/\\]'
21304 ;;
21305 *)
21306 gl_dirsep_regex='\/'
21307 ;;
21308 esac
21309 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21310
21311 gl_header_literal_regex=`echo 'string.h' \
21312 | sed -e "$gl_make_literal_regex_sed"`
21313 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21314 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21315 s|^/[^/]|//&|
21316 p
21317 q
21318 }'
21319 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21320 sed -n "$gl_absolute_header_sed"`'"'
21321
21322
21323 fi
21324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21325 $as_echo "$gl_cv_next_string_h" >&6; }
21326 fi
21327 NEXT_STRING_H=$gl_cv_next_string_h
21328
21329 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21330 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21331 gl_next_as_first_directive='<'string.h'>'
21332 else
21333 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21334 gl_next_as_first_directive=$gl_cv_next_string_h
21335 fi
21336 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21347 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21348 ac_have_decl=1
21349 else
21350 ac_have_decl=0
21351 fi
21352
21353 cat >>confdefs.h <<_ACEOF
21354 #define HAVE_DECL_STRTOIMAX $ac_have_decl
21355 _ACEOF
21356
21357
21358
21359 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21360 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21361 ac_have_decl=1
21362 else
21363 ac_have_decl=0
21364 fi
21365
21366 cat >>confdefs.h <<_ACEOF
21367 #define HAVE_DECL_STRTOUMAX $ac_have_decl
21368 _ACEOF
21369
21370
21371
21372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21373 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21374 if test "${ac_cv_header_stat_broken+set}" = set; then :
21375 $as_echo_n "(cached) " >&6
21376 else
21377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21378 /* end confdefs.h. */
21379 #include <sys/types.h>
21380 #include <sys/stat.h>
21381
21382 #if defined S_ISBLK && defined S_IFDIR
21383 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21384 #endif
21385
21386 #if defined S_ISBLK && defined S_IFCHR
21387 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21388 #endif
21389
21390 #if defined S_ISLNK && defined S_IFREG
21391 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21392 #endif
21393
21394 #if defined S_ISSOCK && defined S_IFREG
21395 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21396 #endif
21397
21398 _ACEOF
21399 if ac_fn_c_try_compile "$LINENO"; then :
21400 ac_cv_header_stat_broken=no
21401 else
21402 ac_cv_header_stat_broken=yes
21403 fi
21404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21405 fi
21406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21407 $as_echo "$ac_cv_header_stat_broken" >&6; }
21408 if test $ac_cv_header_stat_broken = yes; then
21409
21410 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
21411
21412 fi
21413
21414
21415
21416
21417
21418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21419 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21420 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21421 $as_echo_n "(cached) " >&6
21422 else
21423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21424 /* end confdefs.h. */
21425 #include <time.h>
21426
21427 int
21428 main ()
21429 {
21430 static struct timespec x; x.tv_sec = x.tv_nsec;
21431 ;
21432 return 0;
21433 }
21434 _ACEOF
21435 if ac_fn_c_try_compile "$LINENO"; then :
21436 gl_cv_sys_struct_timespec_in_time_h=yes
21437 else
21438 gl_cv_sys_struct_timespec_in_time_h=no
21439 fi
21440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21441 fi
21442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21443 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21444
21445 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21446 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21447 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21448 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21449 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21450 else
21451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21452 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21453 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21454 $as_echo_n "(cached) " >&6
21455 else
21456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21457 /* end confdefs.h. */
21458 #include <sys/time.h>
21459
21460 int
21461 main ()
21462 {
21463 static struct timespec x; x.tv_sec = x.tv_nsec;
21464 ;
21465 return 0;
21466 }
21467 _ACEOF
21468 if ac_fn_c_try_compile "$LINENO"; then :
21469 gl_cv_sys_struct_timespec_in_sys_time_h=yes
21470 else
21471 gl_cv_sys_struct_timespec_in_sys_time_h=no
21472 fi
21473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21474 fi
21475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21476 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21477 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21478 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21479 else
21480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21481 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21482 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
21483 $as_echo_n "(cached) " >&6
21484 else
21485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21486 /* end confdefs.h. */
21487 #include <pthread.h>
21488
21489 int
21490 main ()
21491 {
21492 static struct timespec x; x.tv_sec = x.tv_nsec;
21493 ;
21494 return 0;
21495 }
21496 _ACEOF
21497 if ac_fn_c_try_compile "$LINENO"; then :
21498 gl_cv_sys_struct_timespec_in_pthread_h=yes
21499 else
21500 gl_cv_sys_struct_timespec_in_pthread_h=no
21501 fi
21502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21503 fi
21504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21505 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21506 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21507 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21508 fi
21509 fi
21510 fi
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526 if test $gl_cv_have_include_next = yes; then
21527 gl_cv_next_time_h='<'time.h'>'
21528 else
21529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21530 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21531 if test "${gl_cv_next_time_h+set}" = set; then :
21532 $as_echo_n "(cached) " >&6
21533 else
21534
21535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21536 /* end confdefs.h. */
21537 #include <time.h>
21538
21539 _ACEOF
21540 case "$host_os" in
21541 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21542 *) gl_absname_cpp="$ac_cpp" ;;
21543 esac
21544
21545 case "$host_os" in
21546 mingw*)
21547 gl_dirsep_regex='[/\\]'
21548 ;;
21549 *)
21550 gl_dirsep_regex='\/'
21551 ;;
21552 esac
21553 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21554
21555 gl_header_literal_regex=`echo 'time.h' \
21556 | sed -e "$gl_make_literal_regex_sed"`
21557 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21558 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21559 s|^/[^/]|//&|
21560 p
21561 q
21562 }'
21563 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21564 sed -n "$gl_absolute_header_sed"`'"'
21565
21566
21567 fi
21568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21569 $as_echo "$gl_cv_next_time_h" >&6; }
21570 fi
21571 NEXT_TIME_H=$gl_cv_next_time_h
21572
21573 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21574 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21575 gl_next_as_first_directive='<'time.h'>'
21576 else
21577 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21578 gl_next_as_first_directive=$gl_cv_next_time_h
21579 fi
21580 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21596 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21597 ac_have_decl=1
21598 else
21599 ac_have_decl=0
21600 fi
21601
21602 cat >>confdefs.h <<_ACEOF
21603 #define HAVE_DECL_UNSETENV $ac_have_decl
21604 _ACEOF
21605
21606
21607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21608 $as_echo_n "checking whether the utimes function works... " >&6; }
21609 if test "${gl_cv_func_working_utimes+set}" = set; then :
21610 $as_echo_n "(cached) " >&6
21611 else
21612
21613 if test "$cross_compiling" = yes; then :
21614 gl_cv_func_working_utimes=no
21615 else
21616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21617 /* end confdefs.h. */
21618
21619 #include <sys/types.h>
21620 #include <sys/stat.h>
21621 #include <fcntl.h>
21622 #include <sys/time.h>
21623 #include <time.h>
21624 #include <unistd.h>
21625 #include <stdlib.h>
21626 #include <stdio.h>
21627 #include <utime.h>
21628
21629 static int
21630 inorder (time_t a, time_t b, time_t c)
21631 {
21632 return a <= b && b <= c;
21633 }
21634
21635 int
21636 main ()
21637 {
21638 int result = 0;
21639 char const *file = "conftest.utimes";
21640 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
21641
21642 /* Test whether utimes() essentially works. */
21643 {
21644 struct stat sbuf;
21645 FILE *f = fopen (file, "w");
21646 if (f == NULL)
21647 result |= 1;
21648 else if (fclose (f) != 0)
21649 result |= 1;
21650 else if (utimes (file, timeval) != 0)
21651 result |= 2;
21652 else if (lstat (file, &sbuf) != 0)
21653 result |= 1;
21654 else if (!(sbuf.st_atime == timeval[0].tv_sec
21655 && sbuf.st_mtime == timeval[1].tv_sec))
21656 result |= 4;
21657 if (unlink (file) != 0)
21658 result |= 1;
21659 }
21660
21661 /* Test whether utimes() with a NULL argument sets the file's timestamp
21662 to the current time. Use 'fstat' as well as 'time' to
21663 determine the "current" time, to accommodate NFS file systems
21664 if there is a time skew between the host and the NFS server. */
21665 {
21666 int fd = open (file, O_WRONLY|O_CREAT, 0644);
21667 if (fd < 0)
21668 result |= 1;
21669 else
21670 {
21671 time_t t0, t2;
21672 struct stat st0, st1, st2;
21673 if (time (&t0) == (time_t) -1)
21674 result |= 1;
21675 else if (fstat (fd, &st0) != 0)
21676 result |= 1;
21677 else if (utimes (file, timeval) != 0)
21678 result |= 2;
21679 else if (utimes (file, NULL) != 0)
21680 result |= 8;
21681 else if (fstat (fd, &st1) != 0)
21682 result |= 1;
21683 else if (write (fd, "\n", 1) != 1)
21684 result |= 1;
21685 else if (fstat (fd, &st2) != 0)
21686 result |= 1;
21687 else if (time (&t2) == (time_t) -1)
21688 result |= 1;
21689 else
21690 {
21691 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
21692 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
21693 if (! (st1.st_atime == st1.st_mtime))
21694 result |= 16;
21695 if (! (m_ok_POSIX || m_ok_NFS))
21696 result |= 32;
21697 }
21698 if (close (fd) != 0)
21699 result |= 1;
21700 }
21701 if (unlink (file) != 0)
21702 result |= 1;
21703 }
21704
21705 /* Test whether utimes() with a NULL argument works on read-only files. */
21706 {
21707 int fd = open (file, O_WRONLY|O_CREAT, 0444);
21708 if (fd < 0)
21709 result |= 1;
21710 else if (close (fd) != 0)
21711 result |= 1;
21712 else if (utimes (file, NULL) != 0)
21713 result |= 64;
21714 if (unlink (file) != 0)
21715 result |= 1;
21716 }
21717
21718 return result;
21719 }
21720
21721 _ACEOF
21722 if ac_fn_c_try_run "$LINENO"; then :
21723 gl_cv_func_working_utimes=yes
21724 else
21725 gl_cv_func_working_utimes=no
21726 fi
21727 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21728 conftest.$ac_objext conftest.beam conftest.$ac_ext
21729 fi
21730
21731 fi
21732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
21733 $as_echo "$gl_cv_func_working_utimes" >&6; }
21734
21735 if test $gl_cv_func_working_utimes = yes; then
21736
21737 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
21738
21739 fi
21740
21741
21742
21743
21744
21745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
21746 $as_echo_n "checking for struct utimbuf... " >&6; }
21747 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
21748 $as_echo_n "(cached) " >&6
21749 else
21750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21751 /* end confdefs.h. */
21752 #if HAVE_SYS_TIME_H
21753 #include <sys/time.h>
21754 #endif
21755 #include <time.h>
21756 #ifdef HAVE_UTIME_H
21757 #include <utime.h>
21758 #endif
21759
21760 int
21761 main ()
21762 {
21763 static struct utimbuf x; x.actime = x.modtime;
21764 ;
21765 return 0;
21766 }
21767 _ACEOF
21768 if ac_fn_c_try_compile "$LINENO"; then :
21769 gl_cv_sys_struct_utimbuf=yes
21770 else
21771 gl_cv_sys_struct_utimbuf=no
21772 fi
21773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21774 fi
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
21776 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
21777
21778 if test $gl_cv_sys_struct_utimbuf = yes; then
21779
21780 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
21781
21782 fi
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
21795 $as_echo_n "checking type of array argument to getgroups... " >&6; }
21796 if test "${ac_cv_type_getgroups+set}" = set; then :
21797 $as_echo_n "(cached) " >&6
21798 else
21799 if test "$cross_compiling" = yes; then :
21800 ac_cv_type_getgroups=cross
21801 else
21802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21803 /* end confdefs.h. */
21804 /* Thanks to Mike Rendell for this test. */
21805 $ac_includes_default
21806 #define NGID 256
21807 #undef MAX
21808 #define MAX(x, y) ((x) > (y) ? (x) : (y))
21809
21810 int
21811 main ()
21812 {
21813 gid_t gidset[NGID];
21814 int i, n;
21815 union { gid_t gval; long int lval; } val;
21816
21817 val.lval = -1;
21818 for (i = 0; i < NGID; i++)
21819 gidset[i] = val.gval;
21820 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
21821 gidset);
21822 /* Exit non-zero if getgroups seems to require an array of ints. This
21823 happens when gid_t is short int but getgroups modifies an array
21824 of ints. */
21825 return n > 0 && gidset[n] != val.gval;
21826 }
21827 _ACEOF
21828 if ac_fn_c_try_run "$LINENO"; then :
21829 ac_cv_type_getgroups=gid_t
21830 else
21831 ac_cv_type_getgroups=int
21832 fi
21833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21834 conftest.$ac_objext conftest.beam conftest.$ac_ext
21835 fi
21836
21837 if test $ac_cv_type_getgroups = cross; then
21838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21839 /* end confdefs.h. */
21840 #include <unistd.h>
21841
21842 _ACEOF
21843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21844 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
21845 ac_cv_type_getgroups=gid_t
21846 else
21847 ac_cv_type_getgroups=int
21848 fi
21849 rm -f conftest*
21850
21851 fi
21852 fi
21853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
21854 $as_echo "$ac_cv_type_getgroups" >&6; }
21855
21856 cat >>confdefs.h <<_ACEOF
21857 #define GETGROUPS_T $ac_cv_type_getgroups
21858 _ACEOF
21859
21860
21861
21862
21863 if false; then
21864 GL_COND_LIBTOOL_TRUE=
21865 GL_COND_LIBTOOL_FALSE='#'
21866 else
21867 GL_COND_LIBTOOL_TRUE='#'
21868 GL_COND_LIBTOOL_FALSE=
21869 fi
21870
21871 gl_cond_libtool=false
21872 gl_libdeps=
21873 gl_ltlibdeps=
21874 gl_m4_base='m4'
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884 gl_source_base='lib'
21885
21886
21887 if test $ac_cv_func_alloca_works = no; then
21888 :
21889 fi
21890
21891 # Define an additional variable used in the Makefile substitution.
21892 if test $ac_cv_working_alloca_h = yes; then
21893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
21894 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
21895 if test "${gl_cv_rpl_alloca+set}" = set; then :
21896 $as_echo_n "(cached) " >&6
21897 else
21898
21899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21900 /* end confdefs.h. */
21901
21902 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
21903 Need own alloca
21904 #endif
21905
21906 _ACEOF
21907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21908 $EGREP "Need own alloca" >/dev/null 2>&1; then :
21909 gl_cv_rpl_alloca=yes
21910 else
21911 gl_cv_rpl_alloca=no
21912 fi
21913 rm -f conftest*
21914
21915
21916 fi
21917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
21918 $as_echo "$gl_cv_rpl_alloca" >&6; }
21919 if test $gl_cv_rpl_alloca = yes; then
21920
21921 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
21922
21923 ALLOCA_H=alloca.h
21924 else
21925 ALLOCA_H=
21926 fi
21927 else
21928 ALLOCA_H=alloca.h
21929 fi
21930
21931 if test -n "$ALLOCA_H"; then
21932 GL_GENERATE_ALLOCA_H_TRUE=
21933 GL_GENERATE_ALLOCA_H_FALSE='#'
21934 else
21935 GL_GENERATE_ALLOCA_H_TRUE='#'
21936 GL_GENERATE_ALLOCA_H_FALSE=
21937 fi
21938
21939
21940
21941
21942
21943
21944 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
21945 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
21946
21947 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
21948 # programs in the package would end up linked with that potentially-shared
21949 # library, inducing unnecessary run-time overhead.
21950 LIB_CLOCK_GETTIME=
21951
21952 gl_saved_libs=$LIBS
21953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21954 $as_echo_n "checking for library containing clock_gettime... " >&6; }
21955 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21956 $as_echo_n "(cached) " >&6
21957 else
21958 ac_func_search_save_LIBS=$LIBS
21959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21960 /* end confdefs.h. */
21961
21962 /* Override any GCC internal prototype to avoid an error.
21963 Use char because int might match the return type of a GCC
21964 builtin and then its argument prototype would still apply. */
21965 #ifdef __cplusplus
21966 extern "C"
21967 #endif
21968 char clock_gettime ();
21969 int
21970 main ()
21971 {
21972 return clock_gettime ();
21973 ;
21974 return 0;
21975 }
21976 _ACEOF
21977 for ac_lib in '' rt posix4; do
21978 if test -z "$ac_lib"; then
21979 ac_res="none required"
21980 else
21981 ac_res=-l$ac_lib
21982 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21983 fi
21984 if ac_fn_c_try_link "$LINENO"; then :
21985 ac_cv_search_clock_gettime=$ac_res
21986 fi
21987 rm -f core conftest.err conftest.$ac_objext \
21988 conftest$ac_exeext
21989 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21990 break
21991 fi
21992 done
21993 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21994
21995 else
21996 ac_cv_search_clock_gettime=no
21997 fi
21998 rm conftest.$ac_ext
21999 LIBS=$ac_func_search_save_LIBS
22000 fi
22001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22002 $as_echo "$ac_cv_search_clock_gettime" >&6; }
22003 ac_res=$ac_cv_search_clock_gettime
22004 if test "$ac_res" != no; then :
22005 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22006 test "$ac_cv_search_clock_gettime" = "none required" ||
22007 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22008 fi
22009
22010 for ac_func in clock_gettime clock_settime
22011 do :
22012 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22013 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22014 eval as_val=\$$as_ac_var
22015 if test "x$as_val" = x""yes; then :
22016 cat >>confdefs.h <<_ACEOF
22017 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22018 _ACEOF
22019
22020 fi
22021 done
22022
22023 LIBS=$gl_saved_libs
22024
22025
22026 :
22027
22028
22029
22030 cat >>confdefs.h <<_ACEOF
22031 #define GNULIB_CLOSE_STREAM 1
22032 _ACEOF
22033
22034
22035
22036
22037 :
22038
22039
22040
22041 :
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061 if test $gl_cv_have_include_next = yes; then
22062 gl_cv_next_dirent_h='<'dirent.h'>'
22063 else
22064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22065 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22066 if test "${gl_cv_next_dirent_h+set}" = set; then :
22067 $as_echo_n "(cached) " >&6
22068 else
22069
22070 if test $ac_cv_header_dirent_h = yes; then
22071
22072
22073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22074 /* end confdefs.h. */
22075 #include <dirent.h>
22076
22077 _ACEOF
22078 case "$host_os" in
22079 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22080 *) gl_absname_cpp="$ac_cpp" ;;
22081 esac
22082
22083 case "$host_os" in
22084 mingw*)
22085 gl_dirsep_regex='[/\\]'
22086 ;;
22087 *)
22088 gl_dirsep_regex='\/'
22089 ;;
22090 esac
22091 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22092
22093 gl_header_literal_regex=`echo 'dirent.h' \
22094 | sed -e "$gl_make_literal_regex_sed"`
22095 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22096 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22097 s|^/[^/]|//&|
22098 p
22099 q
22100 }'
22101 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22102 sed -n "$gl_absolute_header_sed"`'"'
22103 else
22104 gl_cv_next_dirent_h='<'dirent.h'>'
22105 fi
22106
22107
22108 fi
22109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22110 $as_echo "$gl_cv_next_dirent_h" >&6; }
22111 fi
22112 NEXT_DIRENT_H=$gl_cv_next_dirent_h
22113
22114 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22115 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22116 gl_next_as_first_directive='<'dirent.h'>'
22117 else
22118 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22119 gl_next_as_first_directive=$gl_cv_next_dirent_h
22120 fi
22121 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
22122
22123
22124
22125
22126 if test $ac_cv_header_dirent_h = yes; then
22127 HAVE_DIRENT_H=1
22128 else
22129 HAVE_DIRENT_H=0
22130 fi
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
22142
22143
22144 if test $HAVE_DUP2 = 1; then
22145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22146 $as_echo_n "checking whether dup2 works... " >&6; }
22147 if test "${gl_cv_func_dup2_works+set}" = set; then :
22148 $as_echo_n "(cached) " >&6
22149 else
22150 if test "$cross_compiling" = yes; then :
22151 case "$host_os" in
22152 mingw*) # on this platform, dup2 always returns 0 for success
22153 gl_cv_func_dup2_works="guessing no" ;;
22154 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22155 gl_cv_func_dup2_works="guessing no" ;;
22156 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22157 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22158 gl_cv_func_dup2_works="guessing no" ;;
22159 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22160 gl_cv_func_dup2_works="guessing no" ;;
22161 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22162 gl_cv_func_dup2_works="guessing no" ;;
22163 *) gl_cv_func_dup2_works="guessing yes" ;;
22164 esac
22165 else
22166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22167 /* end confdefs.h. */
22168
22169 #include <unistd.h>
22170 #include <fcntl.h>
22171 #include <errno.h>
22172 int
22173 main ()
22174 {
22175 int result = 0;
22176 #ifdef FD_CLOEXEC
22177 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22178 result |= 1;
22179 #endif
22180 if (dup2 (1, 1) == 0)
22181 result |= 2;
22182 #ifdef FD_CLOEXEC
22183 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22184 result |= 4;
22185 #endif
22186 close (0);
22187 if (dup2 (0, 0) != -1)
22188 result |= 8;
22189 /* Many gnulib modules require POSIX conformance of EBADF. */
22190 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22191 result |= 16;
22192 /* Flush out a cygwin core dump. */
22193 if (dup2 (2, -1) != -1 || errno != EBADF)
22194 result |= 32;
22195 return result;
22196
22197 ;
22198 return 0;
22199 }
22200
22201 _ACEOF
22202 if ac_fn_c_try_run "$LINENO"; then :
22203 gl_cv_func_dup2_works=yes
22204 else
22205 gl_cv_func_dup2_works=no
22206 fi
22207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22208 conftest.$ac_objext conftest.beam conftest.$ac_ext
22209 fi
22210
22211
22212 fi
22213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22214 $as_echo "$gl_cv_func_dup2_works" >&6; }
22215 case "$gl_cv_func_dup2_works" in
22216 *yes) ;;
22217 *)
22218 REPLACE_DUP2=1
22219 ;;
22220 esac
22221 fi
22222
22223
22224 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22225
22226
22227
22228
22229
22230
22231
22232
22233 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22234
22235
22236 fi
22237
22238
22239
22240
22241
22242 GNULIB_DUP2=1
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254 GNULIB_ENVIRON=1
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264 LIB_EXECINFO=''
22265 EXECINFO_H='execinfo.h'
22266
22267 if test $ac_cv_header_execinfo_h = yes; then
22268 gl_saved_libs=$LIBS
22269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22270 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22271 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22272 $as_echo_n "(cached) " >&6
22273 else
22274 ac_func_search_save_LIBS=$LIBS
22275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22276 /* end confdefs.h. */
22277
22278 /* Override any GCC internal prototype to avoid an error.
22279 Use char because int might match the return type of a GCC
22280 builtin and then its argument prototype would still apply. */
22281 #ifdef __cplusplus
22282 extern "C"
22283 #endif
22284 char backtrace_symbols_fd ();
22285 int
22286 main ()
22287 {
22288 return backtrace_symbols_fd ();
22289 ;
22290 return 0;
22291 }
22292 _ACEOF
22293 for ac_lib in '' execinfo; do
22294 if test -z "$ac_lib"; then
22295 ac_res="none required"
22296 else
22297 ac_res=-l$ac_lib
22298 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22299 fi
22300 if ac_fn_c_try_link "$LINENO"; then :
22301 ac_cv_search_backtrace_symbols_fd=$ac_res
22302 fi
22303 rm -f core conftest.err conftest.$ac_objext \
22304 conftest$ac_exeext
22305 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22306 break
22307 fi
22308 done
22309 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22310
22311 else
22312 ac_cv_search_backtrace_symbols_fd=no
22313 fi
22314 rm conftest.$ac_ext
22315 LIBS=$ac_func_search_save_LIBS
22316 fi
22317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22318 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22319 ac_res=$ac_cv_search_backtrace_symbols_fd
22320 if test "$ac_res" != no; then :
22321 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22322 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22323 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22324 fi
22325
22326 LIBS=$gl_saved_libs
22327 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22328 fi
22329
22330 if test -n "$EXECINFO_H"; then
22331
22332
22333
22334
22335
22336
22337
22338
22339 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22340
22341 fi
22342
22343
22344
22345 if test -n "$EXECINFO_H"; then
22346 GL_GENERATE_EXECINFO_H_TRUE=
22347 GL_GENERATE_EXECINFO_H_FALSE='#'
22348 else
22349 GL_GENERATE_EXECINFO_H_TRUE='#'
22350 GL_GENERATE_EXECINFO_H_FALSE=
22351 fi
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361 if test $ac_cv_func_faccessat = no; then
22362 HAVE_FACCESSAT=0
22363 fi
22364
22365 if test $HAVE_FACCESSAT = 0; then
22366
22367
22368
22369
22370
22371
22372
22373
22374 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22375
22376
22377 for ac_func in access
22378 do :
22379 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22380 if test "x$ac_cv_func_access" = x""yes; then :
22381 cat >>confdefs.h <<_ACEOF
22382 #define HAVE_ACCESS 1
22383 _ACEOF
22384
22385 fi
22386 done
22387
22388
22389 fi
22390
22391
22392 cat >>confdefs.h <<_ACEOF
22393 #define GNULIB_FACCESSAT 1
22394 _ACEOF
22395
22396
22397
22398
22399
22400
22401
22402 GNULIB_FACCESSAT=1
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419 if test $gl_cv_have_include_next = yes; then
22420 gl_cv_next_fcntl_h='<'fcntl.h'>'
22421 else
22422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22423 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22424 if test "${gl_cv_next_fcntl_h+set}" = set; then :
22425 $as_echo_n "(cached) " >&6
22426 else
22427
22428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22429 /* end confdefs.h. */
22430 #include <fcntl.h>
22431
22432 _ACEOF
22433 case "$host_os" in
22434 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22435 *) gl_absname_cpp="$ac_cpp" ;;
22436 esac
22437
22438 case "$host_os" in
22439 mingw*)
22440 gl_dirsep_regex='[/\\]'
22441 ;;
22442 *)
22443 gl_dirsep_regex='\/'
22444 ;;
22445 esac
22446 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22447
22448 gl_header_literal_regex=`echo 'fcntl.h' \
22449 | sed -e "$gl_make_literal_regex_sed"`
22450 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22451 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22452 s|^/[^/]|//&|
22453 p
22454 q
22455 }'
22456 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22457 sed -n "$gl_absolute_header_sed"`'"'
22458
22459
22460 fi
22461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22462 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22463 fi
22464 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22465
22466 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22467 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22468 gl_next_as_first_directive='<'fcntl.h'>'
22469 else
22470 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22471 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22472 fi
22473 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489 LIB_FDATASYNC=
22490
22491
22492 if test $ac_cv_have_decl_fdatasync = no; then
22493 HAVE_DECL_FDATASYNC=0
22494 for ac_func in fdatasync
22495 do :
22496 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
22497 if test "x$ac_cv_func_fdatasync" = x""yes; then :
22498 cat >>confdefs.h <<_ACEOF
22499 #define HAVE_FDATASYNC 1
22500 _ACEOF
22501
22502 fi
22503 done
22504
22505 if test $ac_cv_func_fdatasync = no; then
22506 HAVE_FDATASYNC=0
22507 fi
22508 else
22509 gl_saved_libs=$LIBS
22510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
22511 $as_echo_n "checking for library containing fdatasync... " >&6; }
22512 if test "${ac_cv_search_fdatasync+set}" = set; then :
22513 $as_echo_n "(cached) " >&6
22514 else
22515 ac_func_search_save_LIBS=$LIBS
22516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22517 /* end confdefs.h. */
22518
22519 /* Override any GCC internal prototype to avoid an error.
22520 Use char because int might match the return type of a GCC
22521 builtin and then its argument prototype would still apply. */
22522 #ifdef __cplusplus
22523 extern "C"
22524 #endif
22525 char fdatasync ();
22526 int
22527 main ()
22528 {
22529 return fdatasync ();
22530 ;
22531 return 0;
22532 }
22533 _ACEOF
22534 for ac_lib in '' rt posix4; do
22535 if test -z "$ac_lib"; then
22536 ac_res="none required"
22537 else
22538 ac_res=-l$ac_lib
22539 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22540 fi
22541 if ac_fn_c_try_link "$LINENO"; then :
22542 ac_cv_search_fdatasync=$ac_res
22543 fi
22544 rm -f core conftest.err conftest.$ac_objext \
22545 conftest$ac_exeext
22546 if test "${ac_cv_search_fdatasync+set}" = set; then :
22547 break
22548 fi
22549 done
22550 if test "${ac_cv_search_fdatasync+set}" = set; then :
22551
22552 else
22553 ac_cv_search_fdatasync=no
22554 fi
22555 rm conftest.$ac_ext
22556 LIBS=$ac_func_search_save_LIBS
22557 fi
22558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
22559 $as_echo "$ac_cv_search_fdatasync" >&6; }
22560 ac_res=$ac_cv_search_fdatasync
22561 if test "$ac_res" != no; then :
22562 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22563 test "$ac_cv_search_fdatasync" = "none required" ||
22564 LIB_FDATASYNC=$ac_cv_search_fdatasync
22565 fi
22566
22567 LIBS=$gl_saved_libs
22568 fi
22569
22570 if test $HAVE_FDATASYNC = 0; then
22571
22572
22573
22574
22575
22576
22577
22578
22579 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
22580
22581 fi
22582
22583
22584
22585
22586
22587 GNULIB_FDATASYNC=1
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22599 #include <dirent.h>
22600
22601 "
22602 if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
22603 ac_have_decl=1
22604 else
22605 ac_have_decl=0
22606 fi
22607
22608 cat >>confdefs.h <<_ACEOF
22609 #define HAVE_DECL_FDOPENDIR $ac_have_decl
22610 _ACEOF
22611 if test $ac_have_decl = 1; then :
22612
22613 else
22614 HAVE_DECL_FDOPENDIR=0
22615 fi
22616
22617
22618 if test $ac_cv_func_fdopendir = no; then
22619 HAVE_FDOPENDIR=0
22620 else
22621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22622 $as_echo_n "checking whether fdopendir works... " >&6; }
22623 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
22624 $as_echo_n "(cached) " >&6
22625 else
22626 if test "$cross_compiling" = yes; then :
22627 case "$host_os" in
22628 # Guess yes on glibc systems.
22629 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22630 # If we don't know, assume the worst.
22631 *) gl_cv_func_fdopendir_works="guessing no" ;;
22632 esac
22633
22634 else
22635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22636 /* end confdefs.h. */
22637
22638 #include <dirent.h>
22639 #include <fcntl.h>
22640 #include <unistd.h>
22641 #if !HAVE_DECL_FDOPENDIR
22642 extern
22643 # ifdef __cplusplus
22644 "C"
22645 # endif
22646 DIR *fdopendir (int);
22647 #endif
22648
22649 int
22650 main ()
22651 {
22652 int result = 0;
22653 int fd = open ("conftest.c", O_RDONLY);
22654 if (fd < 0) result |= 1;
22655 if (fdopendir (fd)) result |= 2;
22656 if (close (fd)) result |= 4;
22657 return result;
22658 ;
22659 return 0;
22660 }
22661 _ACEOF
22662 if ac_fn_c_try_run "$LINENO"; then :
22663 gl_cv_func_fdopendir_works=yes
22664 else
22665 gl_cv_func_fdopendir_works=no
22666 fi
22667 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22668 conftest.$ac_objext conftest.beam conftest.$ac_ext
22669 fi
22670
22671 fi
22672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22673 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
22674 case "$gl_cv_func_fdopendir_works" in
22675 *yes) ;;
22676 *)
22677 REPLACE_FDOPENDIR=1
22678 ;;
22679 esac
22680 fi
22681
22682 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22683
22684
22685
22686
22687
22688
22689
22690
22691 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22692
22693 fi
22694
22695
22696
22697
22698
22699 GNULIB_FDOPENDIR=1
22700
22701
22702
22703
22704
22705
22706
22707 cat >>confdefs.h <<_ACEOF
22708 #define GNULIB_FDOPENDIR 1
22709 _ACEOF
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719 fp_headers='
22720 # include <stdio.h>
22721 # if HAVE_STDIO_EXT_H
22722 # include <stdio_ext.h>
22723 # endif
22724 '
22725 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22726 "
22727 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
22728 ac_have_decl=1
22729 else
22730 ac_have_decl=0
22731 fi
22732
22733 cat >>confdefs.h <<_ACEOF
22734 #define HAVE_DECL___FPENDING $ac_have_decl
22735 _ACEOF
22736
22737
22738 if test $ac_cv_func___fpending = no; then
22739
22740
22741
22742
22743
22744
22745
22746
22747 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22748
22749
22750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
22751 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
22752 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
22753 $as_echo_n "(cached) " >&6
22754 else
22755
22756 for ac_expr in \
22757 \
22758 '# glibc2' \
22759 'fp->_IO_write_ptr - fp->_IO_write_base' \
22760 \
22761 '# traditional Unix' \
22762 'fp->_ptr - fp->_base' \
22763 \
22764 '# BSD' \
22765 'fp->_p - fp->_bf._base' \
22766 \
22767 '# SCO, Unixware' \
22768 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
22769 \
22770 '# QNX' \
22771 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
22772 \
22773 '# old glibc?' \
22774 'fp->__bufp - fp->__buffer' \
22775 \
22776 '# old glibc iostream?' \
22777 'fp->_pptr - fp->_pbase' \
22778 \
22779 '# emx+gcc' \
22780 'fp->_ptr - fp->_buffer' \
22781 \
22782 '# Minix' \
22783 'fp->_ptr - fp->_buf' \
22784 \
22785 '# Plan9' \
22786 'fp->wp - fp->buf' \
22787 \
22788 '# VMS' \
22789 '(*fp)->_ptr - (*fp)->_base' \
22790 \
22791 '# e.g., DGUX R4.11; the info is not available' \
22792 1 \
22793 ; do
22794
22795 # Skip each embedded comment.
22796 case "$ac_expr" in '#'*) continue;; esac
22797
22798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22799 /* end confdefs.h. */
22800 #include <stdio.h>
22801 int
22802 main ()
22803 {
22804 FILE *fp = stdin; (void) ($ac_expr);
22805 ;
22806 return 0;
22807 }
22808 _ACEOF
22809 if ac_fn_c_try_compile "$LINENO"; then :
22810 fp_done=yes
22811
22812 fi
22813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22814 test "$fp_done" = yes && break
22815 done
22816
22817 ac_cv_sys_pending_output_n_bytes=$ac_expr
22818
22819
22820 fi
22821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
22822 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
22823
22824 cat >>confdefs.h <<_ACEOF
22825 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
22826 _ACEOF
22827
22828
22829 fi
22830
22831
22832
22833
22834
22835
22836 if test $ac_cv_func_fstatat = no; then
22837 HAVE_FSTATAT=0
22838 else
22839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
22840 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
22841 if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
22842 $as_echo_n "(cached) " >&6
22843 else
22844 if test "$cross_compiling" = yes; then :
22845 case "$host_os" in
22846 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
22847 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
22848 esac
22849
22850 else
22851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22852 /* end confdefs.h. */
22853
22854 #include <fcntl.h>
22855 #include <sys/stat.h>
22856 int
22857 main (void)
22858 {
22859 struct stat a;
22860 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
22861 }
22862
22863 _ACEOF
22864 if ac_fn_c_try_run "$LINENO"; then :
22865 gl_cv_func_fstatat_zero_flag=yes
22866 else
22867 gl_cv_func_fstatat_zero_flag=no
22868 fi
22869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22870 conftest.$ac_objext conftest.beam conftest.$ac_ext
22871 fi
22872
22873
22874 fi
22875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
22876 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
22877
22878 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
22879 *yes+*yes) ;;
22880 *) REPLACE_FSTATAT=1
22881 case $gl_cv_func_fstatat_zero_flag in
22882 *yes)
22883
22884 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
22885
22886 ;;
22887 esac
22888 ;;
22889 esac
22890 fi
22891
22892 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
22893
22894
22895
22896
22897
22898
22899
22900
22901 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
22902
22903 fi
22904
22905
22906
22907
22908
22909 GNULIB_FSTATAT=1
22910
22911
22912
22913
22914
22915
22916
22917
22918 if test $ac_cv_func_fsync = no; then
22919 HAVE_FSYNC=0
22920 fi
22921
22922 if test $HAVE_FSYNC = 0; then
22923
22924
22925
22926
22927
22928
22929
22930
22931 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
22932
22933 :
22934 fi
22935
22936
22937
22938
22939
22940 GNULIB_FSYNC=1
22941
22942
22943
22944
22945
22946
22947
22948 # Persuade glibc <stdlib.h> to declare getloadavg().
22949
22950
22951 gl_save_LIBS=$LIBS
22952
22953 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
22954 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
22955 HAVE_GETLOADAVG=1
22956 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
22957 if test "x$ac_cv_func_getloadavg" = x""yes; then :
22958
22959 else
22960 gl_func_getloadavg_done=no
22961
22962 # Some systems with -lutil have (and need) -lkvm as well, some do not.
22963 # On Solaris, -lkvm requires nlist from -lelf, so check that first
22964 # to get the right answer into the cache.
22965 # For kstat on solaris, we need to test for libelf and libkvm to force the
22966 # definition of SVR4 below.
22967 if test $gl_func_getloadavg_done = no; then
22968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
22969 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
22970 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
22971 $as_echo_n "(cached) " >&6
22972 else
22973 ac_check_lib_save_LIBS=$LIBS
22974 LIBS="-lelf $LIBS"
22975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22976 /* end confdefs.h. */
22977
22978 /* Override any GCC internal prototype to avoid an error.
22979 Use char because int might match the return type of a GCC
22980 builtin and then its argument prototype would still apply. */
22981 #ifdef __cplusplus
22982 extern "C"
22983 #endif
22984 char elf_begin ();
22985 int
22986 main ()
22987 {
22988 return elf_begin ();
22989 ;
22990 return 0;
22991 }
22992 _ACEOF
22993 if ac_fn_c_try_link "$LINENO"; then :
22994 ac_cv_lib_elf_elf_begin=yes
22995 else
22996 ac_cv_lib_elf_elf_begin=no
22997 fi
22998 rm -f core conftest.err conftest.$ac_objext \
22999 conftest$ac_exeext conftest.$ac_ext
23000 LIBS=$ac_check_lib_save_LIBS
23001 fi
23002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23003 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23004 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23005 LIBS="-lelf $LIBS"
23006 fi
23007
23008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23009 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23010 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
23011 $as_echo_n "(cached) " >&6
23012 else
23013 ac_check_lib_save_LIBS=$LIBS
23014 LIBS="-lkvm $LIBS"
23015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23016 /* end confdefs.h. */
23017
23018 /* Override any GCC internal prototype to avoid an error.
23019 Use char because int might match the return type of a GCC
23020 builtin and then its argument prototype would still apply. */
23021 #ifdef __cplusplus
23022 extern "C"
23023 #endif
23024 char kvm_open ();
23025 int
23026 main ()
23027 {
23028 return kvm_open ();
23029 ;
23030 return 0;
23031 }
23032 _ACEOF
23033 if ac_fn_c_try_link "$LINENO"; then :
23034 ac_cv_lib_kvm_kvm_open=yes
23035 else
23036 ac_cv_lib_kvm_kvm_open=no
23037 fi
23038 rm -f core conftest.err conftest.$ac_objext \
23039 conftest$ac_exeext conftest.$ac_ext
23040 LIBS=$ac_check_lib_save_LIBS
23041 fi
23042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23043 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23044 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23045 LIBS="-lkvm $LIBS"
23046 fi
23047
23048 # Check for the 4.4BSD definition of getloadavg.
23049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23050 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
23051 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
23052 $as_echo_n "(cached) " >&6
23053 else
23054 ac_check_lib_save_LIBS=$LIBS
23055 LIBS="-lutil $LIBS"
23056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23057 /* end confdefs.h. */
23058
23059 /* Override any GCC internal prototype to avoid an error.
23060 Use char because int might match the return type of a GCC
23061 builtin and then its argument prototype would still apply. */
23062 #ifdef __cplusplus
23063 extern "C"
23064 #endif
23065 char getloadavg ();
23066 int
23067 main ()
23068 {
23069 return getloadavg ();
23070 ;
23071 return 0;
23072 }
23073 _ACEOF
23074 if ac_fn_c_try_link "$LINENO"; then :
23075 ac_cv_lib_util_getloadavg=yes
23076 else
23077 ac_cv_lib_util_getloadavg=no
23078 fi
23079 rm -f core conftest.err conftest.$ac_objext \
23080 conftest$ac_exeext conftest.$ac_ext
23081 LIBS=$ac_check_lib_save_LIBS
23082 fi
23083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23084 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23085 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23086 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
23087 fi
23088
23089 fi
23090
23091 if test $gl_func_getloadavg_done = no; then
23092 # There is a commonly available library for RS/6000 AIX.
23093 # Since it is not a standard part of AIX, it might be installed locally.
23094 gl_getloadavg_LIBS=$LIBS
23095 LIBS="-L/usr/local/lib $LIBS"
23096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23097 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23098 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
23099 $as_echo_n "(cached) " >&6
23100 else
23101 ac_check_lib_save_LIBS=$LIBS
23102 LIBS="-lgetloadavg $LIBS"
23103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23104 /* end confdefs.h. */
23105
23106 /* Override any GCC internal prototype to avoid an error.
23107 Use char because int might match the return type of a GCC
23108 builtin and then its argument prototype would still apply. */
23109 #ifdef __cplusplus
23110 extern "C"
23111 #endif
23112 char getloadavg ();
23113 int
23114 main ()
23115 {
23116 return getloadavg ();
23117 ;
23118 return 0;
23119 }
23120 _ACEOF
23121 if ac_fn_c_try_link "$LINENO"; then :
23122 ac_cv_lib_getloadavg_getloadavg=yes
23123 else
23124 ac_cv_lib_getloadavg_getloadavg=no
23125 fi
23126 rm -f core conftest.err conftest.$ac_objext \
23127 conftest$ac_exeext conftest.$ac_ext
23128 LIBS=$ac_check_lib_save_LIBS
23129 fi
23130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23131 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23132 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23133 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23134 else
23135 LIBS=$gl_getloadavg_LIBS
23136 fi
23137
23138 fi
23139
23140 # Set up the replacement function if necessary.
23141 if test $gl_func_getloadavg_done = no; then
23142 HAVE_GETLOADAVG=0
23143
23144 # Solaris has libkstat which does not require root.
23145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23146 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23147 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
23148 $as_echo_n "(cached) " >&6
23149 else
23150 ac_check_lib_save_LIBS=$LIBS
23151 LIBS="-lkstat $LIBS"
23152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23153 /* end confdefs.h. */
23154
23155 /* Override any GCC internal prototype to avoid an error.
23156 Use char because int might match the return type of a GCC
23157 builtin and then its argument prototype would still apply. */
23158 #ifdef __cplusplus
23159 extern "C"
23160 #endif
23161 char kstat_open ();
23162 int
23163 main ()
23164 {
23165 return kstat_open ();
23166 ;
23167 return 0;
23168 }
23169 _ACEOF
23170 if ac_fn_c_try_link "$LINENO"; then :
23171 ac_cv_lib_kstat_kstat_open=yes
23172 else
23173 ac_cv_lib_kstat_kstat_open=no
23174 fi
23175 rm -f core conftest.err conftest.$ac_objext \
23176 conftest$ac_exeext conftest.$ac_ext
23177 LIBS=$ac_check_lib_save_LIBS
23178 fi
23179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23180 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23181 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
23182 cat >>confdefs.h <<_ACEOF
23183 #define HAVE_LIBKSTAT 1
23184 _ACEOF
23185
23186 LIBS="-lkstat $LIBS"
23187
23188 fi
23189
23190 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
23191
23192 # AIX has libperfstat which does not require root
23193 if test $gl_func_getloadavg_done = no; then
23194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23195 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23196 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
23197 $as_echo_n "(cached) " >&6
23198 else
23199 ac_check_lib_save_LIBS=$LIBS
23200 LIBS="-lperfstat $LIBS"
23201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23202 /* end confdefs.h. */
23203
23204 /* Override any GCC internal prototype to avoid an error.
23205 Use char because int might match the return type of a GCC
23206 builtin and then its argument prototype would still apply. */
23207 #ifdef __cplusplus
23208 extern "C"
23209 #endif
23210 char perfstat_cpu_total ();
23211 int
23212 main ()
23213 {
23214 return perfstat_cpu_total ();
23215 ;
23216 return 0;
23217 }
23218 _ACEOF
23219 if ac_fn_c_try_link "$LINENO"; then :
23220 ac_cv_lib_perfstat_perfstat_cpu_total=yes
23221 else
23222 ac_cv_lib_perfstat_perfstat_cpu_total=no
23223 fi
23224 rm -f core conftest.err conftest.$ac_objext \
23225 conftest$ac_exeext conftest.$ac_ext
23226 LIBS=$ac_check_lib_save_LIBS
23227 fi
23228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23229 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23230 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23231 cat >>confdefs.h <<_ACEOF
23232 #define HAVE_LIBPERFSTAT 1
23233 _ACEOF
23234
23235 LIBS="-lperfstat $LIBS"
23236
23237 fi
23238
23239 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23240 fi
23241
23242 if test $gl_func_getloadavg_done = no; then
23243 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23244 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23245 gl_func_getloadavg_done=yes
23246
23247 $as_echo "#define DGUX 1" >>confdefs.h
23248
23249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23250 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23251 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
23252 $as_echo_n "(cached) " >&6
23253 else
23254 ac_check_lib_save_LIBS=$LIBS
23255 LIBS="-ldgc $LIBS"
23256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23257 /* end confdefs.h. */
23258
23259 /* Override any GCC internal prototype to avoid an error.
23260 Use char because int might match the return type of a GCC
23261 builtin and then its argument prototype would still apply. */
23262 #ifdef __cplusplus
23263 extern "C"
23264 #endif
23265 char dg_sys_info ();
23266 int
23267 main ()
23268 {
23269 return dg_sys_info ();
23270 ;
23271 return 0;
23272 }
23273 _ACEOF
23274 if ac_fn_c_try_link "$LINENO"; then :
23275 ac_cv_lib_dgc_dg_sys_info=yes
23276 else
23277 ac_cv_lib_dgc_dg_sys_info=no
23278 fi
23279 rm -f core conftest.err conftest.$ac_objext \
23280 conftest$ac_exeext conftest.$ac_ext
23281 LIBS=$ac_check_lib_save_LIBS
23282 fi
23283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23284 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23285 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23286 cat >>confdefs.h <<_ACEOF
23287 #define HAVE_LIBDGC 1
23288 _ACEOF
23289
23290 LIBS="-ldgc $LIBS"
23291
23292 fi
23293
23294 fi
23295
23296
23297 fi
23298 fi
23299 fi
23300
23301
23302 if test "x$gl_save_LIBS" = x; then
23303 GETLOADAVG_LIBS=$LIBS
23304 else
23305 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
23306 fi
23307 LIBS=$gl_save_LIBS
23308
23309
23310 # Test whether the system declares getloadavg. Solaris has the function
23311 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
23312 for ac_header in sys/loadavg.h
23313 do :
23314 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
23315 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
23316 cat >>confdefs.h <<_ACEOF
23317 #define HAVE_SYS_LOADAVG_H 1
23318 _ACEOF
23319
23320 fi
23321
23322 done
23323
23324 if test $ac_cv_header_sys_loadavg_h = yes; then
23325 HAVE_SYS_LOADAVG_H=1
23326 else
23327 HAVE_SYS_LOADAVG_H=0
23328 fi
23329 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
23330 # include <sys/loadavg.h>
23331 #endif
23332 #include <stdlib.h>
23333 "
23334 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
23335
23336 else
23337 HAVE_DECL_GETLOADAVG=0
23338 fi
23339
23340
23341 if test $HAVE_GETLOADAVG = 0; then
23342
23343
23344
23345
23346
23347
23348
23349
23350 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
23351
23352
23353 # Figure out what our getloadavg.c needs.
23354
23355
23356
23357 # On HPUX9, an unprivileged user can get load averages this way.
23358 if test $gl_func_getloadavg_done = no; then
23359 for ac_func in pstat_getdynamic
23360 do :
23361 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
23362 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
23363 cat >>confdefs.h <<_ACEOF
23364 #define HAVE_PSTAT_GETDYNAMIC 1
23365 _ACEOF
23366 gl_func_getloadavg_done=yes
23367 fi
23368 done
23369
23370 fi
23371
23372 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
23373 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
23374 # Irix 4.0.5F has the header but not the library.
23375 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
23376 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
23377 gl_func_getloadavg_done=yes
23378
23379 $as_echo "#define SVR4 1" >>confdefs.h
23380
23381 fi
23382
23383 if test $gl_func_getloadavg_done = no; then
23384 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
23385 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
23386 gl_func_getloadavg_done=yes
23387
23388 $as_echo "#define UMAX 1" >>confdefs.h
23389
23390
23391 $as_echo "#define UMAX4_3 1" >>confdefs.h
23392
23393 fi
23394
23395
23396 fi
23397
23398 if test $gl_func_getloadavg_done = no; then
23399 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
23400 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
23401 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
23402
23403 fi
23404
23405
23406 fi
23407
23408 if test $gl_func_getloadavg_done = no; then
23409 for ac_header in mach/mach.h
23410 do :
23411 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
23412 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
23413 cat >>confdefs.h <<_ACEOF
23414 #define HAVE_MACH_MACH_H 1
23415 _ACEOF
23416
23417 fi
23418
23419 done
23420
23421 fi
23422
23423 for ac_header in nlist.h
23424 do :
23425 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
23426 if test "x$ac_cv_header_nlist_h" = x""yes; then :
23427 cat >>confdefs.h <<_ACEOF
23428 #define HAVE_NLIST_H 1
23429 _ACEOF
23430 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
23431 "
23432 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
23433
23434 cat >>confdefs.h <<_ACEOF
23435 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
23436 _ACEOF
23437
23438
23439 fi
23440
23441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23442 /* end confdefs.h. */
23443 #include <nlist.h>
23444 int
23445 main ()
23446 {
23447 struct nlist x;
23448 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
23449 x.n_un.n_name = "";
23450 #else
23451 x.n_name = "";
23452 #endif
23453 ;
23454 return 0;
23455 }
23456 _ACEOF
23457 if ac_fn_c_try_link "$LINENO"; then :
23458
23459 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
23460
23461 fi
23462 rm -f core conftest.err conftest.$ac_objext \
23463 conftest$ac_exeext conftest.$ac_ext
23464
23465 fi
23466
23467 done
23468
23469 fi
23470
23471
23472
23473
23474
23475 GNULIB_GETLOADAVG=1
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486 if test $REPLACE_GETOPT = 1; then
23487
23488
23489
23490
23491
23492
23493
23494
23495 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23506
23507
23508
23509
23510 GNULIB_GL_UNISTD_H_GETOPT=1
23511 fi
23512
23513
23514
23515
23516
23517
23518
23519 REPLACE_GETOPT=0
23520 if test -n "$gl_replace_getopt"; then
23521 REPLACE_GETOPT=1
23522 fi
23523
23524 if test $REPLACE_GETOPT = 1; then
23525
23526 GETOPT_H=getopt.h
23527
23528 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23529
23530
23531
23532 fi
23533
23534 if test $REPLACE_GETOPT = 1; then
23535
23536
23537
23538
23539
23540
23541
23542
23543 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23554
23555
23556
23557
23558 GNULIB_GL_UNISTD_H_GETOPT=1
23559 fi
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572 gl_gettimeofday_timezone=void
23573 if test $ac_cv_func_gettimeofday != yes; then
23574 HAVE_GETTIMEOFDAY=0
23575 else
23576
23577
23578
23579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23580 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23581 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
23582 $as_echo_n "(cached) " >&6
23583 else
23584 if test "$cross_compiling" = yes; then :
23585 # When cross-compiling:
23586 case "$host_os" in
23587 # Guess all is fine on glibc systems.
23588 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23589 # If we don't know, assume the worst.
23590 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23591 esac
23592
23593 else
23594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23595 /* end confdefs.h. */
23596 #include <string.h>
23597 #include <sys/time.h>
23598 #include <time.h>
23599 #include <stdlib.h>
23600
23601 int
23602 main ()
23603 {
23604
23605 time_t t = 0;
23606 struct tm *lt;
23607 struct tm saved_lt;
23608 struct timeval tv;
23609 lt = localtime (&t);
23610 saved_lt = *lt;
23611 gettimeofday (&tv, NULL);
23612 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23613
23614 ;
23615 return 0;
23616 }
23617 _ACEOF
23618 if ac_fn_c_try_run "$LINENO"; then :
23619 gl_cv_func_gettimeofday_clobber=no
23620 else
23621 gl_cv_func_gettimeofday_clobber=yes
23622 fi
23623 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23624 conftest.$ac_objext conftest.beam conftest.$ac_ext
23625 fi
23626
23627 fi
23628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23629 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23630
23631 case "$gl_cv_func_gettimeofday_clobber" in
23632 *yes)
23633 REPLACE_GETTIMEOFDAY=1
23634
23635
23636 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
23637
23638
23639 $as_echo "#define localtime rpl_localtime" >>confdefs.h
23640
23641
23642
23643 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23644
23645 ;;
23646 esac
23647
23648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23649 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23650 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
23651 $as_echo_n "(cached) " >&6
23652 else
23653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23654 /* end confdefs.h. */
23655 #include <sys/time.h>
23656 struct timeval c;
23657 int gettimeofday (struct timeval *restrict, void *restrict);
23658
23659 int
23660 main ()
23661 {
23662 /* glibc uses struct timezone * rather than the POSIX void *
23663 if _GNU_SOURCE is defined. However, since the only portable
23664 use of gettimeofday uses NULL as the second parameter, and
23665 since the glibc definition is actually more typesafe, it is
23666 not worth wrapping this to get a compliant signature. */
23667 int (*f) (struct timeval *restrict, void *restrict)
23668 = gettimeofday;
23669 int x = f (&c, 0);
23670 return !(x | c.tv_sec | c.tv_usec);
23671
23672 ;
23673 return 0;
23674 }
23675 _ACEOF
23676 if ac_fn_c_try_compile "$LINENO"; then :
23677 gl_cv_func_gettimeofday_posix_signature=yes
23678 else
23679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23680 /* end confdefs.h. */
23681 #include <sys/time.h>
23682 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23683
23684 int
23685 main ()
23686 {
23687
23688 ;
23689 return 0;
23690 }
23691 _ACEOF
23692 if ac_fn_c_try_compile "$LINENO"; then :
23693 gl_cv_func_gettimeofday_posix_signature=almost
23694 else
23695 gl_cv_func_gettimeofday_posix_signature=no
23696 fi
23697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23698 fi
23699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23700 fi
23701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23702 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23703 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23704 gl_gettimeofday_timezone='struct timezone'
23705 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23706 REPLACE_GETTIMEOFDAY=1
23707 fi
23708 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23709 REPLACE_GETTIMEOFDAY=1
23710 fi
23711
23712 fi
23713
23714 cat >>confdefs.h <<_ACEOF
23715 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23716 _ACEOF
23717
23718
23719 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23720
23721
23722
23723
23724
23725
23726
23727
23728 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
23729
23730
23731 for ac_header in sys/timeb.h
23732 do :
23733 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23734 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
23735 cat >>confdefs.h <<_ACEOF
23736 #define HAVE_SYS_TIMEB_H 1
23737 _ACEOF
23738
23739 fi
23740
23741 done
23742
23743 for ac_func in _ftime
23744 do :
23745 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23746 if test "x$ac_cv_func__ftime" = x""yes; then :
23747 cat >>confdefs.h <<_ACEOF
23748 #define HAVE__FTIME 1
23749 _ACEOF
23750
23751 fi
23752 done
23753
23754
23755 fi
23756
23757
23758
23759
23760
23761 GNULIB_GETTIMEOFDAY=1
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772 if test $ac_cv_func_lstat = yes; then
23773
23774 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23775 *no)
23776 REPLACE_LSTAT=1
23777 ;;
23778 esac
23779 else
23780 HAVE_LSTAT=0
23781 fi
23782
23783 if test $REPLACE_LSTAT = 1; then
23784
23785
23786
23787
23788
23789
23790
23791
23792 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23793
23794 :
23795 fi
23796
23797
23798
23799
23800
23801 GNULIB_LSTAT=1
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812 if test $ac_cv_have_decl_memrchr = no; then
23813 HAVE_DECL_MEMRCHR=0
23814 fi
23815
23816 for ac_func in memrchr
23817 do :
23818 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23819 if test "x$ac_cv_func_memrchr" = x""yes; then :
23820 cat >>confdefs.h <<_ACEOF
23821 #define HAVE_MEMRCHR 1
23822 _ACEOF
23823
23824 fi
23825 done
23826
23827
23828 if test $ac_cv_func_memrchr = no; then
23829
23830
23831
23832
23833
23834
23835
23836
23837 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23838
23839 :
23840 fi
23841
23842
23843
23844
23845
23846 GNULIB_MEMRCHR=1
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858 if test $APPLE_UNIVERSAL_BUILD = 1; then
23859 # A universal build on Apple Mac OS X platforms.
23860 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
23861 # But we need a configuration result that is valid in both modes.
23862 gl_cv_func_working_mktime=no
23863 fi
23864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
23865 $as_echo_n "checking for working mktime... " >&6; }
23866 if test "${gl_cv_func_working_mktime+set}" = set; then :
23867 $as_echo_n "(cached) " >&6
23868 else
23869 if test "$cross_compiling" = yes; then :
23870 gl_cv_func_working_mktime=no
23871 else
23872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23873 /* end confdefs.h. */
23874 /* Test program from Paul Eggert and Tony Leneis. */
23875 #include <limits.h>
23876 #include <stdlib.h>
23877 #include <time.h>
23878
23879 #ifdef HAVE_UNISTD_H
23880 # include <unistd.h>
23881 #endif
23882
23883 #if HAVE_DECL_ALARM
23884 # include <signal.h>
23885 #endif
23886
23887 /* Work around redefinition to rpl_putenv by other config tests. */
23888 #undef putenv
23889
23890 static time_t time_t_max;
23891 static time_t time_t_min;
23892
23893 /* Values we'll use to set the TZ environment variable. */
23894 static char *tz_strings[] = {
23895 (char *) 0, "TZ=GMT0", "TZ=JST-9",
23896 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
23897 };
23898 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
23899
23900 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
23901 Based on a problem report from Andreas Jaeger. */
23902 static int
23903 spring_forward_gap ()
23904 {
23905 /* glibc (up to about 1998-10-07) failed this test. */
23906 struct tm tm;
23907
23908 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
23909 instead of "TZ=America/Vancouver" in order to detect the bug even
23910 on systems that don't support the Olson extension, or don't have the
23911 full zoneinfo tables installed. */
23912 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
23913
23914 tm.tm_year = 98;
23915 tm.tm_mon = 3;
23916 tm.tm_mday = 5;
23917 tm.tm_hour = 2;
23918 tm.tm_min = 0;
23919 tm.tm_sec = 0;
23920 tm.tm_isdst = -1;
23921 return mktime (&tm) != (time_t) -1;
23922 }
23923
23924 static int
23925 mktime_test1 (time_t now)
23926 {
23927 struct tm *lt;
23928 return ! (lt = localtime (&now)) || mktime (lt) == now;
23929 }
23930
23931 static int
23932 mktime_test (time_t now)
23933 {
23934 return (mktime_test1 (now)
23935 && mktime_test1 ((time_t) (time_t_max - now))
23936 && mktime_test1 ((time_t) (time_t_min + now)));
23937 }
23938
23939 static int
23940 irix_6_4_bug ()
23941 {
23942 /* Based on code from Ariel Faigon. */
23943 struct tm tm;
23944 tm.tm_year = 96;
23945 tm.tm_mon = 3;
23946 tm.tm_mday = 0;
23947 tm.tm_hour = 0;
23948 tm.tm_min = 0;
23949 tm.tm_sec = 0;
23950 tm.tm_isdst = -1;
23951 mktime (&tm);
23952 return tm.tm_mon == 2 && tm.tm_mday == 31;
23953 }
23954
23955 static int
23956 bigtime_test (int j)
23957 {
23958 struct tm tm;
23959 time_t now;
23960 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
23961 now = mktime (&tm);
23962 if (now != (time_t) -1)
23963 {
23964 struct tm *lt = localtime (&now);
23965 if (! (lt
23966 && lt->tm_year == tm.tm_year
23967 && lt->tm_mon == tm.tm_mon
23968 && lt->tm_mday == tm.tm_mday
23969 && lt->tm_hour == tm.tm_hour
23970 && lt->tm_min == tm.tm_min
23971 && lt->tm_sec == tm.tm_sec
23972 && lt->tm_yday == tm.tm_yday
23973 && lt->tm_wday == tm.tm_wday
23974 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
23975 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
23976 return 0;
23977 }
23978 return 1;
23979 }
23980
23981 static int
23982 year_2050_test ()
23983 {
23984 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
23985 ignoring leap seconds. */
23986 unsigned long int answer = 2527315200UL;
23987
23988 struct tm tm;
23989 time_t t;
23990 tm.tm_year = 2050 - 1900;
23991 tm.tm_mon = 2 - 1;
23992 tm.tm_mday = 1;
23993 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
23994 tm.tm_isdst = -1;
23995
23996 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
23997 instead of "TZ=America/Vancouver" in order to detect the bug even
23998 on systems that don't support the Olson extension, or don't have the
23999 full zoneinfo tables installed. */
24000 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24001
24002 t = mktime (&tm);
24003
24004 /* Check that the result is either a failure, or close enough
24005 to the correct answer that we can assume the discrepancy is
24006 due to leap seconds. */
24007 return (t == (time_t) -1
24008 || (0 < t && answer - 120 <= t && t <= answer + 120));
24009 }
24010
24011 int
24012 main ()
24013 {
24014 int result = 0;
24015 time_t t, delta;
24016 int i, j;
24017 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24018 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24019
24020 #if HAVE_DECL_ALARM
24021 /* This test makes some buggy mktime implementations loop.
24022 Give up after 60 seconds; a mktime slower than that
24023 isn't worth using anyway. */
24024 signal (SIGALRM, SIG_DFL);
24025 alarm (60);
24026 #endif
24027
24028 time_t_max = (! time_t_signed
24029 ? (time_t) -1
24030 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24031 * 2 + 1));
24032 time_t_min = (! time_t_signed
24033 ? (time_t) 0
24034 : time_t_signed_magnitude
24035 ? ~ (time_t) 0
24036 : ~ time_t_max);
24037
24038 delta = time_t_max / 997; /* a suitable prime number */
24039 for (i = 0; i < N_STRINGS; i++)
24040 {
24041 if (tz_strings[i])
24042 putenv (tz_strings[i]);
24043
24044 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24045 if (! mktime_test (t))
24046 result |= 1;
24047 if ((result & 2) == 0
24048 && ! (mktime_test ((time_t) 1)
24049 && mktime_test ((time_t) (60 * 60))
24050 && mktime_test ((time_t) (60 * 60 * 24))))
24051 result |= 2;
24052
24053 for (j = 1; (result & 4) == 0; j <<= 1)
24054 {
24055 if (! bigtime_test (j))
24056 result |= 4;
24057 if (INT_MAX / 2 < j)
24058 break;
24059 }
24060 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24061 result |= 8;
24062 }
24063 if (! irix_6_4_bug ())
24064 result |= 16;
24065 if (! spring_forward_gap ())
24066 result |= 32;
24067 if (! year_2050_test ())
24068 result |= 64;
24069 return result;
24070 }
24071 _ACEOF
24072 if ac_fn_c_try_run "$LINENO"; then :
24073 gl_cv_func_working_mktime=yes
24074 else
24075 gl_cv_func_working_mktime=no
24076 fi
24077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24078 conftest.$ac_objext conftest.beam conftest.$ac_ext
24079 fi
24080
24081
24082 fi
24083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24084 $as_echo "$gl_cv_func_working_mktime" >&6; }
24085
24086 if test $gl_cv_func_working_mktime = no; then
24087 REPLACE_MKTIME=1
24088 else
24089 REPLACE_MKTIME=0
24090 fi
24091
24092 if test $REPLACE_MKTIME = 1; then
24093
24094
24095
24096
24097
24098
24099
24100
24101 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24102
24103 :
24104 fi
24105
24106
24107
24108
24109
24110 GNULIB_MKTIME=1
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122 if test $ac_cv_func_pselect = yes; then
24123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24124 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24125 if test "${gl_cv_sig_pselect+set}" = set; then :
24126 $as_echo_n "(cached) " >&6
24127 else
24128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24129 /* end confdefs.h. */
24130 #include <sys/select.h>
24131
24132 int
24133 main ()
24134 {
24135 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24136 struct timespec const *restrict,
24137 sigset_t const *restrict) = pselect;
24138 return !p;
24139 ;
24140 return 0;
24141 }
24142 _ACEOF
24143 if ac_fn_c_try_link "$LINENO"; then :
24144 gl_cv_sig_pselect=yes
24145 else
24146 gl_cv_sig_pselect=no
24147 fi
24148 rm -f core conftest.err conftest.$ac_objext \
24149 conftest$ac_exeext conftest.$ac_ext
24150 fi
24151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24152 $as_echo "$gl_cv_sig_pselect" >&6; }
24153
24154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24155 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24156 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24157 $as_echo_n "(cached) " >&6
24158 else
24159
24160 if test "$cross_compiling" = yes; then :
24161
24162 case "$host_os" in
24163 # Guess yes on glibc systems.
24164 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24165 # If we don't know, assume the worst.
24166 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24167 esac
24168
24169 else
24170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24171 /* end confdefs.h. */
24172
24173 #include <sys/types.h>
24174 #include <sys/time.h>
24175 #if HAVE_SYS_SELECT_H
24176 # include <sys/select.h>
24177 #endif
24178 #include <unistd.h>
24179 #include <errno.h>
24180
24181 int
24182 main ()
24183 {
24184
24185 fd_set set;
24186 dup2(0, 16);
24187 FD_ZERO(&set);
24188 FD_SET(16, &set);
24189 close(16);
24190 struct timespec timeout;
24191 timeout.tv_sec = 0;
24192 timeout.tv_nsec = 5000;
24193 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24194
24195 ;
24196 return 0;
24197 }
24198 _ACEOF
24199 if ac_fn_c_try_run "$LINENO"; then :
24200 gl_cv_func_pselect_detects_ebadf=yes
24201 else
24202 gl_cv_func_pselect_detects_ebadf=no
24203 fi
24204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24205 conftest.$ac_objext conftest.beam conftest.$ac_ext
24206 fi
24207
24208
24209 fi
24210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24211 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24212 case $gl_cv_func_pselect_detects_ebadf in
24213 *yes) ;;
24214 *) REPLACE_PSELECT=1 ;;
24215 esac
24216 fi
24217
24218 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24219 REPLACE_PSELECT=1
24220 fi
24221
24222 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
24223
24224
24225
24226
24227
24228
24229
24230
24231 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
24232
24233 fi
24234
24235
24236
24237
24238
24239 GNULIB_PSELECT=1
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249 LIB_PTHREAD_SIGMASK=
24250
24251
24252
24253
24254 if test "$gl_threads_api" = posix; then
24255 if test $ac_cv_func_pthread_sigmask = yes; then
24256 :
24257 else
24258 if test -n "$LIBMULTITHREAD"; then
24259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
24260 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
24261 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
24262 $as_echo_n "(cached) " >&6
24263 else
24264 gl_save_LIBS="$LIBS"
24265 LIBS="$LIBS $LIBMULTITHREAD"
24266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24267 /* end confdefs.h. */
24268 #include <pthread.h>
24269 #include <signal.h>
24270
24271 int
24272 main ()
24273 {
24274 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
24275 ;
24276 return 0;
24277 }
24278
24279 _ACEOF
24280 if ac_fn_c_try_link "$LINENO"; then :
24281 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
24282 else
24283 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
24284 fi
24285 rm -f core conftest.err conftest.$ac_objext \
24286 conftest$ac_exeext conftest.$ac_ext
24287 LIBS="$gl_save_LIBS"
24288
24289 fi
24290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
24291 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
24292 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
24293 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
24294 else
24295 HAVE_PTHREAD_SIGMASK=0
24296 fi
24297 else
24298 HAVE_PTHREAD_SIGMASK=0
24299 fi
24300 fi
24301 else
24302 if test $ac_cv_func_pthread_sigmask = yes; then
24303 REPLACE_PTHREAD_SIGMASK=1
24304 else
24305 HAVE_PTHREAD_SIGMASK=0
24306 fi
24307 fi
24308
24309
24310
24311
24312 if test $HAVE_PTHREAD_SIGMASK = 1; then
24313
24314
24315 if test -z "$LIB_PTHREAD_SIGMASK"; then
24316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
24317 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
24318 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
24319 $as_echo_n "(cached) " >&6
24320 else
24321
24322 if test "$cross_compiling" = yes; then :
24323
24324 case "$host_os" in
24325 freebsd* | hpux* | solaris | solaris2.[2-9]*)
24326 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
24327 *)
24328 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
24329 esac
24330
24331 else
24332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24333 /* end confdefs.h. */
24334
24335 #include <pthread.h>
24336 #include <signal.h>
24337 #include <stddef.h>
24338 int main ()
24339 {
24340 sigset_t set;
24341 sigemptyset (&set);
24342 return pthread_sigmask (1729, &set, NULL) != 0;
24343 }
24344 _ACEOF
24345 if ac_fn_c_try_run "$LINENO"; then :
24346 gl_cv_func_pthread_sigmask_in_libc_works=no
24347 else
24348 gl_cv_func_pthread_sigmask_in_libc_works=yes
24349 fi
24350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24351 conftest.$ac_objext conftest.beam conftest.$ac_ext
24352 fi
24353
24354
24355 fi
24356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
24357 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
24358 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
24359 *no)
24360 REPLACE_PTHREAD_SIGMASK=1
24361
24362 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
24363
24364 ;;
24365 esac
24366 fi
24367
24368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
24369 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
24370 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
24371 $as_echo_n "(cached) " >&6
24372 else
24373
24374 gl_save_LIBS="$LIBS"
24375 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
24376 if test "$cross_compiling" = yes; then :
24377 case "$host_os" in
24378 cygwin*)
24379 gl_cv_func_pthread_sigmask_return_works="guessing no";;
24380 *)
24381 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
24382 esac
24383
24384 else
24385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24386 /* end confdefs.h. */
24387
24388 #include <pthread.h>
24389 #include <signal.h>
24390 #include <stddef.h>
24391 int main ()
24392 {
24393 sigset_t set;
24394 sigemptyset (&set);
24395 if (pthread_sigmask (1729, &set, NULL) == -1)
24396 return 1;
24397 return 0;
24398 }
24399 _ACEOF
24400 if ac_fn_c_try_run "$LINENO"; then :
24401 gl_cv_func_pthread_sigmask_return_works=yes
24402 else
24403 gl_cv_func_pthread_sigmask_return_works=no
24404 fi
24405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24406 conftest.$ac_objext conftest.beam conftest.$ac_ext
24407 fi
24408
24409 LIBS="$gl_save_LIBS"
24410
24411 fi
24412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
24413 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
24414 case "$gl_cv_func_pthread_sigmask_return_works" in
24415 *no)
24416 REPLACE_PTHREAD_SIGMASK=1
24417
24418 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
24419
24420 ;;
24421 esac
24422
24423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
24424 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
24425 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
24426 $as_echo_n "(cached) " >&6
24427 else
24428
24429 case "$host_os" in
24430 irix*)
24431 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
24432 *)
24433 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
24434 esac
24435 gl_save_LIBS="$LIBS"
24436 LIBS="$LIBS $LIBMULTITHREAD"
24437 if test "$cross_compiling" = yes; then :
24438 :
24439 else
24440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24441 /* end confdefs.h. */
24442
24443 #include <pthread.h>
24444 #include <signal.h>
24445 #include <stdio.h>
24446 #include <stdlib.h>
24447 #include <unistd.h>
24448 static volatile int sigint_occurred;
24449 static void
24450 sigint_handler (int sig)
24451 {
24452 sigint_occurred++;
24453 }
24454 int main ()
24455 {
24456 sigset_t set;
24457 int pid = getpid ();
24458 char command[80];
24459 signal (SIGINT, sigint_handler);
24460 sigemptyset (&set);
24461 sigaddset (&set, SIGINT);
24462 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
24463 return 1;
24464 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
24465 if (!(system (command) == 0))
24466 return 2;
24467 sleep (2);
24468 if (!(sigint_occurred == 0))
24469 return 3;
24470 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
24471 return 4;
24472 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
24473 return 5;
24474 return 0;
24475 }
24476 _ACEOF
24477 if ac_fn_c_try_run "$LINENO"; then :
24478 :
24479 else
24480 gl_cv_func_pthread_sigmask_unblock_works=no
24481 fi
24482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24483 conftest.$ac_objext conftest.beam conftest.$ac_ext
24484 fi
24485
24486 LIBS="$gl_save_LIBS"
24487
24488 fi
24489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
24490 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
24491 case "$gl_cv_func_pthread_sigmask_unblock_works" in
24492 *no)
24493 REPLACE_PTHREAD_SIGMASK=1
24494
24495 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
24496
24497 ;;
24498 esac
24499 fi
24500
24501 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
24502
24503
24504
24505
24506
24507
24508
24509
24510 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
24511
24512
24513 if test $HAVE_PTHREAD_SIGMASK = 1; then
24514
24515 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
24516
24517 fi
24518
24519 fi
24520
24521
24522
24523
24524
24525 GNULIB_PTHREAD_SIGMASK=1
24526
24527
24528
24529
24530
24531
24532
24533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
24534 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
24535 if test "${gl_cv_func_svid_putenv+set}" = set; then :
24536 $as_echo_n "(cached) " >&6
24537 else
24538 if test "$cross_compiling" = yes; then :
24539 case "$host_os" in
24540 # Guess yes on glibc systems.
24541 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
24542 # If we don't know, assume the worst.
24543 *) gl_cv_func_svid_putenv="guessing no" ;;
24544 esac
24545
24546 else
24547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24548 /* end confdefs.h. */
24549 $ac_includes_default
24550 int
24551 main ()
24552 {
24553
24554 /* Put it in env. */
24555 if (putenv ("CONFTEST_putenv=val"))
24556 return 1;
24557
24558 /* Try to remove it. */
24559 if (putenv ("CONFTEST_putenv"))
24560 return 2;
24561
24562 /* Make sure it was deleted. */
24563 if (getenv ("CONFTEST_putenv") != 0)
24564 return 3;
24565
24566 return 0;
24567
24568 ;
24569 return 0;
24570 }
24571 _ACEOF
24572 if ac_fn_c_try_run "$LINENO"; then :
24573 gl_cv_func_svid_putenv=yes
24574 else
24575 gl_cv_func_svid_putenv=no
24576 fi
24577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24578 conftest.$ac_objext conftest.beam conftest.$ac_ext
24579 fi
24580
24581
24582 fi
24583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
24584 $as_echo "$gl_cv_func_svid_putenv" >&6; }
24585 case "$gl_cv_func_svid_putenv" in
24586 *yes) ;;
24587 *)
24588 REPLACE_PUTENV=1
24589 ;;
24590 esac
24591
24592 if test $REPLACE_PUTENV = 1; then
24593
24594
24595
24596
24597
24598
24599
24600
24601 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
24602
24603
24604 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
24605 if test "x$ac_cv_have_decl__putenv" = x""yes; then :
24606 ac_have_decl=1
24607 else
24608 ac_have_decl=0
24609 fi
24610
24611 cat >>confdefs.h <<_ACEOF
24612 #define HAVE_DECL__PUTENV $ac_have_decl
24613 _ACEOF
24614
24615
24616 fi
24617
24618
24619
24620
24621
24622 GNULIB_PUTENV=1
24623
24624
24625
24626
24627
24628
24629 # Check whether --enable-acl was given.
24630 if test "${enable_acl+set}" = set; then :
24631 enableval=$enable_acl;
24632 else
24633 enable_acl=auto
24634 fi
24635
24636
24637 LIB_ACL=
24638 use_acl=0
24639 if test "x$enable_acl" != "xno"; then
24640 for ac_header in sys/acl.h
24641 do :
24642 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
24643 if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
24644 cat >>confdefs.h <<_ACEOF
24645 #define HAVE_SYS_ACL_H 1
24646 _ACEOF
24647
24648 fi
24649
24650 done
24651
24652 if test $ac_cv_header_sys_acl_h = yes; then
24653 ac_save_LIBS=$LIBS
24654
24655 if test $use_acl = 0; then
24656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
24657 $as_echo_n "checking for library containing acl_get_file... " >&6; }
24658 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24659 $as_echo_n "(cached) " >&6
24660 else
24661 ac_func_search_save_LIBS=$LIBS
24662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24663 /* end confdefs.h. */
24664
24665 /* Override any GCC internal prototype to avoid an error.
24666 Use char because int might match the return type of a GCC
24667 builtin and then its argument prototype would still apply. */
24668 #ifdef __cplusplus
24669 extern "C"
24670 #endif
24671 char acl_get_file ();
24672 int
24673 main ()
24674 {
24675 return acl_get_file ();
24676 ;
24677 return 0;
24678 }
24679 _ACEOF
24680 for ac_lib in '' acl pacl; do
24681 if test -z "$ac_lib"; then
24682 ac_res="none required"
24683 else
24684 ac_res=-l$ac_lib
24685 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24686 fi
24687 if ac_fn_c_try_link "$LINENO"; then :
24688 ac_cv_search_acl_get_file=$ac_res
24689 fi
24690 rm -f core conftest.err conftest.$ac_objext \
24691 conftest$ac_exeext
24692 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24693 break
24694 fi
24695 done
24696 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24697
24698 else
24699 ac_cv_search_acl_get_file=no
24700 fi
24701 rm conftest.$ac_ext
24702 LIBS=$ac_func_search_save_LIBS
24703 fi
24704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
24705 $as_echo "$ac_cv_search_acl_get_file" >&6; }
24706 ac_res=$ac_cv_search_acl_get_file
24707 if test "$ac_res" != no; then :
24708 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24709 if test "$ac_cv_search_acl_get_file" != "none required"; then
24710 LIB_ACL=$ac_cv_search_acl_get_file
24711 fi
24712 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
24713 acl_free acl_from_mode acl_from_text \
24714 acl_delete_def_file acl_extended_file \
24715 acl_delete_fd_np acl_delete_file_np \
24716 acl_copy_ext_native acl_create_entry_np \
24717 acl_to_short_text acl_free_text
24718 do :
24719 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24720 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24721 eval as_val=\$$as_ac_var
24722 if test "x$as_val" = x""yes; then :
24723 cat >>confdefs.h <<_ACEOF
24724 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24725 _ACEOF
24726
24727 fi
24728 done
24729
24730 # If the acl_get_file bug is detected, don't enable the ACL support.
24731
24732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
24733 $as_echo_n "checking for working acl_get_file... " >&6; }
24734 if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
24735 $as_echo_n "(cached) " >&6
24736 else
24737 if test "$cross_compiling" = yes; then :
24738 gl_cv_func_working_acl_get_file=cross-compiling
24739 else
24740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24741 /* end confdefs.h. */
24742 #include <sys/types.h>
24743 #include <sys/acl.h>
24744 #include <errno.h>
24745
24746 int
24747 main ()
24748 {
24749 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
24750 return 1;
24751 return 0;
24752
24753 ;
24754 return 0;
24755 }
24756 _ACEOF
24757 if ac_fn_c_try_run "$LINENO"; then :
24758 gl_cv_func_working_acl_get_file=yes
24759 else
24760 gl_cv_func_working_acl_get_file=no
24761 fi
24762 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24763 conftest.$ac_objext conftest.beam conftest.$ac_ext
24764 fi
24765
24766 fi
24767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
24768 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
24769
24770 if test $gl_cv_func_working_acl_get_file = yes; then :
24771 use_acl=1
24772 fi
24773
24774 if test $use_acl = 1; then
24775 for ac_header in acl/libacl.h
24776 do :
24777 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
24778 if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
24779 cat >>confdefs.h <<_ACEOF
24780 #define HAVE_ACL_LIBACL_H 1
24781 _ACEOF
24782
24783 fi
24784
24785 done
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795 for ac_func in acl_entries
24796 do :
24797 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
24798 if test "x$ac_cv_func_acl_entries" = x""yes; then :
24799 cat >>confdefs.h <<_ACEOF
24800 #define HAVE_ACL_ENTRIES 1
24801 _ACEOF
24802
24803 else
24804
24805 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
24806
24807 fi
24808 done
24809
24810
24811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
24812 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
24813 if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
24814 $as_echo_n "(cached) " >&6
24815 else
24816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24817 /* end confdefs.h. */
24818 #include <sys/types.h>
24819 #include <sys/acl.h>
24820 int type = ACL_FIRST_ENTRY;
24821 int
24822 main ()
24823 {
24824
24825 ;
24826 return 0;
24827 }
24828 _ACEOF
24829 if ac_fn_c_try_compile "$LINENO"; then :
24830 gl_cv_acl_ACL_FIRST_ENTRY=yes
24831 else
24832 gl_cv_acl_ACL_FIRST_ENTRY=no
24833 fi
24834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24835 fi
24836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
24837 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
24838 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
24839
24840 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
24841
24842 fi
24843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
24844 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
24845 if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
24846 $as_echo_n "(cached) " >&6
24847 else
24848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24849 /* end confdefs.h. */
24850 #include <sys/types.h>
24851 #include <sys/acl.h>
24852 int type = ACL_TYPE_EXTENDED;
24853 int
24854 main ()
24855 {
24856
24857 ;
24858 return 0;
24859 }
24860 _ACEOF
24861 if ac_fn_c_try_compile "$LINENO"; then :
24862 gl_cv_acl_ACL_TYPE_EXTENDED=yes
24863 else
24864 gl_cv_acl_ACL_TYPE_EXTENDED=no
24865 fi
24866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24867 fi
24868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
24869 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
24870 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
24871
24872 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
24873
24874 fi
24875 else
24876 LIB_ACL=
24877 fi
24878
24879 fi
24880
24881 fi
24882
24883 if test $use_acl = 0; then
24884 for ac_func in facl
24885 do :
24886 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
24887 if test "x$ac_cv_func_facl" = x""yes; then :
24888 cat >>confdefs.h <<_ACEOF
24889 #define HAVE_FACL 1
24890 _ACEOF
24891
24892 fi
24893 done
24894
24895 if test $ac_cv_func_facl = yes; then
24896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
24897 $as_echo_n "checking for library containing acl_trivial... " >&6; }
24898 if test "${ac_cv_search_acl_trivial+set}" = set; then :
24899 $as_echo_n "(cached) " >&6
24900 else
24901 ac_func_search_save_LIBS=$LIBS
24902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24903 /* end confdefs.h. */
24904
24905 /* Override any GCC internal prototype to avoid an error.
24906 Use char because int might match the return type of a GCC
24907 builtin and then its argument prototype would still apply. */
24908 #ifdef __cplusplus
24909 extern "C"
24910 #endif
24911 char acl_trivial ();
24912 int
24913 main ()
24914 {
24915 return acl_trivial ();
24916 ;
24917 return 0;
24918 }
24919 _ACEOF
24920 for ac_lib in '' sec; do
24921 if test -z "$ac_lib"; then
24922 ac_res="none required"
24923 else
24924 ac_res=-l$ac_lib
24925 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24926 fi
24927 if ac_fn_c_try_link "$LINENO"; then :
24928 ac_cv_search_acl_trivial=$ac_res
24929 fi
24930 rm -f core conftest.err conftest.$ac_objext \
24931 conftest$ac_exeext
24932 if test "${ac_cv_search_acl_trivial+set}" = set; then :
24933 break
24934 fi
24935 done
24936 if test "${ac_cv_search_acl_trivial+set}" = set; then :
24937
24938 else
24939 ac_cv_search_acl_trivial=no
24940 fi
24941 rm conftest.$ac_ext
24942 LIBS=$ac_func_search_save_LIBS
24943 fi
24944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
24945 $as_echo "$ac_cv_search_acl_trivial" >&6; }
24946 ac_res=$ac_cv_search_acl_trivial
24947 if test "$ac_res" != no; then :
24948 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24949 if test "$ac_cv_search_acl_trivial" != "none required"; then
24950 LIB_ACL=$ac_cv_search_acl_trivial
24951 fi
24952
24953 fi
24954
24955 for ac_func in acl_trivial
24956 do :
24957 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
24958 if test "x$ac_cv_func_acl_trivial" = x""yes; then :
24959 cat >>confdefs.h <<_ACEOF
24960 #define HAVE_ACL_TRIVIAL 1
24961 _ACEOF
24962
24963 fi
24964 done
24965
24966 use_acl=1
24967 fi
24968 fi
24969
24970 if test $use_acl = 0; then
24971 for ac_func in getacl
24972 do :
24973 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
24974 if test "x$ac_cv_func_getacl" = x""yes; then :
24975 cat >>confdefs.h <<_ACEOF
24976 #define HAVE_GETACL 1
24977 _ACEOF
24978
24979 fi
24980 done
24981
24982 if test $ac_cv_func_getacl = yes; then
24983 use_acl=1
24984 fi
24985 for ac_header in aclv.h
24986 do :
24987 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
24988 "
24989 if test "x$ac_cv_header_aclv_h" = x""yes; then :
24990 cat >>confdefs.h <<_ACEOF
24991 #define HAVE_ACLV_H 1
24992 _ACEOF
24993
24994 fi
24995
24996 done
24997
24998 fi
24999
25000 if test $use_acl = 0; then
25001 for ac_func in aclx_get
25002 do :
25003 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25004 if test "x$ac_cv_func_aclx_get" = x""yes; then :
25005 cat >>confdefs.h <<_ACEOF
25006 #define HAVE_ACLX_GET 1
25007 _ACEOF
25008
25009 fi
25010 done
25011
25012 if test $ac_cv_func_aclx_get = yes; then
25013 use_acl=1
25014 fi
25015 fi
25016
25017 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25018 for ac_func in statacl
25019 do :
25020 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25021 if test "x$ac_cv_func_statacl" = x""yes; then :
25022 cat >>confdefs.h <<_ACEOF
25023 #define HAVE_STATACL 1
25024 _ACEOF
25025
25026 fi
25027 done
25028
25029 if test $ac_cv_func_statacl = yes; then
25030 use_acl=1
25031 fi
25032 fi
25033
25034 if test $use_acl = 0; then
25035 for ac_func in aclsort
25036 do :
25037 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25038 if test "x$ac_cv_func_aclsort" = x""yes; then :
25039 cat >>confdefs.h <<_ACEOF
25040 #define HAVE_ACLSORT 1
25041 _ACEOF
25042
25043 fi
25044 done
25045
25046 if test $ac_cv_func_aclsort = yes; then
25047 use_acl=1
25048 fi
25049 fi
25050
25051 LIBS=$ac_save_LIBS
25052 fi
25053 if test "x$enable_acl$use_acl" = "xyes0"; then
25054 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25055 elif test "x$enable_acl$use_acl" = "xauto0"; then
25056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25057 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25059 $as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25060 fi
25061 fi
25062
25063
25064 cat >>confdefs.h <<_ACEOF
25065 #define USE_ACL $use_acl
25066 _ACEOF
25067
25068 USE_ACL=$use_acl
25069
25070
25071
25072
25073
25074 if test $ac_cv_func_readlink = no; then
25075 HAVE_READLINK=0
25076 else
25077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25078 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25079 if test "${gl_cv_decl_readlink_works+set}" = set; then :
25080 $as_echo_n "(cached) " >&6
25081 else
25082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25083 /* end confdefs.h. */
25084 #include <unistd.h>
25085 /* Cause compilation failure if original declaration has wrong type. */
25086 ssize_t readlink (const char *, char *, size_t);
25087 int
25088 main ()
25089 {
25090
25091 ;
25092 return 0;
25093 }
25094 _ACEOF
25095 if ac_fn_c_try_compile "$LINENO"; then :
25096 gl_cv_decl_readlink_works=yes
25097 else
25098 gl_cv_decl_readlink_works=no
25099 fi
25100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25101 fi
25102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25103 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25105 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25106 if test "${gl_cv_func_readlink_works+set}" = set; then :
25107 $as_echo_n "(cached) " >&6
25108 else
25109 # We have readlink, so assume ln -s works.
25110 ln -s conftest.no-such conftest.link
25111 ln -s conftest.link conftest.lnk2
25112 if test "$cross_compiling" = yes; then :
25113 case "$host_os" in
25114 # Guess yes on glibc systems.
25115 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25116 # If we don't know, assume the worst.
25117 *) gl_cv_func_readlink_works="guessing no" ;;
25118 esac
25119
25120 else
25121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25122 /* end confdefs.h. */
25123 #include <unistd.h>
25124
25125 int
25126 main ()
25127 {
25128 char buf[20];
25129 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25130 ;
25131 return 0;
25132 }
25133 _ACEOF
25134 if ac_fn_c_try_run "$LINENO"; then :
25135 gl_cv_func_readlink_works=yes
25136 else
25137 gl_cv_func_readlink_works=no
25138 fi
25139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25140 conftest.$ac_objext conftest.beam conftest.$ac_ext
25141 fi
25142
25143 rm -f conftest.link conftest.lnk2
25144 fi
25145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25146 $as_echo "$gl_cv_func_readlink_works" >&6; }
25147 case "$gl_cv_func_readlink_works" in
25148 *yes)
25149 if test "$gl_cv_decl_readlink_works" != yes; then
25150 REPLACE_READLINK=1
25151 fi
25152 ;;
25153 *)
25154
25155 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25156
25157 REPLACE_READLINK=1
25158 ;;
25159 esac
25160 fi
25161
25162 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25163
25164
25165
25166
25167
25168
25169
25170
25171 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25172
25173
25174 :
25175
25176 fi
25177
25178
25179
25180
25181
25182 GNULIB_READLINK=1
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192 if test $ac_cv_func_readlinkat = no; then
25193 HAVE_READLINKAT=0
25194 fi
25195
25196 if test $HAVE_READLINKAT = 0; then
25197
25198
25199
25200
25201
25202
25203
25204
25205 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25206
25207 fi
25208
25209
25210
25211
25212
25213 GNULIB_READLINKAT=1
25214
25215
25216
25217
25218
25219
25220 for ac_func in sig2str
25221 do :
25222 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25223 if test "x$ac_cv_func_sig2str" = x""yes; then :
25224 cat >>confdefs.h <<_ACEOF
25225 #define HAVE_SIG2STR 1
25226 _ACEOF
25227
25228 fi
25229 done
25230
25231
25232 if test $ac_cv_func_sig2str = no; then
25233
25234
25235
25236
25237
25238
25239
25240
25241 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
25242
25243
25244 :
25245
25246 fi
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258 if test $gl_cv_have_include_next = yes; then
25259 gl_cv_next_signal_h='<'signal.h'>'
25260 else
25261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25262 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
25263 if test "${gl_cv_next_signal_h+set}" = set; then :
25264 $as_echo_n "(cached) " >&6
25265 else
25266
25267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25268 /* end confdefs.h. */
25269 #include <signal.h>
25270
25271 _ACEOF
25272 case "$host_os" in
25273 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25274 *) gl_absname_cpp="$ac_cpp" ;;
25275 esac
25276
25277 case "$host_os" in
25278 mingw*)
25279 gl_dirsep_regex='[/\\]'
25280 ;;
25281 *)
25282 gl_dirsep_regex='\/'
25283 ;;
25284 esac
25285 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25286
25287 gl_header_literal_regex=`echo 'signal.h' \
25288 | sed -e "$gl_make_literal_regex_sed"`
25289 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25290 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25291 s|^/[^/]|//&|
25292 p
25293 q
25294 }'
25295 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25296 sed -n "$gl_absolute_header_sed"`'"'
25297
25298
25299 fi
25300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25301 $as_echo "$gl_cv_next_signal_h" >&6; }
25302 fi
25303 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25304
25305 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25306 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25307 gl_next_as_first_directive='<'signal.h'>'
25308 else
25309 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25310 gl_next_as_first_directive=$gl_cv_next_signal_h
25311 fi
25312 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25313
25314
25315
25316
25317
25318 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25319 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25320 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25321 #include <signal.h>
25322
25323 "
25324 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
25325
25326 else
25327 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25328 fi
25329
25330
25331
25332
25333
25334
25335
25336 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25337 #include <signal.h>
25338
25339 "
25340 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
25341
25342 else
25343 HAVE_SIGHANDLER_T=0
25344 fi
25345
25346
25347
25348
25349 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25350 /* <sys/types.h> is not needed according to POSIX, but the
25351 <sys/socket.h> in i386-unknown-freebsd4.10 and
25352 powerpc-apple-darwin5.5 required it. */
25353 #include <sys/types.h>
25354 #if HAVE_SYS_SOCKET_H
25355 # include <sys/socket.h>
25356 #elif HAVE_WS2TCPIP_H
25357 # include <ws2tcpip.h>
25358 #endif
25359
25360 "
25361 if test "x$ac_cv_type_socklen_t" = x""yes; then :
25362
25363 else
25364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25365 $as_echo_n "checking for socklen_t equivalent... " >&6; }
25366 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
25367 $as_echo_n "(cached) " >&6
25368 else
25369 # Systems have either "struct sockaddr *" or
25370 # "void *" as the second argument to getpeername
25371 gl_cv_socklen_t_equiv=
25372 for arg2 in "struct sockaddr" void; do
25373 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25375 /* end confdefs.h. */
25376 #include <sys/types.h>
25377 #include <sys/socket.h>
25378
25379 int getpeername (int, $arg2 *, $t *);
25380 int
25381 main ()
25382 {
25383 $t len;
25384 getpeername (0, 0, &len);
25385 ;
25386 return 0;
25387 }
25388 _ACEOF
25389 if ac_fn_c_try_compile "$LINENO"; then :
25390 gl_cv_socklen_t_equiv="$t"
25391 fi
25392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25393 test "$gl_cv_socklen_t_equiv" != "" && break
25394 done
25395 test "$gl_cv_socklen_t_equiv" != "" && break
25396 done
25397
25398 fi
25399
25400 if test "$gl_cv_socklen_t_equiv" = ""; then
25401 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25402 fi
25403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25404 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
25405
25406 cat >>confdefs.h <<_ACEOF
25407 #define socklen_t $gl_cv_socklen_t_equiv
25408 _ACEOF
25409
25410 fi
25411
25412
25413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25414 $as_echo_n "checking for ssize_t... " >&6; }
25415 if test "${gt_cv_ssize_t+set}" = set; then :
25416 $as_echo_n "(cached) " >&6
25417 else
25418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25419 /* end confdefs.h. */
25420 #include <sys/types.h>
25421 int
25422 main ()
25423 {
25424 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25425 return !x;
25426 ;
25427 return 0;
25428 }
25429 _ACEOF
25430 if ac_fn_c_try_compile "$LINENO"; then :
25431 gt_cv_ssize_t=yes
25432 else
25433 gt_cv_ssize_t=no
25434 fi
25435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25436 fi
25437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25438 $as_echo "$gt_cv_ssize_t" >&6; }
25439 if test $gt_cv_ssize_t = no; then
25440
25441 $as_echo "#define ssize_t int" >>confdefs.h
25442
25443 fi
25444
25445
25446
25447
25448
25449 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>
25450 #include <sys/stat.h>
25451 "
25452 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
25453
25454 cat >>confdefs.h <<_ACEOF
25455 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25456 _ACEOF
25457
25458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25459 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25460 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
25461 $as_echo_n "(cached) " >&6
25462 else
25463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25464 /* end confdefs.h. */
25465
25466 #include <sys/types.h>
25467 #include <sys/stat.h>
25468 #if HAVE_SYS_TIME_H
25469 # include <sys/time.h>
25470 #endif
25471 #include <time.h>
25472 struct timespec ts;
25473 struct stat st;
25474
25475 int
25476 main ()
25477 {
25478
25479 st.st_atim = ts;
25480
25481 ;
25482 return 0;
25483 }
25484 _ACEOF
25485 if ac_fn_c_try_compile "$LINENO"; then :
25486 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25487 else
25488 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25489 fi
25490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25491 fi
25492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25493 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25494 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25495
25496 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25497
25498 fi
25499 else
25500 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>
25501 #include <sys/stat.h>
25502 "
25503 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
25504
25505 cat >>confdefs.h <<_ACEOF
25506 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25507 _ACEOF
25508
25509
25510 else
25511 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25512 #include <sys/stat.h>
25513 "
25514 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
25515
25516 cat >>confdefs.h <<_ACEOF
25517 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25518 _ACEOF
25519
25520
25521 else
25522 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>
25523 #include <sys/stat.h>
25524 "
25525 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
25526
25527 cat >>confdefs.h <<_ACEOF
25528 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25529 _ACEOF
25530
25531
25532 fi
25533
25534 fi
25535
25536 fi
25537
25538 fi
25539
25540
25541
25542
25543
25544 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>
25545 #include <sys/stat.h>
25546 "
25547 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
25548
25549 cat >>confdefs.h <<_ACEOF
25550 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25551 _ACEOF
25552
25553
25554 else
25555 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25556 #include <sys/stat.h>
25557 "
25558 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
25559
25560 cat >>confdefs.h <<_ACEOF
25561 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25562 _ACEOF
25563
25564
25565 else
25566 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>
25567 #include <sys/stat.h>
25568 "
25569 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
25570
25571 cat >>confdefs.h <<_ACEOF
25572 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25573 _ACEOF
25574
25575
25576 fi
25577
25578 fi
25579
25580 fi
25581
25582
25583
25584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25585 $as_echo_n "checking for working stdalign.h... " >&6; }
25586 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
25587 $as_echo_n "(cached) " >&6
25588 else
25589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25590 /* end confdefs.h. */
25591 #include <stdalign.h>
25592 #include <stddef.h>
25593
25594 /* Test that alignof yields a result consistent with offsetof.
25595 This catches GCC bug 52023
25596 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25597 #ifdef __cplusplus
25598 template <class t> struct alignof_helper { char a; t b; };
25599 # define ao(type) offsetof (alignof_helper<type>, b)
25600 #else
25601 # define ao(type) offsetof (struct { char a; type b; }, b)
25602 #endif
25603 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25604 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25605 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25606
25607 /* Test _Alignas only on platforms where gnulib can help. */
25608 #if \
25609 (__GNUC__ || __IBMC__ || __IBMCPP__ \
25610 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
25611 struct alignas_test { char c; char alignas (8) alignas_8; };
25612 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25613 ? 1 : -1];
25614 #endif
25615
25616 int
25617 main ()
25618 {
25619
25620 ;
25621 return 0;
25622 }
25623 _ACEOF
25624 if ac_fn_c_try_compile "$LINENO"; then :
25625 gl_cv_header_working_stdalign_h=yes
25626 else
25627 gl_cv_header_working_stdalign_h=no
25628 fi
25629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25630 fi
25631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25632 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25633
25634 if test $gl_cv_header_working_stdalign_h = yes; then
25635 STDALIGN_H=''
25636 else
25637 STDALIGN_H='stdalign.h'
25638 fi
25639
25640
25641 if test -n "$STDALIGN_H"; then
25642 GL_GENERATE_STDALIGN_H_TRUE=
25643 GL_GENERATE_STDALIGN_H_FALSE='#'
25644 else
25645 GL_GENERATE_STDALIGN_H_TRUE='#'
25646 GL_GENERATE_STDALIGN_H_FALSE=
25647 fi
25648
25649
25650
25651 STDARG_H=''
25652 NEXT_STDARG_H='<stdarg.h>'
25653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25654 $as_echo_n "checking for va_copy... " >&6; }
25655 if test "${gl_cv_func_va_copy+set}" = set; then :
25656 $as_echo_n "(cached) " >&6
25657 else
25658
25659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25660 /* end confdefs.h. */
25661 #include <stdarg.h>
25662 int
25663 main ()
25664 {
25665
25666 #ifndef va_copy
25667 void (*func) (va_list, va_list) = va_copy;
25668 #endif
25669
25670 ;
25671 return 0;
25672 }
25673 _ACEOF
25674 if ac_fn_c_try_compile "$LINENO"; then :
25675 gl_cv_func_va_copy=yes
25676 else
25677 gl_cv_func_va_copy=no
25678 fi
25679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25680 fi
25681
25682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25683 $as_echo "$gl_cv_func_va_copy" >&6; }
25684 if test $gl_cv_func_va_copy = no; then
25685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25686 /* end confdefs.h. */
25687 #if defined _AIX && !defined __GNUC__
25688 AIX vaccine
25689 #endif
25690
25691 _ACEOF
25692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25693 $EGREP "vaccine" >/dev/null 2>&1; then :
25694 gl_aixcc=yes
25695 else
25696 gl_aixcc=no
25697 fi
25698 rm -f conftest*
25699
25700 if test $gl_aixcc = yes; then
25701 STDARG_H=stdarg.h
25702
25703
25704
25705
25706
25707
25708
25709
25710 if test $gl_cv_have_include_next = yes; then
25711 gl_cv_next_stdarg_h='<'stdarg.h'>'
25712 else
25713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
25714 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
25715 if test "${gl_cv_next_stdarg_h+set}" = set; then :
25716 $as_echo_n "(cached) " >&6
25717 else
25718
25719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25720 /* end confdefs.h. */
25721 #include <stdarg.h>
25722
25723 _ACEOF
25724 case "$host_os" in
25725 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25726 *) gl_absname_cpp="$ac_cpp" ;;
25727 esac
25728
25729 case "$host_os" in
25730 mingw*)
25731 gl_dirsep_regex='[/\\]'
25732 ;;
25733 *)
25734 gl_dirsep_regex='\/'
25735 ;;
25736 esac
25737 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25738
25739 gl_header_literal_regex=`echo 'stdarg.h' \
25740 | sed -e "$gl_make_literal_regex_sed"`
25741 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25742 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25743 s|^/[^/]|//&|
25744 p
25745 q
25746 }'
25747 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25748 sed -n "$gl_absolute_header_sed"`'"'
25749
25750
25751 fi
25752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
25753 $as_echo "$gl_cv_next_stdarg_h" >&6; }
25754 fi
25755 NEXT_STDARG_H=$gl_cv_next_stdarg_h
25756
25757 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25758 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25759 gl_next_as_first_directive='<'stdarg.h'>'
25760 else
25761 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25762 gl_next_as_first_directive=$gl_cv_next_stdarg_h
25763 fi
25764 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
25765
25766
25767
25768
25769 if test "$gl_cv_next_stdarg_h" = '""'; then
25770 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
25771 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
25772 fi
25773 else
25774
25775 saved_as_echo_n="$as_echo_n"
25776 as_echo_n=':'
25777 if test "${gl_cv_func___va_copy+set}" = set; then :
25778 $as_echo_n "(cached) " >&6
25779 else
25780
25781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25782 /* end confdefs.h. */
25783 #include <stdarg.h>
25784 int
25785 main ()
25786 {
25787
25788 #ifndef __va_copy
25789 error, bail out
25790 #endif
25791
25792 ;
25793 return 0;
25794 }
25795 _ACEOF
25796 if ac_fn_c_try_compile "$LINENO"; then :
25797 gl_cv_func___va_copy=yes
25798 else
25799 gl_cv_func___va_copy=no
25800 fi
25801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25802 fi
25803
25804 as_echo_n="$saved_as_echo_n"
25805
25806 if test $gl_cv_func___va_copy = yes; then
25807
25808 $as_echo "#define va_copy __va_copy" >>confdefs.h
25809
25810 else
25811
25812
25813 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
25814
25815 fi
25816 fi
25817 fi
25818
25819 if test -n "$STDARG_H"; then
25820 GL_GENERATE_STDARG_H_TRUE=
25821 GL_GENERATE_STDARG_H_FALSE='#'
25822 else
25823 GL_GENERATE_STDARG_H_TRUE='#'
25824 GL_GENERATE_STDARG_H_FALSE=
25825 fi
25826
25827
25828
25829
25830
25831
25832 # Define two additional variables used in the Makefile substitution.
25833
25834 if test "$ac_cv_header_stdbool_h" = yes; then
25835 STDBOOL_H=''
25836 else
25837 STDBOOL_H='stdbool.h'
25838 fi
25839
25840 if test -n "$STDBOOL_H"; then
25841 GL_GENERATE_STDBOOL_H_TRUE=
25842 GL_GENERATE_STDBOOL_H_FALSE='#'
25843 else
25844 GL_GENERATE_STDBOOL_H_TRUE='#'
25845 GL_GENERATE_STDBOOL_H_FALSE=
25846 fi
25847
25848
25849 if test "$ac_cv_type__Bool" = yes; then
25850 HAVE__BOOL=1
25851 else
25852 HAVE__BOOL=0
25853 fi
25854
25855
25856
25857
25858
25859 STDDEF_H=
25860 if test $gt_cv_c_wchar_t = no; then
25861 HAVE_WCHAR_T=0
25862 STDDEF_H=stddef.h
25863 fi
25864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25865 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25866 if test "${gl_cv_decl_null_works+set}" = set; then :
25867 $as_echo_n "(cached) " >&6
25868 else
25869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25870 /* end confdefs.h. */
25871 #include <stddef.h>
25872 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25873
25874 int
25875 main ()
25876 {
25877
25878 ;
25879 return 0;
25880 }
25881 _ACEOF
25882 if ac_fn_c_try_compile "$LINENO"; then :
25883 gl_cv_decl_null_works=yes
25884 else
25885 gl_cv_decl_null_works=no
25886 fi
25887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25888 fi
25889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25890 $as_echo "$gl_cv_decl_null_works" >&6; }
25891 if test $gl_cv_decl_null_works = no; then
25892 REPLACE_NULL=1
25893 STDDEF_H=stddef.h
25894 fi
25895
25896 if test -n "$STDDEF_H"; then
25897 GL_GENERATE_STDDEF_H_TRUE=
25898 GL_GENERATE_STDDEF_H_FALSE='#'
25899 else
25900 GL_GENERATE_STDDEF_H_TRUE='#'
25901 GL_GENERATE_STDDEF_H_FALSE=
25902 fi
25903
25904 if test -n "$STDDEF_H"; then
25905
25906
25907
25908
25909
25910
25911
25912
25913 if test $gl_cv_have_include_next = yes; then
25914 gl_cv_next_stddef_h='<'stddef.h'>'
25915 else
25916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25917 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25918 if test "${gl_cv_next_stddef_h+set}" = set; then :
25919 $as_echo_n "(cached) " >&6
25920 else
25921
25922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25923 /* end confdefs.h. */
25924 #include <stddef.h>
25925
25926 _ACEOF
25927 case "$host_os" in
25928 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25929 *) gl_absname_cpp="$ac_cpp" ;;
25930 esac
25931
25932 case "$host_os" in
25933 mingw*)
25934 gl_dirsep_regex='[/\\]'
25935 ;;
25936 *)
25937 gl_dirsep_regex='\/'
25938 ;;
25939 esac
25940 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25941
25942 gl_header_literal_regex=`echo 'stddef.h' \
25943 | sed -e "$gl_make_literal_regex_sed"`
25944 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25945 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25946 s|^/[^/]|//&|
25947 p
25948 q
25949 }'
25950 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25951 sed -n "$gl_absolute_header_sed"`'"'
25952
25953
25954 fi
25955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25956 $as_echo "$gl_cv_next_stddef_h" >&6; }
25957 fi
25958 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25959
25960 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25961 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25962 gl_next_as_first_directive='<'stddef.h'>'
25963 else
25964 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25965 gl_next_as_first_directive=$gl_cv_next_stddef_h
25966 fi
25967 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25968
25969
25970
25971
25972 fi
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985 if test $gl_cv_have_include_next = yes; then
25986 gl_cv_next_stdio_h='<'stdio.h'>'
25987 else
25988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25989 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25990 if test "${gl_cv_next_stdio_h+set}" = set; then :
25991 $as_echo_n "(cached) " >&6
25992 else
25993
25994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25995 /* end confdefs.h. */
25996 #include <stdio.h>
25997
25998 _ACEOF
25999 case "$host_os" in
26000 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26001 *) gl_absname_cpp="$ac_cpp" ;;
26002 esac
26003
26004 case "$host_os" in
26005 mingw*)
26006 gl_dirsep_regex='[/\\]'
26007 ;;
26008 *)
26009 gl_dirsep_regex='\/'
26010 ;;
26011 esac
26012 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26013
26014 gl_header_literal_regex=`echo 'stdio.h' \
26015 | sed -e "$gl_make_literal_regex_sed"`
26016 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26017 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26018 s|^/[^/]|//&|
26019 p
26020 q
26021 }'
26022 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26023 sed -n "$gl_absolute_header_sed"`'"'
26024
26025
26026 fi
26027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26028 $as_echo "$gl_cv_next_stdio_h" >&6; }
26029 fi
26030 NEXT_STDIO_H=$gl_cv_next_stdio_h
26031
26032 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26033 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26034 gl_next_as_first_directive='<'stdio.h'>'
26035 else
26036 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26037 gl_next_as_first_directive=$gl_cv_next_stdio_h
26038 fi
26039 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26040
26041
26042
26043
26044
26045 GNULIB_FSCANF=1
26046
26047
26048 cat >>confdefs.h <<_ACEOF
26049 #define GNULIB_FSCANF 1
26050 _ACEOF
26051
26052
26053 GNULIB_SCANF=1
26054
26055
26056 cat >>confdefs.h <<_ACEOF
26057 #define GNULIB_SCANF 1
26058 _ACEOF
26059
26060
26061 GNULIB_FGETC=1
26062 GNULIB_GETC=1
26063 GNULIB_GETCHAR=1
26064 GNULIB_FGETS=1
26065 GNULIB_FREAD=1
26066
26067
26068 GNULIB_FPRINTF=1
26069 GNULIB_PRINTF=1
26070 GNULIB_VFPRINTF=1
26071 GNULIB_VPRINTF=1
26072 GNULIB_FPUTC=1
26073 GNULIB_PUTC=1
26074 GNULIB_PUTCHAR=1
26075 GNULIB_FPUTS=1
26076 GNULIB_PUTS=1
26077 GNULIB_FWRITE=1
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093 if test $gl_cv_have_include_next = yes; then
26094 gl_cv_next_stdlib_h='<'stdlib.h'>'
26095 else
26096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26097 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26098 if test "${gl_cv_next_stdlib_h+set}" = set; then :
26099 $as_echo_n "(cached) " >&6
26100 else
26101
26102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26103 /* end confdefs.h. */
26104 #include <stdlib.h>
26105
26106 _ACEOF
26107 case "$host_os" in
26108 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26109 *) gl_absname_cpp="$ac_cpp" ;;
26110 esac
26111
26112 case "$host_os" in
26113 mingw*)
26114 gl_dirsep_regex='[/\\]'
26115 ;;
26116 *)
26117 gl_dirsep_regex='\/'
26118 ;;
26119 esac
26120 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26121
26122 gl_header_literal_regex=`echo 'stdlib.h' \
26123 | sed -e "$gl_make_literal_regex_sed"`
26124 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26125 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26126 s|^/[^/]|//&|
26127 p
26128 q
26129 }'
26130 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26131 sed -n "$gl_absolute_header_sed"`'"'
26132
26133
26134 fi
26135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26136 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26137 fi
26138 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26139
26140 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26141 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26142 gl_next_as_first_directive='<'stdlib.h'>'
26143 else
26144 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26145 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26146 fi
26147 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
26158
26159
26160
26161
26162
26163
26164
26165 $as_echo "#define my_strftime nstrftime" >>confdefs.h
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177 if test "$ac_cv_have_decl_strtoimax" != yes; then
26178 HAVE_DECL_STRTOIMAX=0
26179 fi
26180
26181 if test $ac_cv_func_strtoimax = yes; then
26182 HAVE_STRTOIMAX=1
26183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26184 $as_echo_n "checking whether strtoimax works... " >&6; }
26185 if test "${gl_cv_func_strtoimax+set}" = set; then :
26186 $as_echo_n "(cached) " >&6
26187 else
26188 if test "$cross_compiling" = yes; then :
26189 case "$host_os" in
26190 # Guess no on AIX 5.
26191 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26192 # Guess yes otherwise.
26193 *) gl_cv_func_strtoimax="guessing yes" ;;
26194 esac
26195
26196 else
26197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26198 /* end confdefs.h. */
26199
26200 #include <errno.h>
26201 #include <string.h>
26202 #include <inttypes.h>
26203 int main ()
26204 {
26205 if (sizeof (intmax_t) > sizeof (int))
26206 {
26207 const char *s = "4294967295";
26208 char *p;
26209 intmax_t res;
26210 errno = 0;
26211 res = strtoimax (s, &p, 10);
26212 if (p != s + strlen (s))
26213 return 1;
26214 if (errno != 0)
26215 return 2;
26216 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26217 return 3;
26218 }
26219 else
26220 {
26221 const char *s = "2147483647";
26222 char *p;
26223 intmax_t res;
26224 errno = 0;
26225 res = strtoimax (s, &p, 10);
26226 if (p != s + strlen (s))
26227 return 1;
26228 if (errno != 0)
26229 return 2;
26230 if (res != 2147483647)
26231 return 3;
26232 }
26233 return 0;
26234 }
26235
26236 _ACEOF
26237 if ac_fn_c_try_run "$LINENO"; then :
26238 gl_cv_func_strtoimax=yes
26239 else
26240 gl_cv_func_strtoimax=no
26241 fi
26242 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26243 conftest.$ac_objext conftest.beam conftest.$ac_ext
26244 fi
26245
26246
26247 fi
26248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
26249 $as_echo "$gl_cv_func_strtoimax" >&6; }
26250 case "$gl_cv_func_strtoimax" in
26251 *no) REPLACE_STRTOIMAX=1 ;;
26252 esac
26253 else
26254 HAVE_STRTOIMAX=0
26255 fi
26256
26257 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
26258
26259
26260
26261
26262
26263
26264
26265
26266 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
26267
26268
26269 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
26270 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
26271 ac_have_decl=1
26272 else
26273 ac_have_decl=0
26274 fi
26275
26276 cat >>confdefs.h <<_ACEOF
26277 #define HAVE_DECL_STRTOLL $ac_have_decl
26278 _ACEOF
26279
26280
26281
26282 fi
26283
26284
26285
26286
26287
26288 GNULIB_STRTOIMAX=1
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298 if test "$ac_cv_have_decl_strtoumax" != yes; then
26299 HAVE_DECL_STRTOUMAX=0
26300 fi
26301
26302 if test $ac_cv_func_strtoumax = no; then
26303
26304
26305
26306
26307
26308
26309
26310
26311 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
26312
26313
26314 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
26315 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
26316 ac_have_decl=1
26317 else
26318 ac_have_decl=0
26319 fi
26320
26321 cat >>confdefs.h <<_ACEOF
26322 #define HAVE_DECL_STRTOULL $ac_have_decl
26323 _ACEOF
26324
26325
26326
26327 fi
26328
26329
26330
26331
26332
26333 GNULIB_STRTOUMAX=1
26334
26335
26336
26337
26338
26339
26340
26341 if test $ac_cv_func_symlink = no; then
26342 HAVE_SYMLINK=0
26343 else
26344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
26345 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
26346 if test "${gl_cv_func_symlink_works+set}" = set; then :
26347 $as_echo_n "(cached) " >&6
26348 else
26349 if test "$cross_compiling" = yes; then :
26350 case "$host_os" in
26351 # Guess yes on glibc systems.
26352 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
26353 # If we don't know, assume the worst.
26354 *) gl_cv_func_symlink_works="guessing no" ;;
26355 esac
26356
26357 else
26358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26359 /* end confdefs.h. */
26360 #include <unistd.h>
26361
26362 int
26363 main ()
26364 {
26365 int result = 0;
26366 if (!symlink ("a", "conftest.link/"))
26367 result |= 1;
26368 if (symlink ("conftest.f", "conftest.lnk2"))
26369 result |= 2;
26370 else if (!symlink ("a", "conftest.lnk2/"))
26371 result |= 4;
26372 return result;
26373
26374 ;
26375 return 0;
26376 }
26377 _ACEOF
26378 if ac_fn_c_try_run "$LINENO"; then :
26379 gl_cv_func_symlink_works=yes
26380 else
26381 gl_cv_func_symlink_works=no
26382 fi
26383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26384 conftest.$ac_objext conftest.beam conftest.$ac_ext
26385 fi
26386
26387 rm -f conftest.f conftest.link conftest.lnk2
26388 fi
26389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
26390 $as_echo "$gl_cv_func_symlink_works" >&6; }
26391 case "$gl_cv_func_symlink_works" in
26392 *yes) ;;
26393 *)
26394 REPLACE_SYMLINK=1
26395 ;;
26396 esac
26397 fi
26398
26399 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
26400
26401
26402
26403
26404
26405
26406
26407
26408 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
26409
26410 fi
26411
26412
26413
26414
26415
26416 GNULIB_SYMLINK=1
26417
26418
26419
26420
26421
26422
26423
26424
26425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
26426 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
26427 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
26428 $as_echo_n "(cached) " >&6
26429 else
26430
26431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26432 /* end confdefs.h. */
26433 #include <sys/select.h>
26434 int
26435 main ()
26436 {
26437 struct timeval b;
26438 ;
26439 return 0;
26440 }
26441 _ACEOF
26442 if ac_fn_c_try_compile "$LINENO"; then :
26443 gl_cv_header_sys_select_h_selfcontained=yes
26444 else
26445 gl_cv_header_sys_select_h_selfcontained=no
26446 fi
26447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26448 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
26449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26450 /* end confdefs.h. */
26451 #include <sys/select.h>
26452 int
26453 main ()
26454 {
26455 int memset; int bzero;
26456 ;
26457 return 0;
26458 }
26459
26460 _ACEOF
26461 if ac_fn_c_try_compile "$LINENO"; then :
26462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26463 /* end confdefs.h. */
26464 #include <sys/select.h>
26465 int
26466 main ()
26467 {
26468
26469 #undef memset
26470 #define memset nonexistent_memset
26471 extern
26472 #ifdef __cplusplus
26473 "C"
26474 #endif
26475 void *memset (void *, int, unsigned long);
26476 #undef bzero
26477 #define bzero nonexistent_bzero
26478 extern
26479 #ifdef __cplusplus
26480 "C"
26481 #endif
26482 void bzero (void *, unsigned long);
26483 fd_set fds;
26484 FD_ZERO (&fds);
26485
26486 ;
26487 return 0;
26488 }
26489
26490 _ACEOF
26491 if ac_fn_c_try_link "$LINENO"; then :
26492
26493 else
26494 gl_cv_header_sys_select_h_selfcontained=no
26495 fi
26496 rm -f core conftest.err conftest.$ac_objext \
26497 conftest$ac_exeext conftest.$ac_ext
26498
26499 fi
26500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26501 fi
26502
26503 fi
26504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
26505 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515 if test $gl_cv_have_include_next = yes; then
26516 gl_cv_next_sys_select_h='<'sys/select.h'>'
26517 else
26518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
26519 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
26520 if test "${gl_cv_next_sys_select_h+set}" = set; then :
26521 $as_echo_n "(cached) " >&6
26522 else
26523
26524 if test $ac_cv_header_sys_select_h = yes; then
26525
26526
26527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26528 /* end confdefs.h. */
26529 #include <sys/select.h>
26530
26531 _ACEOF
26532 case "$host_os" in
26533 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26534 *) gl_absname_cpp="$ac_cpp" ;;
26535 esac
26536
26537 case "$host_os" in
26538 mingw*)
26539 gl_dirsep_regex='[/\\]'
26540 ;;
26541 *)
26542 gl_dirsep_regex='\/'
26543 ;;
26544 esac
26545 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26546
26547 gl_header_literal_regex=`echo 'sys/select.h' \
26548 | sed -e "$gl_make_literal_regex_sed"`
26549 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26550 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26551 s|^/[^/]|//&|
26552 p
26553 q
26554 }'
26555 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26556 sed -n "$gl_absolute_header_sed"`'"'
26557 else
26558 gl_cv_next_sys_select_h='<'sys/select.h'>'
26559 fi
26560
26561
26562 fi
26563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
26564 $as_echo "$gl_cv_next_sys_select_h" >&6; }
26565 fi
26566 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
26567
26568 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26569 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26570 gl_next_as_first_directive='<'sys/select.h'>'
26571 else
26572 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26573 gl_next_as_first_directive=$gl_cv_next_sys_select_h
26574 fi
26575 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26576
26577
26578
26579
26580 if test $ac_cv_header_sys_select_h = yes; then
26581 HAVE_SYS_SELECT_H=1
26582 else
26583 HAVE_SYS_SELECT_H=0
26584 fi
26585
26586
26587
26588
26589
26590 if test $ac_cv_header_sys_socket_h != yes; then
26591 for ac_header in winsock2.h
26592 do :
26593 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26594 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
26595 cat >>confdefs.h <<_ACEOF
26596 #define HAVE_WINSOCK2_H 1
26597 _ACEOF
26598
26599 fi
26600
26601 done
26602
26603 fi
26604 if test "$ac_cv_header_winsock2_h" = yes; then
26605 HAVE_WINSOCK2_H=1
26606 UNISTD_H_HAVE_WINSOCK2_H=1
26607 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26608 else
26609 HAVE_WINSOCK2_H=0
26610 fi
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631 if test $gl_cv_have_include_next = yes; then
26632 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26633 else
26634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26635 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26636 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
26637 $as_echo_n "(cached) " >&6
26638 else
26639
26640 if test $ac_cv_header_sys_stat_h = yes; then
26641
26642
26643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26644 /* end confdefs.h. */
26645 #include <sys/stat.h>
26646
26647 _ACEOF
26648 case "$host_os" in
26649 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26650 *) gl_absname_cpp="$ac_cpp" ;;
26651 esac
26652
26653 case "$host_os" in
26654 mingw*)
26655 gl_dirsep_regex='[/\\]'
26656 ;;
26657 *)
26658 gl_dirsep_regex='\/'
26659 ;;
26660 esac
26661 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26662
26663 gl_header_literal_regex=`echo 'sys/stat.h' \
26664 | sed -e "$gl_make_literal_regex_sed"`
26665 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26666 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26667 s|^/[^/]|//&|
26668 p
26669 q
26670 }'
26671 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26672 sed -n "$gl_absolute_header_sed"`'"'
26673 else
26674 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26675 fi
26676
26677
26678 fi
26679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26680 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26681 fi
26682 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26683
26684 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26686 gl_next_as_first_directive='<'sys/stat.h'>'
26687 else
26688 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26689 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26690 fi
26691 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26704
26705 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26706
26707 fi
26708
26709 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26710 #include <sys/stat.h>
26711 "
26712 if test "x$ac_cv_type_nlink_t" = x""yes; then :
26713
26714 else
26715
26716 $as_echo "#define nlink_t int" >>confdefs.h
26717
26718 fi
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
26738 "
26739 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
26740 ac_have_decl=1
26741 else
26742 ac_have_decl=0
26743 fi
26744
26745 cat >>confdefs.h <<_ACEOF
26746 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
26747 _ACEOF
26748
26749 if test $ac_cv_have_decl_localtime_r = no; then
26750 HAVE_DECL_LOCALTIME_R=0
26751 fi
26752
26753
26754 if test $ac_cv_func_localtime_r = yes; then
26755 HAVE_LOCALTIME_R=1
26756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
26757 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
26758 if test "${gl_cv_time_r_posix+set}" = set; then :
26759 $as_echo_n "(cached) " >&6
26760 else
26761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26762 /* end confdefs.h. */
26763 #include <time.h>
26764 int
26765 main ()
26766 {
26767 /* We don't need to append 'restrict's to the argument types,
26768 even though the POSIX signature has the 'restrict's,
26769 since C99 says they can't affect type compatibility. */
26770 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
26771 if (ptr) return 0;
26772 /* Check the return type is a pointer.
26773 On HP-UX 10 it is 'int'. */
26774 *localtime_r (0, 0);
26775 ;
26776 return 0;
26777 }
26778
26779 _ACEOF
26780 if ac_fn_c_try_compile "$LINENO"; then :
26781 gl_cv_time_r_posix=yes
26782 else
26783 gl_cv_time_r_posix=no
26784 fi
26785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26786
26787 fi
26788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
26789 $as_echo "$gl_cv_time_r_posix" >&6; }
26790 if test $gl_cv_time_r_posix = yes; then
26791 REPLACE_LOCALTIME_R=0
26792 else
26793 REPLACE_LOCALTIME_R=1
26794 fi
26795 else
26796 HAVE_LOCALTIME_R=0
26797 fi
26798
26799 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
26800
26801
26802
26803
26804
26805
26806
26807
26808 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
26809
26810
26811 :
26812
26813 fi
26814
26815
26816
26817
26818
26819 GNULIB_TIME_R=1
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830 LIB_TIMER_TIME=
26831
26832 gl_saved_libs=$LIBS
26833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
26834 $as_echo_n "checking for library containing timer_settime... " >&6; }
26835 if test "${ac_cv_search_timer_settime+set}" = set; then :
26836 $as_echo_n "(cached) " >&6
26837 else
26838 ac_func_search_save_LIBS=$LIBS
26839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26840 /* end confdefs.h. */
26841
26842 /* Override any GCC internal prototype to avoid an error.
26843 Use char because int might match the return type of a GCC
26844 builtin and then its argument prototype would still apply. */
26845 #ifdef __cplusplus
26846 extern "C"
26847 #endif
26848 char timer_settime ();
26849 int
26850 main ()
26851 {
26852 return timer_settime ();
26853 ;
26854 return 0;
26855 }
26856 _ACEOF
26857 for ac_lib in '' rt posix4; do
26858 if test -z "$ac_lib"; then
26859 ac_res="none required"
26860 else
26861 ac_res=-l$ac_lib
26862 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26863 fi
26864 if ac_fn_c_try_link "$LINENO"; then :
26865 ac_cv_search_timer_settime=$ac_res
26866 fi
26867 rm -f core conftest.err conftest.$ac_objext \
26868 conftest$ac_exeext
26869 if test "${ac_cv_search_timer_settime+set}" = set; then :
26870 break
26871 fi
26872 done
26873 if test "${ac_cv_search_timer_settime+set}" = set; then :
26874
26875 else
26876 ac_cv_search_timer_settime=no
26877 fi
26878 rm conftest.$ac_ext
26879 LIBS=$ac_func_search_save_LIBS
26880 fi
26881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
26882 $as_echo "$ac_cv_search_timer_settime" >&6; }
26883 ac_res=$ac_cv_search_timer_settime
26884 if test "$ac_res" != no; then :
26885 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26886 test "$ac_cv_search_timer_settime" = "none required" ||
26887 LIB_TIMER_TIME=$ac_cv_search_timer_settime
26888 fi
26889
26890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26891 /* end confdefs.h. */
26892
26893 #include <features.h>
26894 #ifdef __GNU_LIBRARY__
26895 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
26896 && !defined __UCLIBC__
26897 Thread emulation available
26898 #endif
26899 #endif
26900
26901 _ACEOF
26902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26903 $EGREP "Thread" >/dev/null 2>&1; then :
26904 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
26905 fi
26906 rm -f conftest*
26907
26908 for ac_func in timer_settime
26909 do :
26910 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
26911 if test "x$ac_cv_func_timer_settime" = x""yes; then :
26912 cat >>confdefs.h <<_ACEOF
26913 #define HAVE_TIMER_SETTIME 1
26914 _ACEOF
26915
26916 fi
26917 done
26918
26919 LIBS=$gl_saved_libs
26920
26921 :
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934 if test $gl_cv_have_include_next = yes; then
26935 gl_cv_next_unistd_h='<'unistd.h'>'
26936 else
26937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26938 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
26939 if test "${gl_cv_next_unistd_h+set}" = set; then :
26940 $as_echo_n "(cached) " >&6
26941 else
26942
26943 if test $ac_cv_header_unistd_h = yes; then
26944
26945
26946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26947 /* end confdefs.h. */
26948 #include <unistd.h>
26949
26950 _ACEOF
26951 case "$host_os" in
26952 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26953 *) gl_absname_cpp="$ac_cpp" ;;
26954 esac
26955
26956 case "$host_os" in
26957 mingw*)
26958 gl_dirsep_regex='[/\\]'
26959 ;;
26960 *)
26961 gl_dirsep_regex='\/'
26962 ;;
26963 esac
26964 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26965
26966 gl_header_literal_regex=`echo 'unistd.h' \
26967 | sed -e "$gl_make_literal_regex_sed"`
26968 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26969 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26970 s|^/[^/]|//&|
26971 p
26972 q
26973 }'
26974 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26975 sed -n "$gl_absolute_header_sed"`'"'
26976 else
26977 gl_cv_next_unistd_h='<'unistd.h'>'
26978 fi
26979
26980
26981 fi
26982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26983 $as_echo "$gl_cv_next_unistd_h" >&6; }
26984 fi
26985 NEXT_UNISTD_H=$gl_cv_next_unistd_h
26986
26987 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26988 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26989 gl_next_as_first_directive='<'unistd.h'>'
26990 else
26991 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26992 gl_next_as_first_directive=$gl_cv_next_unistd_h
26993 fi
26994 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26995
26996
26997
26998
26999 if test $ac_cv_header_unistd_h = yes; then
27000 HAVE_UNISTD_H=1
27001 else
27002 HAVE_UNISTD_H=0
27003 fi
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015 if test $ac_cv_have_decl_unsetenv = no; then
27016 HAVE_DECL_UNSETENV=0
27017 fi
27018 for ac_func in unsetenv
27019 do :
27020 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27021 if test "x$ac_cv_func_unsetenv" = x""yes; then :
27022 cat >>confdefs.h <<_ACEOF
27023 #define HAVE_UNSETENV 1
27024 _ACEOF
27025
27026 fi
27027 done
27028
27029 if test $ac_cv_func_unsetenv = no; then
27030 HAVE_UNSETENV=0
27031 else
27032 HAVE_UNSETENV=1
27033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27034 $as_echo_n "checking for unsetenv() return type... " >&6; }
27035 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27036 $as_echo_n "(cached) " >&6
27037 else
27038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27039 /* end confdefs.h. */
27040
27041 #undef _BSD
27042 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27043 #include <stdlib.h>
27044 extern
27045 #ifdef __cplusplus
27046 "C"
27047 #endif
27048 int unsetenv (const char *name);
27049
27050 int
27051 main ()
27052 {
27053
27054 ;
27055 return 0;
27056 }
27057 _ACEOF
27058 if ac_fn_c_try_compile "$LINENO"; then :
27059 gt_cv_func_unsetenv_ret='int'
27060 else
27061 gt_cv_func_unsetenv_ret='void'
27062 fi
27063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27064 fi
27065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27066 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27067 if test $gt_cv_func_unsetenv_ret = 'void'; then
27068
27069 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27070
27071 REPLACE_UNSETENV=1
27072 fi
27073
27074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27075 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27076 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27077 $as_echo_n "(cached) " >&6
27078 else
27079 if test "$cross_compiling" = yes; then :
27080 case "$host_os" in
27081 # Guess yes on glibc systems.
27082 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27083 # If we don't know, assume the worst.
27084 *) gl_cv_func_unsetenv_works="guessing no" ;;
27085 esac
27086
27087 else
27088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27089 /* end confdefs.h. */
27090
27091 #include <stdlib.h>
27092 #include <errno.h>
27093 extern char **environ;
27094
27095 int
27096 main ()
27097 {
27098
27099 char entry1[] = "a=1";
27100 char entry2[] = "b=2";
27101 char *env[] = { entry1, entry2, NULL };
27102 if (putenv ((char *) "a=1")) return 1;
27103 if (putenv (entry2)) return 2;
27104 entry2[0] = 'a';
27105 unsetenv ("a");
27106 if (getenv ("a")) return 3;
27107 if (!unsetenv ("") || errno != EINVAL) return 4;
27108 entry2[0] = 'b';
27109 environ = env;
27110 if (!getenv ("a")) return 5;
27111 entry2[0] = 'a';
27112 unsetenv ("a");
27113 if (getenv ("a")) return 6;
27114
27115 ;
27116 return 0;
27117 }
27118 _ACEOF
27119 if ac_fn_c_try_run "$LINENO"; then :
27120 gl_cv_func_unsetenv_works=yes
27121 else
27122 gl_cv_func_unsetenv_works=no
27123 fi
27124 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27125 conftest.$ac_objext conftest.beam conftest.$ac_ext
27126 fi
27127
27128 fi
27129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27130 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27131 case "$gl_cv_func_unsetenv_works" in
27132 *yes) ;;
27133 *)
27134 REPLACE_UNSETENV=1
27135 ;;
27136 esac
27137 fi
27138
27139 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27140
27141
27142
27143
27144
27145
27146
27147
27148 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27149
27150
27151
27152
27153
27154 fi
27155
27156
27157
27158
27159
27160 GNULIB_UNSETENV=1
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27174 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27175 if test "${gl_cv_func_futimesat_works+set}" = set; then :
27176 $as_echo_n "(cached) " >&6
27177 else
27178 touch conftest.file
27179 if test "$cross_compiling" = yes; then :
27180 case "$host_os" in
27181 # Guess yes on glibc systems.
27182 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27183 # If we don't know, assume the worst.
27184 *) gl_cv_func_futimesat_works="guessing no" ;;
27185 esac
27186
27187 else
27188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27189 /* end confdefs.h. */
27190
27191 #include <stddef.h>
27192 #include <sys/times.h>
27193 #include <fcntl.h>
27194
27195 int
27196 main ()
27197 {
27198 int fd = open ("conftest.file", O_RDWR);
27199 if (fd < 0) return 1;
27200 if (futimesat (fd, NULL, NULL)) return 2;
27201
27202 ;
27203 return 0;
27204 }
27205 _ACEOF
27206 if ac_fn_c_try_run "$LINENO"; then :
27207 gl_cv_func_futimesat_works=yes
27208 else
27209 gl_cv_func_futimesat_works=no
27210 fi
27211 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27212 conftest.$ac_objext conftest.beam conftest.$ac_ext
27213 fi
27214
27215 rm -f conftest.file
27216 fi
27217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27218 $as_echo "$gl_cv_func_futimesat_works" >&6; }
27219 case "$gl_cv_func_futimesat_works" in
27220 *yes) ;;
27221 *)
27222
27223 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
27224
27225 ;;
27226 esac
27227 fi
27228
27229 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
27230 gl_gnulib_enabled_dosname=false
27231 gl_gnulib_enabled_euidaccess=false
27232 gl_gnulib_enabled_getgroups=false
27233 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
27234 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
27235 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
27236 gl_gnulib_enabled_pathmax=false
27237 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
27238 gl_gnulib_enabled_stat=false
27239 gl_gnulib_enabled_strtoll=false
27240 gl_gnulib_enabled_strtoull=false
27241 gl_gnulib_enabled_verify=false
27242 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
27243 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
27244 {
27245 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27246
27247
27248
27249
27250
27251
27252
27253
27254 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
27255
27256 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
27257 fi
27258 }
27259 func_gl_gnulib_m4code_dosname ()
27260 {
27261 if ! $gl_gnulib_enabled_dosname; then
27262 gl_gnulib_enabled_dosname=true
27263 fi
27264 }
27265 func_gl_gnulib_m4code_euidaccess ()
27266 {
27267 if ! $gl_gnulib_enabled_euidaccess; then
27268
27269
27270
27271
27272
27273 for ac_func in euidaccess
27274 do :
27275 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
27276 if test "x$ac_cv_func_euidaccess" = x""yes; then :
27277 cat >>confdefs.h <<_ACEOF
27278 #define HAVE_EUIDACCESS 1
27279 _ACEOF
27280
27281 fi
27282 done
27283
27284 if test $ac_cv_func_euidaccess = no; then
27285 HAVE_EUIDACCESS=0
27286 fi
27287
27288 if test $HAVE_EUIDACCESS = 0; then
27289
27290
27291
27292
27293
27294
27295
27296
27297 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
27298
27299
27300
27301 for ac_header in libgen.h
27302 do :
27303 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
27304 if test "x$ac_cv_header_libgen_h" = x""yes; then :
27305 cat >>confdefs.h <<_ACEOF
27306 #define HAVE_LIBGEN_H 1
27307 _ACEOF
27308
27309 fi
27310
27311 done
27312
27313
27314 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27315 if test "x$ac_cv_func_getgroups" = x""yes; then :
27316
27317 fi
27318
27319
27320 # If we don't yet have getgroups, see if it's in -lbsd.
27321 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27322 ac_save_LIBS=$LIBS
27323 if test $ac_cv_func_getgroups = no; then
27324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27325 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27326 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27327 $as_echo_n "(cached) " >&6
27328 else
27329 ac_check_lib_save_LIBS=$LIBS
27330 LIBS="-lbsd $LIBS"
27331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27332 /* end confdefs.h. */
27333
27334 /* Override any GCC internal prototype to avoid an error.
27335 Use char because int might match the return type of a GCC
27336 builtin and then its argument prototype would still apply. */
27337 #ifdef __cplusplus
27338 extern "C"
27339 #endif
27340 char getgroups ();
27341 int
27342 main ()
27343 {
27344 return getgroups ();
27345 ;
27346 return 0;
27347 }
27348 _ACEOF
27349 if ac_fn_c_try_link "$LINENO"; then :
27350 ac_cv_lib_bsd_getgroups=yes
27351 else
27352 ac_cv_lib_bsd_getgroups=no
27353 fi
27354 rm -f core conftest.err conftest.$ac_objext \
27355 conftest$ac_exeext conftest.$ac_ext
27356 LIBS=$ac_check_lib_save_LIBS
27357 fi
27358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27359 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27360 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27361 GETGROUPS_LIB=-lbsd
27362 fi
27363
27364 fi
27365
27366 # Run the program to test the functionality of the system-supplied
27367 # getgroups function only if there is such a function.
27368 if test $ac_cv_func_getgroups = yes; then
27369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27370 $as_echo_n "checking for working getgroups... " >&6; }
27371 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27372 $as_echo_n "(cached) " >&6
27373 else
27374 if test "$cross_compiling" = yes; then :
27375 case "$host_os" in # ((
27376 # Guess yes on glibc systems.
27377 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27378 # If we don't know, assume the worst.
27379 *) ac_cv_func_getgroups_works="guessing no" ;;
27380 esac
27381
27382 else
27383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27384 /* end confdefs.h. */
27385 $ac_includes_default
27386 int
27387 main ()
27388 {
27389 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27390 return getgroups (0, 0) == -1;
27391 ;
27392 return 0;
27393 }
27394
27395 _ACEOF
27396 if ac_fn_c_try_run "$LINENO"; then :
27397 ac_cv_func_getgroups_works=yes
27398 else
27399 ac_cv_func_getgroups_works=no
27400 fi
27401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27402 conftest.$ac_objext conftest.beam conftest.$ac_ext
27403 fi
27404
27405
27406 fi
27407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27408 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27409 else
27410 ac_cv_func_getgroups_works=no
27411 fi
27412 case "$ac_cv_func_getgroups_works" in
27413 *yes)
27414
27415 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27416
27417 ;;
27418 esac
27419 LIBS=$ac_save_LIBS
27420
27421
27422 # Solaris 9 and 10 need -lgen to get the eaccess function.
27423 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
27424 # programs in the package would end up linked with that potentially-shared
27425 # library, inducing unnecessary run-time overhead.
27426 LIB_EACCESS=
27427
27428 gl_saved_libs=$LIBS
27429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
27430 $as_echo_n "checking for library containing eaccess... " >&6; }
27431 if test "${ac_cv_search_eaccess+set}" = set; then :
27432 $as_echo_n "(cached) " >&6
27433 else
27434 ac_func_search_save_LIBS=$LIBS
27435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27436 /* end confdefs.h. */
27437
27438 /* Override any GCC internal prototype to avoid an error.
27439 Use char because int might match the return type of a GCC
27440 builtin and then its argument prototype would still apply. */
27441 #ifdef __cplusplus
27442 extern "C"
27443 #endif
27444 char eaccess ();
27445 int
27446 main ()
27447 {
27448 return eaccess ();
27449 ;
27450 return 0;
27451 }
27452 _ACEOF
27453 for ac_lib in '' gen; do
27454 if test -z "$ac_lib"; then
27455 ac_res="none required"
27456 else
27457 ac_res=-l$ac_lib
27458 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27459 fi
27460 if ac_fn_c_try_link "$LINENO"; then :
27461 ac_cv_search_eaccess=$ac_res
27462 fi
27463 rm -f core conftest.err conftest.$ac_objext \
27464 conftest$ac_exeext
27465 if test "${ac_cv_search_eaccess+set}" = set; then :
27466 break
27467 fi
27468 done
27469 if test "${ac_cv_search_eaccess+set}" = set; then :
27470
27471 else
27472 ac_cv_search_eaccess=no
27473 fi
27474 rm conftest.$ac_ext
27475 LIBS=$ac_func_search_save_LIBS
27476 fi
27477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
27478 $as_echo "$ac_cv_search_eaccess" >&6; }
27479 ac_res=$ac_cv_search_eaccess
27480 if test "$ac_res" != no; then :
27481 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27482 test "$ac_cv_search_eaccess" = "none required" ||
27483 LIB_EACCESS=$ac_cv_search_eaccess
27484 fi
27485
27486 for ac_func in eaccess
27487 do :
27488 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
27489 if test "x$ac_cv_func_eaccess" = x""yes; then :
27490 cat >>confdefs.h <<_ACEOF
27491 #define HAVE_EACCESS 1
27492 _ACEOF
27493
27494 fi
27495 done
27496
27497 LIBS=$gl_saved_libs
27498
27499 fi
27500
27501
27502
27503
27504
27505 GNULIB_EUIDACCESS=1
27506
27507
27508
27509
27510
27511 gl_gnulib_enabled_euidaccess=true
27512 if test $HAVE_EUIDACCESS = 0; then
27513 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
27514 fi
27515 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
27516 if test $HAVE_EUIDACCESS = 0; then
27517 func_gl_gnulib_m4code_stat
27518 fi
27519 fi
27520 }
27521 func_gl_gnulib_m4code_getgroups ()
27522 {
27523 if ! $gl_gnulib_enabled_getgroups; then
27524
27525
27526
27527
27528
27529 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27530 if test "x$ac_cv_func_getgroups" = x""yes; then :
27531
27532 fi
27533
27534
27535 # If we don't yet have getgroups, see if it's in -lbsd.
27536 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27537 ac_save_LIBS=$LIBS
27538 if test $ac_cv_func_getgroups = no; then
27539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27540 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27541 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27542 $as_echo_n "(cached) " >&6
27543 else
27544 ac_check_lib_save_LIBS=$LIBS
27545 LIBS="-lbsd $LIBS"
27546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27547 /* end confdefs.h. */
27548
27549 /* Override any GCC internal prototype to avoid an error.
27550 Use char because int might match the return type of a GCC
27551 builtin and then its argument prototype would still apply. */
27552 #ifdef __cplusplus
27553 extern "C"
27554 #endif
27555 char getgroups ();
27556 int
27557 main ()
27558 {
27559 return getgroups ();
27560 ;
27561 return 0;
27562 }
27563 _ACEOF
27564 if ac_fn_c_try_link "$LINENO"; then :
27565 ac_cv_lib_bsd_getgroups=yes
27566 else
27567 ac_cv_lib_bsd_getgroups=no
27568 fi
27569 rm -f core conftest.err conftest.$ac_objext \
27570 conftest$ac_exeext conftest.$ac_ext
27571 LIBS=$ac_check_lib_save_LIBS
27572 fi
27573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27574 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27575 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27576 GETGROUPS_LIB=-lbsd
27577 fi
27578
27579 fi
27580
27581 # Run the program to test the functionality of the system-supplied
27582 # getgroups function only if there is such a function.
27583 if test $ac_cv_func_getgroups = yes; then
27584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27585 $as_echo_n "checking for working getgroups... " >&6; }
27586 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27587 $as_echo_n "(cached) " >&6
27588 else
27589 if test "$cross_compiling" = yes; then :
27590 case "$host_os" in # ((
27591 # Guess yes on glibc systems.
27592 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27593 # If we don't know, assume the worst.
27594 *) ac_cv_func_getgroups_works="guessing no" ;;
27595 esac
27596
27597 else
27598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27599 /* end confdefs.h. */
27600 $ac_includes_default
27601 int
27602 main ()
27603 {
27604 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27605 return getgroups (0, 0) == -1;
27606 ;
27607 return 0;
27608 }
27609
27610 _ACEOF
27611 if ac_fn_c_try_run "$LINENO"; then :
27612 ac_cv_func_getgroups_works=yes
27613 else
27614 ac_cv_func_getgroups_works=no
27615 fi
27616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27617 conftest.$ac_objext conftest.beam conftest.$ac_ext
27618 fi
27619
27620
27621 fi
27622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27623 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27624 else
27625 ac_cv_func_getgroups_works=no
27626 fi
27627 case "$ac_cv_func_getgroups_works" in
27628 *yes)
27629
27630 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27631
27632 ;;
27633 esac
27634 LIBS=$ac_save_LIBS
27635
27636 if test $ac_cv_func_getgroups != yes; then
27637 HAVE_GETGROUPS=0
27638 else
27639 if test "$ac_cv_type_getgroups" != gid_t \
27640 || { case "$ac_cv_func_getgroups_works" in
27641 *yes) false;;
27642 *) true;;
27643 esac
27644 }; then
27645 REPLACE_GETGROUPS=1
27646
27647 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
27648
27649 else
27650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
27651 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
27652 if test "${gl_cv_func_getgroups_works+set}" = set; then :
27653 $as_echo_n "(cached) " >&6
27654 else
27655 if test "$cross_compiling" = yes; then :
27656 case "$host_os" in
27657 # Guess yes on glibc systems.
27658 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
27659 # If we don't know, assume the worst.
27660 *) gl_cv_func_getgroups_works="guessing no" ;;
27661 esac
27662
27663 else
27664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27665 /* end confdefs.h. */
27666 $ac_includes_default
27667 int
27668 main ()
27669 {
27670 int size = getgroups (0, 0);
27671 gid_t *list = malloc (size * sizeof *list);
27672 return getgroups (-1, list) != -1;
27673 ;
27674 return 0;
27675 }
27676 _ACEOF
27677 if ac_fn_c_try_run "$LINENO"; then :
27678 gl_cv_func_getgroups_works=yes
27679 else
27680 gl_cv_func_getgroups_works=no
27681 fi
27682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27683 conftest.$ac_objext conftest.beam conftest.$ac_ext
27684 fi
27685
27686 fi
27687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
27688 $as_echo "$gl_cv_func_getgroups_works" >&6; }
27689 case "$gl_cv_func_getgroups_works" in
27690 *yes) ;;
27691 *) REPLACE_GETGROUPS=1 ;;
27692 esac
27693 fi
27694 fi
27695 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
27696
27697 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
27698
27699
27700
27701
27702
27703
27704
27705
27706 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
27707
27708 fi
27709
27710
27711
27712
27713
27714 GNULIB_GETGROUPS=1
27715
27716
27717
27718
27719
27720 gl_gnulib_enabled_getgroups=true
27721 fi
27722 }
27723 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
27724 {
27725 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
27726
27727
27728 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
27729 fi
27730 }
27731 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
27732 {
27733 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
27734
27735
27736
27737
27738
27739 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
27740 if test "x$ac_cv_func_group_member" = x""yes; then :
27741
27742 else
27743
27744 HAVE_GROUP_MEMBER=0
27745
27746 fi
27747
27748
27749 if test $HAVE_GROUP_MEMBER = 0; then
27750
27751
27752
27753
27754
27755
27756
27757
27758 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
27759
27760
27761
27762
27763 fi
27764
27765
27766
27767
27768
27769 GNULIB_GROUP_MEMBER=1
27770
27771
27772
27773
27774
27775 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
27776 if test $HAVE_GROUP_MEMBER = 0; then
27777 func_gl_gnulib_m4code_getgroups
27778 fi
27779 if test $HAVE_GROUP_MEMBER = 0; then
27780 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
27781 fi
27782 fi
27783 }
27784 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
27785 {
27786 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
27787 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
27788 fi
27789 }
27790 func_gl_gnulib_m4code_pathmax ()
27791 {
27792 if ! $gl_gnulib_enabled_pathmax; then
27793
27794
27795
27796 gl_gnulib_enabled_pathmax=true
27797 fi
27798 }
27799 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
27800 {
27801 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
27802 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
27803 fi
27804 }
27805 func_gl_gnulib_m4code_stat ()
27806 {
27807 if ! $gl_gnulib_enabled_stat; then
27808
27809
27810
27811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
27812 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
27813 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
27814 $as_echo_n "(cached) " >&6
27815 else
27816 if test "$cross_compiling" = yes; then :
27817 case $host_os in
27818 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
27819 *) gl_cv_func_stat_dir_slash="guessing yes";;
27820 esac
27821 else
27822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27823 /* end confdefs.h. */
27824 #include <sys/stat.h>
27825
27826 int
27827 main ()
27828 {
27829 struct stat st; return stat (".", &st) != stat ("./", &st);
27830 ;
27831 return 0;
27832 }
27833 _ACEOF
27834 if ac_fn_c_try_run "$LINENO"; then :
27835 gl_cv_func_stat_dir_slash=yes
27836 else
27837 gl_cv_func_stat_dir_slash=no
27838 fi
27839 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27840 conftest.$ac_objext conftest.beam conftest.$ac_ext
27841 fi
27842
27843 fi
27844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
27845 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
27846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27847 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27848 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
27849 $as_echo_n "(cached) " >&6
27850 else
27851 touch conftest.tmp
27852 # Assume that if we have lstat, we can also check symlinks.
27853 if test $ac_cv_func_lstat = yes; then
27854 ln -s conftest.tmp conftest.lnk
27855 fi
27856 if test "$cross_compiling" = yes; then :
27857 case "$host_os" in
27858 # Guess yes on glibc systems.
27859 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27860 # If we don't know, assume the worst.
27861 *) gl_cv_func_stat_file_slash="guessing no" ;;
27862 esac
27863
27864 else
27865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27866 /* end confdefs.h. */
27867 #include <sys/stat.h>
27868
27869 int
27870 main ()
27871 {
27872 int result = 0;
27873 struct stat st;
27874 if (!stat ("conftest.tmp/", &st))
27875 result |= 1;
27876 #if HAVE_LSTAT
27877 if (!stat ("conftest.lnk/", &st))
27878 result |= 2;
27879 #endif
27880 return result;
27881
27882 ;
27883 return 0;
27884 }
27885 _ACEOF
27886 if ac_fn_c_try_run "$LINENO"; then :
27887 gl_cv_func_stat_file_slash=yes
27888 else
27889 gl_cv_func_stat_file_slash=no
27890 fi
27891 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27892 conftest.$ac_objext conftest.beam conftest.$ac_ext
27893 fi
27894
27895 rm -f conftest.tmp conftest.lnk
27896 fi
27897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
27898 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
27899 case $gl_cv_func_stat_dir_slash in
27900 *no) REPLACE_STAT=1
27901
27902 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
27903 ;;
27904 esac
27905 case $gl_cv_func_stat_file_slash in
27906 *no) REPLACE_STAT=1
27907
27908 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
27909 ;;
27910 esac
27911
27912 if test $REPLACE_STAT = 1; then
27913
27914
27915
27916
27917
27918
27919
27920
27921 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
27922
27923 :
27924 fi
27925
27926
27927
27928
27929
27930 GNULIB_STAT=1
27931
27932
27933
27934
27935
27936 gl_gnulib_enabled_stat=true
27937 if test $REPLACE_STAT = 1; then
27938 func_gl_gnulib_m4code_dosname
27939 fi
27940 if test $REPLACE_STAT = 1; then
27941 func_gl_gnulib_m4code_pathmax
27942 fi
27943 if test $REPLACE_STAT = 1; then
27944 func_gl_gnulib_m4code_verify
27945 fi
27946 fi
27947 }
27948 func_gl_gnulib_m4code_strtoll ()
27949 {
27950 if ! $gl_gnulib_enabled_strtoll; then
27951
27952
27953
27954 if test "$ac_cv_type_long_long_int" = yes; then
27955 for ac_func in strtoll
27956 do :
27957 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
27958 if test "x$ac_cv_func_strtoll" = x""yes; then :
27959 cat >>confdefs.h <<_ACEOF
27960 #define HAVE_STRTOLL 1
27961 _ACEOF
27962
27963 fi
27964 done
27965
27966 if test $ac_cv_func_strtoll = no; then
27967 HAVE_STRTOLL=0
27968 fi
27969 fi
27970
27971 if test $HAVE_STRTOLL = 0; then
27972
27973
27974
27975
27976
27977
27978
27979
27980 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
27981
27982
27983 :
27984
27985 fi
27986
27987
27988
27989
27990
27991 GNULIB_STRTOLL=1
27992
27993
27994
27995
27996
27997 gl_gnulib_enabled_strtoll=true
27998 fi
27999 }
28000 func_gl_gnulib_m4code_strtoull ()
28001 {
28002 if ! $gl_gnulib_enabled_strtoull; then
28003
28004
28005
28006 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28007 for ac_func in strtoull
28008 do :
28009 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28010 if test "x$ac_cv_func_strtoull" = x""yes; then :
28011 cat >>confdefs.h <<_ACEOF
28012 #define HAVE_STRTOULL 1
28013 _ACEOF
28014
28015 fi
28016 done
28017
28018 if test $ac_cv_func_strtoull = no; then
28019 HAVE_STRTOULL=0
28020 fi
28021 fi
28022
28023 if test $HAVE_STRTOULL = 0; then
28024
28025
28026
28027
28028
28029
28030
28031
28032 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
28033
28034
28035 :
28036
28037 fi
28038
28039
28040
28041
28042
28043 GNULIB_STRTOULL=1
28044
28045
28046
28047
28048
28049 gl_gnulib_enabled_strtoull=true
28050 fi
28051 }
28052 func_gl_gnulib_m4code_verify ()
28053 {
28054 if ! $gl_gnulib_enabled_verify; then
28055 gl_gnulib_enabled_verify=true
28056 fi
28057 }
28058 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28059 {
28060 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28061 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28062 fi
28063 }
28064 if test $HAVE_FACCESSAT = 0; then
28065 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28066 fi
28067 if test $HAVE_FACCESSAT = 0; then
28068 func_gl_gnulib_m4code_dosname
28069 fi
28070 if test $HAVE_FACCESSAT = 0; then
28071 func_gl_gnulib_m4code_euidaccess
28072 fi
28073 if test $HAVE_FACCESSAT = 0; then
28074 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28075 fi
28076 if test $HAVE_FDOPENDIR = 0; then
28077 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28078 fi
28079 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28080 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28081 fi
28082 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28083 func_gl_gnulib_m4code_dosname
28084 fi
28085 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28086 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28087 fi
28088 if test $REPLACE_GETOPT = 1; then
28089 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
28090 fi
28091 if test $REPLACE_LSTAT = 1; then
28092 func_gl_gnulib_m4code_dosname
28093 fi
28094 if test $REPLACE_LSTAT = 1; then
28095 func_gl_gnulib_m4code_stat
28096 fi
28097 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
28098 func_gl_gnulib_m4code_stat
28099 fi
28100 if test $HAVE_READLINKAT = 0; then
28101 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28102 fi
28103 if test $HAVE_READLINKAT = 0; then
28104 func_gl_gnulib_m4code_dosname
28105 fi
28106 if test $HAVE_READLINKAT = 0; then
28107 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28108 fi
28109 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
28110 func_gl_gnulib_m4code_strtoll
28111 fi
28112 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
28113 func_gl_gnulib_m4code_verify
28114 fi
28115 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
28116 func_gl_gnulib_m4code_strtoull
28117 fi
28118 if test $ac_cv_func_strtoumax = no; then
28119 func_gl_gnulib_m4code_verify
28120 fi
28121
28122 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28123 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
28124 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
28125 else
28126 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
28127 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
28128 fi
28129
28130 if $gl_gnulib_enabled_dosname; then
28131 gl_GNULIB_ENABLED_dosname_TRUE=
28132 gl_GNULIB_ENABLED_dosname_FALSE='#'
28133 else
28134 gl_GNULIB_ENABLED_dosname_TRUE='#'
28135 gl_GNULIB_ENABLED_dosname_FALSE=
28136 fi
28137
28138 if $gl_gnulib_enabled_euidaccess; then
28139 gl_GNULIB_ENABLED_euidaccess_TRUE=
28140 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
28141 else
28142 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
28143 gl_GNULIB_ENABLED_euidaccess_FALSE=
28144 fi
28145
28146 if $gl_gnulib_enabled_getgroups; then
28147 gl_GNULIB_ENABLED_getgroups_TRUE=
28148 gl_GNULIB_ENABLED_getgroups_FALSE='#'
28149 else
28150 gl_GNULIB_ENABLED_getgroups_TRUE='#'
28151 gl_GNULIB_ENABLED_getgroups_FALSE=
28152 fi
28153
28154 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28155 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
28156 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
28157 else
28158 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
28159 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
28160 fi
28161
28162 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28163 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
28164 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
28165 else
28166 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
28167 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
28168 fi
28169
28170 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28171 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
28172 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
28173 else
28174 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
28175 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
28176 fi
28177
28178 if $gl_gnulib_enabled_pathmax; then
28179 gl_GNULIB_ENABLED_pathmax_TRUE=
28180 gl_GNULIB_ENABLED_pathmax_FALSE='#'
28181 else
28182 gl_GNULIB_ENABLED_pathmax_TRUE='#'
28183 gl_GNULIB_ENABLED_pathmax_FALSE=
28184 fi
28185
28186 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28187 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
28188 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
28189 else
28190 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
28191 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
28192 fi
28193
28194 if $gl_gnulib_enabled_stat; then
28195 gl_GNULIB_ENABLED_stat_TRUE=
28196 gl_GNULIB_ENABLED_stat_FALSE='#'
28197 else
28198 gl_GNULIB_ENABLED_stat_TRUE='#'
28199 gl_GNULIB_ENABLED_stat_FALSE=
28200 fi
28201
28202 if $gl_gnulib_enabled_strtoll; then
28203 gl_GNULIB_ENABLED_strtoll_TRUE=
28204 gl_GNULIB_ENABLED_strtoll_FALSE='#'
28205 else
28206 gl_GNULIB_ENABLED_strtoll_TRUE='#'
28207 gl_GNULIB_ENABLED_strtoll_FALSE=
28208 fi
28209
28210 if $gl_gnulib_enabled_strtoull; then
28211 gl_GNULIB_ENABLED_strtoull_TRUE=
28212 gl_GNULIB_ENABLED_strtoull_FALSE='#'
28213 else
28214 gl_GNULIB_ENABLED_strtoull_TRUE='#'
28215 gl_GNULIB_ENABLED_strtoull_FALSE=
28216 fi
28217
28218 if $gl_gnulib_enabled_verify; then
28219 gl_GNULIB_ENABLED_verify_TRUE=
28220 gl_GNULIB_ENABLED_verify_FALSE='#'
28221 else
28222 gl_GNULIB_ENABLED_verify_TRUE='#'
28223 gl_GNULIB_ENABLED_verify_FALSE=
28224 fi
28225
28226 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28227 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
28228 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
28229 else
28230 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
28231 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
28232 fi
28233
28234 # End of code from modules
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244 gltests_libdeps=
28245 gltests_ltlibdeps=
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255 gl_source_base='tests'
28256 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
28257
28258 gl_module_indicator_condition=$gltests_WITNESS
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269 LIBGNU_LIBDEPS="$gl_libdeps"
28270
28271 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28272
28273
28274 CFLAGS=$SAVE_CFLAGS
28275 LIBS=$SAVE_LIBS
28276
28277 if test "${opsys}" = "mingw32"; then
28278 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
28279 # Remove unneeded switches from the value of CC that goes to Makefiles
28280 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
28281 fi
28282
28283 case "$opsys" in
28284 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
28285
28286 darwin)
28287 ## The -headerpad option tells ld (see man page) to leave room at the
28288 ## end of the header for adding load commands. Needed for dumping.
28289 ## 0x690 is the total size of 30 segment load commands (at 56
28290 ## each); under Cocoa 31 commands are required.
28291 if test "$HAVE_NS" = "yes"; then
28292 libs_nsgui="-framework AppKit"
28293 if test "$NS_IMPL_COCOA" = "yes"; then
28294 libs_nsgui="$libs_nsgui -framework IOKit"
28295 fi
28296 headerpad_extra=6C8
28297 else
28298 libs_nsgui=
28299 headerpad_extra=690
28300 fi
28301 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
28302
28303 ## This is here because src/Makefile.in did some extra fiddling around
28304 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
28305 ## LD_SWITCH_SYSTEM_TEMACS instead,
28306 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
28307 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
28308 ;;
28309
28310 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
28311 ## find X at run-time.
28312 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
28313 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
28314 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
28315 ## had different values in configure (in ac_link) and src/Makefile.in.
28316 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
28317 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
28318
28319 mingw32)
28320 ## MinGW64 does not prepend an underscore to symbols, so we must
28321 ## pass a different -entry switch to linker. FIXME: It is better
28322 ## to make the entry points the same by changing unexw32.c.
28323 case "$canonical" in
28324 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
28325 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
28326 esac
28327 ;;
28328
28329 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
28330
28331 *) LD_SWITCH_SYSTEM_TEMACS= ;;
28332 esac
28333
28334 if test x$ac_enable_profiling != x ; then
28335 case $opsys in
28336 *freebsd | gnu-linux) ;;
28337 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
28338 esac
28339 fi
28340
28341
28342
28343 ## MinGW-specific post-link processing of temacs.
28344 TEMACS_POST_LINK=":"
28345 ADDSECTION=
28346 EMACS_HEAPSIZE=
28347 if test "${opsys}" = "mingw32"; then
28348 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
28349 ADDSECTION="../nt/addsection\$(EXEEXT)"
28350 ## Preload heap size of temacs.exe in MB.
28351 case "$canonical" in
28352 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
28353 *) EMACS_HEAPSIZE=27 ;;
28354 esac
28355 fi
28356
28357
28358
28359
28360
28361 ## Common for all window systems
28362 if test "$window_system" != "none"; then
28363
28364 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
28365
28366 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
28367 fi
28368
28369
28370
28371
28372
28373 #### Report on what we decided to do.
28374 #### Report GTK as a toolkit, even if it doesn't use Xt.
28375 #### It makes printing result more understandable as using GTK sets
28376 #### toolkit_scroll_bars to yes by default.
28377 if test "${HAVE_GTK}" = "yes"; then
28378 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
28379 fi
28380
28381 echo "
28382 Configured for \`${canonical}'.
28383
28384 Where should the build process find the source code? ${srcdir}
28385 What compiler should emacs be built with? ${CC} ${CFLAGS}
28386 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
28387 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
28388 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
28389 What window system should Emacs use? ${window_system}
28390 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
28391
28392 if test -n "${x_includes}"; then
28393 echo " Where do we find X Windows header files? ${x_includes}"
28394 else
28395 echo " Where do we find X Windows header files? Standard dirs"
28396 fi
28397 if test -n "${x_libraries}"; then
28398 echo " Where do we find X Windows libraries? ${x_libraries}"
28399 else
28400 echo " Where do we find X Windows libraries? Standard dirs"
28401 fi
28402
28403 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
28404 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
28405 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
28406 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
28407 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
28408 echo " Does Emacs use -lpng? ${HAVE_PNG}"
28409 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
28410 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
28411
28412 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
28413 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
28414 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
28415 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
28416 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
28417 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
28418 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
28419
28420 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
28421 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
28422 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
28423 echo " Does Emacs use -lxft? ${HAVE_XFT}"
28424
28425 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
28426 echo
28427
28428 if test -n "${EMACSDATA}"; then
28429 echo " Environment variable EMACSDATA set to: $EMACSDATA"
28430 fi
28431 if test -n "${EMACSDOC}"; then
28432 echo " Environment variable EMACSDOC set to: $EMACSDOC"
28433 fi
28434
28435 echo
28436
28437 if test "$HAVE_NS" = "yes"; then
28438 echo
28439 echo "You must run \"${MAKE-make} install\" in order to test the built application.
28440 The installed application will go to nextstep/Emacs.app and can be
28441 run or moved from there."
28442 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
28443 echo "The application will be fully self-contained."
28444 else
28445 echo "The lisp resources for the application will be installed under ${prefix}.
28446 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
28447 to run if these resources are not installed."
28448 fi
28449 echo
28450 fi
28451
28452 if test "${opsys}" = "cygwin"; then
28453 case `uname -r` in
28454 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
28455 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
28456 echo
28457 ;;
28458 esac
28459 fi
28460
28461 # Remove any trailing slashes in these variables.
28462 test "${prefix}" != NONE &&
28463 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
28464 test "${exec_prefix}" != NONE &&
28465 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
28466
28467 if test "$HAVE_NS" = "yes"; then
28468 if test "$NS_IMPL_GNUSTEP" = yes; then
28469 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"
28470
28471 else
28472 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"
28473
28474 fi
28475 fi
28476
28477 SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
28478
28479 ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
28480
28481
28482 opt_makefile=test/automated/Makefile
28483
28484 if test -f "$srcdir/$opt_makefile.in"; then
28485 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
28486 ac_config_files="$ac_config_files test/automated/Makefile"
28487
28488 fi
28489
28490
28491 opt_makefile=admin/unidata/Makefile
28492
28493 if test -f "$srcdir/$opt_makefile.in"; then
28494 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
28495 ac_config_files="$ac_config_files admin/unidata/Makefile"
28496
28497 fi
28498
28499
28500 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
28501
28502
28503
28504 ac_config_commands="$ac_config_commands mkdirs"
28505
28506
28507 ac_config_commands="$ac_config_commands epaths"
28508
28509
28510 ac_config_commands="$ac_config_commands gdbinit"
28511
28512
28513 cat >confcache <<\_ACEOF
28514 # This file is a shell script that caches the results of configure
28515 # tests run on this system so they can be shared between configure
28516 # scripts and configure runs, see configure's option --config-cache.
28517 # It is not useful on other systems. If it contains results you don't
28518 # want to keep, you may remove or edit it.
28519 #
28520 # config.status only pays attention to the cache file if you give it
28521 # the --recheck option to rerun configure.
28522 #
28523 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28524 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28525 # following values.
28526
28527 _ACEOF
28528
28529 # The following way of writing the cache mishandles newlines in values,
28530 # but we know of no workaround that is simple, portable, and efficient.
28531 # So, we kill variables containing newlines.
28532 # Ultrix sh set writes to stderr and can't be redirected directly,
28533 # and sets the high bit in the cache file unless we assign to the vars.
28534 (
28535 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28536 eval ac_val=\$$ac_var
28537 case $ac_val in #(
28538 *${as_nl}*)
28539 case $ac_var in #(
28540 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28541 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28542 esac
28543 case $ac_var in #(
28544 _ | IFS | as_nl) ;; #(
28545 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28546 *) { eval $ac_var=; unset $ac_var;} ;;
28547 esac ;;
28548 esac
28549 done
28550
28551 (set) 2>&1 |
28552 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28553 *${as_nl}ac_space=\ *)
28554 # `set' does not quote correctly, so add quotes: double-quote
28555 # substitution turns \\\\ into \\, and sed turns \\ into \.
28556 sed -n \
28557 "s/'/'\\\\''/g;
28558 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28559 ;; #(
28560 *)
28561 # `set' quotes correctly as required by POSIX, so do not add quotes.
28562 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28563 ;;
28564 esac |
28565 sort
28566 ) |
28567 sed '
28568 /^ac_cv_env_/b end
28569 t clear
28570 :clear
28571 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28572 t end
28573 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28574 :end' >>confcache
28575 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28576 if test -w "$cache_file"; then
28577 test "x$cache_file" != "x/dev/null" &&
28578 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28579 $as_echo "$as_me: updating cache $cache_file" >&6;}
28580 cat confcache >$cache_file
28581 else
28582 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28583 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
28584 fi
28585 fi
28586 rm -f confcache
28587
28588 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28589 # Let make expand exec_prefix.
28590 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28591
28592 DEFS=-DHAVE_CONFIG_H
28593
28594 ac_libobjs=
28595 ac_ltlibobjs=
28596 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28597 # 1. Remove the extension, and $U if already installed.
28598 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28599 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
28600 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28601 # will be set to the directory where LIBOBJS objects are built.
28602 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28603 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28604 done
28605 LIBOBJS=$ac_libobjs
28606
28607 LTLIBOBJS=$ac_ltlibobjs
28608
28609
28610 if test -n "$EXEEXT"; then
28611 am__EXEEXT_TRUE=
28612 am__EXEEXT_FALSE='#'
28613 else
28614 am__EXEEXT_TRUE='#'
28615 am__EXEEXT_FALSE=
28616 fi
28617
28618 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28619 as_fn_error "conditional \"AMDEP\" was never defined.
28620 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28621 fi
28622 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28623 as_fn_error "conditional \"am__fastdepCC\" was never defined.
28624 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28625 fi
28626 if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
28627 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
28628 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28629 fi
28630 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28631 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
28632 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28633 fi
28634 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28635 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
28636 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28637 fi
28638
28639 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28640 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28641 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28642 fi
28643 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
28644 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
28645 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28646 fi
28647 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
28648 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
28649 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28650 fi
28651 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
28652 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
28653 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28654 fi
28655 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
28656 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
28657 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28658 fi
28659 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
28660 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
28661 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28662 fi
28663 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
28664 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
28665 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28666 fi
28667 if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
28668 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
28669 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28670 fi
28671 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
28672 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
28673 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28674 fi
28675 if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
28676 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
28677 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28678 fi
28679 if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
28680 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
28681 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28682 fi
28683 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
28684 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
28685 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28686 fi
28687 if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
28688 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
28689 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28690 fi
28691 if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
28692 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
28693 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28694 fi
28695 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
28696 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
28697 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28698 fi
28699 if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
28700 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
28701 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28702 fi
28703 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
28704 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
28705 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28706 fi
28707 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
28708 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
28709 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28710 fi
28711 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
28712 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
28713 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28714 fi
28715 if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
28716 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
28717 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28718 fi
28719 if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
28720 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
28721 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28722 fi
28723
28724 gl_libobjs=
28725 gl_ltlibobjs=
28726 if test -n "$gl_LIBOBJS"; then
28727 # Remove the extension.
28728 sed_drop_objext='s/\.o$//;s/\.obj$//'
28729 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28730 gl_libobjs="$gl_libobjs $i.$ac_objext"
28731 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28732 done
28733 fi
28734 gl_LIBOBJS=$gl_libobjs
28735
28736 gl_LTLIBOBJS=$gl_ltlibobjs
28737
28738
28739
28740 gltests_libobjs=
28741 gltests_ltlibobjs=
28742 if test -n "$gltests_LIBOBJS"; then
28743 # Remove the extension.
28744 sed_drop_objext='s/\.o$//;s/\.obj$//'
28745 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28746 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28747 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
28748 done
28749 fi
28750 gltests_LIBOBJS=$gltests_libobjs
28751
28752 gltests_LTLIBOBJS=$gltests_ltlibobjs
28753
28754
28755
28756 : ${CONFIG_STATUS=./config.status}
28757 ac_write_fail=0
28758 ac_clean_files_save=$ac_clean_files
28759 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28760 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28761 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
28762 as_write_fail=0
28763 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28764 #! $SHELL
28765 # Generated by $as_me.
28766 # Run this file to recreate the current configuration.
28767 # Compiler output produced by configure, useful for debugging
28768 # configure, is in config.log if it exists.
28769
28770 debug=false
28771 ac_cs_recheck=false
28772 ac_cs_silent=false
28773
28774 SHELL=\${CONFIG_SHELL-$SHELL}
28775 export SHELL
28776 _ASEOF
28777 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
28778 ## -------------------- ##
28779 ## M4sh Initialization. ##
28780 ## -------------------- ##
28781
28782 # Be more Bourne compatible
28783 DUALCASE=1; export DUALCASE # for MKS sh
28784 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
28785 emulate sh
28786 NULLCMD=:
28787 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
28788 # is contrary to our usage. Disable this feature.
28789 alias -g '${1+"$@"}'='"$@"'
28790 setopt NO_GLOB_SUBST
28791 else
28792 case `(set -o) 2>/dev/null` in #(
28793 *posix*) :
28794 set -o posix ;; #(
28795 *) :
28796 ;;
28797 esac
28798 fi
28799
28800
28801 as_nl='
28802 '
28803 export as_nl
28804 # Printing a long string crashes Solaris 7 /usr/bin/printf.
28805 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
28806 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
28807 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
28808 # Prefer a ksh shell builtin over an external printf program on Solaris,
28809 # but without wasting forks for bash or zsh.
28810 if test -z "$BASH_VERSION$ZSH_VERSION" \
28811 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
28812 as_echo='print -r --'
28813 as_echo_n='print -rn --'
28814 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
28815 as_echo='printf %s\n'
28816 as_echo_n='printf %s'
28817 else
28818 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
28819 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
28820 as_echo_n='/usr/ucb/echo -n'
28821 else
28822 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
28823 as_echo_n_body='eval
28824 arg=$1;
28825 case $arg in #(
28826 *"$as_nl"*)
28827 expr "X$arg" : "X\\(.*\\)$as_nl";
28828 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
28829 esac;
28830 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
28831 '
28832 export as_echo_n_body
28833 as_echo_n='sh -c $as_echo_n_body as_echo'
28834 fi
28835 export as_echo_body
28836 as_echo='sh -c $as_echo_body as_echo'
28837 fi
28838
28839 # The user is always right.
28840 if test "${PATH_SEPARATOR+set}" != set; then
28841 PATH_SEPARATOR=:
28842 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
28843 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
28844 PATH_SEPARATOR=';'
28845 }
28846 fi
28847
28848
28849 # IFS
28850 # We need space, tab and new line, in precisely that order. Quoting is
28851 # there to prevent editors from complaining about space-tab.
28852 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
28853 # splitting by setting IFS to empty value.)
28854 IFS=" "" $as_nl"
28855
28856 # Find who we are. Look in the path if we contain no directory separator.
28857 case $0 in #((
28858 *[\\/]* ) as_myself=$0 ;;
28859 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28860 for as_dir in $PATH
28861 do
28862 IFS=$as_save_IFS
28863 test -z "$as_dir" && as_dir=.
28864 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
28865 done
28866 IFS=$as_save_IFS
28867
28868 ;;
28869 esac
28870 # We did not find ourselves, most probably we were run as `sh COMMAND'
28871 # in which case we are not to be found in the path.
28872 if test "x$as_myself" = x; then
28873 as_myself=$0
28874 fi
28875 if test ! -f "$as_myself"; then
28876 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
28877 exit 1
28878 fi
28879
28880 # Unset variables that we do not need and which cause bugs (e.g. in
28881 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
28882 # suppresses any "Segmentation fault" message there. '((' could
28883 # trigger a bug in pdksh 5.2.14.
28884 for as_var in BASH_ENV ENV MAIL MAILPATH
28885 do eval test x\${$as_var+set} = xset \
28886 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
28887 done
28888 PS1='$ '
28889 PS2='> '
28890 PS4='+ '
28891
28892 # NLS nuisances.
28893 LC_ALL=C
28894 export LC_ALL
28895 LANGUAGE=C
28896 export LANGUAGE
28897
28898 # CDPATH.
28899 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
28900
28901
28902 # as_fn_error ERROR [LINENO LOG_FD]
28903 # ---------------------------------
28904 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
28905 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
28906 # script with status $?, using 1 if that was 0.
28907 as_fn_error ()
28908 {
28909 as_status=$?; test $as_status -eq 0 && as_status=1
28910 if test "$3"; then
28911 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
28912 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
28913 fi
28914 $as_echo "$as_me: error: $1" >&2
28915 as_fn_exit $as_status
28916 } # as_fn_error
28917
28918
28919 # as_fn_set_status STATUS
28920 # -----------------------
28921 # Set $? to STATUS, without forking.
28922 as_fn_set_status ()
28923 {
28924 return $1
28925 } # as_fn_set_status
28926
28927 # as_fn_exit STATUS
28928 # -----------------
28929 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
28930 as_fn_exit ()
28931 {
28932 set +e
28933 as_fn_set_status $1
28934 exit $1
28935 } # as_fn_exit
28936
28937 # as_fn_unset VAR
28938 # ---------------
28939 # Portably unset VAR.
28940 as_fn_unset ()
28941 {
28942 { eval $1=; unset $1;}
28943 }
28944 as_unset=as_fn_unset
28945 # as_fn_append VAR VALUE
28946 # ----------------------
28947 # Append the text in VALUE to the end of the definition contained in VAR. Take
28948 # advantage of any shell optimizations that allow amortized linear growth over
28949 # repeated appends, instead of the typical quadratic growth present in naive
28950 # implementations.
28951 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
28952 eval 'as_fn_append ()
28953 {
28954 eval $1+=\$2
28955 }'
28956 else
28957 as_fn_append ()
28958 {
28959 eval $1=\$$1\$2
28960 }
28961 fi # as_fn_append
28962
28963 # as_fn_arith ARG...
28964 # ------------------
28965 # Perform arithmetic evaluation on the ARGs, and store the result in the
28966 # global $as_val. Take advantage of shells that can avoid forks. The arguments
28967 # must be portable across $(()) and expr.
28968 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
28969 eval 'as_fn_arith ()
28970 {
28971 as_val=$(( $* ))
28972 }'
28973 else
28974 as_fn_arith ()
28975 {
28976 as_val=`expr "$@" || test $? -eq 1`
28977 }
28978 fi # as_fn_arith
28979
28980
28981 if expr a : '\(a\)' >/dev/null 2>&1 &&
28982 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28983 as_expr=expr
28984 else
28985 as_expr=false
28986 fi
28987
28988 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28989 as_basename=basename
28990 else
28991 as_basename=false
28992 fi
28993
28994 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28995 as_dirname=dirname
28996 else
28997 as_dirname=false
28998 fi
28999
29000 as_me=`$as_basename -- "$0" ||
29001 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29002 X"$0" : 'X\(//\)$' \| \
29003 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29004 $as_echo X/"$0" |
29005 sed '/^.*\/\([^/][^/]*\)\/*$/{
29006 s//\1/
29007 q
29008 }
29009 /^X\/\(\/\/\)$/{
29010 s//\1/
29011 q
29012 }
29013 /^X\/\(\/\).*/{
29014 s//\1/
29015 q
29016 }
29017 s/.*/./; q'`
29018
29019 # Avoid depending upon Character Ranges.
29020 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29021 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29022 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29023 as_cr_digits='0123456789'
29024 as_cr_alnum=$as_cr_Letters$as_cr_digits
29025
29026 ECHO_C= ECHO_N= ECHO_T=
29027 case `echo -n x` in #(((((
29028 -n*)
29029 case `echo 'xy\c'` in
29030 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29031 xy) ECHO_C='\c';;
29032 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29033 ECHO_T=' ';;
29034 esac;;
29035 *)
29036 ECHO_N='-n';;
29037 esac
29038
29039 rm -f conf$$ conf$$.exe conf$$.file
29040 if test -d conf$$.dir; then
29041 rm -f conf$$.dir/conf$$.file
29042 else
29043 rm -f conf$$.dir
29044 mkdir conf$$.dir 2>/dev/null
29045 fi
29046 if (echo >conf$$.file) 2>/dev/null; then
29047 if ln -s conf$$.file conf$$ 2>/dev/null; then
29048 as_ln_s='ln -s'
29049 # ... but there are two gotchas:
29050 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29051 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29052 # In both cases, we have to default to `cp -p'.
29053 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29054 as_ln_s='cp -p'
29055 elif ln conf$$.file conf$$ 2>/dev/null; then
29056 as_ln_s=ln
29057 else
29058 as_ln_s='cp -p'
29059 fi
29060 else
29061 as_ln_s='cp -p'
29062 fi
29063 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29064 rmdir conf$$.dir 2>/dev/null
29065
29066
29067 # as_fn_mkdir_p
29068 # -------------
29069 # Create "$as_dir" as a directory, including parents if necessary.
29070 as_fn_mkdir_p ()
29071 {
29072
29073 case $as_dir in #(
29074 -*) as_dir=./$as_dir;;
29075 esac
29076 test -d "$as_dir" || eval $as_mkdir_p || {
29077 as_dirs=
29078 while :; do
29079 case $as_dir in #(
29080 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29081 *) as_qdir=$as_dir;;
29082 esac
29083 as_dirs="'$as_qdir' $as_dirs"
29084 as_dir=`$as_dirname -- "$as_dir" ||
29085 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29086 X"$as_dir" : 'X\(//\)[^/]' \| \
29087 X"$as_dir" : 'X\(//\)$' \| \
29088 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29089 $as_echo X"$as_dir" |
29090 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29091 s//\1/
29092 q
29093 }
29094 /^X\(\/\/\)[^/].*/{
29095 s//\1/
29096 q
29097 }
29098 /^X\(\/\/\)$/{
29099 s//\1/
29100 q
29101 }
29102 /^X\(\/\).*/{
29103 s//\1/
29104 q
29105 }
29106 s/.*/./; q'`
29107 test -d "$as_dir" && break
29108 done
29109 test -z "$as_dirs" || eval "mkdir $as_dirs"
29110 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
29111
29112
29113 } # as_fn_mkdir_p
29114 if mkdir -p . 2>/dev/null; then
29115 as_mkdir_p='mkdir -p "$as_dir"'
29116 else
29117 test -d ./-p && rmdir ./-p
29118 as_mkdir_p=false
29119 fi
29120
29121 if test -x / >/dev/null 2>&1; then
29122 as_test_x='test -x'
29123 else
29124 if ls -dL / >/dev/null 2>&1; then
29125 as_ls_L_option=L
29126 else
29127 as_ls_L_option=
29128 fi
29129 as_test_x='
29130 eval sh -c '\''
29131 if test -d "$1"; then
29132 test -d "$1/.";
29133 else
29134 case $1 in #(
29135 -*)set "./$1";;
29136 esac;
29137 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
29138 ???[sx]*):;;*)false;;esac;fi
29139 '\'' sh
29140 '
29141 fi
29142 as_executable_p=$as_test_x
29143
29144 # Sed expression to map a string onto a valid CPP name.
29145 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29146
29147 # Sed expression to map a string onto a valid variable name.
29148 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29149
29150
29151 exec 6>&1
29152 ## ----------------------------------- ##
29153 ## Main body of $CONFIG_STATUS script. ##
29154 ## ----------------------------------- ##
29155 _ASEOF
29156 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29157
29158 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29159 # Save the log message, to keep $0 and so on meaningful, and to
29160 # report actual input values of CONFIG_FILES etc. instead of their
29161 # values after options handling.
29162 ac_log="
29163 This file was extended by emacs $as_me 24.3.50, which was
29164 generated by GNU Autoconf 2.65. Invocation command line was
29165
29166 CONFIG_FILES = $CONFIG_FILES
29167 CONFIG_HEADERS = $CONFIG_HEADERS
29168 CONFIG_LINKS = $CONFIG_LINKS
29169 CONFIG_COMMANDS = $CONFIG_COMMANDS
29170 $ $0 $@
29171
29172 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29173 "
29174
29175 _ACEOF
29176
29177 case $ac_config_files in *"
29178 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29179 esac
29180
29181 case $ac_config_headers in *"
29182 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29183 esac
29184
29185
29186 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29187 # Files that config.status was made for.
29188 config_files="$ac_config_files"
29189 config_headers="$ac_config_headers"
29190 config_commands="$ac_config_commands"
29191
29192 _ACEOF
29193
29194 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29195 ac_cs_usage="\
29196 \`$as_me' instantiates files and other configuration actions
29197 from templates according to the current configuration. Unless the files
29198 and actions are specified as TAGs, all are instantiated by default.
29199
29200 Usage: $0 [OPTION]... [TAG]...
29201
29202 -h, --help print this help, then exit
29203 -V, --version print version number and configuration settings, then exit
29204 --config print configuration, then exit
29205 -q, --quiet, --silent
29206 do not print progress messages
29207 -d, --debug don't remove temporary files
29208 --recheck update $as_me by reconfiguring in the same conditions
29209 --file=FILE[:TEMPLATE]
29210 instantiate the configuration file FILE
29211 --header=FILE[:TEMPLATE]
29212 instantiate the configuration header FILE
29213
29214 Configuration files:
29215 $config_files
29216
29217 Configuration headers:
29218 $config_headers
29219
29220 Configuration commands:
29221 $config_commands
29222
29223 Report bugs to the package provider."
29224
29225 _ACEOF
29226 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29227 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29228 ac_cs_version="\\
29229 emacs config.status 24.3.50
29230 configured by $0, generated by GNU Autoconf 2.65,
29231 with options \\"\$ac_cs_config\\"
29232
29233 Copyright (C) 2009 Free Software Foundation, Inc.
29234 This config.status script is free software; the Free Software Foundation
29235 gives unlimited permission to copy, distribute and modify it."
29236
29237 ac_pwd='$ac_pwd'
29238 srcdir='$srcdir'
29239 INSTALL='$INSTALL'
29240 MKDIR_P='$MKDIR_P'
29241 AWK='$AWK'
29242 test -n "\$AWK" || AWK=awk
29243 _ACEOF
29244
29245 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29246 # The default lists apply if the user does not specify any file.
29247 ac_need_defaults=:
29248 while test $# != 0
29249 do
29250 case $1 in
29251 --*=*)
29252 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29253 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29254 ac_shift=:
29255 ;;
29256 *)
29257 ac_option=$1
29258 ac_optarg=$2
29259 ac_shift=shift
29260 ;;
29261 esac
29262
29263 case $ac_option in
29264 # Handling of the options.
29265 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29266 ac_cs_recheck=: ;;
29267 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29268 $as_echo "$ac_cs_version"; exit ;;
29269 --config | --confi | --conf | --con | --co | --c )
29270 $as_echo "$ac_cs_config"; exit ;;
29271 --debug | --debu | --deb | --de | --d | -d )
29272 debug=: ;;
29273 --file | --fil | --fi | --f )
29274 $ac_shift
29275 case $ac_optarg in
29276 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29277 esac
29278 as_fn_append CONFIG_FILES " '$ac_optarg'"
29279 ac_need_defaults=false;;
29280 --header | --heade | --head | --hea )
29281 $ac_shift
29282 case $ac_optarg in
29283 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29284 esac
29285 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29286 ac_need_defaults=false;;
29287 --he | --h)
29288 # Conflict between --help and --header
29289 as_fn_error "ambiguous option: \`$1'
29290 Try \`$0 --help' for more information.";;
29291 --help | --hel | -h )
29292 $as_echo "$ac_cs_usage"; exit ;;
29293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29294 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29295 ac_cs_silent=: ;;
29296
29297 # This is an error.
29298 -*) as_fn_error "unrecognized option: \`$1'
29299 Try \`$0 --help' for more information." ;;
29300
29301 *) as_fn_append ac_config_targets " $1"
29302 ac_need_defaults=false ;;
29303
29304 esac
29305 shift
29306 done
29307
29308 ac_configure_extra_args=
29309
29310 if $ac_cs_silent; then
29311 exec 6>/dev/null
29312 ac_configure_extra_args="$ac_configure_extra_args --silent"
29313 fi
29314
29315 _ACEOF
29316 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29317 if \$ac_cs_recheck; then
29318 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29319 shift
29320 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29321 CONFIG_SHELL='$SHELL'
29322 export CONFIG_SHELL
29323 exec "\$@"
29324 fi
29325
29326 _ACEOF
29327 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29328 exec 5>>config.log
29329 {
29330 echo
29331 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29332 ## Running $as_me. ##
29333 _ASBOX
29334 $as_echo "$ac_log"
29335 } >&5
29336
29337 _ACEOF
29338 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29339 #
29340 # INIT-COMMANDS
29341 #
29342 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29343 GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
29344
29345 _ACEOF
29346
29347 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29348
29349 # Handling of arguments.
29350 for ac_config_target in $ac_config_targets
29351 do
29352 case $ac_config_target in
29353 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
29354 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29355 "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" ;;
29356 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
29357 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
29358 "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" ;;
29359 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29360 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29361 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
29362 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
29363 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
29364 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
29365 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
29366 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
29367 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
29368 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
29369 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
29370 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
29371 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
29372 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
29373 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
29374 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
29375 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
29376 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
29377 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
29378
29379 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29380 esac
29381 done
29382
29383
29384 # If the user did not use the arguments to specify the items to instantiate,
29385 # then the envvar interface is used. Set only those that are not.
29386 # We use the long form for the default assignment because of an extremely
29387 # bizarre bug on SunOS 4.1.3.
29388 if $ac_need_defaults; then
29389 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29390 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29391 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29392 fi
29393
29394 # Have a temporary directory for convenience. Make it in the build tree
29395 # simply because there is no reason against having it here, and in addition,
29396 # creating and moving files from /tmp can sometimes cause problems.
29397 # Hook for its removal unless debugging.
29398 # Note that there is a small window in which the directory will not be cleaned:
29399 # after its creation but before its name has been assigned to `$tmp'.
29400 $debug ||
29401 {
29402 tmp=
29403 trap 'exit_status=$?
29404 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
29405 ' 0
29406 trap 'as_fn_exit 1' 1 2 13 15
29407 }
29408 # Create a (secure) tmp directory for tmp files.
29409
29410 {
29411 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29412 test -n "$tmp" && test -d "$tmp"
29413 } ||
29414 {
29415 tmp=./conf$$-$RANDOM
29416 (umask 077 && mkdir "$tmp")
29417 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
29418
29419 # Set up the scripts for CONFIG_FILES section.
29420 # No need to generate them if there are no CONFIG_FILES.
29421 # This happens for instance with `./config.status config.h'.
29422 if test -n "$CONFIG_FILES"; then
29423
29424 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
29425 ac_cs_awk_getline=:
29426 ac_cs_awk_pipe_init=
29427 ac_cs_awk_read_file='
29428 while ((getline aline < (F[key])) > 0)
29429 print(aline)
29430 close(F[key])'
29431 ac_cs_awk_pipe_fini=
29432 else
29433 ac_cs_awk_getline=false
29434 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
29435 ac_cs_awk_read_file='
29436 print "|#_!!_#|"
29437 print "cat " F[key] " &&"
29438 '$ac_cs_awk_pipe_init
29439 # The final `:' finishes the AND list.
29440 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
29441 fi
29442 ac_cr=`echo X | tr X '\015'`
29443 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29444 # But we know of no other shell where ac_cr would be empty at this
29445 # point, so we can use a bashism as a fallback.
29446 if test "x$ac_cr" = x; then
29447 eval ac_cr=\$\'\\r\'
29448 fi
29449 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29450 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29451 ac_cs_awk_cr='\r'
29452 else
29453 ac_cs_awk_cr=$ac_cr
29454 fi
29455
29456 echo 'BEGIN {' >"$tmp/subs1.awk" &&
29457 _ACEOF
29458
29459 # Create commands to substitute file output variables.
29460 {
29461 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
29462 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
29463 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
29464 echo "_ACAWK" &&
29465 echo "_ACEOF"
29466 } >conf$$files.sh &&
29467 . ./conf$$files.sh ||
29468 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29469 rm -f conf$$files.sh
29470
29471 {
29472 echo "cat >conf$$subs.awk <<_ACEOF" &&
29473 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29474 echo "_ACEOF"
29475 } >conf$$subs.sh ||
29476 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29477 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
29478 ac_delim='%!_!# '
29479 for ac_last_try in false false false false false :; do
29480 . ./conf$$subs.sh ||
29481 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29482
29483 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29484 if test $ac_delim_n = $ac_delim_num; then
29485 break
29486 elif $ac_last_try; then
29487 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29488 else
29489 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29490 fi
29491 done
29492 rm -f conf$$subs.sh
29493
29494 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29495 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
29496 _ACEOF
29497 sed -n '
29498 h
29499 s/^/S["/; s/!.*/"]=/
29500 p
29501 g
29502 s/^[^!]*!//
29503 :repl
29504 t repl
29505 s/'"$ac_delim"'$//
29506 t delim
29507 :nl
29508 h
29509 s/\(.\{148\}\)..*/\1/
29510 t more1
29511 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29512 p
29513 n
29514 b repl
29515 :more1
29516 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29517 p
29518 g
29519 s/.\{148\}//
29520 t nl
29521 :delim
29522 h
29523 s/\(.\{148\}\)..*/\1/
29524 t more2
29525 s/["\\]/\\&/g; s/^/"/; s/$/"/
29526 p
29527 b
29528 :more2
29529 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29530 p
29531 g
29532 s/.\{148\}//
29533 t delim
29534 ' <conf$$subs.awk | sed '
29535 /^[^""]/{
29536 N
29537 s/\n//
29538 }
29539 ' >>$CONFIG_STATUS || ac_write_fail=1
29540 rm -f conf$$subs.awk
29541 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29542 _ACAWK
29543 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
29544 for (key in S) S_is_set[key] = 1
29545 FS = "\a"
29546 \$ac_cs_awk_pipe_init
29547 }
29548 {
29549 line = $ 0
29550 nfields = split(line, field, "@")
29551 substed = 0
29552 len = length(field[1])
29553 for (i = 2; i < nfields; i++) {
29554 key = field[i]
29555 keylen = length(key)
29556 if (S_is_set[key]) {
29557 value = S[key]
29558 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29559 len += length(value) + length(field[++i])
29560 substed = 1
29561 } else
29562 len += 1 + keylen
29563 }
29564 if (nfields == 3 && !substed) {
29565 key = field[2]
29566 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
29567 \$ac_cs_awk_read_file
29568 next
29569 }
29570 }
29571 print line
29572 }
29573 \$ac_cs_awk_pipe_fini
29574 _ACAWK
29575 _ACEOF
29576 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29577 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29578 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29579 else
29580 cat
29581 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
29582 || as_fn_error "could not setup config files machinery" "$LINENO" 5
29583 _ACEOF
29584
29585 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29586 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29587 # trailing colons and then remove the whole line if VPATH becomes empty
29588 # (actually we leave an empty line to preserve line numbers).
29589 if test "x$srcdir" = x.; then
29590 ac_vpsub='/^[ ]*VPATH[ ]*=/{
29591 s/:*\$(srcdir):*/:/
29592 s/:*\${srcdir}:*/:/
29593 s/:*@srcdir@:*/:/
29594 s/^\([^=]*=[ ]*\):*/\1/
29595 s/:*$//
29596 s/^[^=]*=[ ]*$//
29597 }'
29598 fi
29599
29600 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29601 fi # test -n "$CONFIG_FILES"
29602
29603 # Set up the scripts for CONFIG_HEADERS section.
29604 # No need to generate them if there are no CONFIG_HEADERS.
29605 # This happens for instance with `./config.status Makefile'.
29606 if test -n "$CONFIG_HEADERS"; then
29607 cat >"$tmp/defines.awk" <<\_ACAWK ||
29608 BEGIN {
29609 _ACEOF
29610
29611 # Transform confdefs.h into an awk script `defines.awk', embedded as
29612 # here-document in config.status, that substitutes the proper values into
29613 # config.h.in to produce config.h.
29614
29615 # Create a delimiter string that does not exist in confdefs.h, to ease
29616 # handling of long lines.
29617 ac_delim='%!_!# '
29618 for ac_last_try in false false :; do
29619 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
29620 if test -z "$ac_t"; then
29621 break
29622 elif $ac_last_try; then
29623 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
29624 else
29625 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29626 fi
29627 done
29628
29629 # For the awk script, D is an array of macro values keyed by name,
29630 # likewise P contains macro parameters if any. Preserve backslash
29631 # newline sequences.
29632
29633 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29634 sed -n '
29635 s/.\{148\}/&'"$ac_delim"'/g
29636 t rset
29637 :rset
29638 s/^[ ]*#[ ]*define[ ][ ]*/ /
29639 t def
29640 d
29641 :def
29642 s/\\$//
29643 t bsnl
29644 s/["\\]/\\&/g
29645 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29646 D["\1"]=" \3"/p
29647 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29648 d
29649 :bsnl
29650 s/["\\]/\\&/g
29651 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29652 D["\1"]=" \3\\\\\\n"\\/p
29653 t cont
29654 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29655 t cont
29656 d
29657 :cont
29658 n
29659 s/.\{148\}/&'"$ac_delim"'/g
29660 t clear
29661 :clear
29662 s/\\$//
29663 t bsnlc
29664 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29665 d
29666 :bsnlc
29667 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29668 b cont
29669 ' <confdefs.h | sed '
29670 s/'"$ac_delim"'/"\\\
29671 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29672
29673 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29674 for (key in D) D_is_set[key] = 1
29675 FS = "\a"
29676 }
29677 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29678 line = \$ 0
29679 split(line, arg, " ")
29680 if (arg[1] == "#") {
29681 defundef = arg[2]
29682 mac1 = arg[3]
29683 } else {
29684 defundef = substr(arg[1], 2)
29685 mac1 = arg[2]
29686 }
29687 split(mac1, mac2, "(") #)
29688 macro = mac2[1]
29689 prefix = substr(line, 1, index(line, defundef) - 1)
29690 if (D_is_set[macro]) {
29691 # Preserve the white space surrounding the "#".
29692 print prefix "define", macro P[macro] D[macro]
29693 next
29694 } else {
29695 # Replace #undef with comments. This is necessary, for example,
29696 # in the case of _POSIX_SOURCE, which is predefined and required
29697 # on some systems where configure will not decide to define it.
29698 if (defundef == "undef") {
29699 print "/*", prefix defundef, macro, "*/"
29700 next
29701 }
29702 }
29703 }
29704 { print }
29705 _ACAWK
29706 _ACEOF
29707 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29708 as_fn_error "could not setup config headers machinery" "$LINENO" 5
29709 fi # test -n "$CONFIG_HEADERS"
29710
29711
29712 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
29713 shift
29714 for ac_tag
29715 do
29716 case $ac_tag in
29717 :[FHLC]) ac_mode=$ac_tag; continue;;
29718 esac
29719 case $ac_mode$ac_tag in
29720 :[FHL]*:*);;
29721 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
29722 :[FH]-) ac_tag=-:-;;
29723 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29724 esac
29725 ac_save_IFS=$IFS
29726 IFS=:
29727 set x $ac_tag
29728 IFS=$ac_save_IFS
29729 shift
29730 ac_file=$1
29731 shift
29732
29733 case $ac_mode in
29734 :L) ac_source=$1;;
29735 :[FH])
29736 ac_file_inputs=
29737 for ac_f
29738 do
29739 case $ac_f in
29740 -) ac_f="$tmp/stdin";;
29741 *) # Look for the file first in the build tree, then in the source tree
29742 # (if the path is not absolute). The absolute path cannot be DOS-style,
29743 # because $ac_f cannot contain `:'.
29744 test -f "$ac_f" ||
29745 case $ac_f in
29746 [\\/$]*) false;;
29747 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29748 esac ||
29749 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29750 esac
29751 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29752 as_fn_append ac_file_inputs " '$ac_f'"
29753 done
29754
29755 # Let's still pretend it is `configure' which instantiates (i.e., don't
29756 # use $as_me), people would be surprised to read:
29757 # /* config.h. Generated by config.status. */
29758 configure_input='Generated from '`
29759 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29760 `' by configure.'
29761 if test x"$ac_file" != x-; then
29762 configure_input="$ac_file. $configure_input"
29763 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29764 $as_echo "$as_me: creating $ac_file" >&6;}
29765 fi
29766 # Neutralize special characters interpreted by sed in replacement strings.
29767 case $configure_input in #(
29768 *\&* | *\|* | *\\* )
29769 ac_sed_conf_input=`$as_echo "$configure_input" |
29770 sed 's/[\\\\&|]/\\\\&/g'`;; #(
29771 *) ac_sed_conf_input=$configure_input;;
29772 esac
29773
29774 case $ac_tag in
29775 *:-:* | *:-) cat >"$tmp/stdin" \
29776 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
29777 esac
29778 ;;
29779 esac
29780
29781 ac_dir=`$as_dirname -- "$ac_file" ||
29782 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29783 X"$ac_file" : 'X\(//\)[^/]' \| \
29784 X"$ac_file" : 'X\(//\)$' \| \
29785 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29786 $as_echo X"$ac_file" |
29787 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29788 s//\1/
29789 q
29790 }
29791 /^X\(\/\/\)[^/].*/{
29792 s//\1/
29793 q
29794 }
29795 /^X\(\/\/\)$/{
29796 s//\1/
29797 q
29798 }
29799 /^X\(\/\).*/{
29800 s//\1/
29801 q
29802 }
29803 s/.*/./; q'`
29804 as_dir="$ac_dir"; as_fn_mkdir_p
29805 ac_builddir=.
29806
29807 case "$ac_dir" in
29808 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29809 *)
29810 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
29811 # A ".." for each directory in $ac_dir_suffix.
29812 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29813 case $ac_top_builddir_sub in
29814 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29815 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29816 esac ;;
29817 esac
29818 ac_abs_top_builddir=$ac_pwd
29819 ac_abs_builddir=$ac_pwd$ac_dir_suffix
29820 # for backward compatibility:
29821 ac_top_builddir=$ac_top_build_prefix
29822
29823 case $srcdir in
29824 .) # We are building in place.
29825 ac_srcdir=.
29826 ac_top_srcdir=$ac_top_builddir_sub
29827 ac_abs_top_srcdir=$ac_pwd ;;
29828 [\\/]* | ?:[\\/]* ) # Absolute name.
29829 ac_srcdir=$srcdir$ac_dir_suffix;
29830 ac_top_srcdir=$srcdir
29831 ac_abs_top_srcdir=$srcdir ;;
29832 *) # Relative name.
29833 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29834 ac_top_srcdir=$ac_top_build_prefix$srcdir
29835 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29836 esac
29837 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29838
29839
29840 case $ac_mode in
29841 :F)
29842 #
29843 # CONFIG_FILE
29844 #
29845
29846 case $INSTALL in
29847 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29848 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
29849 esac
29850 ac_MKDIR_P=$MKDIR_P
29851 case $MKDIR_P in
29852 [\\/$]* | ?:[\\/]* ) ;;
29853 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
29854 esac
29855 _ACEOF
29856
29857 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29858 # If the template does not know about datarootdir, expand it.
29859 # FIXME: This hack should be removed a few years after 2.60.
29860 ac_datarootdir_hack=; ac_datarootdir_seen=
29861 ac_sed_dataroot='
29862 /datarootdir/ {
29863 p
29864 q
29865 }
29866 /@datadir@/p
29867 /@docdir@/p
29868 /@infodir@/p
29869 /@localedir@/p
29870 /@mandir@/p'
29871 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
29872 *datarootdir*) ac_datarootdir_seen=yes;;
29873 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
29874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
29875 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
29876 _ACEOF
29877 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29878 ac_datarootdir_hack='
29879 s&@datadir@&$datadir&g
29880 s&@docdir@&$docdir&g
29881 s&@infodir@&$infodir&g
29882 s&@localedir@&$localedir&g
29883 s&@mandir@&$mandir&g
29884 s&\\\${datarootdir}&$datarootdir&g' ;;
29885 esac
29886 _ACEOF
29887
29888 # Neutralize VPATH when `$srcdir' = `.'.
29889 # Shell code in configure.ac might set extrasub.
29890 # FIXME: do we really want to maintain this feature?
29891 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29892 ac_sed_extra="$ac_vpsub
29893 $extrasub
29894 _ACEOF
29895 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29896 :t
29897 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29898 s|@configure_input@|$ac_sed_conf_input|;t t
29899 s&@top_builddir@&$ac_top_builddir_sub&;t t
29900 s&@top_build_prefix@&$ac_top_build_prefix&;t t
29901 s&@srcdir@&$ac_srcdir&;t t
29902 s&@abs_srcdir@&$ac_abs_srcdir&;t t
29903 s&@top_srcdir@&$ac_top_srcdir&;t t
29904 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
29905 s&@builddir@&$ac_builddir&;t t
29906 s&@abs_builddir@&$ac_abs_builddir&;t t
29907 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
29908 s&@INSTALL@&$ac_INSTALL&;t t
29909 s&@MKDIR_P@&$ac_MKDIR_P&;t t
29910 $ac_datarootdir_hack
29911 "
29912 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
29913 if $ac_cs_awk_getline; then
29914 $AWK -f "$tmp/subs.awk"
29915 else
29916 $AWK -f "$tmp/subs.awk" | $SHELL
29917 fi >$tmp/out \
29918 || as_fn_error "could not create $ac_file" "$LINENO" 5
29919
29920 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
29921 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
29922 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
29923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29924 which seems to be undefined. Please make sure it is defined." >&5
29925 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29926 which seems to be undefined. Please make sure it is defined." >&2;}
29927
29928 rm -f "$tmp/stdin"
29929 case $ac_file in
29930 -) cat "$tmp/out" && rm -f "$tmp/out";;
29931 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
29932 esac \
29933 || as_fn_error "could not create $ac_file" "$LINENO" 5
29934 ;;
29935 :H)
29936 #
29937 # CONFIG_HEADER
29938 #
29939 if test x"$ac_file" != x-; then
29940 {
29941 $as_echo "/* $configure_input */" \
29942 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
29943 } >"$tmp/config.h" \
29944 || as_fn_error "could not create $ac_file" "$LINENO" 5
29945 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
29946 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
29947 $as_echo "$as_me: $ac_file is unchanged" >&6;}
29948 else
29949 rm -f "$ac_file"
29950 mv "$tmp/config.h" "$ac_file" \
29951 || as_fn_error "could not create $ac_file" "$LINENO" 5
29952 fi
29953 else
29954 $as_echo "/* $configure_input */" \
29955 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
29956 || as_fn_error "could not create -" "$LINENO" 5
29957 fi
29958 # Compute "$ac_file"'s index in $config_headers.
29959 _am_arg="$ac_file"
29960 _am_stamp_count=1
29961 for _am_header in $config_headers :; do
29962 case $_am_header in
29963 $_am_arg | $_am_arg:* )
29964 break ;;
29965 * )
29966 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
29967 esac
29968 done
29969 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
29970 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29971 X"$_am_arg" : 'X\(//\)[^/]' \| \
29972 X"$_am_arg" : 'X\(//\)$' \| \
29973 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
29974 $as_echo X"$_am_arg" |
29975 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29976 s//\1/
29977 q
29978 }
29979 /^X\(\/\/\)[^/].*/{
29980 s//\1/
29981 q
29982 }
29983 /^X\(\/\/\)$/{
29984 s//\1/
29985 q
29986 }
29987 /^X\(\/\).*/{
29988 s//\1/
29989 q
29990 }
29991 s/.*/./; q'`/stamp-h$_am_stamp_count
29992 ;;
29993
29994 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
29995 $as_echo "$as_me: executing $ac_file commands" >&6;}
29996 ;;
29997 esac
29998
29999
30000 case $ac_file$ac_mode in
30001 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30002 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30003 # are listed without --file. Let's play safe and only enable the eval
30004 # if we detect the quoting.
30005 case $CONFIG_FILES in
30006 *\'*) eval set x "$CONFIG_FILES" ;;
30007 *) set x $CONFIG_FILES ;;
30008 esac
30009 shift
30010 for mf
30011 do
30012 # Strip MF so we end up with the name of the file.
30013 mf=`echo "$mf" | sed -e 's/:.*$//'`
30014 # Check whether this is an Automake generated Makefile or not.
30015 # We used to match only the files named `Makefile.in', but
30016 # some people rename them; so instead we look at the file content.
30017 # Grep'ing the first line is not enough: some people post-process
30018 # each Makefile.in and add a new line on top of each file to say so.
30019 # Grep'ing the whole file is not good either: AIX grep has a line
30020 # limit of 2048, but all sed's we know have understand at least 4000.
30021 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30022 dirpart=`$as_dirname -- "$mf" ||
30023 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30024 X"$mf" : 'X\(//\)[^/]' \| \
30025 X"$mf" : 'X\(//\)$' \| \
30026 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30027 $as_echo X"$mf" |
30028 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30029 s//\1/
30030 q
30031 }
30032 /^X\(\/\/\)[^/].*/{
30033 s//\1/
30034 q
30035 }
30036 /^X\(\/\/\)$/{
30037 s//\1/
30038 q
30039 }
30040 /^X\(\/\).*/{
30041 s//\1/
30042 q
30043 }
30044 s/.*/./; q'`
30045 else
30046 continue
30047 fi
30048 # Extract the definition of DEPDIR, am__include, and am__quote
30049 # from the Makefile without running `make'.
30050 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30051 test -z "$DEPDIR" && continue
30052 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30053 test -z "am__include" && continue
30054 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30055 # When using ansi2knr, U may be empty or an underscore; expand it
30056 U=`sed -n 's/^U = //p' < "$mf"`
30057 # Find all dependency output files, they are included files with
30058 # $(DEPDIR) in their names. We invoke sed twice because it is the
30059 # simplest approach to changing $(DEPDIR) to its actual value in the
30060 # expansion.
30061 for file in `sed -n "
30062 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30063 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
30064 # Make sure the directory exists.
30065 test -f "$dirpart/$file" && continue
30066 fdir=`$as_dirname -- "$file" ||
30067 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30068 X"$file" : 'X\(//\)[^/]' \| \
30069 X"$file" : 'X\(//\)$' \| \
30070 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30071 $as_echo X"$file" |
30072 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30073 s//\1/
30074 q
30075 }
30076 /^X\(\/\/\)[^/].*/{
30077 s//\1/
30078 q
30079 }
30080 /^X\(\/\/\)$/{
30081 s//\1/
30082 q
30083 }
30084 /^X\(\/\).*/{
30085 s//\1/
30086 q
30087 }
30088 s/.*/./; q'`
30089 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30090 # echo "creating $dirpart/$file"
30091 echo '# dummy' > "$dirpart/$file"
30092 done
30093 done
30094 }
30095 ;;
30096 "mkdirs":C)
30097 for dir in etc lisp ; do
30098 test -d ${dir} || mkdir ${dir}
30099 done
30100 ;;
30101 "epaths":C)
30102 echo creating src/epaths.h
30103 if test "${opsys}" = "mingw32"; then
30104 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
30105 else
30106 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
30107 fi
30108 ;;
30109 "gdbinit":C)
30110 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
30111 echo creating src/.gdbinit
30112 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
30113 fi
30114 ;;
30115
30116 esac
30117 done # for ac_tag
30118
30119
30120 as_fn_exit 0
30121 _ACEOF
30122 ac_clean_files=$ac_clean_files_save
30123
30124 test $ac_write_fail = 0 ||
30125 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
30126
30127
30128 # configure is writing to config.log, and then calls config.status.
30129 # config.status does its own redirection, appending to config.log.
30130 # Unfortunately, on DOS this fails, as config.log is still kept open
30131 # by configure, so config.status won't be able to write to it; its
30132 # output is simply discarded. So we exec the FD to /dev/null,
30133 # effectively closing config.log, so it can be properly (re)opened and
30134 # appended to by config.status. When coming back to configure, we
30135 # need to make the FD available again.
30136 if test "$no_create" != yes; then
30137 ac_cs_success=:
30138 ac_config_status_args=
30139 test "$silent" = yes &&
30140 ac_config_status_args="$ac_config_status_args --quiet"
30141 exec 5>/dev/null
30142 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30143 exec 5>>config.log
30144 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30145 # would make configure fail if this is the last instruction.
30146 $ac_cs_success || as_fn_exit $?
30147 fi
30148 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30150 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30151 fi
30152